Say when the tray is signed out, and draw the sparkline so it reads as a chart #14
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_tray!14
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/tray-signed-out-and-sparkline"
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?
Two menu-visible defects the tray's own capture suite found, landed together because both are about what a row says and both re-bless the same captures.
Signed out — platform #838
Before: the tray refused to start, printed a line to stderr, exited 1. The whole user-visible state was an empty panel — the old capture for this scene was, honestly, a photograph of nothing.
After:
The stderr line is still printed for whoever started it from a terminal. Both halves are asserted now — the golden holds the menu and the stderr.
sc loginin a terminal beside it. A Refresh that could only ever fail is worse than a sentence saying a restart is what picks it up — which is why the hint names the restart/loginsignedInURLtrades a path for a one-shot signed-in link, and that is exactly what a tray with no credential has nothing to ask for it with. The device flow is still waiting on/cli/auth/*The sparkline — platform #839
Braille packed two samples per cell, which is why it was chosen. At menu font size DejaVu draws it small and low in the line box, so it came out as a dotted leader rather than a chart.
Before —
⣀⣀⣠⣴⣷⣦⣄⣀⣀⣀⣀⣀:After —
▂▂▄▆█▆▄▃▂▂▂▂:Same row, same 12-cell width, and now legibly a quiet night, a working day and a tail-off. Block elements are full-height, sit on the baseline, and are in every desktop font.
The cost is density — one sample per cell instead of two — and it is paid by bucketing rather than widening a row that already carries a name, a balance and a runway. A series longer than 12 reduces to 12 columns taking the largest reading in each bucket: the glance is looking for the hour something expensive ran, and averaging it against quiet neighbours is how a spike disappears.
▁is reserved for zero, so an all-zero day draws a flat baseline and the smallest non-zero reading draws one step above it.Harness changes
expects: exitis retired — it existed for one scene, and no scene now expects the tray not to run. Replacing it:capture.shbranches on the scene having no token (env -u SC_TOKEN, notSC_TOKEN=, which is not the same thing to any reader of it), and a newlogwalk step appends the process's stderr to the dump.How it was verified
hack/screenshot/run.sh— every scene re-captured, all three themes, thencheck.sh --bless. The re-blessed diff is the review: outside the signed-out scene, the only change in any golden is the sparkline.check.shandmanual.py checkgreen afterwards;docs/manual.mdregenerated from the run.go vet,go test ./...,hack/lint.sh(golangci-lint v2.6.1, 0 issues),shellcheckoncapture.sh.hack/coverage.shgreen — see below.coverage.floorforinternal/traydrops 38.3 → 37.6, with the reason recorded in the file.onReadySignedOutandRun's new branch are systray wiring — the "OS-drawn menu callback"hack/coverage.sh's own header names as the thing a unit test cannot exercise. The wording is covered instead (signedOutTitle,signedOutHint,signInURLinlabel_test.go), and the rows themselves end to end by the signed-out golden. Measured on Linux as well as darwin — both 37.6%, so this is CI's figure and not a laptop's.Closes #838 and #839 in the platform repo, which needs a submodule pin bump once this merges.
sc-tray refused to start without a credential: it printed why and exited 1. Half of that reasoning holds — a tray icon sitting dim and silent tells you nothing — and half of it was never true. Nobody running a desktop app is reading its stderr. Launched from a .desktop file, a login item or a Windows shortcut, that sentence goes nowhere, and the whole user-visible state is an empty panel: indistinguishable from a crash, a missing dependency, or the app never having been started. It now starts anyway and says so where it can be seen: Not signed in — https://someones.computer [disabled] Sign in… ─── run `sc login`, then restart sc-tray [disabled] Quit The stderr line is still printed, for whoever did start it from a terminal. Both halves are now asserted: the golden holds the menu *and* the stderr. Three things worth saying about the shape: - **The endpoint is named.** "Not signed in" alone is half a sentence with one tray on staging and another on production, which is the arrangement the identity row exists for. - **There is no Refresh.** A credential is read once at startup, so a running tray cannot notice `sc login` happening in a terminal beside it; a Refresh that could only ever fail would be worse than saying plainly that a restart is what picks it up. That is also why the hint names the restart. - **Sign in… opens the plain login page**, not signedInURL — that trades a path for a one-shot signed-in link, and a one-shot link is precisely what a tray with no credential has nothing to ask for it with. The device flow that would make this a real sign-in is still waiting on /cli/auth/*. The capture harness had a whole mode for this scene — `expects: exit`, whose capture was an exit code and a log — and it is retired, because there is no longer a scene that expects the tray not to run. What replaces it is smaller: capture.sh branches on the scene having no token (unsetting SC_TOKEN rather than passing an empty one, which is not the same thing to any reader of it), and a new `log` walk step appends the process's stderr to the dump. coverage.floor for internal/tray drops 38.3 -> 37.6, with the reason recorded in the file: onReadySignedOut and Run's new branch are systray wiring — the "OS-drawn menu callback" hack/coverage.sh names as the thing a unit test cannot exercise. Its wording is covered instead, as signedOutTitle, signedOutHint and signInURL in label_test.go, and the rows themselves are asserted end to end by the signed-out golden. Closes #838Say when the tray is signed out, and draw the sparkline so it reads as a chartto WIP: Say when the tray is signed out, and draw the sparkline so it reads as a chartWIP: Say when the tray is signed out, and draw the sparkline so it reads as a chartto Say when the tray is signed out, and draw the sparkline so it reads as a chart