Skip to content

feat(settings): add optional connection color bar along the bottom of the window - #1645

Merged
debba merged 3 commits into
TabularisDB:mainfrom
GoodGaming2511:feat/connection-color-bottom-bar
Nov 24, 2026
Merged

debba merged 3 commits into
TabularisDB:mainfrom
GoodGaming2511:feat/connection-color-bottom-bar

Conversation

@GoodGaming2511

@GoodGaming2511 GoodGaming2511 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Off by default, so nothing changes for existing users.
  • The bar takes its own row below the whole layout, so everything above it, including the buttons near the bottom of the sidebar and activity strip, moves up.
  • With no connection selected the bar falls back to var(--accent-primary), like the editor tab bar.
  • All colors come from theme tokens: the accent is mixed with 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.
  • The color follows per-connection accent overrides, falling back to the driver color, via the existing getConnectionAccent.
  • New connectionColorBar setting is added to the frontend settings and the Rust AppConfig (and its merge list), with the persistence round-trip test extended.
  • Strings added to every locale. The non-English translations are AI-assisted, so native-speaker corrections are welcome.

Testing

  • Unit tests for the color helper and the ConnectionColorBar component (off, theme-accent fallback, active connection), plus a toggle test in AppearanceTab and the persistence test.
  • pnpm lint, tsc -b, pnpm test (all pass) and the Rust persistence test.
  • Manually checked in pnpm tauri dev.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • Added an optional colored bar along the bottom of the app to identify the active connection. Enable it in Appearance settings.
    • The bar uses the active connection’s color, or the theme accent when no connection is selected.
    • The setting is off by default and available in multiple languages.

@kilo-code-bot

