feat(memory): align Create Memory modal layout and spacing with Create Variable modal design system#13287
Conversation
…e Variable modal design system
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdded English translation keys for memory-related form labels ( ChangesMemory Modal i18n Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (7 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (40.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release-1.10.0 #13287 +/- ##
==================================================
+ Coverage 55.80% 55.92% +0.12%
==================================================
Files 2179 2179
Lines 206451 207190 +739
Branches 29457 32369 +2912
==================================================
+ Hits 115203 115872 +669
- Misses 89895 89966 +71
+ Partials 1353 1352 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 `@src/frontend/src/modals/createMemoryModal/index.tsx`:
- Around line 99-101: Several user-facing strings in createMemoryModal (the
"Provider:" label next to selectedEmbeddingModel[0].provider, the "LLM
Preprocessing" heading, its descriptive text, and the batch-size help aria-label
at the batch-size control) remain hardcoded; replace each literal with the
appropriate i18n translation key using the same translation function/hook
already used in this file (e.g., t(...) or translate(...)). Update the JSX nodes
that render "Provider:", the LLM preprocessing title and description, and the
aria-label on the batch-size control so they call the translation helper with
clear keys (e.g., memory.modal.provider, memory.modal.llmPreprocessing.title,
memory.modal.llmPreprocessing.description, memory.modal.batchSize.help) and keep
selectedEmbeddingModel[0].provider as the dynamic value. Ensure
pluralization/context keys match other translations and run the app to verify
the strings are pulled from the locale files.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9117eb1b-5694-429a-bc44-3666a92c8d45
📒 Files selected for processing (2)
src/frontend/src/locales/en.jsonsrc/frontend/src/modals/createMemoryModal/index.tsx
| <div className="text-xs text-muted-foreground"> | ||
| Provider: {selectedEmbeddingModel[0].provider} | ||
| </span> | ||
| </div> |
There was a problem hiding this comment.
Replace remaining hardcoded modal copy with translation keys.
A few user-facing strings are still hardcoded in the refactored modal (Provider:, LLM Preprocessing, preprocessing description, and the batch-size help aria-label), which leaves this dialog partially untranslated.
Suggested patch
@@
- <div className="text-xs text-muted-foreground">
- Provider: {selectedEmbeddingModel[0].provider}
- </div>
+ <div className="text-xs text-muted-foreground">
+ {t("memory.providerLabel")} {selectedEmbeddingModel[0].provider}
+ </div>
@@
- aria-label="Batch size help"
+ aria-label={t("memory.batchSizeHelpAriaLabel")}
@@
- LLM Preprocessing
+ {t("memory.preprocessingToggleLabel")}
@@
- Summarize messages with an LLM before ingestion
+ {t("memory.preprocessingToggleDescription")}
@@
- <div className="text-xs text-muted-foreground">
- Provider: {selectedPreprocessingModel[0].provider}
- </div>
+ <div className="text-xs text-muted-foreground">
+ {t("memory.providerLabel")} {selectedPreprocessingModel[0].provider}
+ </div>--- a/src/frontend/src/locales/en.json
+++ b/src/frontend/src/locales/en.json
@@
"memory.batchSize": "Batch Size",
+ "memory.batchSizeHelpAriaLabel": "Batch size help",
@@
"memory.preprocessing": "Preprocessing:",
+ "memory.preprocessingToggleLabel": "LLM Preprocessing",
+ "memory.preprocessingToggleDescription": "Summarize messages with an LLM before ingestion",Also applies to: 115-116, 145-149, 177-179
🤖 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 `@src/frontend/src/modals/createMemoryModal/index.tsx` around lines 99 - 101,
Several user-facing strings in createMemoryModal (the "Provider:" label next to
selectedEmbeddingModel[0].provider, the "LLM Preprocessing" heading, its
descriptive text, and the batch-size help aria-label at the batch-size control)
remain hardcoded; replace each literal with the appropriate i18n translation key
using the same translation function/hook already used in this file (e.g., t(...)
or translate(...)). Update the JSX nodes that render "Provider:", the LLM
preprocessing title and description, and the aria-label on the batch-size
control so they call the translation helper with clear keys (e.g.,
memory.modal.provider, memory.modal.llmPreprocessing.title,
memory.modal.llmPreprocessing.description, memory.modal.batchSize.help) and keep
selectedEmbeddingModel[0].provider as the dynamic value. Ensure
pluralization/context keys match other translations and run the app to verify
the strings are pulled from the locale files.
…, and scrollbar position in Create Memory modal
…, and scrollbar position in Create Memory modal
Align Create Memory modal with Create Variable modal design
The Create Memory modal was inconsistent with the Create Variable modal,
which is the established design reference for form modals in the platform.
Spacing, sizing, label patterns, and structural conventions all diverged.
What changed
small-h-full→x-smallto match the compact form modal standardgap-6→gap-4to match platform conventionflex flex-col gap-2→space-y-2for consistency*) from required labels — not used inthe reference modal
field (was always full-width regardless of breakpoint)
(
h-6 w-6 pr-1 text-primary) used in Create Variablespantodivto match the hintpattern used elsewhere in the modal system
memory.nameLabel,memory.embeddingModelLabel,memory.preprocessingModelLabel,memory.preprocessingInstructionsLabelNo logic or functionality was changed.
Test plan
spacing, label style, and modal width
preprocessing model, preprocessing instructions) render and function correctly
screenshot
Before


After
Summary by CodeRabbit