Repository navigation
Add interactive subscription dashboard - #931
Open
DavidBadura wants to merge 4 commits into
Open
DavidBadura wants to merge 4 commits into
DavidBadura wants to merge 4 commits into
Conversation
A k9s like terminal UI built on symfony/tui to monitor and manage subscriptions. It shows status, progress and lag in a live updating table, has a describe view with the error and stack trace, and runs the subscription commands (setup, boot, run, pause, reactivate, refresh, teardown, remove, rebuild) on the selected or marked subscriptions. symfony/tui requires PHP 8.4, so it is only a dev dependency and a suggestion. The unit workflow removes it for PHP 8.2/8.3 and lowest dependencies, and the tests are skipped when it is missing. bin/subscription-dashboard-demo starts the dashboard with an in-memory store and a few example subscribers.
|
Hello 👋 here is the most recent benchmark result:
This comment gets update everytime a new commit comes in! |
DanielBadura
reviewed
Oct 7, 2026
| * | ||
| * @experimental | ||
| */ | ||
| final class SubscriptionDashboard |
Member
There was a problem hiding this comment.
i would say to mark everything besides the command itself also internal, no? Or do you want this to be an official api/entry points for users?
The actions are now executed with the existing subscription commands in a separate process, so the dashboard keeps rendering and reacting to input while e.g. a long boot or rebuild is running. A spinner shows the running action, and a second action has to wait until it is done. The process is polled from the event loop and its output goes into a temporary file, so this also works on windows where revolt can not wait on pipes. If the subscription commands are not registered in the same console application (like in the demo), or with --in-process, the actions still run in the dashboard process.
The run worker stops as soon as all messages are processed. The dashboard uses it, so a run started there catches up completely instead of processing only one batch.
The rate is calculated from the positions of the last reloads, averaged over ten seconds. It is shown as its own column, in the describe view together with an estimate of the remaining time, and for the head in the header.
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 adds
event-sourcing:subscription:dashboard, a k9s like terminal UI built on the new symfony/tui component. It shows all subscriptions in a live updating table with status, progress and lag, has a describe view with the error and stack trace, and lets you run setup, boot, run, pause, reactivate, refresh, teardown, remove and rebuild on the selected or marked subscriptions. Only actions that fit the status are offered, and the destructive ones ask for confirmation.The actions run the existing subscription commands in a separate process, so the UI keeps updating while a long boot or rebuild is running. If those commands are not registered in the same console application, or with
--in-process, they run in the dashboard process instead. For this the run command got a new--stop-when-finishedoption, which stops the worker as soon as all messages are processed.symfony/tui needs PHP 8.4, so it is only added as dev dependency and suggestion. The command prints an error if it is missing. The unit workflow removes it for PHP 8.2/8.3 and lowest dependencies (otherwise it would pull in symfony/string 8 and we would no longer test against console 5.4), and the tests are skipped in that case.
To try it out, run
bin/subscription-dashboard-demo. It starts the dashboard with an in-memory store, a few example subscribers and a background producer and worker, so the positions and lags change live.The whole thing is marked as experimental, since symfony/tui itself is experimental too.