fix(app): restore missing workspaces from History

Workspace and agent archival are separate lifecycles. Carry restore intent from History so closed agents can reopen archived workspaces without changing ordinary navigation.
This commit is contained in:
Mohamed Boudra
2026-07-16 15:10:11 +02:00
parent 6aba0370ae
commit 9cdbb88520
6 changed files with 95 additions and 65 deletions
+5
View File
@@ -52,6 +52,11 @@ Archiving runs through `AgentManager.archiveAgent` (`packages/server/src/server/
Cascade is what keeps subagent fleets from outliving their orchestrator.
Workspace archive is a separate lifecycle. Archiving or removing a worktree can close a surviving
agent record without setting the agent's `archivedAt`, while its `workspaceId` still points at the
archived workspace. History restore must therefore follow explicit restore intent for that missing
workspace identity; it must not infer workspace lifecycle from `agent.archivedAt`.
## Tabs vs archive
These are two distinct concepts that used to be conflated: