Skip to content

fix(app): address the desktop app code review - #66

Merged
vishr merged 6 commits into
mainfrom
fix/app-review
Oct 25, 2026
Merged

vishr merged 6 commits into
mainfrom
fix/app-review

Conversation

@vishr

@vishr vishr commented Oct 25, 2026

Copy link
Copy Markdown
Member

Fixes from the code review of #65 (the desktop app).

  • Chat no longer flips to "Reconnecting…" when idle. The app's chat client gave up (10 s) before the collector answered a wait (15 s), and the page turned that into a 404. Deadlines are now ordered so the collector answers first, and a client timeout reads the current state instead of failing.
  • The collector uses the app's data folder and config. DRIGA_* values from the login shell no longer reach the child; it gets exactly the app's own.
  • Ready check keeps retrying with backoff, so a slow start (for example after a migration) no longer leaves the tray in an error state.
  • driga app opens the exact bundle with open -a <bundle>, not whichever copy Launch Services has for run.driga.
  • Cancelled upgrade relaunch: the app no longer starts the new binary's collector under the old app. It shows "Restart Driga to finish updating" and asks again.
  • Login environment refreshes on every launch in the background, so PATH changes reach later collector starts.
  • --notify-fd / --parent-fd are validated with fstat (and GetFileType on Windows), and fail fast when the fd is not open.
  • Single-instance check comes first, so a second launch no longer opens the store or runs a snapshot.
  • Late activity rows reach the page. The updates cursor remembers the last 64 row keys.

Each fix started with a failing test. The full isolated suite, TZ=UTC runs of the touched packages, -race on desktop and web, and CGO_ENABLED=0 vet for darwin, linux and windows all pass. A scoped review of this diff found no new Critical or Important issues.

https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4

vishr added 6 commits October 24, 2026 22:29
The collector's chat client gave up on a long poll after 10 s while the
broker waits 15 s, so every quiet poll answered 404 and the chat showed
Reconnecting. The client now waits past the broker's wait, and the page
treats a client deadline as no change.

The updates cursor now remembers the keys of the newest tail rows it
covered, so a row that arrives with an older timestamp is still sent once.

Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
…aunches

- The collector's DRIGA_* variables are exactly the app's own, so a login
  shell's DRIGA_DATA_DIR or settings never point it elsewhere.
- Each launch reads the login shell again in the background; the stored
  environment serves until the fresh one arrives.
- The supervisor keeps checking with backoff that a running child serves
  chat, and reports collecting once it does.
- A cancelled relaunch after an upgrade no longer starts the new binary's
  collector under the old app; the tray asks for a restart and the app
  asks again on its next check.
- The single-instance lock is taken before the store is opened, so a
  second launch never opens it.

Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
driga app now opens the bundle it ran from with open -a, not whichever
bundle has the identifier. driga collect checks --notify-fd and
--parent-fd with fstat (GetFileType on Windows) and fails at once when
one is not open.

Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
The Dock now shows the white Murmur on Driga's red rounded square, on
Apple's 824 px grid, instead of the bare mark inside the gray tile macOS
adds to plateless icons. The menu bar keeps its bare template icon.

Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
The brand red is now Catppuccin Latte red (#D20F39), the same red the UI
uses, in the mark, lockups, favicons, Windows icon and the macOS app icon.
The menu bar shows the template icon only, with a dot while anything needs
you; the count is in the tooltip and the menu. The app icon is written with
PNG chunks again so every size is kept.

Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
@vishr
vishr merged commit 99ac057 into main Oct 25, 2026
5 checks passed
@vishr
vishr deleted the fix/app-review branch October 25, 2026 06:13
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