Add compact runtime session visibility#21
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a compact “runtime sessions” inventory endpoint and surfaces it in the web dashboard to provide at-a-glance visibility into recent runs and workflow progress, while also aligning the dashboard’s run status filters with the backend’s serialized RunStatus values.
Changes:
- Added
GET /api/runtime/sessionsreturning a compact list of recent runs plus derived workflow/lifecycle/action-hint summaries. - Updated the dashboard to fetch and render “Runtime Session” cards (including workflow progress and action hints).
- Updated the dashboard run-status filter values to match backend kebab-case status strings (e.g.,
awaiting-approval,succeeded).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
crates/web/src/server.rs |
Adds a new route for the runtime sessions inventory endpoint. |
crates/web/src/api.rs |
Implements /api/runtime/sessions and introduces compact response/summary types exported to the frontend. |
crates/web/frontend/src/views/DashboardView.vue |
Fetches runtime sessions alongside runs and renders compact runtime session cards; fixes status filter values. |
crates/web/frontend/src/composables/useApi.js |
Adds getRuntimeSessions() API helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 pull request introduces a new "runtime sessions" inventory feature to the dashboard, providing a compact, real-time overview of active and recent sessions. It adds a new API endpoint, backend data models, and a UI component to display and interact with runtime sessions. The changes also include utility functions for formatting and filtering, and comprehensive tests for the new API.
Backend: Runtime Sessions API
GET /api/runtime/sessionsendpoint that returns a compact inventory of runtime sessions, including counts and detailed summaries for dashboard and TUI clients. [1] [2]RuntimeSessionsQuery,RuntimeSessionCounts,RuntimeWorkflowSummary,RuntimeSessionSummary, andRuntimeSessionsResponsefor type-safe API responses.Frontend: Dashboard Integration
getRuntimeSessionstouseApi.jsand arefreshRuntimeSessionsfunction to periodically fetch and update runtime session data. [1] [2]runtimeSessions,runtime,runtimeFocusSessions) to manage and present runtime session data in the dashboard. [1] [2]DashboardView.vuefor displaying the runtime sessions inventory, including status badges, workflow progress, and action hints, with filtering and manual refresh controls.Utilities and Enhancements
Testing
/api/runtime/sessionsendpoint returns the correct structure and data for session inventory.## Summary\n- add compact /api/runtime/sessions inventory for recent runs and workflow state\n- show runtime session cards in the dashboard with lifecycle, provider/mode, workflow progress, and action hints\n- fix persisted run status filter values to match serialized run statuses\n\n## Validation\n- cargo fmt --all -- --check\n- cargo check -p agent007-web\n- cargo test -p agent007-web api_runtime_sessions_returns_compact_inventory --lib\n- npm --prefix crates/web/frontend run build