Skip to content

fix: show Countdown and Join in Settings after picking it - #940

Merged
M4n0x merged 2 commits into
stablebox:mainfrom
MaHofseth:fix/937-calendar-display-choice
Nov 26, 2026
Merged

M4n0x merged 2 commits into
stablebox:mainfrom
MaHofseth:fix/937-calendar-display-choice

Conversation

@MaHofseth

@MaHofseth MaHofseth commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

After you choose Countdown and Join under a calendar widget's Display > Show, Settings reads Custom layout, although the bar draws the chosen layout.

Fixes #937

Changes

  • The choice's layout contains @token.warning, which loading the configuration replaces with the theme's color. The picker compared that loaded layout with the choice as written. WidgetLayoutChoice.current now resolves each choice with the same tokens before comparing. The saved layout keeps the token, so the countdown still follows the theme.
  • A new test loads every clock and calendar choice, with the Built-in theme's warning color and with one the file sets, and checks that Settings names it.
  • The settings-calendar-picker scene now uses Countdown and Join, so the screens bot draws what the picker reads for it.

Setup's Meetings widget writes the same layout, so this should also correct its picker (not checked in the app). No configuration property changes, and the guide already describes both choices.

Before:

Screen.Recording.2026-11-26.at.01.24.52.mov

After:
image

Testing

  • With the old comparison moved unchanged into current, the new test failed because Countdown and Join matched no choice. It passes with the fix.
  • swift build --build-tests passes, as do 46 tests selected with swift test --filter, including the new test, scene file tests and architecture rules.
  • scripts/check.sh --quick and npx commitlint --from upstream/main pass.
  • I drew settings-calendar-picker with --render-scenes from release builds of main (8590fcd) and this branch. Show reads Custom layout on main and Countdown and Join here, and the bar preview looks the same.
  • After review, I gave the scene's sample a joinCommand and drew it again with release builds of main (8590fcd) and this branch's app code. Both show Join, and Show still reads Custom layout on main and Countdown and Join here. On a clean checkout of 890efc0, swift build --build-tests passes, as do 21 tests: the scene file tests and the new test.
  • Not checked: I did not run the full suite locally or try the change in a running app.

Merging

Any merge method works. A merge commit or rebase merge keeps both commits: the fix makes a patch release, and the test commit, which only changes the scene's sample, makes none. A squash keeps the fix title, which is also a patch release.

🤖 Generated with Claude Code

Claude Sonnet 5.5 via Claude Code

A calendar widget's Show picker read Custom layout after Countdown and Join was picked. Loading
the configuration replaces the layout's @token.warning with the theme's color, and the picker
compared that with the choice as written. It now resolves each choice with the same tokens first.

The calendar picker scene uses the layout, so CI draws what the picker reads for it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].

Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.

Fix all with cubic | Re-trigger cubic

Comment thread scenes/settings-calendar-picker.json Resolved
Countdown and Join hides its Join button without a joinCommand, so the scene drew the choice
without it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@M4n0x M4n0x added the deep-review CodeRabbit reviews this pull request: big or risky changes label Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The settings picker now matches layout choices after resolving their tokens. The calendar picker scene now shows phase-dependent event details and includes a sample meeting URL command.

Changes: Calendar settings

Layer / File(s) Summary
Token-aware layout selection
Sources/StableBar/Configuration/WidgetSettings.swift, Sources/StableBar/Settings/BarInspector.swift, Tests/StableBarTests/WidgetTests.swift
The picker resolves tokens in each layout choice before comparing it with the loaded layout. The added test checks clock and calendar choices with empty and file-defined tokens.
Calendar picker scene
scenes/settings-calendar-picker.json
The scene defines conditional event details for calendar phases and adds a sample meeting URL command.

Possibly related issues

  • None.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 890ef

This change makes the calendar Show picker keep reading "Countdown and Join" after selection, and it updates a sample scene. The visible impact is limited to the settings label and a sample preview, and no merge-blocking risk was found.

Security architecture risk: Minimal · up to 890ef

Settings now recognizes the selected layout after theme colors are applied. The fix changes the displayed label, not what gets saved or how the live Join action works.

Pre-merge checks: Passed 3

Check name Status Explanation
Description check Passed The description follows the repository template. It has Problem, Changes, Testing, and Merging sections, and it ends with a model-and-harness line. The Problem section states the bug and links issue #…
Linked Issues check Passed Issue #937 requires that the calendar widget's Show picker read Countdown and Join after that choice is selected. The head revision adds WidgetLayoutChoice.current(_:in:tokens:) in Sources/StableBar/C…
Out of Scope Changes check Passed The changes fall into three groups. (1) WidgetSettings.swift adds current(_:in:tokens:), which implements the #937 fix directly. (2) BarInspector.swift changes the layout selector to call current, per…
Full details: Description check

Explanation

The description follows the repository template. It has Problem, Changes, Testing, and Merging sections, and it ends with a model-and-harness line. The Problem section states the bug and links issue #937 with "Fixes #937". The Changes section explains the token-resolution fix, the new test, and the scene update, and it says why each is needed. The Testing section lists the commands run, the before/after scene renders, and what was not checked: the full suite and a running app. The Merging section states that any merge method works and explains the release effect of each method. The final line names the model and harness, as the template requires.

Full details: Linked Issues check

Explanation

Issue #937 requires that the calendar widget's Show picker read Countdown and Join after that choice is selected. The head revision adds WidgetLayoutChoice.current(_:in:tokens:) in Sources/StableBar/Configuration/WidgetSettings.swift. It substitutes the @token. references in each choice with the supplied tokens before it compares the result with the loaded layout, and it treats a missing layout as .null. The PR summary states that BarInspector.contentPanel now calls this function in place of the exact comparison, passing the decoded document tokens. The head file confirms that countdownAndJoin still contains "foreground": "@token.warning", so the saved layout keeps the token. Title and minutes (.null) still matches. The new test settingsNamesEveryLayoutChoiceOnceItsTokensResolve covers every clock and calendar choice with an empty token map and with a file-defined warning token, per the PR summary. The BarInspector call site was not confirmed by a diff read, because the changed blobs were unavailable. This assessment relies on the PR summary for that call site. The #937 requirement is a coding requirement and the change addresses it. Setup's Meetings widget is not a stated requirement, so it does not affect this result.

Full details: Out of Scope Changes check

Explanation

The changes fall into three groups. (1) WidgetSettings.swift adds current(_:in:tokens:), which implements the #937 fix directly. (2) BarInspector.swift changes the layout selector to call current, per the PR summary. This is the same fix at the call site. (3) WidgetTests.swift adds the test for the fix, and scenes/settings-calendar-picker.json changes the scene to use Countdown and Join and adds a joinCommand to its sample. The scene change is test-fixture support: the PR states that the scene must show what the picker reads for Countdown and Join, and that Countdown and Join hides the Join button without a joinCommand. No change was found that lacks a connection to #937. The diff read for the changed files was unavailable, so the scene file's contents were not inspected directly. This assessment relies on the PR summary for those hunks.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8590fcd and 890efc0.

Files selected for processing: 4

  • Sources/StableBar/Configuration/WidgetSettings.swift
  • Sources/StableBar/Settings/BarInspector.swift
  • Tests/StableBarTests/WidgetTests.swift
  • scenes/settings-calendar-picker.json

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

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Before and after

main at 8590fcd → this pull request at 890efc0 · 202 screens drawn · 1 changed

Screen Change Where (image pixels)
scenes/settings-calendar-picker-dark 3,798 pixels 1743,830 · 232×28

scenes/settings-calendar-picker-dark

Before After
Before After

Difference, changed pixels in red:

Difference

201 unchanged screens

docs/essentials-clock-settings-dark, docs/essentials-clock-settings-light, docs/essentials-dark, docs/essentials-light, docs/essentials-settings-dark, docs/essentials-settings-light, docs/hero-dark, docs/hero-light, docs/popups-dark, docs/popups-light, docs/settings-dark, docs/settings-light, docs/themes-dark, docs/themes-light, scenes/accessibility-guide-dark, scenes/app-menu-popup-dark, scenes/apple-menu-settings-dark, scenes/apple-menu-symbol-bar-dark, scenes/apple-menu-symbol-settings-dark, scenes/bar-dividers-dark, scenes/bottom-bar-popup-dark, scenes/chat-popup-dark, scenes/crowded-edit-bar-dark, scenes/disk-meter-bar-dark, scenes/dock-badges-bar-dark, scenes/edit-bar-wide-group-dark, scenes/essentials-clock-popup-dark, scenes/essentials-disk-popup-dark, scenes/filled-slider-popup-dark, scenes/glass-text-follows-background-bar-dark, scenes/glass-text-follows-background-bar-light, scenes/group-members-bar-dark, scenes/group-others-bar-dark, scenes/group-text-color-bar-dark, scenes/gruvbox-bar-dark, scenes/gruvbox-bar-light, scenes/horizontal-list-popup-dark, scenes/increase-contrast-bar-dark, scenes/increase-contrast-bar-light, scenes/increase-contrast-popup-dark, scenes/increase-contrast-popup-light, scenes/input-source-popup-dark, scenes/labeled-metric-built-in-dark, scenes/labeled-metric-catppuccin-dark, scenes/labeled-metric-catppuccin-light, scenes/meeting-live-popup-dark, scenes/meeting-soon-bar-dark, scenes/menu-bar-items-widget-settings-dark, scenes/menu-bar-items-widget-style-dark, scenes/merged-status-bar-dark, scenes/notch-flare-bar-dark, scenes/output-device-popup-dark, scenes/package-template-clash-bar-dark, scenes/popup-gap-bar-dark, scenes/popup-spacing-bar-dark, scenes/popup-view-dark, scenes/preset-dashboard-bar-dark, scenes/preset-developer-bar-dark, scenes/preset-everyday-bar-dark, scenes/preset-minimal-bar-dark, scenes/preset-workday-bar-dark, scenes/privacy-both-bar-dark, scenes/privacy-hide-when-idle-bar-dark, scenes/privacy-idle-bar-dark, scenes/privacy-microphone-bar-dark, scenes/privacy-settings-dark, scenes/quick-toggles-bar-dark, scenes/quick-toggles-displays-popup-dark, scenes/quick-toggles-every-tile-popup-dark, scenes/quick-toggles-network-popup-dark, scenes/quick-toggles-networks-popup-dark, scenes/quick-toggles-popup-dark, scenes/reduce-transparency-bar-dark, scenes/reduce-transparency-bar-light, scenes/reduce-transparency-glass-bar-dark, scenes/reduce-transparency-glass-bar-light, scenes/reduce-transparency-text-follows-background-bar-dark, scenes/reduce-transparency-text-follows-background-bar-light, scenes/ring-bar-dark, scenes/settings-bar-dark, scenes/settings-bar-link-dark, scenes/settings-bar-link-review-dark, scenes/settings-bar-link-workspace-color-dark, scenes/settings-bar-look-dark, scenes/settings-bar-look-light, scenes/settings-bar-placement-bottom-dark, scenes/settings-bar-placement-dark, scenes/settings-calendar-widget-dark, scenes/settings-clock-widget-dark, scenes/settings-crashes-dark, scenes/settings-disk-widget-dark, scenes/settings-feedback-dark, scenes/settings-general-dark, scenes/settings-general-kiwidesk-dark, scenes/settings-general-macos15-dark, scenes/settings-general-macos27-dark, scenes/settings-general-manager-not-found-dark, scenes/settings-general-move-dark, scenes/settings-general-move-failed-dark, scenes/settings-general-move-moving-dark, scenes/settings-general-move-replace-dark, scenes/settings-general-setup-open-dark, scenes/settings-general-spaces-dark, scenes/settings-general-yabai-gap-dark, scenes/settings-group-dark, scenes/settings-group-defaults-dark, scenes/settings-group-defaults-light, scenes/settings-group-theme-color-dark, scenes/settings-group-theme-color-light, scenes/settings-help-dark, scenes/settings-help-starred-dark, scenes/settings-labeled-metric-dark, scenes/settings-narrow-dark, scenes/settings-package-dark, scenes/settings-package-widget-dark, scenes/settings-profiles-conditions-dark, scenes/settings-profiles-dark, scenes/settings-profiles-groups-dark, scenes/settings-profiles-theme-dark, scenes/settings-quick-toggles-dark, scenes/settings-store-dark, scenes/settings-theme-dark, scenes/settings-theme-edits-dark, scenes/settings-theme-edits-light, scenes/settings-theme-groups-dark, scenes/settings-theme-light, scenes/settings-theme-link-dark, scenes/settings-theme-link-light, scenes/settings-theme-origins-dark, scenes/settings-theme-versions-dark, scenes/settings-tiled-dark, scenes/settings-tiled-narrowest-dark, scenes/settings-uninstall-dark, scenes/settings-uninstall-failed-dark, scenes/settings-widget-backgrounds-dark, scenes/settings-widget-backgrounds-light, scenes/settings-widget-colors-dark, scenes/settings-widget-colors-light, scenes/settings-widget-style-theme-edits-dark, scenes/settings-widget-style-theme-edits-light, scenes/settings-workspace-hidden-dark, scenes/setup-allow-aerospace-gap-dark, scenes/setup-allow-automation-dark, scenes/setup-allow-below-menu-bar-dark, scenes/setup-allow-dark, scenes/setup-allow-dot-dark, scenes/setup-allow-macos27-dark, scenes/setup-allow-offline-dark, scenes/setup-allow-spaces-dark, scenes/setup-allow-workday-dark, scenes/setup-choose-dark, scenes/setup-choose-new-dark, scenes/setup-choose-no-battery-dark, scenes/setup-done-dark, scenes/setup-intro-dark, scenes/setup-intro-wallpaper-dark, scenes/setup-move-existing-dark, scenes/setup-move-failed-dark, scenes/setup-move-ready-dark, scenes/setup-move-replace-dark, scenes/shadow-offsets-bar-dark, scenes/shadow-offsets-bar-light, scenes/share-my-bar-dark, scenes/share-my-bar-dock-dark, scenes/share-my-bar-glass-dark, scenes/share-my-bar-glass-light, scenes/share-my-bar-landscape-dark, scenes/share-my-bar-link-dark, scenes/share-my-bar-macbook-dark, scenes/share-my-bar-post-dark, scenes/slider-end-stop-popup-dark, scenes/sound-details-popup-dark, scenes/stablebar-widget-bar-dark, scenes/stablebar-widget-settings-dark, scenes/starter-bar-dark, scenes/starter-edit-bar-dark, scenes/symbol-variants-bar-dark, scenes/system-monitor-memory-bar-dark, scenes/system-monitor-shows-settings-dark, scenes/system-monitor-split-warning-bar-dark, scenes/text-follows-background-bar-dark, scenes/text-follows-background-bar-light, scenes/themed-slider-inline-dark, scenes/themed-slider-inline-light, scenes/themed-slider-popup-dark, scenes/themed-slider-popup-light, scenes/themed-slider-tooltip-dark, scenes/themed-slider-tooltip-light, scenes/tinted-app-icons-bar-dark, scenes/tinted-app-icons-bar-light, scenes/tinted-image-bar-dark, scenes/tinted-image-bar-light, scenes/update-popup-dark, scenes/update-popup-star-github-cli-dark, scenes/update-popup-star-thanks-dark, scenes/workspace-badges-bar-dark, scenes/workspace-cells-bar-dark, scenes/workspace-focused-window-bar-dark, scenes/workspace-focused-window-padding-bar-dark, scenes/workspace-hidden-apps-bar-dark, and 1 more

Visual review: 1 changed screen approved.

@M4n0x M4n0x 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.

Checked it locally, the new test fails without the fix and passes with it, and setup's Workday Meetings widget reads Countdown and Join too since it writes the same layout. Filling the choices with the loaded tokens is the right spot imo, it works whatever theme or token the file sets, and the file keeps @token.warning so the format doesn't change

Screens look good, only the picker label changes. Nice one 👏

@M4n0x M4n0x added the visual-ok A maintainer looked at the changed screens and approves them label Nov 26, 2026
@M4n0x
M4n0x added this pull request to the merge queue Nov 26, 2026
Merged via the queue into stablebox:main with commit 6ecaa72 Nov 26, 2026
33 of 34 checks passed
stablebar-releases Bot pushed a commit that referenced this pull request Nov 29, 2026
## [0.20.0](v0.19.0...v0.20.0) (2026-11-29)

### Features

* animate widgets that a profile shows or hides ([#948](#948)) by @M4n0x ([eec8544](eec8544)), closes [#947](#947) [#947](#947)
* log quit causes and show unexpected quits in Status ([#953](#953)) by @M4n0x ([ea5a64e](ea5a64e)), closes [#952](#952)

### Bug Fixes

* choose a submenu item opened from the App menus tray ([#944](#944)) by @MaHofseth ([add49b0](add49b0)), closes [#942](#942)
* draw borders in whole pixels so they keep every edge on 1x screens ([#934](#934)) by @M4n0x ([8590fcd](8590fcd)), closes [#933](#933) [#933](#933)
* keep a package version installed when its folder is hidden ([#962](#962)) by @M4n0x ([2d97d15](2d97d15)), closes [#961](#961)
* keep the Sound details open and smooth when picking a device ([#931](#931)) by @M4n0x ([df96453](df96453)), closes [#928](#928) [#928](#928)
* keep windows clear of the bar after a double-click fills them ([#936](#936)) by @M4n0x ([c1478d1](c1478d1)), closes [#935](#935) [#935](#935)
* leave the keyboard with the app while StableBar shows its menus ([#943](#943)) by @MaHofseth ([abc1c4f](abc1c4f)), closes [#941](#941)
* play an app's first sound at its mixer volume ([#899](#899)) by @M4n0x ([2c38350](2c38350)), closes [#897](#897) [#897](#897)
* show a turned-off widget's last output when it comes back ([#950](#950)) by @M4n0x ([6776fcb](6776fcb)), closes [#949](#949) [#949](#949)
* show Countdown and Join in Settings after picking it ([#940](#940)) by @MaHofseth ([6ecaa72](6ecaa72))
* stop offering a package update that is already installed ([#956](#956)) by @M4n0x ([4592ebc](4592ebc))
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.20.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deep-review CodeRabbit reviews this pull request: big or risky changes released visual-ok A maintainer looked at the changed screens and approves them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings shows Custom layout after picking Countdown and Join for a calendar widget

2 participants