Refresh design guidelines across the host app and workspace applets - #56
Merged
Conversation
tonyfresher
force-pushed
the
design-guidelines
branch
from
July 24, 2026 17:50
0af566c to
386656d
Compare
tonyfresher
force-pushed
the
design-guidelines
branch
from
July 27, 2026 13:33
81d05fc to
6f1d272
Compare
molefrog
reviewed
Jul 27, 2026
molefrog
reviewed
Jul 27, 2026
molefrog
reviewed
Jul 27, 2026
* Store the skill auto-update flag in server-side app settings The auto-update preference lived in the client's localStorage (zustand persist), so it was per-browser and invisible to the server. Move it to a new app-wide settings store: a conf-backed settings.json in moi's data dir, exposed via GET/PATCH /api/settings. conf gives atomic writes, per-key schema validation, and migrations for future settings keys. The workspace skill update hook now reads the flag through a react-query query and enables it with a PATCH; banner display and auto-updates wait until settings have loaded so the default value never flashes the prompt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv9P3ecorjQnhL3ABFTYQU * Broadcast settings changes to open clients A PATCH to /api/settings only updated the query cache of the client that sent it; other open clients sat on the stale flag until a remount or focus refetch, so an enabled auto-update never reached them (PR #64 review). Publish a settings:updated event carrying the new value over the live-events socket, and let useAppSettings apply it to the cache directly — no refetch round trip. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv9P3ecorjQnhL3ABFTYQU * Let app-settings declare its API-updatable fields The PATCH /api/settings route hand-validated each settings key, so every new key would touch api.ts (PR #64 review). app-settings now owns a map of API-updatable fields with their runtime checks, and the route just parses the body against it: unknown keys ignored, wrong types reject the patch with a 400. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv9P3ecorjQnhL3ABFTYQU * Validate settings patches with the conf schema The API-updatable field map duplicated type checks the conf schema already declares. Replace it with a plain whitelist: the route picks whitelisted keys and object-form set() validates the merged store against the schema before writing, so a bad value rejects the whole patch (400 with conf's message) and persists nothing. Each settings key is now declared once. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gv9P3ecorjQnhL3ABFTYQU --------- Co-authored-by: Claude <noreply@anthropic.com>
Resolve both conflicts by keeping both sides: - `client/runtime/useWorkspaceEvents.ts` — the `WorkspaceEvent` union keeps `settings:updated` (this branch) alongside `tab:focus` (main), and the type import pulls in `AppSettings` and `WorkspaceTabId`. - `server/api.ts` — the `lib/types` import keeps `AppSettings` (settings API) and `AppletKind` (applet error records). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rAUcnSwr47GRZRmynJXFo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The host app now follows the refreshed design guidance across chat, workspace, settings, development screens, and shared controls. Workspace applets keep the same radius language and clearer content, color, typography, and container guidance.
What changed
Review focus
Verification
bun test— 593 passedbun run format:checkbun run lintbun run typecheck:clientgit diff --checkandgit range-diffagainst the original PR history