[tech-debt] ConnectionQualityIndicator polish (Wave 2a E1 follow-up)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start with app/src/components/ConnectionQualityIndicator.tsx:38-52 and the existing visibility and cleanup logic, then read ConnectionQualityIndicator.test.tsx. Trace the in-flight fetch behavior during visible/hidden transitions and review the sibling AgentDot semantics at lines 88-93. Done means aborted requests are silent, the indicator semantics are aligned with the chosen accessibility approach, and rapid visibility flicker has a regression test.
Written by the indexing model from the issue text.
Description
Follow-ups from Wave 2a Cluster E1 (#219 connection-quality indicator). Code-quality review flagged 2 substantive minors.
Tasks
-
Add
AbortControllerfor in-flight fetch on visibility/unmount transitions —app/src/components/ConnectionQualityIndicator.tsx:38-52. When the tab transitionsvisible → hiddenwhile a ping'sawait fetch(ENDPOINT)is mid-flight,stopInterval()cancels future intervals but the live request continues. When it resolves,cancelledis stillfalse(only set on unmount), so 3 setState calls fire while the tab is hidden — wasted work and an extra state churn on the nextvisibleevent. Fix: thread anAbortControllerintofetch, callcontroller.abort()fromstopInterval()AND the cleanup function; treatAbortErroras silent in catch. -
Align a11y semantics with sibling indicators —
app/src/components/ConnectionQualityIndicator.tsx:88-93usesrole="img"+aria-label, but siblingAgentDotcomponents in the same header icon group have no a11y semantics (silent dots). Screen readers will announce 1 dynamic indicator + 3 silent dots — inconsistent reading. Options: (a) liftAgentDottorole="img"witharia-label, OR (b) addaria-live="polite"to the indicator for state transitions so SR users hear "Backend reachable (45ms)" → "Unreachable" announcements. -
Add flicker test for rapid
visible → hidden → visibletransitions —ConnectionQualityIndicator.test.tsx. Current tests covervisible-only,hidden-on-mount, unmount cleanup, but not the flicker case wherehandleVisibilityfires multiple times in quick succession while a ping is still pending. Behavior is correct by inspection (idempotentstartInterval/stopInterval) but a test would lock the contract.
Source
Wave 2a Cluster E1 code-quality review (6 minors total — top 3 bundled here, others skipped as polish-only).
Priority
Low — indicator works correctly today; these are robustness polish.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sip-protocol/sipher
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sip-protocol/sipher#270 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
sip-protocol/sipher#344 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
sip-protocol/sipher#285 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
sip-protocol/sipher#284 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
sip-protocol/sipher#283 ·
All issues in sip-protocol/sipher
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·