Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: harden task thread state contracts (#171)

3 months ago

221a8ce
Authored
Max Weinbach6/20/2026, 8:56:38 AM
Preserve task-owned sessions and task/dashboard selection invariants; enforce terminal task immutability and runtime quiescence; serialize artifact and lifecycle mutations; harden persisted ownership, workspace path handling, Settings overlays, approvals, and cached bootstrap behavior; and add broad deterministic desktop/core regressions.

Parentd73b8b7

71 files changed
  • apps/desktop/electron/main.ts+1−1
  • apps/desktop/electron/services/persistence.ts+4−0
  • apps/desktop/electron/services/windowState.ts+1−1
  • apps/desktop/src/App.tsx+6−2
  • apps/desktop/src/app/sandboxApprovalVisibility.ts+62−0
  • apps/desktop/src/app/store.actions/bootstrap.ts+54−8
  • apps/desktop/src/app/store.actions/tasks.ts+16−10
  • apps/desktop/src/app/store.actions/thread.ts+25−1
apps/desktop/src/app/store.actions/workspace.ts
+113
−11
  • apps/desktop/src/app/store.helpers.ts+2−1
  • apps/desktop/src/app/store.helpers/controlSocket.ts+61−21
  • apps/desktop/src/app/store.ts+1−0
  • apps/desktop/src/app/threadFilters.ts+13−0
  • apps/desktop/src/app/threadSelectionContext.ts+34−0
  • apps/desktop/src/lib/desktopSchemas.ts+16−1
  • apps/desktop/src/styles.css+5−5
  • apps/desktop/src/ui/ChatView.tsx+89−13
  • apps/desktop/src/ui/CommandPalette.tsx+9−24
  • apps/desktop/src/ui/CrashReportingErrorBoundary.tsx+1−7
  • apps/desktop/src/ui/Sidebar.tsx+4−1
  • apps/desktop/src/ui/chat/ChatComposer.tsx+2−1
  • apps/desktop/src/ui/chat/ComposerMentionMenu.tsx+1−1
  • apps/desktop/src/ui/menuBar/MenuBarUtilityShell.tsx+2−0
  • apps/desktop/src/ui/onboarding/DesktopOnboarding.tsx+2−6
  • apps/desktop/src/ui/quickChat/QuickChatShell.tsx+21−5
  • apps/desktop/src/ui/settings/SettingsShell.tsx+7−1
  • apps/desktop/src/ui/settings/pages/ArchivedChatsPage.tsx+4−1
  • apps/desktop/src/ui/settings/pages/BackupPage.tsx+2−0
  • apps/desktop/src/ui/settings/pages/McpServersPage.tsx+2−1
  • apps/desktop/src/ui/settings/pages/UpdatesPage.tsx+1−1
  • apps/desktop/src/ui/settings/pages/WorkspacesPage.tsx+9−2
  • apps/desktop/src/ui/sidebarHelpers.ts+3−1
  • apps/desktop/src/ui/tasks/ArtifactReviewCard.tsx+57−13
  • apps/desktop/src/ui/tasks/NewTaskLanding.tsx+13−2
  • apps/desktop/src/ui/tasks/TaskContextSidebar.tsx+18−2
  • apps/desktop/src/ui/tasks/TaskConversationSidebar.tsx+54−5
  • apps/desktop/test/app-notifications-window-modes.test.tsx+207−0
  • apps/desktop/test/bootstrap-cache.test.ts+505−2
  • apps/desktop/test/command-palette.test.tsx+45−12
  • apps/desktop/test/control-socket.sessions.test.ts+398−0
  • apps/desktop/test/desktop-schemas.test.ts+54−0
  • apps/desktop/test/inline-error-boundary.test.tsx+12−10
  • apps/desktop/test/menu-bar-utility-shell.test.tsx+122−0
  • apps/desktop/test/message-links.test.ts+1−1
  • apps/desktop/test/persistence-state-sanitization.test.ts+66−0
  • apps/desktop/test/protocol-v2-events.test.ts+347−0
  • apps/desktop/test/settings-shell.test.ts+5−1
  • apps/desktop/test/sidebar.test.ts+26−0
  • apps/desktop/test/task-actions.test.ts+124−3
  • apps/desktop/test/task-mode-ui.test.tsx+692−1
  • apps/desktop/test/workspace-startup.test.ts+1025−0
  • apps/mobile/src/app/(app)/(tabs)/skills/index.tsx+214−221
  • apps/mobile/src/app/(app)/settings/mcp.tsx+495−489
  • apps/mobile/src/components/ui/screen.tsx+6−1
  • apps/mobile/src/components/workspace/workspace-switcher.tsx+3−1
  • docs/websocket-protocol.md+11−11
  • src/runtime/piRuntimeOptions.ts+2−8
  • src/server/jsonrpc/routes/tasks.ts+11−13
  • src/server/runtime/ServerRuntime.ts+20−1
  • src/server/session/TurnExecutionManager.ts+23−0
  • src/server/sessionDb.ts+33−4
  • src/server/sessionDb/tasks.ts+113−22
  • src/server/sessionDb/writeCoordinator.ts+11−1
  • src/server/tasks/TaskCoordinator.ts+474−125
  • src/utils/workspacePath.ts+81−6
  • test/jsonrpc.task-artifacts-route.test.ts+31−1
  • test/mobile.thread-toolbar.test.tsx+14−0
  • test/session/agentSession.messaging.test.ts+58−0
  • test/task-artifact-versions.test.ts+922−7
  • test/task-mode.persistence.test.ts+1270−1
  • test/workspace-path.test.ts+91−0