Skip to content

Tag Filter - #295

Merged
mirumodapon merged 5 commits into
mainfrom
feat/language-tag
Jul 26, 2026
Merged

Tag Filter #295
mirumodapon merged 5 commits into
mainfrom
feat/language-tag

Conversation

@mirumodapon

@mirumodapon mirumodapon commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Session filter tags now display localized names in English and Chinese.
    • Imported session data now normalizes language labels and includes language and difficulty tags more consistently.
  • Bug Fixes

    • Added fallback labels for unrecognized tags.
    • Standardized tag names across session filters and imported session information.

Copilot AI review requested due to automatic review settings July 25, 2026 08:59
@rileychh-dokploy-coscup

rileychh-dokploy-coscup Bot commented Jul 25, 2026

Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ✅ Done Preview URL 2026-07-25T09:02:16.234Z

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mirumodapon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ec5f735-c464-4739-a8d5-63011f23b4a4

📥 Commits

Reviewing files that changed from the base of the PR and between 95075d6 and 613528a.

📒 Files selected for processing (5)
  • app/composables/useSessionFilter.ts
  • server/utils/opass/tags.ts
  • server/utils/pretalx/parser.ts
  • server/utils/pretalx/sessions.ts
  • shared/utils/session.ts
📝 Walkthrough

Walkthrough

The change centralizes bilingual tag names, normalizes Pretalx language values, appends language and difficulty tags to session summaries, and localizes session filter labels.

Changes

Session tag localization

Layer / File(s) Summary
Shared tag label contract
shared/utils/session.ts, server/utils/opass/tags.ts
Bilingual TAG_NAMES data is centralized in the shared session utility and used by Opass tag construction.
Pretalx language and tag normalization
server/utils/pretalx/parser.ts
parseLanguage canonicalizes language values, while parseTags accepts appended tag strings.
Session summary and filter integration
server/utils/pretalx/sessions.ts, app/composables/useSessionFilter.ts
Session summaries include parsed language and difficulty tags, and filters display localized type and tag labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Pretalx
  participant buildSessionSummary
  participant parseLanguage
  participant parseTags
  participant SessionFilter
  Pretalx->>buildSessionSummary: session answers and tag IDs
  buildSessionSummary->>parseLanguage: raw language
  parseLanguage-->>buildSessionSummary: canonical language
  buildSessionSummary->>parseTags: tag IDs plus language and difficulty
  parseTags-->>buildSessionSummary: normalized session tags
  buildSessionSummary->>SessionFilter: session summary
  SessionFilter->>SessionFilter: localize type and tag labels
Loading

Possibly related PRs

  • COSCUP/2026#215: Modifies related Pretalx session and tag shaping used by session display components.
  • COSCUP/2026#221: Modifies the multilingual TAG_NAMES mapping in the same Opass tag utility.

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the changes, but it is too generic to show the main update. Use a more specific title, such as adding tag localization or session tag parsing to describe the main change.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/language-tag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds localized, user-friendly “tag filter” labels for sessions by centralizing tag display names and appending normalized language/difficulty into each session’s tag list, so the UI can render consistent multi-lingual filter options.

Changes:

  • Introduces shared TAG_NAMES mapping for language + difficulty labels and uses it in both the app session filter and OPass tag generation.
  • Appends normalized difficulty + language into SessionSummary.tags via updated pretalx parsing (parseTags, new parseLanguage).
  • Updates the session filter composable to render tag labels in the current locale.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
shared/utils/session.ts Adds centralized TAG_NAMES mapping for multi-lingual tag labels.
server/utils/pretalx/sessions.ts Appends normalized difficulty + language into session tags and normalizes language.
server/utils/pretalx/parser.ts Generalizes parseTags to accept appended tags and adds parseLanguage.
server/utils/opass/tags.ts Reuses shared TAG_NAMES for OPass tag dictionary labels.
app/composables/useSessionFilter.ts Uses TAG_NAMES to display localized tag labels in filter options.
Comments suppressed due to low confidence (1)

server/utils/pretalx/parser.ts:165

  • parseLanguage() lowercases the input but compares against mixed-case strings (e.g. Mandarin), so some values will never match. It also has a duplicate lang === 'chinese' check, making the later Chinese branch unreachable. This will incorrectly normalize some languages and affect both SessionSummary.language and the appended language tag.
export function parseLanguage(language: string | undefined): string | undefined {
  if (!language) {
    return undefined
  }


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread shared/utils/session.ts
Comment on lines +1 to +16
// 各通用鍵(語言 + 難度)的多語顯示名稱(沿用 2025 tagTranslations)。
export const TAG_NAMES: Record<string, { zh: string, en: string }> = {
'zh-tw': { zh: '漢語', en: 'Mandarin' },
'en': { zh: '英語', en: 'English' },
'ja-JP': { zh: '日本語', en: '日本語' },
'others': { zh: '其他', en: '其他' },
'Elementary': { zh: '入門', en: 'Elementary' },
'Intermediate': { zh: '中階', en: 'Intermediate' },
'Advanced': { zh: '進階', en: 'Advanced' },
'Professional': { zh: '專業', en: 'Professional' },
'Chinese': { zh: '中國語', en: 'Chinese' },
'English': { zh: '英語', en: 'English' },
'Japanese': { zh: '日本語', en: '日本語' },
'Mandarin': { zh: '中文', en: 'Mandarin' },
'Taiwanese': { zh: '台語', en: '台語' },
}
Comment thread server/utils/pretalx/parser.ts
Comment thread server/utils/opass/tags.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@server/utils/pretalx/parser.ts`:
- Around line 161-184: Fix the conditional mappings in parseLanguage after
lowercasing: use lowercase comparisons consistently, including the Mandarin
alias, and ensure Chinese inputs map to “Chinese” rather than being captured by
the Mandarin branch. Preserve the existing English and Japanese mappings and the
“others” fallback.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6703f299-7b27-40ca-b906-e97f41ff4ac2

📥 Commits

Reviewing files that changed from the base of the PR and between e4b0a7f and 95075d6.

📒 Files selected for processing (5)
  • app/composables/useSessionFilter.ts
  • server/utils/opass/tags.ts
  • server/utils/pretalx/parser.ts
  • server/utils/pretalx/sessions.ts
  • shared/utils/session.ts

Comment thread server/utils/pretalx/parser.ts
@mirumodapon
mirumodapon merged commit 1c696df into main Jul 26, 2026
2 checks passed
@mirumodapon
mirumodapon deleted the feat/language-tag branch July 26, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants