Add live conversation list, create and history UI (U01, #16) #58

Merged
amiryahaya merged 11 commits from feat/16-conversation-ui into main 2026-10-26 02:42:22 +01:00
Owner

Refs #16

What

Replaces the static React shell with a live conversation screen: list, create, and history (read-only), in English and Bahasa Melayu.

  • web/src/api/conversations.ts: typed client (list, create, history) with uniform outcomes; copies only documented fields.
  • web/src/conversations/: useConversations hook (abort/supersede, scoped retries, pagination), ConversationList, History.
  • web/src/i18n/: catalogue, provider, language switch, formatTime. Language choice is memory-only.
  • docs/operations/web-conversations.md: outcome table, privacy rules, known limits.

Behaviour worth knowing

  • The server hides a lost session on GET behind the uniform 404, so a 404 on the list signs the user out. A history 404 shows "gone" and also asks AuthGate to re-check /auth/me.
  • POST 403 (origin/CSRF) is a retryable "unavailable", not a sign-out.
  • No new npm dependencies, no router, no browser storage, no service worker. Message bodies are text nodes only; nothing protected reaches console, URL, title or aria-labels. Conversations are labelled by time only.

Verification

  • npm run typecheck, npm run build: clean.
  • npm run test:coverage: 89/89 tests, 96.33% line coverage (minimum 80%).
  • Dual-pass review (Ponytail complexity + opus correctness). Pass 2 found 3 Important bugs (lost session on GET, POST 403 lock-up, shared retry firing a stray create); all fixed with tests that failed first, then re-checked.
  • No Rust change, so the cargo suites are unaffected.

Not in this PR

  • Sending messages / composer (#27) and citations (#29); the composer stays disabled.
  • Malay copy has not had a native-speaker review.
  • Session-bar copy stays English in Malay mode; same-minute conversations have identical names; focus falls to the page when Load more / Load earlier disappears at the last page (all listed in the doc).
  • Not exercised in a real browser.

🤖 Generated with Claude Code

Refs #16 ## What Replaces the static React shell with a live conversation screen: list, create, and history (read-only), in English and Bahasa Melayu. - `web/src/api/conversations.ts`: typed client (list, create, history) with uniform outcomes; copies only documented fields. - `web/src/conversations/`: `useConversations` hook (abort/supersede, scoped retries, pagination), `ConversationList`, `History`. - `web/src/i18n/`: catalogue, provider, language switch, `formatTime`. Language choice is memory-only. - `docs/operations/web-conversations.md`: outcome table, privacy rules, known limits. ## Behaviour worth knowing - The server hides a lost session on GET behind the uniform 404, so a 404 on the list signs the user out. A history 404 shows "gone" and also asks AuthGate to re-check `/auth/me`. - POST 403 (origin/CSRF) is a retryable "unavailable", not a sign-out. - No new npm dependencies, no router, no browser storage, no service worker. Message bodies are text nodes only; nothing protected reaches console, URL, title or aria-labels. Conversations are labelled by time only. ## Verification - `npm run typecheck`, `npm run build`: clean. - `npm run test:coverage`: 89/89 tests, **96.33% line coverage** (minimum 80%). - Dual-pass review (Ponytail complexity + opus correctness). Pass 2 found 3 Important bugs (lost session on GET, POST 403 lock-up, shared retry firing a stray create); all fixed with tests that failed first, then re-checked. - No Rust change, so the cargo suites are unaffected. ## Not in this PR - Sending messages / composer (#27) and citations (#29); the composer stays disabled. - Malay copy has not had a native-speaker review. - Session-bar copy stays English in Malay mode; same-minute conversations have identical names; focus falls to the page when Load more / Load earlier disappears at the last page (all listed in the doc). - Not exercised in a real browser. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(web): treat a hidden lost session as sign-out and scope retries (#16)
Some checks failed
CI / Web checks (push) Failing after 49s
CI / Web checks (pull_request) Failing after 1m42s
CI / Rust checks (push) Has been cancelled
CI / Rust checks (pull_request) Has been cancelled
012456cc66
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(web): keep the session-ended notice across a second re-check (#16)
All checks were successful
CI / Web checks (push) Successful in 58s
CI / Web checks (pull_request) Successful in 50s
CI / Rust checks (pull_request) Successful in 17m54s
CI / Rust checks (push) Successful in 20m17s
55b4f3e552
CI failure: the expiry test did not mock the conversations list, so the list's 404 (a lost
session) started a second /auth/me re-check that erased the notice the timer's re-check set.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.