diff --git a/agents-tab-popover-mockup.html b/agents-tab-popover-mockup.html
new file mode 100644
index 00000000000..ea16bb8ce32
--- /dev/null
+++ b/agents-tab-popover-mockup.html
@@ -0,0 +1,56 @@
+
+
+
+
+ Orca · proposed onboarding
+ A quiet introduction to the Agents tab
+ An anchored, one-shot popover keeps the user in context. “Try Agents” opens the tab; “Maybe later” dismisses it without changing settings.
+
+
+
+
+
+
+ First-time user Agents view has never been enabled
+
+
+
+
+ Returning user Previously used the experimental Agents view
+
+
+
+
+
+
+
+
diff --git a/src/main/persistence/loading-store/workspace-session-snapshot-publication.ts b/src/main/persistence/loading-store/workspace-session-snapshot-publication.ts
index 97cd3b2b544..51c6befec30 100644
--- a/src/main/persistence/loading-store/workspace-session-snapshot-publication.ts
+++ b/src/main/persistence/loading-store/workspace-session-snapshot-publication.ts
@@ -15,6 +15,7 @@ import { registerPersistedPaneKeyAlias } from '../restoring-sessions/pane-alias-
import {
normalizeWorkspaceSessionPaneIdentities,
remapAcknowledgedAgentPaneKeys,
+ remapActivityClearedAtPaneKeys,
remapSshRemotePtyLeaseLeafIds,
type WorkspaceSessionPaneIdentityRemap
} from '../restoring-sessions/workspace-pane-normalization'
@@ -50,10 +51,19 @@ export function setLocalWorkspaceSession(
context.runtime.state.ui?.acknowledgedAgentsByPaneKey,
normalized.leafIdByInputLeafIdByTabId
)
- if (remappedAcknowledgements.changed) {
+ const remappedActivityCutoffs = remapActivityClearedAtPaneKeys(
+ context.runtime.state.ui?.activityClearedAtByPaneKey,
+ normalized.leafIdByInputLeafIdByTabId
+ )
+ if (remappedAcknowledgements.changed || remappedActivityCutoffs.changed) {
context.runtime.state.ui = {
...context.runtime.state.ui,
- acknowledgedAgentsByPaneKey: remappedAcknowledgements.acknowledgements
+ ...(remappedAcknowledgements.changed
+ ? { acknowledgedAgentsByPaneKey: remappedAcknowledgements.acknowledgements }
+ : {}),
+ ...(remappedActivityCutoffs.changed
+ ? { activityClearedAtByPaneKey: remappedActivityCutoffs.cutoffs }
+ : {})
}
}
for (const entry of normalized.legacyPaneKeyAliasEntries) {
diff --git a/src/main/persistence/restoring-sessions/pane-key-remapping.ts b/src/main/persistence/restoring-sessions/pane-key-remapping.ts
new file mode 100644
index 00000000000..ea863e79acc
--- /dev/null
+++ b/src/main/persistence/restoring-sessions/pane-key-remapping.ts
@@ -0,0 +1,67 @@
+import type { PersistedState } from '../../../shared/persisted-state-types'
+import { isTerminalLeafId, makePaneKey, parsePaneKey } from '../../../shared/stable-pane-id'
+
+type PaneLeafRemap = Map