Skip to content

Add compact runtime session visibility#21

Merged
danieldear merged 2 commits into
mainfrom
codex/runtime-session-visibility
May 16, 2026
Merged

Add compact runtime session visibility#21
danieldear merged 2 commits into
mainfrom
codex/runtime-session-visibility

Conversation

@danieldear
Copy link
Copy Markdown
Owner

@danieldear danieldear commented May 16, 2026

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

  • Added a new GET /api/runtime/sessions endpoint that returns a compact inventory of runtime sessions, including counts and detailed summaries for dashboard and TUI clients. [1] [2]
  • Defined new data models: RuntimeSessionsQuery, RuntimeSessionCounts, RuntimeWorkflowSummary, RuntimeSessionSummary, and RuntimeSessionsResponse for type-safe API responses.
  • Implemented logic to compute session counts and lifecycle states, summarize workflow progress, and provide actionable hints for each session.

Frontend: Dashboard Integration

  • Added API method getRuntimeSessions to useApi.js and a refreshRuntimeSessions function to periodically fetch and update runtime session data. [1] [2]
  • Introduced new state variables and computed properties (runtimeSessions, runtime, runtimeFocusSessions) to manage and present runtime session data in the dashboard. [1] [2]
  • Implemented a new UI component in DashboardView.vue for displaying the runtime sessions inventory, including status badges, workflow progress, and action hints, with filtering and manual refresh controls.

Utilities and Enhancements

  • Added utility functions for formatting session age and determining badge/class styling based on session lifecycle.
  • Updated run status filter options in the dashboard to match new lifecycle states.

Testing

  • Added an integration test to ensure the /api/runtime/sessions endpoint 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

Copilot AI review requested due to automatic review settings May 16, 2026 14:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/sessions returning 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.

Comment thread crates/web/frontend/src/views/DashboardView.vue Outdated
@danieldear danieldear merged commit 7abb0f6 into main May 16, 2026
2 checks passed
@danieldear danieldear deleted the codex/runtime-session-visibility branch May 16, 2026 19:47
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.

2 participants