feat(web): React UI v2.0 — Phase 6 Task 51 (NewSessionModal) + live Playwright E2E#33
Merged
Merged
Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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. SurfacesApiClientErrorinline.web/src/App.tsx—newSessionOpenstate + wiredonNewhandler + modal mount.onCreatedsetsactiveSidto 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 0npx 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=listagainsthttps://clm.randomcodespace.dev→ 1 passed (3.9s)Live E2E flow
Spec drift noted
web/src/api/types.tsclaimsSessionIdisSES-YYYYMMDD-NNNbut the backend emitsINC-…(legacy incident_management prefix). Type isstringso it works — comment update tracked for a future renaming pass.Out of scope
🤖 Generated with Claude Code