Add External Test Runs API listing endpoints and new Test Runs UI (list + detail) - #348
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/bg-playground/BGSTM/sessions/294d8d86-ccd0-403f-8efe-8eea70b4325f Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bg-playground/BGSTM/sessions/294d8d86-ccd0-403f-8efe-8eea70b4325f Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Test Runs section to BGSTM frontend
Add External Test Runs API listing endpoints and new Test Runs UI (list + detail)
May 10, 2026
…_id to satisfy mypy Column[Any] key constraint
bg-playground
marked this pull request as ready for review
May 10, 2026 01:55
bg-playground
approved these changes
May 10, 2026
bg-playground
left a comment
Owner
There was a problem hiding this comment.
Backend: Two new paginated list endpoints (GET /external-results/sessions and GET /external-results/session/{id}/cases) with CRUD functions, response schemas, and integration tests
Frontend: New TestRunsPage (/runs) and TestRunDetailPage (/runs/:sessionId) pages with full session/case browsing UI, wired into App.tsx and Navigation.tsx
Bug fix: mypy type annotation corrected in list_case_results_for_session (dict[Any, list[UUID]])
Merged
7 tasks
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.
This PR surfaces Playwright external run data already persisted in
external_run_sessions/external_case_resultsby adding missing list APIs and introducing a dedicated Test Runs UI. It adds end-to-end support for browsing sessions and drilling into per-session case outcomes.Backend: external results list APIs
list_sessions(db, project_id?, status?, skip, limit) -> (sessions, total)list_case_results_for_session(db, session_id, skip, limit) -> (cases, total)SessionListResponseCaseResultListResponseGET /external-results/sessionsGET /external-results/session/{session_id}/casesSessionResponsewithsummaryand included it in_session_to_response(summary=session.summary or {}), withci_urlnormalized to string for response safety.Backend: query efficiency
Frontend: external results API client
frontend/src/api/externalResults.tswith typed models and methods:listSessions(...)getSession(sessionId)listSessionCases(sessionId, ...)Frontend: new Test Runs pages
TestRunsPage(/runs):TestRunDetailPage(/runs/:sessionId):App wiring
App.tsx:/runs/runs/:sessionIdNavigation.tsx:Test Runs(betweenTest CasesandManual Links)Targeted backend coverage
Original prompt
Overview
Add a Test Runs section to the BGSTM frontend that surfaces the external Playwright test run data already being collected by the backend. Currently the
external_run_sessionsandexternal_case_resultstables are populated by the Playwright reporter but are completely invisible in the UI.This change requires:
externalResults.ts)TestRunsPage.tsx,TestRunDetailPage.tsx)App.tsxandNavigation.tsxBackend Changes
1. Add
list_sessionsCRUD functionIn
backend/app/crud/external_results.py, add:2. Add
list_case_results_for_sessionCRUD functionIn
backend/app/crud/external_case_results.py, add:3. Add schema for paginated session list response
In
backend/app/schemas/external_results.py, add:4. Add two new GET endpoints to
backend/app/api/external_results.pyGET /external-results/sessions— paginated list of all sessionsGET /external-results/session/{session_id}/cases— case results for a session