Repository navigation
fix(web): make sidebar i18n reactive and refine template card/icon UI - #16646
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThis PR updates template language mapping, sidebar translations, component spacing, icon presentation, and two Korean translation strings. ChangesMiscellaneous UI and i18n tweaks
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change updates reactive sidebar translations and refines template, upload, and parsing-status presentation without changing backend behavior or user permissions; no actionable merge-blocking risk remains. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/src/pages/agents/template-card.tsx (1)
23-31: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
languageneeds to track the current locale
useMemois caching a value derived fromi18n.languagewith an empty dependency list, so the template title/description/avatar name andlangattribute can stay on the initial locale after a language switch. Addi18n.languageto the dependencies or derivelanguagedirectly.🤖 Prompt for 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. In `@web/src/pages/agents/template-card.tsx` around lines 23 - 31, The language value in TemplateCard is memoized with an empty dependency list, so it can stay stuck on the initial locale after a language switch. Update the `useMemo` in `template-card.tsx` to depend on `i18n.language`, or remove the memo and derive `language` directly so the template title, description, avatar name, and `lang` attribute always reflect the current locale.
🤖 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.
Outside diff comments:
In `@web/src/pages/agents/template-card.tsx`:
- Around line 23-31: The language value in TemplateCard is memoized with an
empty dependency list, so it can stay stuck on the initial locale after a
language switch. Update the `useMemo` in `template-card.tsx` to depend on
`i18n.language`, or remove the memo and derive `language` directly so the
template title, description, avatar name, and `lang` attribute always reflect
the current locale.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 80991801-a8a3-43ce-9952-7b22ec4fa64e
📒 Files selected for processing (5)
web/src/components/file-uploader.tsxweb/src/locales/ko.tsweb/src/pages/agents/template-card.tsxweb/src/pages/agents/template-sidebar.tsxweb/src/pages/dataset/dataset/parsing-status-cell.tsx
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/src/components/card-container.tsx (1)
15-15: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider padding instead of an empty spacer element.
An extra
aria-hiddengrid child solely for a bottom gap can be replaced withpb-6(or similar) on the container div, avoiding an unnecessary DOM node for pure spacing.♻️ Alternative using padding
<div className={cn( - 'grid gap-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 auto-rows-auto content-start', + 'grid gap-6 pb-6 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5 auto-rows-auto content-start', className, )} > {children} - <div className="col-span-full h-6" aria-hidden="true" /> </div>🤖 Prompt for 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. In `@web/src/components/card-container.tsx` at line 15, Replace the empty spacer element in card-container with container padding instead of an extra grid child. Update the wrapping div in the card container component to use bottom padding (for example, pb-6) and remove the aria-hidden spacer node so spacing is handled by the parent layout. Keep the change localized to the card-container component and preserve the existing grid behavior.
🤖 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.
Nitpick comments:
In `@web/src/components/card-container.tsx`:
- Line 15: Replace the empty spacer element in card-container with container
padding instead of an extra grid child. Update the wrapping div in the card
container component to use bottom padding (for example, pb-6) and remove the
aria-hidden spacer node so spacing is handled by the parent layout. Keep the
change localized to the card-container component and preserve the existing grid
behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: db1a1f25-6fd1-40b5-8dda-9a2f77fb9a2a
📒 Files selected for processing (1)
web/src/components/card-container.tsx
|
@dcc123456 I just wanted to gently follow up in case this got buried under other activity. Whenever you have a moment, I'd really appreciate a review. Thanks! |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
Several UI fixes in the agent template and dataset table components:
template-sidebar.tsx) were computed once at module load usingi18next'stdirectly, so they never updated on language change. MovedmenuItemsinto the component withuseTranslation+useMemoso labels re-render reactively.w-1/3width; replaced withmax-w-[280px]andwhitespace-normalso the label wraps instead of being cut off.FileText) looked too bold at this size; addedstrokeWidth={1}to match the rest of the icon set.<sup>for a question-mark icon, which superscripted and misaligned it; replaced with an inline-flex<span>and reduced icon size to align with the percentage text.