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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user