kilo-code-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 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)
  • packages/web-ui/src/components/layout/ConnectionColorBar.tsx
  • packages/web-ui/src/components/layout/MainLayout.tsx
  • packages/web-ui/src/components/settings/AppearanceTab.tsx
  • packages/web-ui/src/utils/connectionColorBar.ts
  • packages/web-ui/src/contexts/SettingsContext.ts
  • packages/web-ui/src/i18n/locales/*.json (13 files)
  • src-tauri/src/application/persistence.rs, src-tauri/src/config.rs
  • Related tests
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 --text-primary and default to --accent-primary. They also update the matching tests and drop the "light blue" sentence from the bottomBarDesc strings in 13 locale files. I read the diff but did not run any code or tests.

Files Reviewed (16 files)
  • packages/web-ui/src/utils/connectionColorBar.ts
  • packages/web-ui/tests/utils/connectionColorBar.test.ts
  • packages/web-ui/tests/components/layout/ConnectionColorBar.test.tsx
  • packages/web-ui/src/i18n/locales/*.json (13 locale files, including en)

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 connectionColor translation keys to 12 locale files. I read the diff and spot-checked the de and ja entries; I did not run any code or tests.

Files Reviewed (12 files)
  • packages/web-ui/src/i18n/locales/de.json
  • packages/web-ui/src/i18n/locales/es.json
  • packages/web-ui/src/i18n/locales/fr.json
  • packages/web-ui/src/i18n/locales/it.json
  • packages/web-ui/src/i18n/locales/ja.json
  • packages/web-ui/src/i18n/locales/ko.json
  • packages/web-ui/src/i18n/locales/pt-BR.json
  • packages/web-ui/src/i18n/locales/ru.json
  • packages/web-ui/src/i18n/locales/tl.json
  • packages/web-ui/src/i18n/locales/vi.json
  • packages/web-ui/src/i18n/locales/zh-TW.json
  • packages/web-ui/src/i18n/locales/zh.json

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 .rules/ against the change.

Files Reviewed (13 files)
  • packages/web-ui/src/components/layout/ConnectionColorBar.tsx
  • packages/web-ui/src/components/layout/MainLayout.tsx
  • packages/web-ui/src/components/settings/AppearanceTab.tsx
  • packages/web-ui/src/contexts/SettingsContext.ts
  • packages/web-ui/src/i18n/locales/en.json
  • packages/web-ui/src/utils/connectionColorBar.ts
  • packages/web-ui/tests/components/layout/ConnectionColorBar.test.tsx
  • packages/web-ui/tests/components/layout/MainLayout.test.tsx
  • packages/web-ui/tests/components/settings/AppearanceTab.test.tsx
  • packages/web-ui/tests/utils/connectionColorBar.test.ts
  • src-tauri/src/application/persistence.rs
  • src-tauri/src/application/persistence_tests.rs
  • src-tauri/src/config.rs

Reviewed by claude-sonnet-5.5 · Input: 4K · Output: 1.8K · Cached: 201K

Review guidance: REVIEW.md from base branch main

@GoodGaming2511

Copy link
Copy Markdown
Contributor Author

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 debba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The description still says the other locales fall back to English, but your last commit added all the translations. Worth updating.
  2. Heads-up: this PR and #1647 both add their setting at the same spots (AppearanceTab.tsx, SettingsContext.ts, config.rs, persistence.rs and 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.

@GoodGaming2511

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Fixed in 9ee1aa0:

  • With no connection active, the bar falls back to var(--accent-primary), like the editor tab bar.
  • The accent is mixed toward var(--text-primary) instead of white. It comes out lighter on dark themes and a little deeper on light and high-contrast ones, so it still stands out against the background. There are no fixed colors left.
  • Removed the light-blue sentence from bottomBarDesc in all 13 locales.
  • Description updated (theme-token colors, and the translations are in).

Noted on the overlap with #1647. Whichever lands second, I'll rebase it and keep both settings.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

No actionable comments were generated in the recent review.

Walkthrough

Changes: Connection color bar

Layer / File(s) Summary
Setting contract and persistence
packages/web-ui/src/contexts/SettingsContext.ts, src-tauri/src/config.rs, src-tauri/src/application/persistence.rs, src-tauri/src/application/persistence_tests.rs
The web settings and application configuration include the preference, which defaults to false. Config merging and persistence tests cover retaining it during an unrelated update.
Appearance control and translations
packages/web-ui/src/components/settings/AppearanceTab.tsx, packages/web-ui/src/i18n/locales/*.json, packages/web-ui/tests/components/settings/AppearanceTab.test.tsx
The General appearance tab provides a toggle for the preference. Locale files add its labels and description. Tests cover its default and explicit values and keyboard activation.
Color resolution and layout
packages/web-ui/src/utils/connectionColorBar.ts, packages/web-ui/src/components/layout/ConnectionColorBar.tsx, packages/web-ui/src/components/layout/MainLayout.tsx, packages/web-ui/tests/utils/connectionColorBar.test.ts, packages/web-ui/tests/components/layout/ConnectionColorBar.test.tsx, packages/web-ui/tests/components/layout/MainLayout.test.tsx
The bar resolves its color from the active connection and driver, and renders below the main layout when enabled. Tests cover color resolution, rendering states, and layout integration.

Suggested reviewers: debba, lejyfps

Change: Feature

Merge Risk: Minimal · up to fd574

This adds an optional, off-by-default colored bar at the bottom of the window, along with a setting to turn it on. No merge-blocking risk is evident from the supplied changes.

Security architecture risk: Minimal · up to fd574

The indicator is off by default, works with existing settings, and does not change which database is active or what the user can do. Reverting to an older version may reset the indicator preference if that version rewrites settings, but does not change connection access.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The new visual effect spans screens hosted by MainLayout. The indicator uses existing connection context to set a background color; it does not select a connection or submit a database operation.

Trust Boundaries and Controls

  • observed — The changed Appearance control supplies a fixed key and a boolean to the existing configuration command. The backend adds that key to the existing merge rather than creating a new write path.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c6998fb8-e594-44fe-89c0-7f8256b37a7a
Commits

Reviewing files that changed from the base of the PR and between a676f5a and 9ee1aa0.

Files selected for processing: 25

  • packages/web-ui/src/components/layout/ConnectionColorBar.tsx
  • packages/web-ui/src/components/layout/MainLayout.tsx
  • packages/web-ui/src/components/settings/AppearanceTab.tsx
  • packages/web-ui/src/contexts/SettingsContext.ts
  • packages/web-ui/src/i18n/locales/de.json
  • packages/web-ui/src/i18n/locales/en.json
  • packages/web-ui/src/i18n/locales/es.json
  • packages/web-ui/src/i18n/locales/fr.json
  • packages/web-ui/src/i18n/locales/it.json
  • packages/web-ui/src/i18n/locales/ja.json
  • packages/web-ui/src/i18n/locales/ko.json
  • packages/web-ui/src/i18n/locales/pt-BR.json
  • packages/web-ui/src/i18n/locales/ru.json
  • packages/web-ui/src/i18n/locales/tl.json
  • packages/web-ui/src/i18n/locales/vi.json
  • packages/web-ui/src/i18n/locales/zh-TW.json
  • packages/web-ui/src/i18n/locales/zh.json
  • packages/web-ui/src/utils/connectionColorBar.ts
  • packages/web-ui/tests/components/layout/ConnectionColorBar.test.tsx
  • packages/web-ui/tests/components/layout/MainLayout.test.tsx
  • packages/web-ui/tests/components/settings/AppearanceTab.test.tsx
  • packages/web-ui/tests/utils/connectionColorBar.test.ts
  • src-tauri/src/application/persistence.rs
  • src-tauri/src/application/persistence_tests.rs
  • src-tauri/src/config.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@GoodGaming2511

Copy link
Copy Markdown
Contributor Author

@debba The hardcoded colors are fixed in 9ee1aa0 (details in my comment above), so this should be ready for a re-review whenever you have time. Thanks!

@debba debba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

GoodGaming2511 and others added 3 commits November 24, 2026 07:16
… 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]>
@GoodGaming2511
GoodGaming2511 force-pushed the feat/connection-color-bottom-bar branch from 9ee1aa0 to fd57440 Compare November 24, 2026 07:24
@GoodGaming2511

Copy link
Copy Markdown
Contributor Author

Rebased onto main now that #1644 and #1647 are in. The conflicts were only where both PRs added a setting, so I kept both: tabLayout and connectionColorBar sit side by side in AppearanceTab.tsx, SettingsContext.ts, config.rs, persistence.rs and all 13 locales. pnpm lint, pnpm typecheck, pnpm test, the Rust persistence tests and cargo check --no-default-features all pass.

@debba debba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@debba
debba merged commit cb4b999 into TabularisDB:main Nov 24, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants