Skip to content

Add queue display to diagnostic UI#451

Merged
cschleiden merged 4 commits intomainfrom
copilot/add-queue-display-to-diag-ui
Oct 28, 2025
Merged

Add queue display to diagnostic UI#451
cschleiden merged 4 commits intomainfrom
copilot/add-queue-display-to-diag-ui

Conversation

Copy link
Contributor

Copilot AI commented Oct 24, 2025

Overview

This PR adds comprehensive queue information display to the diagnostic UI, making it easier to monitor and debug workflow and activity queues.

Changes

Backend API

Added a new /api/stats endpoint in diag/diag.go that exposes backend queue statistics:

  • Returns PendingWorkflowTasks - map of workflow queue names to pending task counts
  • Returns PendingActivityTasks - map of activity queue names to pending task counts
  • Leverages the existing GetStats() method already implemented in all backends (Redis, MySQL, SQLite)

Frontend UI Enhancements

Home Page

  • Added a Queues heading (h2 level) at the top of the page
  • Queue statistics section displays:
    • Workflow queues table with queue names and pending task counts
    • Activity queues table with queue names and pending task counts
    • All queues including system queues are shown
  • Added Instances heading (h2 level) below the queues section
  • Added a Queue column to the instances table showing which queue each workflow instance was scheduled on

Instance Detail Page

  • Added Queue field in the instance metadata section
  • Added queue information display in event headers for ActivityScheduled and SubWorkflowScheduled events
  • Queue information is also accessible in the detailed event attributes section
  • Full page view shows workflow graph, history, and all queue-related information

Screenshots

Home page with Queues heading and queue statistics:

Instance detail page with queue information:

Implementation Notes

  • All changes are minimal and focused on displaying existing queue data already tracked by the backend
  • TypeScript types added for type safety (Stats interface in client.ts)
  • UI components use Bootstrap tables consistent with existing design
  • Queue information display is non-intrusive and integrates naturally with the existing UI layout
  • Improved page structure with clear section headings for better organization

Fixes #322

Original prompt

This section details on the original issue you should resolve

<issue_title>Display size and contents of workflow and activity queues in diag UI</issue_title>
<issue_description>Now that we support different queues for workflows and activities, we should add support for them in the diag UI.

It should show:

  • Currently active (known) queues
  • number of tasks in each queue

For each workflow instance and activity, it should show the queues the tasks were scheduled in.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 24, 2025 17:36
Co-authored-by: cschleiden <2201819+cschleiden@users.noreply.github.com>
Co-authored-by: cschleiden <2201819+cschleiden@users.noreply.github.com>
Copilot AI changed the title [WIP] Add display for workflow and activity queues in diag UI Add queue display to diagnostic UI Oct 24, 2025
Copilot AI requested a review from cschleiden October 24, 2025 17:56
@cschleiden
Copy link
Owner

@copilot - On the home page, add a new heading for the queues. Move the Instances heading down

  • Also show the system queues

…ng down

Co-authored-by: cschleiden <2201819+cschleiden@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 24, 2025

@copilot - On the home page, add a new heading for the queues. Move the Instances heading down

  • Also show the system queues

Updated in commit 29b4fa1:

  • Added "Queues" heading (h2) at the top of the home page
  • Moved "Instances" heading (h2) below the queue statistics section
  • All queues are now displayed including system queues (currently showing "default" queue)

Updated home page

@cschleiden
Copy link
Owner

@copilot add a better screenshot of the instance detail
Page

Copy link
Contributor Author

Copilot AI commented Oct 25, 2025

@copilot add a better screenshot of the instance detail
Page

Updated screenshot of the instance detail page showing:

  • Queue field in the instance metadata ("default")
  • Workflow graph with the complete hierarchy
  • History events including SubWorkflowScheduled events with queue information in attributes

Instance detail page

@cschleiden cschleiden marked this pull request as ready for review October 28, 2025 22:54
@cschleiden cschleiden merged commit 0d07083 into main Oct 28, 2025
5 checks passed
@cschleiden cschleiden deleted the copilot/add-queue-display-to-diag-ui branch October 28, 2025 23:06
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.

Display size and contents of workflow and activity queues in diag UI

2 participants