Skip to content

Fix tab color being lost when OS switches from light to dark mode#627

Open
schneidermayer wants to merge 1 commit intognachman:masterfrom
schneidermayer:fix-tab-color-appearance
Open

Fix tab color being lost when OS switches from light to dark mode#627
schneidermayer wants to merge 1 commit intognachman:masterfrom
schneidermayer:fix-tab-color-appearance

Conversation

@schneidermayer
Copy link
Copy Markdown

@schneidermayer schneidermayer commented Mar 25, 2026

This fixes a small but annoying tab-color bug.

If a session tab color is set while OS is in Light mode, and the profile uses Use separate colors for light and dark mode, switching macOS to Dark mode can make the tab color disappear. Switching back to Light brings it back.

This is pretty annoying. I have 10+ tabs color coded, and when sun sets, I lose all my colors and have to manually set them again.

The root cause was an asymmetry between the write and read paths. The tab color was written only to the active appearance variant, but later read only from the current variant and then the shared unsuffixed key. For session-specific overrides, that shared key is usually unset.

This change keeps the fix scoped to tab colors. Tab-color reads now try:

  • the current appearance key
  • the opposite appearance key
  • the shared key
    (→ This mechanic still allows different tab colors for both OS themes. Personally, I think one global Tab color would cover the use cases and simplify things. I just was not confident to decide this on myself, so the fix leaves the core principle untouched. Maybe @gnachman has an opinion, if one global Tab color is even better? :-))

Testing

  • Reproduced the bug locally in the Development build
  • Verified that a custom tab color set in Light mode stays visible after switching to Dark mode, and still looks correct after switching back

I also added focused regression tests for the tab-color resolver logic.

@schneidermayer schneidermayer changed the title Fix session tab color across appearance changes Fix tab color being lost when OS switches from light to dark mode Mar 25, 2026
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.

1 participant