## Code Analysis ### The status hook preserves delivered state without requiring a support code `frontend/src/hooks/useSupportTicketStatus.ts:6-9,34-40` ```ts export interface SupportTicketDelivery { status: 'pending' | 'sending' | 'delivered' | 'failed' | null; supportCode: string | null; } const poll = async () => { try { const { data } = await api.get(`${statusBasePath}/${clientTicketId}/status`); if (cancelled) return; setState({ status: data.status ?? null, supportCode: data.support_code ?? null }); if (data.status === 'delivered') return; } catch { // Transient — keep polling until MAX_POLLS is exhausted. } ``` The hook stores `data.status` and `data.support_code` independently. A delivered response with a null support code therefore produces `{ status: 'delivered', supportCode: null }`, and polling stops on the delivered status. ### The form requires both delivery and an optional code `frontend/src/components/support/SupportTicketForm.tsx:119-135` ```tsx {submittedId && (
{t('requestQueued')}
{delivery.status === 'delivered' && delivery.supportCode ? ( <>{t('supportCode')}: {delivery.supportCode}
{t('supportCodeHint')}
> ) : ( <>{t('requestId')}: {submittedId}
{delivery.status === 'failed' ? t('stillQueuedLocally') : t('confirmingDelivery')}
> )}