Problem (one or two sentences)
The ask/footer state logic in ChatView is bundled into a large effect, which makes approval-related behavior harder to review and change safely. That increases the cost of fixing the approval-control flash.
Context (who is affected and when)
This affects contributors working in the chat UI, especially when touching approval, footer buttons, or ask-state behavior. It matters now because issue #102 needs small, reviewable changes in this area.
Desired behavior (conceptual, not technical)
The chat UI should have a small, easy-to-read unit responsible for deriving ask/footer state so behavior changes are easier to review and test.
Constraints / preferences (optional)
Match existing repo patterns by extracting a focused hook/helper. Do not introduce a new reducer or state-machine abstraction for this area.
Request checklist
Zoo Code Task Links (optional)
Acceptance criteria (optional)
Proposed approach (optional)
Extract the logic currently living around the ask/footer-state branch in ChatView into a useAskUiState-style hook/helper, similar in spirit to other focused webview hooks already used in this repo.
Trade-offs / risks (optional)
This is prep work, so the main risk is over-abstracting. Keep the extraction narrow and behavior-preserving.
Problem (one or two sentences)
The ask/footer state logic in
ChatViewis bundled into a large effect, which makes approval-related behavior harder to review and change safely. That increases the cost of fixing the approval-control flash.Context (who is affected and when)
This affects contributors working in the chat UI, especially when touching approval, footer buttons, or ask-state behavior. It matters now because issue #102 needs small, reviewable changes in this area.
Desired behavior (conceptual, not technical)
The chat UI should have a small, easy-to-read unit responsible for deriving ask/footer state so behavior changes are easier to review and test.
Constraints / preferences (optional)
Match existing repo patterns by extracting a focused hook/helper. Do not introduce a new reducer or state-machine abstraction for this area.
Request checklist
Zoo Code Task Links (optional)
Acceptance criteria (optional)
lastMessage-> ask/footer-state derivation inChatViewis extracted into a focused hook/helper.ChatViewtests continue to behave the same.Proposed approach (optional)
Extract the logic currently living around the ask/footer-state branch in
ChatViewinto auseAskUiState-style hook/helper, similar in spirit to other focused webview hooks already used in this repo.Trade-offs / risks (optional)
This is prep work, so the main risk is over-abstracting. Keep the extraction narrow and behavior-preserving.