Merge the 12-hour clock into the Digital Clock
CI / test (push) Failing after 18s

clock-digital12 and clock-digital had become the same module (same lib/clock
code, same right-click settings), differing only in the starting format. Keep
one: the Digital Clock now starts in 12-hour mode with AM/PM, and its
"Time format" setting switches to 24-hour.

- components/clock-digital12 is gone (and from scripts/components.txt);
  lib/clock drops digital12_info/digital12_config.
- The default panel loads clock-digital.
- "clock-digital12" stays an alias (find_module, slot_of, saved panels) and is
  never listed in the module picker, even if an old .wasm is still installed.
- panel.edn gets :version 2. A version-1 panel is migrated once: the old
  12-hour clock becomes the Digital Clock with its settings (state.edn
  :module-config) moved over in 12-hour mode; a panel that had the old
  24-hour Digital Clock keeps 24-hour. The file is rewritten afterwards.
- Tests updated, plus a migration test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hgnZsS91fwCreut8FL
This commit is contained in:
Claude committed 2026-11-25 20:29:12 +00:00
1 parent 9c0a794c2d
commit c7a6c8376e
25 files changed
+207 -925

No files matched your search

+2 -2
View File
@@ -42,9 +42,9 @@ test "inspector shows the WIT interface of the hovered component" {
ignore(@sys.write_file_bytes("_build/inspector_launcher.png", png))
// Clock, panel, window title bar and desktop resolve to their own components.
let (cx, cy) = center_of(comp, "clock-digital12")
let (cx, cy) = center_of(comp, "clock-digital")
comp.handle_input(@nested.InputEvent::PointerMove(cx, cy), 5U)
assert_eq(comp.shell.hover_id, comp.shell.slot_of("clock-digital12"))
assert_eq(comp.shell.hover_id, comp.shell.slot_of("clock-digital"))
comp.handle_input(@nested.InputEvent::PointerMove(1270.0, 5.0), 6U)
assert_eq(comp.shell.hover_id, "desktop")