Skip to content

feat: switch between light and dark themes on a daily schedule - #34653

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/21097-scheduled-theme-mode
Nov 18, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/21097-scheduled-theme-mode

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let the dashboard switch itself between light and dark at two times of day the user picks, read on the device's own clock.

Settings > Display > Mode offers Auto, Light and Dark. Someone who wants light beside a bright window by day and dark at night has to flip it by hand twice a day, or use Auto, which only follows the operating system's setting.

Why it matters

Light is easier to read in daylight and dark is easier at night. A schedule does that switch without the user thinking about it, in every browser and desktop window that shows the dashboard.

Not a goal

  • Sunrise and sunset scheduling. It needs a location source; Add scheduled light and dark themes #21097 stays open for it.
  • Offering Scheduled in the first-run look step or the Overview quick toggle; both keep Auto / Light / Dark.
  • Changing what Auto, Light or Dark do.

What changed (motivation → approach → change)

Mode gets a fourth choice, Scheduled, so the dashboard is light by day and dark at night without anyone flipping it. It shows two time fields, Light from and Dark from (07:00 and 19:00 until the user sets them). The dashboard is light from the first time until the second, wraps past midnight, and switches while it stays open. Picking Auto, Light or Dark replaces the schedule and keeps its times.

A fourth mode rather than a separate on/off schedule, so there is one answer to "what mode am I in" and a manual pick needs no rule about when the schedule takes over again.

