ui/goose2/ui_improvements/state_management/phase-9-optional-immer.md
Phase 9: Optional Immer Adoption
Status
Goal
Scope
ui/goose2/src/features/chat/stores/chatStore.tsui/goose2/src/features/chat/stores/chatSessionStore.tsOut Of Scope
Cargo.toml; for frontend packages follow the repo's package workflow.Execution Steps
Reassess update complexity after Phases 1 through 7.
chatStore nested updates are still hard to read.Decide whether Immer is worth the dependency and pattern change.
If adopting, start with one store.
chatStore first.Add or update focused tests.
Reassess before expanding.
chatSessionStore if there is still meaningful nested update boilerplate.Validation
cd ui/goose2 && pnpm test -- chatStore chatSessionStore useChatSuccess Criteria