Repository navigation
feat: unread badges in the rail (ADR-0020, Proposed) - #45
Merged
Merged
Conversation
An app may add `badge`, a whole number from 0, to its /health answer. lodge reads it with the state it already polls (only from an up answer, leniently, capped at 99999), and /lodge/apps carries it. The shell draws the count on the rail button, in the switcher row and, on the narrow bar, as the sum of the other apps' counts. It sets the home-screen icon's count with navigator.setAppBadge when the total changes. The kit's lodgeapp.Health gains Badge (omitted at 0), and kittest refuses a negative badge. The development fake app takes --badge, and dev/e2e.sh gives app one a count of 3. Docs: ADR-0020 (Proposed), app-contract.md, lodge-http.md, shell.md (Badges), the overview, the roadmap's later ideas and the index.
…oss-review) badge() reads the JSON number's text, so no float rounding turns a fraction into a count, and an exponent beyond a million cannot overflow the shift. A switcher row with a count sets title as well as aria-label.
A positive exponent past the clamp caps the count before the fraction check, so 1.5e1000001 is 99999, not 0.
bketelsen
approved these changes
Nov 3, 2026
Merged
3 tasks done
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.
What
Unread counts on the rail, lodge's side only (night shift 2026-11-02, line 10; Brian's pick, T721a).
badge, a whole number from 0, in the/healthanswer lodge already polls. Merging this PR accepts the ADR; a follow-up docs PR then sets its Status to Accepted.badgemember, the app's count and never a caller's. lodge reads it only from anokanswer, ignores a bad value, caps it at 99999, and never changes the app's state for it./lodge/apps: each app getsbadge(0 when none).99+above 99), with, N unreadin the accessible name and tooltip. The narrow bar shows the sum of the other apps' counts. The home-screen icon gets the total throughnavigator.setAppBadge/clearAppBadge, only when it changes, where the browser has them.lodgeapp.Health.Badge(badge, omitted at 0);kittestrefuses a negative badge.lodge-fakeapp --badge N;dev/e2e.shgives apponea count of 3.After merge
kit/v0.4.0, an additive minor) before any app can setbadge. The app PRs (frostmail first, then frostread) follow in PRs of their own, after the tag.make bump) and the sysext follow as usual.Checks
make check: pass (Go, both modules, the e2e tag, repocheck on the docs).make shell-check).Coder model: deepseek/deepseek-flash (code and tests). ADR and docs: Irulan (claude-opus-5.5).
Cross-review
openai/gpt-6.1-sol; coderdeepseek/deepseek-flash; ADR, docs and the F3 fix by Irulan (claude-opus-5.5).2651b15: F1 (a fraction that a float rounds to a whole number became a count) and F2 (switcher rows had no count tooltip), both blocking, both fixed in7921a81.7921a81: F3 (a positive out-of-range exponent on a fraction gave 0, not the cap), blocking, fixed inc746620.c746620: Ready, Blocking: none. Base7ec9bca.All CI jobs pass at
c746620.