fix(app): align memory textarea border and radius with DESIGN.md tokens - #565
Conversation
📝 WalkthroughWalkthroughTwo styling token changes in SettingsMemory: the profile "too large" warning panel background changed to ChangesSettingsMemory styling updates
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested Labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Code Review
This pull request updates the styling of the raw memory settings textarea in settings-memory.tsx by replacing unregistered or hardcoded Tailwind classes with theme-specific tokens for borders, backgrounds, and border-radius. The reviewer recommends extending these updates to other parts of the component for consistency, specifically suggesting the use of standard Tailwind tokens like rounded-md instead of arbitrary CSS variables and addressing remaining instances of unregistered background classes.
…ection bg-bg-panel has no --color-bg-panel in tailwind/colors.css; silently no-ops. Replace with bg-surface-base (same fix as memory textarea in same commit).
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/app/src/components/settings-memory.tsx (1)
126-126: ⚡ Quick winUse Tailwind v4 CSS variable shorthand syntax for consistency.
Line 126 uses
rounded-[var(--radius-md)], which is valid but verbose. Tailwind v4 recommends the shorthandrounded-(--radius-md)for consistency with v4 conventions. Both compile identically, but the shorthand form aligns with v4 idioms.Suggested change
- class="min-h-[360px] w-full rounded-[var(--radius-md)] border border-border-weak bg-surface-base p-3 font-mono text-13-regular text-fg-strong" + class="min-h-[360px] w-full rounded-(--radius-md) border border-border-weak bg-surface-base p-3 font-mono text-13-regular text-fg-strong"🤖 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 `@packages/app/src/components/settings-memory.tsx` at line 126, Update the Tailwind class in the settings-memory component to use Tailwind v4's CSS variable shorthand: replace the verbose rounded-[var(--radius-md)] usage in the element's class attribute with the v4 shorthand rounded-(--radius-md) so it matches v4 idioms while keeping the same effect; locate the class string on the element in settings-memory.tsx (the one containing min-h-[360px] w-full rounded-[var(--radius-md)] border ...) and swap only the rounded token.
🤖 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 `@packages/app/src/components/settings-memory.tsx`:
- Line 126: Update the Tailwind class in the settings-memory component to use
Tailwind v4's CSS variable shorthand: replace the verbose
rounded-[var(--radius-md)] usage in the element's class attribute with the v4
shorthand rounded-(--radius-md) so it matches v4 idioms while keeping the same
effect; locate the class string on the element in settings-memory.tsx (the one
containing min-h-[360px] w-full rounded-[var(--radius-md)] border ...) and swap
only the rounded token.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a7632ca6-f0ed-4319-9cd1-db93bb056ede
📒 Files selected for processing (1)
packages/app/src/components/settings-memory.tsx
|
Linked Issues check: The earlier PR draft body contained a reference to `Closes #34` which was a Slock-internal task number (since removed). `gh pr view 565 --json closingIssuesReferences` returns an empty array — there is no actual linked GitHub issue. The warning should be stale. Out of Scope Changes: The `bg-bg-panel` fix at line 114 is intentional scope expansion, not incidental. It is the same bug as the textarea fix: `--color-bg-panel` does not exist in `tailwind/colors.css`, so the token silently no-ops. Treating a sibling same-file same-bug as a separate PR would be artificial scope splitting for a 1-line change. The PR description now explicitly notes this, and a follow-up issue (#566) tracks the separate `rounded` radius consistency question. Docstring Coverage: Not applicable to this PR — styling-only change with no new functions or methods added; existing functions in the file are unchanged. |
|
Tip For best results, initiate chat on the files or code changes.
✏️ Learnings added
|
Summary
Align
settings-memory.tsxCSS tokens with DESIGN.md and registered Tailwind tokens. Two lines changed in one file.rounded→rounded-[var(--radius-md)]on textarea (DESIGN.md: input radius is--radius-md= 10px; barerounded= 4px Tailwind default)border-border→border-border-weakon textarea (DESIGN.md: input fields use--border-weak)bg-bg-panel→bg-surface-baseon textarea and profileTooLarge section (both):--color-bg-panelis not registered intailwind/colors.css; it silently no-ops.bg-surface-baseis the correct input/surface background token.Why
The memory textarea and profileTooLarge warning section were referencing an unregistered Tailwind color token (
bg-bg-panel), causing silent style failures. The textarea also used incorrect border and radius defaults that do not match DESIGN.md input spec.Related Issue
No corresponding GitHub issue. Follow-up issue #566 tracks
roundedradius consistency audit for the alert/banner sections.Human Review Status
Opus second-pass: pass.
AstroHan waived visual review (trivial token-only fix, confirmed in Slock thread).
Review Focus
tailwind/colors.cssandtheme.cssRisk Notes
None. Pure CSS token substitution; no logic, schema, or API changes.
bg-bg-panelwas already silently no-op, so there is no visual regression risk from removing it.How To Verify
Screenshots or Recordings
Visual review waived by maintainer for this token-only fix.
bg-bg-panelwas a silent no-op (no visible change when replaced), and textarea border/radius changes are cosmetic alignment to existing DESIGN.md spec.Checklist
dev, and my PR title and commit messages use Conventional Commits in English