feat(dashboard): expand observability UI and microservice demo#19
feat(dashboard): expand observability UI and microservice demo#19kingwill101 merged 1 commit intomasterfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (28)
📝 WalkthroughWalkthroughThis pull request significantly expands the dashboard with alerting infrastructure, audit logging, modularized UI, configurable base path mounting, and enhanced task/workflow data access. It introduces new dashboard data models, extends service capabilities for task replay/revocation, and updates the example microservice with observability initialization and auto-fill features. Changes
Sequence Diagram(s)sequenceDiagram
participant Dashboard State as DashboardState
participant Service as Service
participant Evaluator as Alert Evaluator
participant Webhook as External Webhook
participant Audit as Audit Log
Dashboard State->>Service: poll() fetch queues, workers, tasks
Service-->>Dashboard State: return data
Dashboard State->>Evaluator: _evaluateAlerts(queues, workers, tasks)
alt Backlog exceeds threshold
Evaluator->>Dashboard State: _emitAlert(backlog alert)
end
alt Failed tasks exceed threshold
Evaluator->>Dashboard State: _emitAlert(failed tasks alert)
end
alt Offline workers exceed threshold
Evaluator->>Dashboard State: _emitAlert(offline workers alert)
end
Dashboard State->>Dashboard State: check alertCooldown elapsed
alt Cooldown passed and webhooks configured
Dashboard State->>Dashboard State: _sendAlertWebhooks(alert)
Dashboard State->>Webhook: POST alert payload
Webhook-->>Dashboard State: response
Dashboard State->>Audit: recordAudit(alert sent)
else Cooldown not elapsed or no webhooks
Dashboard State->>Audit: recordAudit(alert skipped)
end
Dashboard State->>Dashboard State: _broadcastRefreshSignal()
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78b2fd89cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - .env.example | ||
| environment: | ||
| STEM_WORKER_NAME: microservice-worker-1 | ||
| STEM_WORKER_QUEUE: greetings |
There was a problem hiding this comment.
Replace unsupported STEM_WORKER_QUEUE env var
In the microservice docker compose stack, this worker is configured with STEM_WORKER_QUEUE, but Stem reads queue subscriptions from STEM_WORKER_QUEUES and the worker entrypoint still hardcodes queue: 'greetings', so these per-service queue overrides are ignored. With this commit’s enqueuer now emitting billing and reporting traffic, those queues do not get the intended dedicated consumers, which causes backlog growth and misleading demo behavior.
Useful? React with 👍 / 👎.
| final encodedScope = Uri.encodeComponent(scope); | ||
| return ctx.turboSeeOther( | ||
| '/workers?flash=$encodedMessage&scope=$encodedScope', | ||
| '$workersPath?flash=$encodedMessage&scope=$encodedScope', |
There was a problem hiding this comment.
Build worker control redirects with query merging
workersPath can already contain ?namespace=... (it is constructed via _appendRedirectQuery), but this redirect appends another query string with raw ?flash=/?error= concatenation. When actions are submitted from a namespace-filtered workers view, redirects become malformed (for example /workers?namespace=foo?flash=...), which breaks the namespace filter and drops feedback parameters.
Useful? React with 👍 / 👎.
Summary by CodeRabbit
Release Notes
New Features
Improvements