Show Postulo's state as an icon before the instance address in the popup footer #9
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-chromium#9
Loading…
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?
The popup's footer holds the instance address,
#server, a muted 12 px link that ends in an ellipsis when long (.serverinsrc/style.css), hidden until an address and a token are both set (src/popup.js:53-60), then the settings gear (src/popup.html:66-77). The suggestion asks for an icon before the address: a green tick when Postulo is online, orange when it is unresponsive (“<1s”), a red X when it is offline but not in testing mode, and grey in testing mode, the orange and grey shapes left open.The suggestion's “offline”, for red, is the code's
unreachable: no answer within 20 s, a network error, a 5xx. Its “testing mode” is the code'soffline, the testing switch. The connection state and its check belong to #4; this issue adds the response time, and the footer.What the extension should do
/healthz, as recommended there), and updates the icon when the answer comes or 1 s passes without one. Nothing measures response time today;request()insrc/lib/api.jsonly gives up after 20 s. No check in testing, when not set up, or without the host permission.--ok), a tick./healthzanswering 503. Red (--error), an X.--muted), a flask or a pause sign.src/style.css:450): each state has its own shape, and is named in words to a screen reader and in atitle, for example “Postulo answers”, “Postulo is slow to answer”, “Postulo cannot be reached”, “The testing switch is on”. Icons inlined from lucide-static v1.41.0, as the gear is; the shapes are suggestions.src/style.csshas--ok,--error,--mutedand--brand, each with a dark variant, and no orange or amber. A--warntoken is new, light and dark, its contrast against--paperchecked in both (3:1 at least, the floor for an icon).Decisions for this repository
AbortSignal.timeout). Both draw the line at 1 s; under the alternative, a Postulo that hangs stays orange and never turns red. Recommended: the first. A timing may include setting up the connection, so a first check can read slower than the next.noPermissionandtokenRefused. The alternative: both show the red X, told apart only by the title.The browser behaviour here is documented (Chrome, MDN), not tried in a real browser.
Needs from the server
Nothing:
/healthzexists, is public and is not throttled. Not filed on postulo/postulo.Documents and translations
PRIVACY.md: theGET /healthzrow #4 adds must also say it is made each time the popup opens.test/i18n.test.mjsrequires every new key in all 40_localesat once, with identical placeholders: each state's name costs 40 translations in the same commit. It also fails on a key the code never names literally, so no key is built from a state's name.Done when
node --test.From the list of extension improvements of 2026-09-30.