Skip to content

Desktop start failures and port changes, Browser Watch background lookups and settings, sound off, history axis - #1946

Merged
BarganConstantin merged 6 commits into
developmentfrom
fix/desktop-and-watch
Oct 5, 2026
Merged

BarganConstantin merged 6 commits into
developmentfrom
fix/desktop-and-watch

Conversation

@BarganConstantin

Copy link
Copy Markdown
Owner

What changes

  • Desktop app, a deck that cannot start: the app stops waiting as soon as its own deck exits during startup, instead of after forty seconds. It shows a dialog with the last lines the deck wrote to its log (and a button that shows the log), and the tray says "The deck could not start" until a deck answers. A launcher that cannot be written now counts as a failed start. Before, it was a rejection that skipped the rest of the app's startup (timers, window, first-run question). After a failed start, "Start the deck" no longer goes on to start a second deck.
  • Desktop app, deck on another port: when the app reattaches to a deck on a different port, an open window reloads at that deck's address. Before, it kept retrying the old port until it was closed. The window's two link handlers read the address the window shows now, not a copy taken when it opened.
  • Browser Watch, network: the badge's five-minute background poll no longer runs the browser survey. The survey does a DNS lookup of the relay's address, and the poll never used its results. The README now lists what does go out: that lookup while the Browser Watch panel is open, and the machine panel's DNS lookup and TCP handshake to api.anthropic.com. It no longer says nothing leaves the machine for Browser Watch.
  • Browser Watch settings: a settings change is merged into the stored settings inside the write queue. Before, two quick one-field changes could undo each other: turning the watch off and then changing the reaction left the watch on.
  • Sound: turning the sound off (M or the Sounds switch) now stops a custom sound that is already playing: a spoken voice is cancelled and an imported clip is stopped.
  • Machine history: every chart in a history dialog is drawn against the time span of the whole dialog, so one minute sits at the same x on every chart. A series that starts late or ends early leaves its part of the span empty.

Verification

  • npm run typecheck: clean.
  • Full suite before rebasing: 903 files, 11797 tests passed, exit 0. After rebasing on development, the touched areas were run again: 79 files, 908 tests passed.
  • New regression tests. Each one failed before its fix, for the reason described:
    • desktop-deck-start-failure.test.ts: before the fix, the wait ran its full length after the deck exited (4.0 s against a 1.5 s bound), no reason was given, and a throwing start rejected. It also checks the tray line and the wiring in main.mjs.
    • desktop-window-follows-deck.test.ts: originToFollow behaviour, plus attach() reloading the window and the handlers reading the live origin.
    • browser-watch-background-poll-dns.test.ts: before the fix, the live=0 poll with the watch on ran dig (the fixture records commands and runs none). The README cases failed on the old wording.
    • browser-watch-settings-race.test.ts: before the fix, {enabled:false} followed by {reaction} while a poll held the queue left enabled: true.
    • sound-off-silences.test.ts: before the fix, a voice was still speaking and a clip still playing after the sound was turned off. Uses the real player and hook over fake audio and speech.
    • section-history-one-time-axis.test.ts: before the fix, a 40-minute series under a 3-hour one started at the left edge (x 30 instead of 437.6), and the clocks under each chart differed.
  • Existing text pins were repointed, not removed: the tooltip call in desktop-tray-menu.test.ts, the handlers' origin in desktop-window-links.test.ts, and the survey call in browser-watch.test.ts.
  • Browser check on an isolated deck with its own HOME and config dirs, using Playwright:
    • Sound: a 180-character spoken voice at rate 0.5, created in the sound menu and played, with speech stubbed to record calls. Flipping the Sounds switch off cancelled it (speaking true → false).
    • Network history, with the history answer fixed to a 3 h Download series and a 40 min Claude series: the Claude line starts at the same x as Download's minute 140 (457.8), both end at 580, and both charts show the same clocks.
  • The desktop changes are tested only through their modules (own-deck.mjs, tray-menu.mjs, nav.mjs) and main.mjs's wiring. Electron was not started.

… stops

A deck that exits while starting ended the app's forty-second wait only when
the forty seconds were up, and the tray then said "No deck running" with the
reason left in deck-app.log. The wait now ends when the deck exits; its last
log lines go into a dialog and the tray says the deck could not start. A
launcher that cannot be written is a failed start rather than a rejection that
skipped the rest of the app's startup, and Start the deck no longer starts a
second deck after a failed one.
…p follows it

openWindow fixed the window's origin from the deck's port once, and attaching
to a deck on another port never touched the window, so the page retried the
old port until it was closed and opened again, and its custom-sound calls were
refused. An open window is now reloaded at the new deck's origin, and its two
navigation handlers read the origin it shows rather than a copy taken at open.
With the watch on, the badge's five-minute background poll ran the whole
browser survey, whose first step is a DNS lookup of the relay's address, though
the poll reads only the episodes and the switch. That poll no longer surveys.
The README now says what does go out: the relay lookup while the Browser Watch
panel is open, and the machine panel's DNS lookup and TCP handshake to
api.anthropic.com.
…inside the write queue

The settings route read the store before the queue and wrote back the whole
settings object built from that read, so a second one-field change whose read
came before the first one's write put the first field back: switching the
watch off and changing the reaction straight after left the watch on. The patch
is now merged against the state the queue hands in, and the reply and the log
line use what was written.
…is turned off

M and the Sounds switch only wrote the flag down, so a spoken voice went on
for up to half a minute after muting and an imported clip played to its end.
The player keeps hold of the clips it starts and gains silence(), which cancels
speech and stops them, and turning the sound off calls it.
…'s one time axis

Each chart stretched across its own first and last point, so a series that
started late or stopped early — the latency probe on a deck that could not
reach Claude at first, a sensor that turned up late — drew the same minute at a
different x from the charts above and below it. The dialog now hands every
chart the span all of its series cover, the line, the fill, the marks, the
hover and the clocks under each chart use it, and a series that was not
measured for part of it leaves that part empty.
@BarganConstantin
BarganConstantin merged commit 4140d69 into development Oct 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant