Skip to content

fix: hide widgets with nothing to show and draw graphs from the right - #381

Merged
Seb-GRAF merged 2 commits into
mainfrom
fix/379-empty-widgets
Oct 29, 2026
Merged

Seb-GRAF merged 2 commits into
mainfrom
fix/379-empty-widgets

Conversation

@Seb-GRAF

Copy link
Copy Markdown
Collaborator

Problem

A widget that hasn't loaded, or whose script failed, looks broken on the bar. A script widget whose layout shows nothing yet draws an empty pill, and when its script fails the bar shows only a red dot. The CPU graph starts blank, reads 0% on its first sample, and fills from the left over 60 samples.

Fixes #379
Fixes #380

Changes

Testing

  • BarEditingTests.testEmptyWidgetsHaveDistinctNamedPlaceholdersAndOutputDisplaySelectionWins now checks that a script widget whose layout is empty is off the bar, and that it returns once its script fails.
  • Full swift test: everything passes except the 5 ReleaseTests unchangedAppRejects… cases, which fail on this Mac on plain main too. workspaceWindowFocusUsesItsIDAndReportsFailure failed once under full-suite load and passed in the other full run and in 3 runs on its own.
  • The first full run caught scriptUpdatesInvalidateOnlyTheViewsTheyAffect when the empty check was in the bar's visibility. That led to moving it into the presentation.

Offscreen renders (--render-docs-images with a temporary scene): a script widget whose blocks all use hideWhenEmpty, the built-in system widget with two graph samples, and a clock.

Before After
Before the first output before-loading after-loading
Script failed before-failed after-failed

Not checked: the first CPU value on a live bar. The renders use sample output.

Merging

Rebase merge, so each fix keeps its own commit in the changelog.

Claude Opus 5.5 via Claude Code (T3 Code)

@Seb-GRAF
Seb-GRAF enabled auto-merge October 29, 2026 15:48
@Seb-GRAF
Seb-GRAF merged commit eafd46c into main Oct 29, 2026
8 checks passed
@Seb-GRAF
Seb-GRAF deleted the fix/379-empty-widgets branch October 29, 2026 15:53
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.10.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

Projects

None yet

1 participant