Repository navigation
feat(overview): live concurrency strip + per-account in-flight bars - #363
Merged
Merged
Conversation
Add GET /api/live (in_flight, capacity over enabled accounts, requests in last 60s from an in-memory per-second ring, per-account in_flight) and poll it every 2.5s on Overview while the tab is visible.
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.
Summary
GET /api/live(console key) returningin_flight,capacity(sum of effectivemax_inflightover enabled accounts, default 4),rpm(requests started in last 60s), and per-accountin_flight/max_inflight. RPM comes from an in-memory 60-bucket per-second ring (internal/logs/rate.go) bumped inRequestRecorder.Start— O(1), no SQLite query. Resets on restart.N / capacitywith a thin load bar (warning tone when saturated), requests in last 60s, and a ~60s client-sampled recharts sparkline (no animation). Polls every 2.5s only whiledocumentis visible; keeps last snapshot, no skeleton flash.in_flight/max_inflightthin bar (live-updated); saturated rows in warning tone. Quota bar gained a matching % label.changelog/unreleased/live-concurrency.md, rebuiltinternal/webui/static.Tests
internal/logs/rate_test.go(sliding window, slot wrap, nil-safety, recorder counts starts),internal/console/live_test.go(capacity only enabled, default max_inflight)