Repository navigation
fix: draw text-only focused workspaces without a fill in theme previews - #401
Conversation
The sample bar in theme cards, the Theme page, setup and package pages filled the focused workspace for every indicator but `underline`, including `none`. Gruvbox and Notch use `none`, so their previews showed a block the bar never draws, and Gruvbox's orange block hid its orange focused number. The sample bar now fills the cell only for the `background` indicator, the default, as the bar does. Closes #400
The screens bot now draws Settings > Theme with every bundled theme's card.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Focused workspace rendering and validation Sources/StableBar/ThemeCard.swift, Tests/StableBarTests/ThemeCardTests.swift, scenes/settings-theme.json |
workspaceCell applies the focused label background for the background indicator, not for an unset indicator. The rendering test checks unset, background, and default configurations. The new scene configuration targets the Settings theme view. |
Possibly related PRs
- Seb-GRAF/StableBar#396: Adds the Settings scene format and renderer used by the new scene configuration.
- Seb-GRAF/StableBar#397: Adds scene rendering for pull-request screen comparisons, which can capture the Settings theme view.
Severity of issue fixed: Low
Merge Risk: 
Minimal · up to 984e0
-
No actionable merge-blocking risk remains after resolving the preview configuration concern.
Pre-merge checks: 
3
-
Full details: Description check
-
Explanation
The description includes all required sections: Problem, Changes, Testing, and Merging. It links issue
#400, explains the implementation and rationale, reports automated and manual testing, documents untested areas, states the merge requirement, and ends with the model and harness used.
Full details: Linked Issues check
-
Explanation
PR
#400requires previews to match bar behavior fornoneindicators.ThemeSampleBar.workspaceCellnow fills a focused workspace only when(workspace?.indicator ?? .background) == .background. This removes the fill for Gruvbox and Notch while preserving the default background indicator. The shared component covers the listed theme cards, Settings → Theme preview, setup views, and package views.testSampleBarFillsTheFocusedWorkspaceOnlyForTheBackgroundIndicatorverifiesnone,background, and the default case.
Full details: Out of Scope Changes check
-
Explanation
The changed source and test implement PR
#400. The newscenes/settings-theme.jsonsupports the stated screen-rendering verification for the Settings → Theme preview. No unrelated behavior or theme data changes appear in the whole-PR diff.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Problem
Gruvbox and Notch show the focused workspace by text color alone (
"indicator": "none"). Their theme cards, the large preview on the Theme page, setup's theme cards and a theme's package page still drew a filled block behind it. On Gruvbox the orange block hid the orange focused number. Picking either theme then made the bar look as if it didn't mark the focused workspace.Fixes #400
Changes
fix:ThemeSampleBarfills the focused workspace only for thebackgroundindicator, which is the default when a theme sets none. That is the ruleBarViewfollows. Every preview built onThemeSampleBarfollows: theme cards, the Theme page preview, setup's tour and demo, and package pages.build: a new scene,scenes/settings-theme.json, draws Settings → Theme with every bundled theme's card, so the screens bot shows this change.The themes are unchanged: Notch keeps the text-only focus decided in #127, and the website already draws both themes this way.
Testing
testSampleBarFillsTheFocusedWorkspaceOnlyForTheBackgroundIndicatorrenders the sample bar with a magenta accent. It failed before the fix, with 425 accent pixels fornone. It now finds none fornone, and a fill forbackgroundand for no indicator.swift test --filter "ThemeCardTests|ThemePreviewTests|ThemeGalleryTests|SetupTour|SetupDemo"passes, 29 tests.--render-scenesfrommainand from this branch:Not checked: the setup tour and the package page, which use the same
ThemeSampleBarcode.Merging
Two commits, a
fixand abuild. A merge commit or rebase merge keeps both in the changelog.Claude Opus 5.5 via Claude Code