Repository navigation
feat(macos): show 'Clock disabled on this server' when EMBER_CLOCK=off - #305
Conversation
/v1/clock/health carries "disabled": true (omitted otherwise) with a null device. The Settings Status section read that as a lost clock and offered discovery; the Hardware pane showed "No clock configured". Decode the flag in ClockHealth, stop serverLostClock from firing for it, and show the disabled title in both places. Closes #278
Independent review (WORKFLOW §4)Reviewed f01484d against #278 and Decode looks right: absent → nil → No blockers. should-fix
nit
|
Review of #305: pin the server shape with a clock_health_disabled golden, disable Restart and Discover and swap the footer in the Status section, show the disabled notice on the dashboard Clock card instead of "Clock unreachable", hide the menu-bar display on/off rows, add a disabled hardware snapshot scenario, and keep only isDisabled public. The notice comes from one ClockHealthReadout.disabledNotice so every surface picks it the same way.
|
Fixed in 1cd7e74:
Hardware pane, disabled (light): https://raw.githubusercontent.com/tarakanof/Ember/b6aabe9/pr-305/clock-disabled-light.png gofmt, go vet, go test ./... -race, swift test (893), unsigned build and strings.sh check pass. |
The bare poweroff circle read as a stalled spinner.
Re-review (1cd7e74, b5e5b87)Ran these on Mutation check: I removed the
New regressions: none found. Enabled, lost and unconfigured states go through the same branches as before. Verdict: no blockers, ready to merge once CI is green. Item 4's remaining menu-only case can go in a follow-up issue. |
Closes #278
Decodes
disabled(omitted when false) inClockHealth; withEMBER_CLOCK=offthe server sends"disabled":true,"device":null.ClockDiscovery.serverLostClockreturns false when disabled.Localizable.xcstrings(EmberKit entry, like the others).Evidence
clockHealthDecodesDisabled,serverLostClockIsFalseWhenTheServerDisabledTheClock,disabledClockTitleSaysTheServerDisabledIt; written first, failed to compile (noisDisabled), now green.swift test --package-path macos: 891 tests passed.xcodegen generate+ unsigned Debug build OK (viascripts/strings.sh);scripts/strings.sh checkclean aftersync.GET /v1/clock/health(read-only): clock enabled, sodisabledis absent anddevicepopulated; omit-when-false decodes to not disabled. The disabled shape comes fromclock_health_http.go(json:"disabled,omitempty").EMBER_HARDWARE_SNAPSHOTS): light, dark. Icon:clock.badge.xmarkon all surfaces.