cmux-next: Shuffle Daily background (cx-t2x.5)

Merged
TE
24d ago
+676-18

Summary

Adds Shuffle Daily to the background picker. appearance.background: "daily" shows one work of the bundled art set each local day and turns to the next work at midnight, with no settings change and no relaunch. This is the first part of cx-t2x.5; per-workspace art follows in its own PR.

  • Same key, per the art pillar's constraint: daily is one more accepted value of appearance.background. The schema, the Swift parser and the page validator all accept it.
  • Order: consecutive days step through all 174 works by a stride that shares no factor with the set's size. Every work shows once before any repeats, and two days in a row never show the same one.
  • Picker: a Shuffle Daily tile follows None. Resting on it previews today's work.
  • TerminalThemeSetting resolves daily to the day's work and arms a DemandTimer for the next local midnight.

Testing

  • DailyBackgroundTests (CmuxNextAppTests) was committed first in 0de5d266. Its fleet run obs-daily-red-1 failed: PageError cmux.settings.invalid: appearance.background does not accept "daily".
  • The green fleet runs on the fix cover:
    • choosing Shuffle Daily paints today's work, saves "daily" and raises no diagnostics;
    • moving the clock past midnight shows the next work;
    • the rotation covers every work once per cycle, with no repeat on consecutive days.
  • The first green run trapped. The design module's default main-actor isolation made the daily pick main-actor code, and settings parsing runs off the main actor. The functions are now nonisolated.
  • The settings export was regenerated on the fleet. The only change is "daily" among the accepted samples, plus the schema hash.
  • bun test src/pages/settings/ test/ui-rules.test.ts: 123 pass, including the new Shuffle Daily tile test. bun run check passes.
  • gallery-coverage fails on agent-pane.tool-cards#notNow, which is in the base and not touched here.
  • Localization: two new keys, settingsWindow.backdropPicker.shuffleDaily and shuffleDailyHelp, in all 21 catalog locales. strings.json was regenerated.

Changelog

Added: Shuffle Daily in Change Background… shows a different public-domain painting each day

Proof

The gallery's settings/backdrops variant shows the new tile once this lands. No native capture yet; captures do not gate this PR.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds Shuffle Daily to the background picker: appearance.background: "daily" shows one work of the bundled art set each local day and turns to the next at midnight, with no settings change or relaunch. Consecutive days step through all 174 works by a stride sharing no factor with the set's size, so every work shows once before any repeats and no two days in a row show the same one.

  • Schema, Swift parser, and page validator accept daily; a Shuffle Daily tile sits next to None and previews today's work on hover.
  • A day, time zone, or clock change re-picks the work immediately, and the Background row's menu lists Shuffle Daily so settings search finds it.
  • The daily pick is parsed off the main actor, so the new functions are nonisolated; TerminalThemeSetting arms a timer for the next local midnight.
  • DailyBackgroundTests cover choosing the tile, the midnight turn, the full cycle, and clock/time zone changes; the full suite passes.
  • New strings for the tile and its help text are added in all 21 catalog locales. Per-workspace art, the rest of cx-t2x.5, follows in its own PR.