ui/goose2/ui_improvements/state_management/phase-5-session-workflow-failure-policy.md
Phase 5: Decide Chat Session Workflow Failure Policy
Status
Goal
chatSessionStore today.Why This Is Separate
renameSessionAndPersist and updateSessionProjectAndPersist exist, each policy can be changed in one place.Scope
Out Of Scope
projectStore; that remains Phase 6.Policy Options To Evaluate
Keep optimistic without rollback.
Backend first.
Optimistic with rollback.
Optimistic with refresh on failure.
Optimistic with user-visible error.
Execution Steps
Review Phase 3 workflow actions and call sites.
Choose policy per workflow.
chatSessionStore should happen after store boundaries are clearer.Implement one workflow policy at a time.
Add user-visible error handling only if the chosen policy needs it.
SidebarChatRow and SessionCard close inline edit immediately and invoke a void callback; backend-first rename failure can only be surfaced as a toast unless those components gain pending/error state.Validation
cd ui/goose2 && pnpm test -- chatSessionStore useChatSessionController SidebarSuccess Criteria
updateSession.