Files
agent-desk-ng/docs/support-availability-ui.md
mono 2f7a491666 feat: harden support, localize knowledge and add operator availability [skip ci]
Source-only publication of reviewed commit 64e96a7f423673dc29ad56485be9fc79bce8af1c.

Passed in isolation: focused frontend/backend tests, race checks, TypeScript typecheck, lint, Go compilation, Flowgram build, and deterministic SDK build/tests.

Not accepted as a production release: Next.js export/native assembly remains blocked by environment memory limits; browser interaction and MySQL staging acceptance remain unverified. No production server, database/schema, runtime configuration, deployment, release tag, or workflow execution was performed.

Expected source tree: 0a4a7528e9.
2026-10-16 15:21:42 +00:00

3.9 KiB
Raw Permalink Blame History

Support availability UI

Modified in this independent fork; see hardening/README.md. Source-only feature, not a production deployment or a claim of browser acceptance.

Interfaces

  • System → Support availability: deployment-default IANA timezone and explicit team calendar mode. A team can keep dated shifts or opt into recurring weekly periods and date exceptions. Switching modes never deletes dated shifts.
  • Recurring periods support split shifts, overnight ends and 00:00–24:00. A closed date sends no open periods; unsaved hidden period inputs are retained while toggling the date back to open. Draft preview calls the server evaluator.
  • Existing dated-shift screens explain that stored rows are inactive for teams using recurring mode. They do not imply both schedules are combined.
  • Header/workbench availability controls persist Ready, Busy, Break, Unavailable and a half-open vacation interval. The backend captures the return status when vacation is first scheduled. Logging in does not reset an active absence.
  • Vacation and preview inputs explicitly use the browser timezone, show exact UTC instants, reject nonexistent DST times, and expose a choice for repeated local times. Recurring calendar results use the configured timezone. Opaque legacy process timezone names render next-opening instants explicitly in UTC.
  • Admin profile rows show live presence, effective working status and server eligibility separately. Dedicated status changes are independent of general profile edits. The unused offline-message flag is retained but read-only and labeled as legacy, never as permission to assign to disconnected staff.
  • Transfer candidates come from the server's conversation-scoped manual eligibility endpoint, not a client-side serviceStatus === Idle guess.
  • Customer chat shows technical connection separately from aggregated human support availability. No employee identity, absence interval or private reason is sent by the public status endpoint. Scheduled opening copy does not promise that an operator will be connected.

Safety and interaction coverage

The API adapter uses the existing request/session envelope and bounds background availability reads to 10 seconds. Components discard unmounted/old-session responses. Mutations and post-confirmation callbacks are checked against the captured authenticated session. Saves are single-flight; failed saves retain inputs. Read-only/preview Enter does not submit calendar changes. Closing a dirty form, changing scope, and internal/browser navigation warn before discarding.

The calendar is a scoped configuration form rather than a paginated resource, so it uses DashboardPage/Toolbar, react-hook-form, existing field/input/combobox and confirmation components. The existing agent CRUD/calendar components remain in place. All new copy is available in Russian, English and Chinese.

Checks performed

  • Full TypeScript --noEmit --incremental false: passed.
  • Focused availability helper/API tests: 13 passed.
  • Additional independent transport/locale edge tests: 10 passed, including independent deadlines, retry recovery, EU DST and Lord Howe 30-minute overlap.
  • Focused lifecycle tests: 6 passed, including StrictMode effect restart, duplicate saves, late session changes and confirmation after unmount.
  • Focused lint: no errors; existing agent avatar <img> warning remains.
  • Git whitespace check: passed.

The lifecycle tests execute actual component handlers in an isolated hook harness; they are not rendered-browser tests. Browser launch was blocked by the execution environment. Desktop/narrow-width rendering, focus behavior, keyboard interactions, native date/time controls, and real Next.js Back/Forward handling still require browser acceptance. No live account, customer message, production database or deployment was used. The integration owner records combined build and broader regression results separately in hardening/VALIDATION.md.