Context
Customer Support currently assumes one active local session per site and auto-restores it from /customer-support.
This behavior becomes ambiguous in two scenarios:
- A user deep-links directly to
/customer-support/user/[id]without a matching local session. - Multiple active sessions already exist for the same site.
Without explicit entry rules, agents can be redirected unexpectedly, lose direct-link intent, or finalize actions without the intended session context.
Decision
Customer Support adopts explicit entry behavior for single and multiple session states.
- Session model supports multiple active sessions per site.
/customer-supportentry:- Landing state with
0sessions: stay on search page. - Landing state with
>=1sessions: show anActive SessionsCTA in the header. - Session restore is always explicit from CTA click; no auto-restore is performed.
- Session restore CTA is shown only on landing state (no search-initializing query params).
- Landing state with
- Deep-link entry (
/customer-support/user/[id]):- matching active session for deep-linked user: resume directly.
- no sessions: start a new session for deep-linked user.
- active sessions exist but no match: show conflict modal.
- Deep-link conflict actions are mode-specific:
- single-session conflict: Continue Current Session, End Current Session and Open Details, Start New Session.
- multi-session conflict: directly render active-session list (restore any listed session), Start New Session, Cancel.
- Session-dependent detail actions resolve session by
(siteId, userId)instead of site-only lookup. - Deep-link conflict handling is a hard render gate: detail content remains hidden until the gate resolves.
Consequences
- Deep-link intent is preserved while preventing accidental session mismatch.
- Agents explicitly choose restore behavior whenever active sessions exist on landing state, reducing hidden auto-navigation.
- Session resolution becomes safer for Save/End and audit-log actions in multi-session contexts.
- UX and state logic become more explicit, with additional modal/list flows and tests required.
- Returning to an in-progress session requires one explicit CTA click instead of automatic redirect.
Decision Flow

Notes
- This ADR defines runtime entry/session semantics, not visual styling details.
- Implementation follows strict TDD (
red -> green -> refactor) and includes dedicated coverage for0/1/manybranching and deep-link conflict cases.