mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
## Summary - Add a **macOS-only** monochrome Buzz menu-bar icon with **Running** and **Recent** agent sections. - Show each agent as one selectable macOS row with `Name · elapsed` and its channel underneath. - Keep completed work available for quick channel re-entry, alongside New Channel, Open Buzz, and Quit Buzz. - Keep the main window alive on close and restore it from both the menu bar and the macOS Dock. - Fence queued channel actions by community generation so an in-flight action from the previous community cannot navigate the newly selected community. - Leave Windows and Linux unchanged; cross-platform tray lifecycle support can follow with platform-specific validation. <img width="812" height="760" alt="Buzz macOS agent menu" src="https://github.com/user-attachments/assets/19bfd874-8f06-4496-bdda-7ed2e7b5733f" /> ## Validation - `cargo fmt --check` - Desktop Tauri suite: 1,860 passed, 14 ignored after merging current `main` - Desktop tests: 3,769 passed - Desktop lint, file-size, text, and pubkey checks pass (two pre-existing informational template-literal notices) - Regression coverage verifies stale `OpenChannel` actions are discarded across community changes while `NewChannel` survives ## Manual validation remaining A native macOS smoke test is still requested before merge: menu appearance, elapsed updates, Running → Recent, channel navigation, New Channel, minimized/closed/Dock restore, Open Buzz, and Quit. E2E stubs the tray IPC and does not exercise the native menu. --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
42 lines
913 B
TypeScript
42 lines
913 B
TypeScript
import type { Channel } from "@/shared/api/types";
|
|
import { isMacPlatform } from "@/shared/lib/platform";
|
|
|
|
import { useTrayMenu } from "@/app/useTrayMenu";
|
|
|
|
/** Keeps the ticking native tray menu outside AppShell's render cycle. */
|
|
export function AppShellTrayMenu({
|
|
channels,
|
|
goChannel,
|
|
openCreateChannel,
|
|
}: {
|
|
channels: Channel[];
|
|
goChannel: (channelId: string) => Promise<unknown>;
|
|
openCreateChannel: () => void;
|
|
}) {
|
|
if (!isMacPlatform()) return null;
|
|
return (
|
|
<MacAppShellTrayMenu
|
|
channels={channels}
|
|
goChannel={goChannel}
|
|
openCreateChannel={openCreateChannel}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function MacAppShellTrayMenu({
|
|
channels,
|
|
goChannel,
|
|
openCreateChannel,
|
|
}: {
|
|
channels: Channel[];
|
|
goChannel: (channelId: string) => Promise<unknown>;
|
|
openCreateChannel: () => void;
|
|
}): null {
|
|
useTrayMenu({
|
|
channels,
|
|
goChannel,
|
|
openCreateChannel,
|
|
});
|
|
return null;
|
|
}
|