ReviewOS

stacks/uplink

feat(app): the menubar hides lastError and the log, so a failure has no surface

#18
Open glennmichael123 opened this 8 days ago ·
8 days ago

Part of #5.

The app is LSUIElement with no Dock icon and no window of its own, so the popover is the only place anything can be shown. It shows almost nothing when things go wrong.

What is there today

  • status() returns lastError (app/Uplink/desktop-agent.ts#L271) and the popover never reads it. Grep menubar.html for lastError: the only occurrence is the producer. A repeating poll failure or a persistently refused send is invisible.
  • The log is the only record of anything, because stdout is not a TTY and console is redirected to a file (app/Desktop/launcher.ts#L24). Its path is ~/Library/Logs/Uplink.log (app/Uplink/settings.ts#L17). Nothing in the popover opens it, and nothing tells the person it exists.
  • Info.plist.json sets LSUIElement (app/Desktop/Info.plist.json), so there is no fallback window if the popover itself cannot render.
  • The only error surface that does exist is the token field's inline error (app/Uplink/menubar.html#L277).

So the failure modes that matter most in a background app are the ones with no way to see them.

Proposal

  1. Render lastError in the popover, near the state dot, with the time it happened.
  2. Add an "Open log" button that reveals ~/Library/Logs/Uplink.log in Finder or opens it in Console.app.
  3. Add "Copy diagnostics": the version, the checks and their details, the last error, and the log's tail, as text a person can paste into an issue. This is what makes a bug report from a non-developer usable.
  4. Show a failed run's error in the recent list. status() already carries it as answer from run.reply ?? run.error (app/Uplink/desktop-agent.ts#L231), so a failure currently reads like an answer.

Requirements

  • Diagnostics must not include the token. The Keychain value never goes into copyable text, and the log must not carry it either.
  • Handles are personal. Include them only because the person is pasting deliberately, and say that the text contains their phone number.
  • The popover is 380 by 600 (app/Desktop/launcher.ts#L61). An error surface has to fit without pushing the setup steps off screen.

Acceptance

  • With the watcher failing to poll, the popover shows the error.
  • "Open log" opens the file, and it exists even on a fresh install.
  • Copied diagnostics contain the version, the checks and no credential.

Sign in to comment on this issue.