Part Where What it does
Resolver utils/themeSchedule.ts One import-free answer: light or dark for a time of day
Clock useTheme.tsx + useThemeSchedule.ts Re-reads the clock every minute while Scheduled is on, so a switch lands within a minute of each time and of the device waking. The times are saved by their own request, so a mode change right after cannot hide its failure
Settings pages/settings/DisplayPanel.tsx, components/settings.tsx Mode gains Scheduled; two time fields show while it is picked, each saved when it loses focus. A save the workspace refuses shows a notice under them, and leaving a field saves again
Workspace config config/sections_dashboard.py, config/loader_builders.py, dashboard/handlers/core.py, api/client/themes.ts, config-baseline.json dashboard.theme_mode accepts schedule; theme_schedule_light / theme_schedule_dark hold the times, so a second browser or the desktop app switches at the same times. /api/config/theme accepts "" or a 24-hour HH:MM and refuses anything else with 400
Desktop windows native-theme.js, preload.js, ipc-registrar.js, runtime/window/chrome.js, apps/crew-companion/dashboardTheme.ts, apps/mochi/src/shared/themes.ts Electron has no scheduled appearance, so it is sent the resolved light or dark, and that change repaints the crew companion and Mochi windows, which read the same schedule. Every window shares that one appearance, so the shell ignores a dashboard window's push while another dashboard window has focus: a schedule in the background cannot repin the window in use. The crew companion repaints on any OS appearance change, as Mochi does
Toggle Theme useTheme.tsx, providers/actionsProvider.ts From Scheduled it picks the appearance not on screen, instead of stepping to Auto, which often looks the same
First run, search, strings components/OnboardingFlow.tsx, settingsRegistry.gen.ts, docs/settings-registry.generated.json, docs/ui-index.generated.json, i18n/en.context.json, i18n/locales/*.json First run keeps Auto / Light / Dark; the two fields are searchable, findable by the agent and translated in every locale

The themes, config and dashboard-handler specs describe the new mode and its two fields.

Backwards compatibility

Compatible: the theme PUT and the config schema only gain a mode value and two optional keys; every value accepted today is still accepted, and a workspace that never saves a schedule behaves as before. A build from before this change does not know schedule, so after a downgrade the user picks a mode again. In the desktop app, a dashboard window in the background no longer sets the shared appearance while another dashboard window has focus; it sets it when it next gains focus, as it already did.

Removes nothing: no key, mode, route or reader is taken away.

Tests

test/test_api_theme_config.py passed 20 times at -n0, 10 times at -n 4 beside test_config_patch.py and test_config_schema.py, and in a shuffled order (seed 10821). useTheme.schedule.test.tsx, dashboardTheme.test.ts, DisplayPanel.test.tsx and DisplayPanel.pseudolocale.test.tsx passed 5 times with --sequence.shuffle. website/electron/test/window-chrome-theme-mode.test.js, window-lifecycle.test.js and ipc-registrar.test.js passed in order and 3 times in random order (--test-randomize, seeds 11, 222 and 3333). The window-chrome-theme-mode.test.js case fails with the shell's focus check removed. The DisplayPanel.test.tsx time-field case fails with the save-on-blur reverted, and the refused-save case in useTheme.schedule.test.tsx fails with the save's onError removed or with the times sent through the shared theme request.

  • website/src/test/useTheme.schedule.test.tsx: with light 07:00 / dark 19:00 and a fake clock at 18:59:30, Scheduled is light and turns dark within a minute without a reload; a manual Light pick then holds; Toggle Theme from Scheduled picks the other appearance; saving times persists both and applies them at once; a refused save is reported, even with a mode write right after it, until a later save succeeds; a second browser adopts the workspace's times at boot.
  • website/electron/test/window-chrome-theme-mode.test.js: a push from a background dashboard window while another dashboard window has focus leaves the shared appearance alone; the focused window's own push applies, and so does a push while a companion window or no window has focus. ipc-registrar.test.js: the appearance message hands its sender to the shell.
  • website/src/test/dashboardTheme.test.ts: the crew companion window resolves Scheduled from the stored times, repaints on the shell's appearance change and stops listening on cleanup.
  • website/src/test/DisplayPanel.pseudolocale.test.tsx: the Scheduled option is translated and still writes schedule.
  • website/src/test/DisplayPanel.test.tsx: typing a time saves nothing until the field loses focus, then saves once; a cleared field keeps the saved time; a refused save shows its notice under the times, and leaving a field saves the same pair again.
  • test/test_api_theme_config.py: the PUT stores schedule and both times, returns them from every theme payload, and refuses 7:00, 24:00, 19:00:00, a trailing newline and a number.

Manual verification

Ran the change in an isolated gateway (seeded minimal data home, never the real one), opened Settings > Display > Theme in Chromium with the clock fixed in UTC, and picked Scheduled: at 12:00 the dashboard was light and at 20:30 dark, with the 07:00 / 19:00 defaults showing. With Dark picked, the two time fields are hidden. With the theme PUT answered 500 in the browser, changing Light from to 06:30 and leaving the field kept 06:30 on screen and showed the notice under the times. The desktop shell's focus rule is covered by the Electron unit tests above; no desktop build was run.

Screenshots / video

Scheduled at 12:00, light, with the two time fields:

Scheduled mode at midday: light, Light from 07:00 and Dark from 19:00

Scheduled at 20:30, dark:

Scheduled mode in the evening: dark

A schedule save the workspace refuses: the notice under the two times, with the new time still shown:

Scheduled mode after a refused save: Light from 06:30 and the inline notice under the time fields

Dark picked: four mode choices, no time fields:

Mode set to Dark: Auto, Light, Dark and Scheduled shown, time fields hidden

Related Issues

Part of #21097

#31196 takes the same issue another way (an on/off schedule kept per browser, plus sunrise and sunset); this PR does not build on it.

Sibling sweep

N/A: a feature, not a fix.

Pattern harvest

N/A: a feature, not a fix.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 16:44
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 10, 2026 16:47
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 10, 2026
@bolichen97
bolichen97 force-pushed the fix/21097-scheduled-theme-mode branch from e62411d to 0d4b68c Compare November 11, 2026 00:20
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in config-baseline.json, docs/system-specs/modules/config.md, docs/system-specs/modules/learn-cron-dashboard.md, src/kiro_crew/config/loader_builders.py, src/kiro_crew/docs/ui-index.generated.json, website/src/components/settings.tsx, website/src/i18n/en.context.json and website/src/i18n/locales/*.json since this head was cut, and GitHub reported the branch as conflicting (0396be4 -> 4477b72); ui-index.generated.json was regenerated on the rebased tree, the change itself is unchanged, CI re-running.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] One red in the local related-test run on this head is main's, not this change's: test/test_find_ui_auto.py::test_the_generated_auto_tier_answers_labels_only_it_carries[continue with github-en-Continue with GitHub-path0] fails on main wherever the UI generator runs and is tracked in #32670. CI skips that case (its backend jobs have no website/node_modules), so it does not gate this PR.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: Scheduled is a fourth mode value with two optional keys, and the existing readers (the resolved theme consumers and onboarding_plan.py) handle it.

Notes

  • When the mode is Scheduled, the Overview quick toggle (pages/overview/DisplayTab.tsx:81) highlights none of Auto, Light or Dark. The mode then looks unset there, so consider showing the active mode as a selected, non-toggling chip, the way Custom font already is.

[DESIGN-REVIEWED] 669bb4b

Description read

[DESCRIPTION-READ] 9f84fd349776fe9681615bc524fdc54dc9957f532be35631983bc40d10df6c7a

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

This adds a fourth Mode, Scheduled, alongside Auto, Light and Dark. No default changes, so it is not product shape. The one change that reaches everyone, the desktop focus rule, is declared and is needed because a background window now pushes its appearance every minute.

Notes

  • Item 4 — duplicate (small): _CLOCK_TIME_RE = re.compile(r"(?:[01][0-9]|2[0-3]):[0-5][0-9]") in dashboard/handlers/core.py is a second spelling of member_goals._TIME_RE (^([01]\d|2[0-3]):([0-5]\d)$). Grepping 24-hour HH:MM patterns under src/ found 1 existing validator. Subtraction: keep one validator and have both call it (the existing one would need fullmatch in place of the $ anchor, which also accepts a trailing newline).

What this change ships

Inventory (8 items) — 7 justified

Intent: let the dashboard switch between light and dark at two times of day the user picks. ADDITION.

  1. Settings > Display > Mode gains a fourth choice, Scheduled — justified
  2. Two time fields, Light from / Dark from (07:00 / 19:00), shown only under Scheduled, saved when a field loses focus, with a notice if the save is refused — justified
  3. Under Scheduled the dashboard re-reads the clock every minute and switches without a reload — justified
  4. Workspace config gains schedule as a mode and two time keys; the theme PUT accepts them and refuses anything else — duplicate of member_goals._TIME_RE
  5. Toggle Theme from Scheduled jumps to the other appearance instead of to Auto — justified
  6. Desktop: a background dashboard window no longer sets the shared appearance while another dashboard window has focus — justified
  7. The crew companion and Mochi windows follow Scheduled; the companion now repaints on OS appearance changes — justified
  8. First run and the Overview quick toggle keep Auto / Light / Dark — justified

[FIRST-PRINCIPLES-REVIEWED] 669bb4b

Description read

[DESCRIPTION-READ] 8538db98caede9545bc7a47c4e680948d3155afd01701a5a47e66084471909a7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader read the Scheduled mode button and the "Light from" / "Dark from" time fields correctly and said they would use them. The save-failure notice is confusing, but it only appears when a save is refused.

Notes

  • theme_schedule_save_failed contradicts itself to a cold reader. They asked: "if this device 'uses them', did it save or not? There's no Retry button." Suggested copy: "Times not saved to the workspace — other devices still switch at the old times." Also give the notice a real retry button that calls commitSchedule(), because "leave the field" is not something a user will find on their own.
  • The two hints repeat their labels ("Scheduled mode switches to light at this time…"). The only new information is the time zone, so cut each hint to "Uses this device's time zone."
  • "Auto" and "Scheduled" both read as "changes on its own", and the reader had to guess which was which. Relabel Auto as "System" (its stored value is already system). Then Scheduled is the only mode that changes by itself.

[UX-REVIEWED] 669bb4b

Description read

[DESCRIPTION-READ] feb6c8273178db8ec772b8c69cacb18966830d54a5d9f226b995e4e90c6ead1f

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 669bb4b

Verdict parsed from the review's SHA-scoped output markers for commit 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 669bb4b

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 669bb4b099082f3fa6ee12bb38a5c32b4ff1dbb6 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 11, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=afaae5c82a69 Schedule save failures remain invisible

Rebutted: errors-use-error-notice governs how an error that is surfaced renders (through ErrorNotice, never a hand-written red box). This diff renders no error anywhere, so there is nothing for the rule to route; it does not require every failed write to grow a notice.
The schedule save is one more field on the existing persistTheme mutation (useTheme.tsx:1137), which on main already carries the mode (persistTheme({ mode })), colour, glass and first-run writes with no onError. A failed mode write today keeps the choice on this device and the next boot read adopts the server's value; a failed schedule write behaves exactly the same (adoptSchedule(servedSchedule) at :1207). Nothing the server stored is lost or corrupted.
Surfacing theme-write failures is a change to that shared mutation for all five writers. Doing it for the schedule alone would make one theme field report failures its four siblings swallow, and doing it for all five is outside this PR's goal (a daily light/dark schedule).
[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=cdae41df8d47 Scheduled windows miss transitions when native appearance already matches

Rebutted as disproportionate, as the adjudication also ruled (downgraded, disproportionate-remedy). The miss needs the desktop app with a second gateway's window pinned Dark and focused before the switch time while both the dashboard and the companion are on Scheduled.
The harm is cosmetic and self-healing: the companion and Mochi re-resolve Scheduled from the stored times on the next storage or appearance event (dashboardTheme.ts:185, :189), and the dashboard itself is right on its own minute clock.
The asked-for fix adds a second minute timer to each window theme adapter, duplicating the clock in useThemeSchedule for that multi-gateway edge case only.
[operator: bolichen97]

buluoray
buluoray previously approved these changes Nov 11, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve on 0d4b68c. Adds a fourth theme mode, Scheduled (light from / dark from, 07:00 / 19:00 defaults), stored as two validated workspace keys. The PUT only gains values, the default path is unchanged, and every mc-theme reader (useTheme, crew companion, Mochi, Electron native-theme) handles schedule. No defect found; the one upheld GPT finding belongs to a class that already exists on main. Decisive lines: src/kiro_crew/dashboard/handlers/core.py:515 (_CLOCK_TIME_RE, fullmatch), src/kiro_crew/dashboard/handlers/core.py:607-612 (schedule_light/dark validation), website/src/utils/themeSchedule.ts:45-51 (scheduledMode, wraps past midnight), website/src/hooks/useThemeSchedule.ts:28-35 (minute tick only while Scheduled), website/src/hooks/useTheme.tsx:1319-1323 (Electron gets the resolved mode under Scheduled), website/src/hooks/useTheme.tsx:1396-1401 (Toggle from Scheduled)

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 11, 2026
@bolichen97
bolichen97 force-pushed the fix/21097-scheduled-theme-mode branch from 0d4b68c to 7d70104 Compare November 11, 2026 16:30
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in config-baseline.json, docs/system-specs/modules/config.md, docs/system-specs/modules/learn-cron-dashboard.md, src/kiro_crew/config/loader_builders.py, src/kiro_crew/config/sections_dashboard.py, src/kiro_crew/dashboard/handlers/core.py, src/kiro_crew/docs/settings-registry.generated.json, src/kiro_crew/docs/ui-index.generated.json, website/electron/preload.js, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/components/OnboardingFlow.tsx, website/src/i18n/en.context.json and website/src/i18n/locales/*.json since this head went green, and GitHub reported the branch as conflicting (4477b72 -> 6ffa86b); ui-index.generated.json was regenerated on the rebased tree, and this head also carries the fix for the schedule-save finding (disposition below); CI re-running.

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author

self-added: no
mechanism: the Scheduled-times save renders its own failure through ErrorNotice

  • span=afaae5c82a69 Schedule save failures remain invisible

fixed in 7d70104: the schedule save runs on its own useMutation with a per-call onError (useThemeSchedule.ts, useTheme.tsx), so a refused PUT sets scheduleSaveFailed and Settings > Display > Theme renders an inline ErrorNotice under the two times (DisplayPanel.tsx), with the panel's No hand-off comment naming its drafts.
The earlier rebuttal was wrong: errors-use-error-notice names "a useMutation with no onError and no isError read" as the never-rendered case, and this diff adds the request.
A separate observer because per-call mutate callbacks follow only the latest call on an observer: a mode or colour write through the shared persistTheme right after would drop this save's failure.
Leaving a time field while the notice shows saves the same pair again (the retry). Tests: useTheme.schedule.test.tsx (refused save reported until a later save succeeds, with a mode write in between) and DisplayPanel.test.tsx (notice shown, re-save on blur).
[operator: bolichen97]

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 11, 2026
@KiroCrewCaptain

KiroCrewCaptain commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 14% chance that this change introduces a defect, above the 12% limit for approving on its own.

Adds a fourth theme mode, Scheduled, with two times stored in the workspace config. The backend checks each time against a 24-hour HH:MM pattern (fullmatch) and refuses anything else with 400. The boot and theme-config payloads, the loader, the schema and the specs are all consistent. On the frontend, the dashboard, crew companion and Mochi all use the same resolver. A one-minute clock runs only while Scheduled is on. The times are saved by their own request and a refused save is reported. Settings saves on blur, and the workspace's times are adopted at boot only if it has saved some. In the desktop app, the shell is sent the resolved light or dark, and the focus re-sync falls back correctly through resolveThemeSource. The new focus check drops only pushes from background dashboard windows, as the spec says. Each behaviour has a deterministic test, and every test, lint and build job passed; the only red checks are GitHub API rate-limit failures. I found no regression, data-loss or trust problem.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 50216d60a5 · 881 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 11, 2026
@bolichen97
bolichen97 force-pushed the fix/21097-scheduled-theme-mode branch from 7f20a03 to 50216d6 Compare November 12, 2026 09:03
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json (a conflict, rebuilt with npm --prefix website run gen:ui), config-baseline.json, docs/system-specs/modules/config.md, docs/system-specs/modules/learn-cron-dashboard.md and the 13 website/src/i18n/locales/*.json catalogs since this head was last judged (d80dd05 -> 9ef0fc4); main now carries #35625, the fix for the two backend tests this head was red on. CI re-running.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 12, 2026
@bolichen97
bolichen97 force-pushed the fix/21097-scheduled-theme-mode branch from 50216d6 to 6bf3e5d Compare November 12, 2026 19:30
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json (a conflict, rebuilt with npm --prefix website run gen:ui), config-baseline.json, docs/system-specs/modules/config.md, docs/system-specs/modules/learn-cron-dashboard.md, docs/system-specs/modules/themes.md, src/kiro_crew/config/loader_builders.py, src/kiro_crew/docs/settings-registry.generated.json, website/electron/ipc-registrar.js, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/i18n/en.context.json and the 13 website/src/i18n/locales/*.json catalogs since this head was last judged (9ef0fc4 -> 230cf97); the change itself is identical. CI re-running.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Nov 12, 2026
Add a Scheduled choice to Settings > Display > Mode. The dashboard is
light from one local time and dark from another (07:00 and 19:00 until
the user sets them), read on the device's own clock and time zone, and
it switches while the dashboard stays open. Picking Auto, Light or Dark
replaces the schedule, and Toggle Theme from Scheduled picks the
appearance not on screen.

The mode and both times are stored in the workspace like the existing
mode, so a second browser or the desktop app switches at the same
times. The desktop shell follows the resolved mode, and the crew
companion and Mochi windows resolve the same schedule and repaint when
the shell's appearance changes.

Part of #21097 (sunrise and sunset need a location source and are not
in this change).
@iamwhatever
iamwhatever force-pushed the fix/21097-scheduled-theme-mode branch from 6bf3e5d to 669bb4b Compare November 18, 2026 01:24
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 18, 2026

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

Reviewed head 669bb4b. The theme PUT accepts only an empty value or a strict 24-hour HH:MM for the two new keys. The schedule resolver wraps past midnight correctly, and the minute clock runs only while Scheduled is selected. Times save on blur through their own request, so a refused save is shown and retried. The desktop shell gets the resolved light or dark, and the new focus check stops a background dashboard window from overriding the focused one. I ran the backend theme config tests, the four schedule and display panel frontend suites, and the window chrome and IPC desktop tests on this head, and all passed with all CI checks green, so nothing here blocks.

@KiroCrewCaptain
KiroCrewCaptain merged commit 46e373f into main Nov 18, 2026
101 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/21097-scheduled-theme-mode branch November 18, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants