mirror of
https://github.com/stablyai/orca.git
synced 2026-10-21 08:03:33 +00:00
fix(agent-dashboard): persist acknowledgedAgentsByPaneKey across restart
Without this, agent rows the user already visited come back bold every relaunch now that the rows themselves survive restart (per docs/agent-dashboard-retention-restart.md). Hydrate sanitizes input field-by-field (rejects null/non-object/array, prototype-pollution keys, non-finite/non-positive values) and applies a 7-day TTL paralleling HYDRATE_MAX_AGE_MS in agent-hooks/server.ts so hard-quit/crash paths can't grow the persisted map forever. Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -292,7 +292,8 @@ export function getDefaultUIState(): PersistedUIState {
|
||||
statusBarVisible: true,
|
||||
dismissedUpdateVersion: null,
|
||||
lastUpdateCheckAt: null,
|
||||
trustedOrcaHooks: {}
|
||||
trustedOrcaHooks: {},
|
||||
acknowledgedAgentsByPaneKey: {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1461,6 +1461,15 @@ export type PersistedUIState = {
|
||||
/** Once the user has seen the "your sessions won't be interrupted"
|
||||
* reassurance card, we never show it again. */
|
||||
updateReassuranceSeen?: boolean
|
||||
/** Per-paneKey "user has visited this row" timestamps, used by the inline
|
||||
* agents list to mute rows the user has already seen. Persisted because
|
||||
* agent rows themselves now survive restart (see
|
||||
* docs/agent-dashboard-retention-restart.md); without persisting acks too,
|
||||
* rows you'd already clicked come back bold on relaunch. Stale entries
|
||||
* keyed on dead panes are inert: a future paneKey reuse stamps a fresh
|
||||
* stateStartedAt that beats the old ack via the existing comparison in
|
||||
* WorktreeCardAgents. Renderer-owned, written through ui:set. */
|
||||
acknowledgedAgentsByPaneKey?: Record<string, number>
|
||||
/** URL to navigate to when a new browser tab is opened. Null means blank tab.
|
||||
* Phase 3 will expand this to a full BrowserSessionProfile per workspace. */
|
||||
browserDefaultUrl?: string | null
|
||||
|
||||
Reference in New Issue
Block a user