mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2556] [CLOSED] web: the header pill's live region says the state when it changes, not the speed every second #4122
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4122
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2556
Author: @qiuzan2001
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:chief-docs/pill-live-region📝 Commits (1)
a7df775web: the header pill's live region says the state when it changes, not the speed every second📊 Changes
4 files changed (+23 additions, -5 deletions)
View changed files
📝
serve/test_server.py(+11 -0)📝
serve/web/app.css(+2 -0)📝
serve/web/app.js(+7 -3)📝
serve/web/index.html(+3 -2)📄 Description
What it changes. The status pill in the header was
role="status" aria-live="polite", andrender()rewrote its text on every one-second poll of/metrics, with a number that changes each time while a request runs ("Generating · 45.3 tok/s", "Reading prompt · 37%"). A screen reader read the pill about once a second for the whole answer. Now:#pill-say,role="status" aria-live="polite") that gets only the state: the text before " · " ("Generating", "Reading prompt", "Idle", "2 queued", "API key needed", "Server not reachable"), and only when it changes;render()sets the pill once per poll: it set the state and then "N queued" over it, so with a queue the region changed twice a second;.st-srrule (the usual clip pattern) inapp.css.What it leaves alone. What the pill shows and its colour states; its text stays in the page and readable on demand. On phones, where
#pill-textis hidden (display: nonebelow 640 px), the old live region announced nothing; the new one announces the state there too.How it was checked.
/healthand/metricsfaked in the page (no server load): 3 s idle, 6 s generating with tok/s changing every poll, then idle, with a MutationObserver on everyrole="status"element for 12.5 s:WebApp.test_the_status_pill_announces_states_not_numbers.python -m unittest serve.test_server serve.test_security serve.test_frontend serve.test_request_hardening serve.test_monitor serve.test_runconfig: all pass.Independent of #2546 (the Sampling drawer's focus); the two touch different lines.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.