fix(annotation): localize reviewer result text and stats in English mode#46
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex noreply@openai.com
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Define placement and interaction model for the persistent Help button: - Desktop: sidebar utility row as 3rd button alongside keyboard shortcuts and theme toggle - Mobile: top bar icon button following the existing shortcutHelpBtn pattern - Modal content: reuse existing dashboard onboarding 3-card layout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add REVIEWER_RESULT_TRANSLATIONS lookup and localizeReviewerText() to both annotation-list and annotation-workspace prototypes so that Chinese sample data, label stats, and annotator result tags are translated when the UI is in English mode. Cover all six task types (classification, VA scoring, aspect list, sentence pairs, NER, relation extraction) with Playwright tests that assert translated strings appear and Chinese originals are absent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Review Complete
I've thoroughly reviewed this PR implementing the Annotation List and Annotation Workspace prototype features (spec 015-annotation-workspace). The implementation demonstrates:
Strengths:
- Comprehensive test coverage with 42 Playwright test files covering all major user flows
- Proper adherence to the functional specifications
- Complete internationalization support (English/Chinese)
- Proper routing and state management
- Responsive design considerations for mobile/desktop viewports
- Well-structured HTML templates with semantic markup
Scope:
This PR adds extensive prototype UI implementations for:
- Annotation list views (annotator/reviewer roles)
- Annotation workspace for multiple task types (classification, VA scoring, sequence labeling, relation extraction, sentence pairs)
- Task management interfaces
- Dataset analysis views
- Comprehensive test coverage validating routing, i18n, UI states, and user workflows
No merge-blocking defects were identified. The implementation is ready for merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
Code Review
This pull request implements comprehensive English localization across the prototype, introducing translation mappings for annotation results, chart labels, and risk assessments. It standardizes layout consistency by aligning page headings to a shared baseline and refining container widths across modules. Key UI improvements include replacing image-based chevrons with inline SVGs for better theme inheritance and enhancing mobile navbar responsiveness. Additionally, a robust suite of Playwright tests was added to ensure i18n and visual integrity. Review feedback identifies opportunities to optimize localization performance by pre-sorting translation keys and ensuring consistent punctuation cleanup in the English interface.
- Pre-sort reviewer/result translation keys outside localizeReviewerText and localizeResultText to avoid per-call sorting overhead - Add punctuation cleanup to localizeResultText in task-detail.html - Set html.lang immediately on init before async panel loading to fix English mode race condition in Playwright tests - Append dry-run round label to sampleListTitle in renderSampleListHeader - Fix TS18048: use truthy guard for optional previewInputValues property Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Eliminates a race condition where ensureEnglishMode reads #langLabel as ZH (sidebar default), clicks langToggle, and then bindEvents fires the handler (switching to ZH) just as panels finish loading. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
REVIEWER_RESULT_TRANSLATIONSlookup table andlocalizeReviewerText()helper to bothannotation-listandannotation-workspaceprototypesTest plan
annotation-list-routing.spec.ts— reviewer list localizes label stats and annotator results across 6 task types in English modeannotation-workspace-i18n.spec.ts— reviewer panel localizes aggregate stats and annotator results across 6 task types in English mode🤖 Generated with Claude Code
Review Resolutions
Round 1 — 2026-05-15
design/prototype/pages/annotation/annotation-workspace.html: Pre-sortREVIEWER_RESULT_TRANSLATIONSkeys intoSORTED_REVIEWER_TRANSLATION_KEYSoutsidelocalizeReviewerText; setdocument.documentElement.langimmediately ininit()before async panel loading to fix English-mode race condition; append dry-run round label to#sampleListTitleinrenderSampleListHeaderdesign/prototype/pages/annotation/annotation-list.html: Pre-sortREVIEWER_RESULT_TRANSLATIONSkeys intoSORTED_REVIEWER_TRANSLATION_KEYSoutsidelocalizeReviewerTextdesign/prototype/pages/task-management/task-detail.html: Pre-sortRESULT_LABEL_I18Nkeys outsidelocalizeResultTextand add full-width punctuation cleanup to the return valuedesign/prototype/tests/task-management/task-detail-settings-edit.spec.ts: Replace'previewInputValues' in itemwithitem.previewInputValuesto satisfy TS18048 narrowingRound 2 — 2026-05-15
design/prototype/pages/annotation/annotation-workspace.html: Eagerly update#langLabel/#mobileLangLabelininit()beforeloadAllAnnotationPanels()to eliminate theensureEnglishModetoggle-click race condition where panels completing load mid-click would triggerapplyLang('zh')and fliphtml.langback tozh-TW