Repository navigation
feat(desktop): the tray shows while idle, and akou tells you when an agent records or capture dies - #24
Conversation
…tray icon while idle With the window closed, an agent could start a recording, a start from the tray or hotkey could be refused, or the call side could go silent, and nothing on screen said so. The idle menu bar item had no image and no title, so it was likely invisible, and the webview had no Edit menu for copy and paste. - DK-N1, DK-N2, DK-N4: `notifyFor` (src/main/window/notify.ts) decides every notification from fixed strings, never call content. The app announces each start and share with its author; the shell notifies for starts from anything but the window, refused starts, agent shares and dead or permission-suspect capture while the window is not in front, once a minute at most per event and call. - DK-T5: a refused tray or hotkey start notifies with the reason; missing models name the window's "Download speech models" card and open the window on it. - DK-T1: one idle tray icon per OS (template PNG, ICO, PNG) drawn by scripts/tray-icons.ts, always passed to createTray and copied beside the main process. - DK-M1: on macOS, an application menu with the Edit roles, Settings…, Hide, Quit (the quit role, same before-quit path) and a docs link.
…as built, with their hardware checks DESKTOP.md marks DK-T1, DK-T5, DK-M1, DK-N1, DK-N2 and DK-N4 as built and says what waits: "Check for updates…" for DK-U1, "Show logs folder" for a log file, the tray's Stop sharing for DK-T4. The two trap candidates they closed, "An invisible tray" and "Lock-screen leaks", move into TRAPS.md under their tests. The release checklist gains the checks only a real desktop can make: the idle icon in a dark and a light menu bar, copy and paste in the notepad and the ask box, the CLI-start notification, and the AppIndicator icon on Ubuntu.
…focus, and open Settings from a closed window The shell marked the window focused on show, so a window an agent opened behind the meeting app silenced every capture notice until it closed. Only the window's focus and blur events set it now. Settings… and a named call sent to a page still loading were lost. The shell holds them until the page pulls its status, then sends them. A permission-suspect right after a dead on the same channel is a new notice: the dedup key carries the state. The permission refusal names the two macOS panes as two, a failed capture says to press Record, and an unknown refusal code is named. The Help item reads "Open the docs", as DESKTOP.md says.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 15 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (21)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (21)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 Walkthrough📝 WalkthroughPriority: ⬇️ Low Change: Feature Merge Risk: ⚪ Minimal · up to The reviewed changes are mergeable after normal checks; no confirmed issue remains that requires a fix before merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Recording and sharing notices now reach the desktop outside the app window. Their wording avoids call content, and callers cannot label themselves as the window to suppress a notice. A window-recreation timing question remains, but no verified security vulnerability was found. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 63.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 18 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
⚔️ Resolve merge conflicts 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…achines without a tailnet The scan started a share with the default bind, tailnet. Every CI runner has no tailnet address, so POST /share answered 409 no_tailnet and the test failed on macOS, Windows and Linux. It passed only on a laptop with Tailscale up. The rig now binds the share to 127.0.0.1 on port 0, as share.test.ts does.
|
@coderabbitai review |
✅ Action performedReview finished.
|
# Conflicts: # electrobun.config.ts
With the window closed, akou could go quiet at the worst moments. An agent could start a recording, a tray or hotkey start could be refused, or the call side could stop capturing, and nothing on screen said so. The idle menu bar item had no image and an empty title, so on macOS it was likely invisible. And the webview had no Edit menu, so copy and paste in the notepad and the ask box may not have worked.
The fix
notifyForinsrc/main/window/notify.ts, builds every title and body from fixed strings picked by the event's kind. No call content can reach it. The shell notifies for a start from anything but the window, a refused start, a share an agent started, and dead or permission-suspect capture while the window is not focused. Each notice fires at most once a minute per call, channel and state.scripts/tray-icons.tsdraws one idle icon per OS (template PNG on macOS, ICO on Windows, PNG for the AppIndicator).createTrayalways gets one, and the build copies it next to the main process.⌘,, Hide, Quit (thequitrole, so it runs the same before-quit path as the tray) and Open the docs. Windows and Linux set no menu, since their webviews handle the clipboard keys themselves.akou open CALLsent while the window was still loading got lost. The shell now holds them until the page asks for its status, after it has wired its buttons.docs/ux/DESKTOP.mdmarks the lines built or partial. The two trap candidates these lines closed, "An invisible tray" and "Lock-screen leaks", move intodocs/TRAPS.md.scripts/release-checklist.mdgains the checks only a real desktop can make.Every new test was written first and failed on the old code. Each rule was then broken one line at a time to watch its test go red.
Per bead
akou-cc6.1, DK-T1: the tray item is visible when idle. Done in code. Acceptance: a shell test asserts
createTraygets an image, and a positive control with no image fails it. Evidence:[DK-T1] An invisible tray: the tray always gets the platform's icon, idle includedchecks a readable image of the right format on each OS. No image, a missing file and the wrong format each fail it. A second test regenerates the icons and compares them with the files on disk. Red whencreateTraygot no image, and red when a bar height changed in the generator. The smoke check finds the icon in the bundle.akou-cc6.14, DK-M1: copy and paste work in the notepad and ask box. Partial. Acceptance: the menu passed to the fake has the Edit roles, and
⌘C/⌘Vwork on the packaged app. Evidence:[DK-M1] the application menu carries the Edit roles…andoff macOS the webview handles the clipboard keys itself: no application menu is set. Red with no menu, red with Copy dropped. A menu without Copy and no menu at all are the positive controls. It also requires the page to boot beforesettingsarrives, and that failed on the old code. What waits: "Check for updates…" comes with DK-U1, and "Show logs folder" once the app writes a log file. The keyboard check is on the release checklist.akou-cc6.5, DK-T5: a failed tray or hotkey start says why. Done. Acceptance: with models missing, the fake tray's Record gives one notification naming the download card, and the window opens on it. Evidence:
[DK-T5] a tray start refused for missing models says why once, naming the download card, and opens the window on itruns a real app with the models missing, then the fake tray, then the hotkey. The card name is read frommodelsCardText, so the body and the button can't drift apart. Red with no notification, red with the window not opened. A refusal for a missing permission names the macOS privacy panes instead of a card, because the window's permission banner only shows during a call.akou-cc6.22, DK-N1, DK-N2, DK-N4: agent-started calls and dead capture are announced, with no call content. Done.
notifyFor, andPOST /callsby an agent with the window closed notifies once, while the same start from the focused window does not. Evidence: thenotifyFor > [DK-N1]table test and[DK-N1] an agent's POST /calls with the window closed notifies once; the same start from the focused window does not. Red with the shell not subscribed to the app's starts. Red in both tests when the "a start from the window shows nothing" rule is removed.deadwith the window closed notifies once, and a second within a minute does not. Evidence:[DK-N2] dead capture with the window closed notifies once, and again only after a minuteuses the fake helper's--call-dead-at 1plus a fake clock. It checks one notice at +59 s and a second at +61 s. Changing the one-minute bound to 58 s turns it red, and so does removing the once-a-minute check or the health watch. Two more tests:[DK-N2] a new capture state on the same channel within the minute still notifies(dead, then permission-suspect) and[DK-N2] a window shown without the focus leaves the capture notices on. Both failed on the old code.[DK-N4] Lock-screen leaks: no notification carries the call's title, workspace, names, notes or wordscovers the started, refused, shared and capture-dead notices. Its markers are the title, workspace, a speaker name, a note, a vocabulary term, the call id and transcript words. Red when the call id went into a body. The in-test positive control that injects the title gets caught.Only the owner can check
These need a real desktop, and they're on
scripts/release-checklist.md:docs/gates/(DK-T1).⌘C/⌘Vin the notepad and the ask box,⌘Zand⇧⌘Z,⌘,opening Settings with the window closed,⌘Wand⌘Qon the packaged app (DK-M1). That a message sent to a page still loading gets lost comes from reading the ElectroBun source, not 2.0.1 itself, and the⌘,check covers it.akou start -t "Check title"with the window closed shows one "Recording started" notification, and the title appears nowhere in it (DK-N1, DK-N4)..icoin a real tray. There's no Windows app build yet, so there's no checklist line for it.Local run:
bun run checkpassed except one test intests/share.test.ts, which this diff doesn't touch. The capture helper didn't start within 10 s on a loaded laptop. I re-ran that file once and got 11/11.Summary by CodeRabbit