Skip to content

Add transcript annotation UI - #308

Merged
johnnygreco merged 3 commits into
feature/trace-annotationsfrom
issue-303-annotation-ui
Jun 17, 2026
Merged

Add transcript annotation UI#308
johnnygreco merged 3 commits into
feature/trace-annotationsfrom
issue-303-annotation-ui

Conversation

@johnnygreco

Copy link
Copy Markdown
Owner

Closes #303.

Summary

  • Adds a session annotation strip, per-event annotation controls, and a reusable annotation drawer to the transcript UI.
  • Wires transcript annotations to the API from Add annotation storage, domain model, and JSON API foundation聽#302 with scoped fetches, local target indexing, count badges, create/update/delete flows, and HTMX/SSE reinitialization.
  • Covers the UI with render tests, JS helper tests, stateful Playwright annotation API fixtures, desktop create/edit/delete e2e coverage, and mobile failure-state coverage.

Validation

  • make generate-check
  • make fmt-check
  • make test
  • make lint
  • make build
  • npm run test:frontend
  • npm run test:e2e
  • npm run test:a11y
  • git diff --check
  • Local review server rebuilt with make install-local INSTALL_DIR="$HOME/.local/bin", restarted in tmux, and verified with curl -fsS http://localhost:4600/ >/dev/null.

QA Artifacts

  • test-results/annotations/session-annotation-desktop.png
  • test-results/annotations/event-annotation-drawer.png
  • test-results/annotations/session-annotation-mobile.png
  • test-results/annotations/review-server-dashboard.png

Notes

@johnnygreco

Copy link
Copy Markdown
Owner Author

Review Record

Target reviewed: feature/trace-annotations 1b5455018e3bbcaa9f0cd326cfb8313ba58da10c .. issue-303-annotation-ui bdda102d8ddbbd9757c85beee561b53a7eeecc35

Reproduce diff:

git diff --find-renames 1b5455018e3bbcaa9f0cd326cfb8313ba58da10c..bdda102d8ddbbd9757c85beee561b53a7eeecc35

Panel design:

  • UI/accessibility/focus reviewer for transcript drawer workflow, responsive behavior, live regions, and keyboard handling.
  • JS/API reviewer for annotation fetch/save/delete state, stale request handling, API contract use, and DOM safety.
  • Templ integration reviewer for source template placement, generated output, and transcript target wiring.
  • Test coverage reviewer for e2e fixture realism, reload behavior, and assertions against Build human transcript annotation UI聽#303 acceptance criteria.
  • Skipped data/migration review because this PR has no schema change. Skipped dependency review because no dependency or lockfile changes were made. Skipped docs review because docs/QA reporting are covered by the final annotation QA issue.

Accepted findings fixed:

  • Annotation reloads could leave stale counts/content when a save/delete happened during an in-flight annotation GET. Fixed with request/mutation tracking plus forced reload queuing.
  • The modal drawer did not contain/restore focus. Fixed with opener tracking, Tab focus trapping, and focus restoration on close.
  • Annotation count/target context was visual-only for assistive tech. Fixed by updating button accessible names with target/count state.
  • The e2e conversation reload check was a no-op because the fixture lacked #conversation-container. Fixed the fixture and made the test fail if the container is missing.
  • Event annotation fixture buttons masked the production #transcript-wrap[data-session-id] fallback. Fixed fixture buttons to use empty session ids and asserted the event POST body includes the resolved session id.
  • Save completion could drop focus after disabling the submit button. Fixed by restoring the focused form control after save completion.
  • Annotation status/error updates were visual-only and error text was set before assertive semantics. Fixed live-region markup and update ordering.
  • Session annotation fixture POSTs silently filled missing session_id. Fixed fixture validation and asserted session create POST payload.
  • Delete could leave focus on a removed Delete button. Fixed by focusing a drawer fallback after delete rerender and asserted focus lands on New.

Rejected/follow-up findings:

  • None. Backward compatibility was explicitly out of scope and no compatibility shims were added.

Final reviewer status:

  • JS/API rerun: clean.
  • Test coverage final rerun: clean.
  • UI/accessibility final clean check: clean.

Validation:

  • make generate-check
  • make fmt-check
  • make test
  • make lint
  • make build
  • npm run test:frontend
  • npx playwright test tests/e2e/dashboard.spec.ts -g "annotations|annotation" --reporter=line
  • npm run test:e2e
  • npm run test:a11y
  • git diff --check

Note: one intermediate full e2e attempt hit an unrelated existing dashboard-search scroll timeout; the failed test passed on focused rerun, and the subsequent full npm run test:e2e passed all 52 tests.

@johnnygreco
johnnygreco merged commit f9bfcf7 into feature/trace-annotations Jun 17, 2026
11 checks passed
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