ADR-028: Customer Support Multi-Session Entry and Deep-Link Conflict Resolution

Prev Next

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:

  1. A user deep-links directly to /customer-support/user/[id] without a matching local session.
  2. 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.

  1. Session model supports multiple active sessions per site.
  2. /customer-support entry:
    • Landing state with 0 sessions: stay on search page.
    • Landing state with >=1 sessions: show an Active Sessions CTA 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).
  3. 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.
  4. 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.
  5. Session-dependent detail actions resolve session by (siteId, userId) instead of site-only lookup.
  6. 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

Image

Notes

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