Repository navigation
feat(settings): add optional connection color bar along the bottom of the window - #1645
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge I found no new issues since the last review. The commits since then are the connection color bar feature work, theme-based colors and translated strings, plus merges from main. I read the diff of the PR-owned files but did not run any code or tests. Files Reviewed (25 files)
Previous Review Summaries (3 snapshots, latest commit 9ee1aa0)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 9ee1aa0)Status: No Issues Found | Recommendation: Merge I found no issues in the changes since the last review. The new commits switch the bar color to mix toward Files Reviewed (16 files)
Previous review (commit 0578a8d)Status: No Issues Found | Recommendation: Merge I found no issues in the changes since the last review. The new commits only add the Files Reviewed (12 files)
Previous review (commit d613d3b)Status: No Issues Found | Recommendation: Merge I found no issues in the changed code. I reviewed the diff only. I did not run any code or tests, and I did not check the repo's Files Reviewed (13 files)
Reviewed by claude-sonnet-5.5 · Input: 4K · Output: 1.8K · Cached: 201K Review guidance: REVIEW.md from base branch |
|
Added the three new strings to every locale (de, es, fr, it, ja, ko, pt-BR, ru, tl, vi, zh, zh-TW), as the contribution guidelines ask. The translations are AI-assisted, so corrections from native speakers are very welcome. |
debba
left a comment
There was a problem hiding this comment.
Thanks for this one too, it's a nice idea for telling connections apart at a glance! The persistence is complete: the setting is in SettingsContext.ts, in the Rust AppConfig and in the merge_config list, the round-trip test covers it, and old configs read the missing key as None so the bar stays off. I also like that the color comes from the existing getConnectionAccent, so custom accent colors and the driver-color fallback just work, and that the bar is aria-hidden and has its own row in MainLayout.
One thing needs to change before we can merge:
The bar uses hardcoded colors. In utils/connectionColorBar.ts, the fallback is 'lightskyblue' and the accent is mixed with a literal white, and both end up as the bar's inline background. .rules/design.md (rules 1 and 5) asks for colors only through theme tokens, and for light and high-contrast themes to look intentional. A named color slips past pnpm lint:theme because the script only checks hex, rgb()/hsl() and Tailwind palette classes, but it's still a fixed color that ignores the theme: on light themes the no-connection bar comes out pale and washed out. The editor tab bar already solves the same problem with tabBarAccent ?? 'var(--accent-primary)' in Editor.tsx, so falling back to var(--accent-primary) would match. For the brightening, I'd either use the accent as it is or mix it toward a theme token instead of white. Please also drop "Light blue when no connection is selected." from bottomBarDesc in the locales once the fallback changes.
Two small things while you're there:
- The description still says the other locales fall back to English, but your last commit added all the translations. Worth updating.
- Heads-up: this PR and #1647 both add their setting at the same spots (
AppearanceTab.tsx,SettingsContext.ts,config.rs,persistence.rsand the locale files), so whichever one is merged second will need a rebase. The keys are different, so it's just a matter of keeping both sides.
|
Thanks for the review! Fixed in 9ee1aa0:
Noted on the overlap with #1647. Whichever lands second, I'll rebase it and keep both settings. |
|
Caution Review failedThe pull request is closed. No actionable comments were generated in the recent review. Walkthrough
Change: Feature Merge Risk:
|
debba
left a comment
There was a problem hiding this comment.
Thanks for changing both parts of the color mix. I checked the bar in Chromium with no active connection, then opened a SQLite connection with a custom accent. The color changed as expected, and disabling the setting hid the bar after a reload. The 27 focused tests, the theme-token check and all 44 contrast tests passed here.
The color issue from my previous review is fixed. The remaining blocker is the merge conflict with current main. I confirmed conflicts in AppearanceTab.tsx, SettingsContext.ts, the locale files, config.rs and persistence.rs. Could you rebase and keep both sets of settings and translations? I'd like to check the combined Appearance panel before merging.
… the window Adds an Appearance setting that shows a thick, solid bar in a brighter version of the active connection's accent color across the full width of the bottom of the window, making connections easier to tell apart than the faint tint on the tab bar. With no connection selected the bar is light blue in both light and dark themes. Off by default. The bar takes its own row, so the content above it, including the buttons near the bottom, moves up. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Add the Connection color setting strings to every locale, as required by the contribution guidelines. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Fall back to var(--accent-primary) when no connection is active, like the editor tab bar, and mix the accent toward var(--text-primary) instead of white so light and high-contrast themes look intentional. Drop the 'light blue' sentence from the setting description in every locale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
9ee1aa0 to
fd57440
Compare
|
Rebased onto main now that #1644 and #1647 are in. The conflicts were only where both PRs added a setting, so I kept both: |
debba
left a comment
There was a problem hiding this comment.
Thanks for taking care of the rebase and keeping both Appearance settings in all 13 translations. I tried the two controls together in Chrome: I selected vertical tabs, turned the bar on with the keyboard, then switched between two connection colors. Turning the bar off left the vertical layout selected.
The 30 focused frontend tests passed here. I also ran the Rust persistence test and confirmed that both preferences survive a separate settings update. That resolves my last concern. Happy to merge this.
Problem
Connections are only distinguished by a faint tint on the editor tab bar. For users with poor eyesight or low-contrast displays (the motivating case is a relative who uses Tabularis and struggles to see which connection is active), that is hard to see.
Change
A new opt-in setting in Settings → Appearance → Connection color shows a thick (10px), solid bar across the full width of the bottom of the window, in the active connection's accent color (the same color that tints the tab bar), mixed toward the theme's primary text color so it stands out against the background.
var(--accent-primary), like the editor tab bar.var(--text-primary)rather than a fixed color, so it gets lighter on dark themes and a little deeper on light and high-contrast themes.getConnectionAccent.connectionColorBarsetting is added to the frontend settings and the RustAppConfig(and its merge list), with the persistence round-trip test extended.Testing
ConnectionColorBarcomponent (off, theme-accent fallback, active connection), plus a toggle test inAppearanceTaband the persistence test.pnpm lint,tsc -b,pnpm test(all pass) and the Rust persistence test.pnpm tauri dev.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit