Skip to content

feat(web): React UI v2.0 — Phase 6 Task 51 (NewSessionModal) + live Playwright E2E#33

Merged
aksOps merged 1 commit into
mainfrom
feat/web-task-51-new-session
May 16, 2026
Merged

feat(web): React UI v2.0 — Phase 6 Task 51 (NewSessionModal) + live Playwright E2E#33
aksOps merged 1 commit into
mainfrom
feat/web-task-51-new-session

Conversation

@aksOps

@aksOps aksOps commented May 16, 2026

Copy link
Copy Markdown
Contributor

Wires the Topbar '+ New Session' button to a working modal. First Phase 6 task + first deployed-URL E2E harness.

What's in this PR

  • web/src/modals/NewSessionModal.tsx — Radix Dialog wrapper around the existing <Modal> primitive. Textarea (query) + env <select> + Cancel/Create. POSTs to /api/v1/sessions. Surfaces ApiClientError inline.
  • web/src/App.tsxnewSessionOpen state + wired onNew handler + modal mount. onCreated sets activeSid to the returned session id.
  • web/playwright.config.ts — headless chromium, ignoreHTTPSErrors.
  • web/tests/e2e/new-session.live.spec.ts — drives the deployed URL end-to-end.

Validation

  • npm run typecheck → exit 0
  • npx vitest run → 156/156 pass (no regression)
  • npm run build → clean, 306 kB JS / 94 kB gzip (added Modal + form code: ~38 kB ungzipped)
  • npx playwright test --reporter=list against https://clm.randomcodespace.dev1 passed (3.9s)

Live E2E flow

shell renders → click 'New Session' → fill query → Create →
modal closes → canvas shows new INC-YYYYMMDD-NNN id + ENV/TURNS meta

Spec drift noted

web/src/api/types.ts claims SessionId is SES-YYYYMMDD-NNN but the backend emits INC-… (legacy incident_management prefix). Type is string so it works — comment update tracked for a future renaming pass.

Out of scope

  • Phase 6 Tasks 52-56 (ApproveRationaleModal · ConfirmModal · two more E2E flows) follow in subsequent PRs.

🤖 Generated with Claude Code

Wires the Topbar '+ New Session' button to a Modal that POSTs to
/api/v1/sessions with { query, environment, submitter }, then sets
activeSid to the returned session_id (auto-loads the new session in
the canvas).

Includes:
- web/src/modals/NewSessionModal.tsx — textarea + env <select> + error envelope
- web/src/App.tsx wiring (newSessionOpen state, onNew handler, modal mount)
- web/playwright.config.ts — headless chromium, ignoreHTTPSErrors
- web/tests/e2e/new-session.live.spec.ts — drives the deployed URL end-to-end

Verified:
  npx playwright test → 1 passed (4s)

Live test path:
  shell renders → click 'New Session' → fill query → Create →
  modal closes → canvas shows new INC-YYYYMMDD-NNN id + ENV/TURNS meta

Note: TS types use 'SES-YYYYMMDD-NNN' but backend emits 'INC-…' (legacy
incident_management prefix). Documented for a future SessionId rename.
@sonarqubecloud

Copy link
Copy Markdown

@aksOps aksOps merged commit 6d1aa37 into main May 16, 2026
9 checks passed
@aksOps aksOps deleted the feat/web-task-51-new-session branch May 16, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant