From 7ed3a5cbe293692fc33e42b70e025fc8f87ae17e Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 19 Aug 2026 03:34:50 -0500 Subject: [PATCH] docs(desktop): repoint comments at the modules that now own the code Comments naming gateway-event.ts, chat-messages.ts and hermes.ts as the place to look, for files those symbols no longer live in. --- .../desktop/src/app/contrib/dev/credits-notice-demo.ts | 2 +- .../src/app/session/hooks/use-prompt-actions/rewind.ts | 2 +- apps/desktop/src/store/live-sync.ts | 10 +++++----- apps/desktop/src/store/settings-scope.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/desktop/src/app/contrib/dev/credits-notice-demo.ts b/apps/desktop/src/app/contrib/dev/credits-notice-demo.ts index 1766489818..4f934b8e53 100644 --- a/apps/desktop/src/app/contrib/dev/credits-notice-demo.ts +++ b/apps/desktop/src/app/contrib/dev/credits-notice-demo.ts @@ -2,7 +2,7 @@ // usage bands. Each trigger emits ONE synthetic `notification.show` / // `notification.clear` gateway event through the real fan-out // (`emitLocalGatewayEvent`), so it exercises the actual dispatcher branch in -// `use-message-stream/gateway-event.ts` — toast render, key-replacement +// `use-message-stream/gateway-event/status.ts` — toast render, key-replacement // escalation, TTL self-dismiss, native OS notification, and billing re-poll. // // Installed only under `import.meta.env.DEV` (see contrib/wiring.tsx), so none diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts index 8b83ba6c1d..aec6ad6ac6 100644 --- a/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts +++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts @@ -94,7 +94,7 @@ export function rebindSurvivorRowIds(messages: ChatMessage[], survivorRowIds: Su /** * Renderer-synthetic message ids (`${timestamp}-${index}-${role}` from - * chat-messages.ts, plus older `user-…` / `assistant-…` shapes). Gateway + * chat-messages/hydration.ts, plus older `user-…` / `assistant-…` shapes). Gateway * history never carries them — only durable `row_id` / platform message_id. */ export function isSyntheticRendererId(messageId: string | undefined): boolean { diff --git a/apps/desktop/src/store/live-sync.ts b/apps/desktop/src/store/live-sync.ts index 61b2a55cf9..844c4d39f2 100644 --- a/apps/desktop/src/store/live-sync.ts +++ b/apps/desktop/src/store/live-sync.ts @@ -3,11 +3,11 @@ import { atom } from 'nanostores' // Event-driven "backend data changed" signals — the workspace-events twin for // gateway-side state. The change watcher in tui_gateway broadcasts // `pet.changed` / `cron.changed` / `sessions.changed` when its on-disk -// signatures move (see server._broadcast_watched_changes), gateway-event.ts -// routes them here, and the surfaces that used to poll (cron sidebar/page, -// messaging lists, pet sprite, live session statuses) subscribe to these ticks -// and refresh — so they move exactly when the backend acts and stay idle -// otherwise. +// signatures move (see server._broadcast_watched_changes), the gateway-event +// lifecycle handler routes them here, and the surfaces that used to poll (cron +// sidebar/page, messaging lists, pet sprite, live session statuses) subscribe +// to these ticks and refresh — so they move exactly when the backend acts and +// stay idle otherwise. // // `$changeEventsAvailable` is the compat gate: gateway.ready advertises // `change_events: true` on backends that broadcast. Consumers keep their old diff --git a/apps/desktop/src/store/settings-scope.ts b/apps/desktop/src/store/settings-scope.ts index 0c079bb7ff..c8178f22df 100644 --- a/apps/desktop/src/store/settings-scope.ts +++ b/apps/desktop/src/store/settings-scope.ts @@ -8,7 +8,7 @@ import { $activeGatewayProfile, normalizeProfileKey } from '@/store/profile' // picking a profile on one page carries to the next instead of resetting per // page. `null` means "follow the app's active profile" — the default, which // keeps single-profile users on the exact pre-existing code path (requests -// fall back to the app-wide active profile in hermes.ts `profileScoped`). +// fall back to the app-wide active profile in api/client.ts `profileScoped`). export const $settingsScopeOverride = atom(null) // The profile the settings pages are currently editing (a concrete key).