Phase 3: closing-overlay fix + goodbye-composer dedupe

Customer chat refreshSessionStatus now clears sessionExpired carryover so the
goodbye composer renders correctly when re-opening a closing session from
history. Backend /api/shared/chat/:id/info returns goodbye_submitted_by_me;
both apps suppress the composer for the side that has already submitted and
render an awaiting-banner view instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 13:43:19 +08:00
parent 05ab1e10df
commit 6801001b64
6 changed files with 157 additions and 10 deletions

View File

@@ -144,3 +144,12 @@ export const getSessionClosures = async (sessionId) => {
ORDER BY created_at ASC
`
}
export const hasUserSubmittedClosure = async (sessionId, userType) => {
const [row] = await sql`
SELECT 1 FROM session_closures
WHERE session_id = ${sessionId} AND user_type = ${userType}
LIMIT 1
`
return !!row
}