Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(desktop): size the Vibey tray icon to match neighboring apps (#2717)
Maxc0bb90a1e750
diff --git a/desktop/src-tauri/icons/tray/serving.png b/desktop/src-tauri/icons/tray/serving.pngindex 9a5469767..4fdf0a5f1 100644Binary files a/desktop/src-tauri/icons/tray/serving.png and b/desktop/src-tauri/icons/tray/serving.png differdiff --git a/desktop/src-tauri/icons/tray/[email protected] b/desktop/src-tauri/icons/tray/[email protected]index a78c04dfa..f6c1bae83 100644Binary files a/desktop/src-tauri/icons/tray/[email protected] and b/desktop/src-tauri/icons/tray/[email protected] differdiff --git a/desktop/src-tauri/icons/tray/source/serving.png b/desktop/src-tauri/icons/tray/source/serving.pngnew file mode 100644index 000000000..cb95237b1Binary files /dev/null and b/desktop/src-tauri/icons/tray/source/serving.png differdiff --git a/desktop/src-tauri/icons/tray/source/starting.png b/desktop/src-tauri/icons/tray/source/starting.pngnew file mode 100644index 000000000..f1681d10aBinary files /dev/null and b/desktop/src-tauri/icons/tray/source/starting.png differdiff --git a/desktop/src-tauri/icons/tray/source/stopped.png b/desktop/src-tauri/icons/tray/source/stopped.pngnew file mode 100644index 000000000..adb1306ffBinary files /dev/null and b/desktop/src-tauri/icons/tray/source/stopped.png differdiff --git a/desktop/src-tauri/icons/tray/source/unreachable.png b/desktop/src-tauri/icons/tray/source/unreachable.pngnew file mode 100644index 000000000..c69dc82b9Binary files /dev/null and b/desktop/src-tauri/icons/tray/source/unreachable.png differdiff --git a/desktop/src-tauri/icons/tray/starting.png b/desktop/src-tauri/icons/tray/starting.pngindex cbfda8303..dde7e5815 100644Binary files a/desktop/src-tauri/icons/tray/starting.png and b/desktop/src-tauri/icons/tray/starting.png differdiff --git a/desktop/src-tauri/icons/tray/[email protected] b/desktop/src-tauri/icons/tray/[email protected]index daa3d1887..9384b6ee9 100644Binary files a/desktop/src-tauri/icons/tray/[email protected] and b/desktop/src-tauri/icons/tray/[email protected] differdiff --git a/desktop/src-tauri/icons/tray/stopped.png b/desktop/src-tauri/icons/tray/stopped.pngindex d3f53b9c9..4f94b1176 100644Binary files a/desktop/src-tauri/icons/tray/stopped.png and b/desktop/src-tauri/icons/tray/stopped.png differdiff --git a/desktop/src-tauri/icons/tray/[email protected] b/desktop/src-tauri/icons/tray/[email protected]index 0e0ae81da..09de3c242 100644Binary files a/desktop/src-tauri/icons/tray/[email protected] and b/desktop/src-tauri/icons/tray/[email protected] differdiff --git a/desktop/src-tauri/icons/tray/unreachable.png b/desktop/src-tauri/icons/tray/unreachable.pngindex fd49b274f..af757e282 100644Binary files a/desktop/src-tauri/icons/tray/unreachable.png and b/desktop/src-tauri/icons/tray/unreachable.png differdiff --git a/desktop/src-tauri/icons/tray/[email protected] b/desktop/src-tauri/icons/tray/[email protected]index 7dcfa8070..abfb85a55 100644Binary files a/desktop/src-tauri/icons/tray/[email protected] and b/desktop/src-tauri/icons/tray/[email protected] differdiff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rsindex fbaf6d715..6632de948 100644--- a/desktop/src-tauri/src/lib.rs+++ b/desktop/src-tauri/src/lib.rs@@ -352,8 +352,8 @@ impl TrayRuntimeState {#[cfg(target_os = "macos")]fn icon(&self) -> tauri::image::Image<'static> {- // tray-icon displays these 36px images at 18pt, preserving Retina detail.- // Keep the approved V1 pixels: template rendering uses their alpha mask.+ // tray-icon preserves aspect ratio: 38x36px becomes 19x18pt on macOS.+ // The V1 artwork is 16pt tall within that canvas; templates use its alpha.match self {Self::Starting | Self::Stopping => tauri::include_image!("icons/tray/[email protected]"),Self::Serving(_) => tauri::include_image!("icons/tray/[email protected]"),@@ -2501,8 +2501,8 @@ mod tests {#[cfg(target_os = "macos")]#[test]fn tray_templates_have_transparent_monochrome_pixels_at_both_export_sizes() {- // Protect the shipped image boundary: opaque canvases or colored pixels- // break native template appearance even if the state mapping is correct.+ // Protect the shipped image boundary, including visible size: excessive+ // transparent padding made the original cloud much smaller than its peers.let origin = LoopbackOrigin::parse("http://127.0.0.1:6123").expect("test listener");let images = [(18, tauri::include_image!("icons/tray/serving.png")),@@ -2515,19 +2515,35 @@ mod tests {(36, TrayRuntimeState::Stopped.icon()),];for (size, image) in images {- assert_eq!((image.width(), image.height()), (size, size));- assert_eq!(image.rgba().len(), (size * size * 4) as usize);+ let width = if size == 36 { 38 } else { 20 };+ let vertical_margin = size / 18;+ assert_eq!((image.width(), image.height()), (width, size));+ assert_eq!(image.rgba().len(), (width * size * 4) as usize);let pixels = image.rgba().as_chunks::<4>().0;assert!(pixels.iter().all(|pixel| pixel[..3] == [0, 0, 0]));assert!(pixels.iter().any(|pixel| pixel[3] > 0), "visible silhouette");assert!(pixels.iter().any(|pixel| pixel[3] == 0), "transparent background");+ let visible = pixels+ .iter()+ .enumerate()+ .filter(|(_, pixel)| pixel[3] >= 16)+ .map(|(index, _)| (index as u32 % image.width(), index as u32 / image.width()));+ let (left, top, right, bottom) = visible.fold(+ (image.width(), image.height(), 0, 0),+ |(left, top, right, bottom), (x, y)| (left.min(x), top.min(y), right.max(x), bottom.max(y)),+ );+ assert_eq!(+ (left, top, right, bottom),+ (1, vertical_margin, width - 2, size - vertical_margin - 1),+ "the cloud must be 16pt tall, with a 1px horizontal guard"+ );assert!(pixels.iter().enumerate().all(|(index, pixel)| {- let x = index as u32 % size;- let y = index as u32 / size;- (x > 0 && x < size - 1 && y > 0 && y < size - 1) || pixel[3] == 0+ let x = index as u32 % width;+ let y = index as u32 / width;+ (x > 0 && x < width - 1 && y >= vertical_margin && y < size - vertical_margin) || pixel[3] == 0}),- "the silhouette must fit inside the canvas"+ "the guard pixels must be fully transparent at both resolutions");}}diff --git a/docs/plans/2026-10-16-vibey-tray-icon.md b/docs/plans/2026-10-16-vibey-tray-icon.mdindex cd68b4bcf..dca492ade 100644--- a/docs/plans/2026-10-16-vibey-tray-icon.md+++ b/docs/plans/2026-10-16-vibey-tray-icon.md@@ -2,7 +2,7 @@## Change contract-Use the first preview approved by Max on 2026-10-16, without redrawing its+Preserve the first preview approved by Max on 2026-10-16, without redrawing itssilhouette, eyes, or status marks. The second preview was rejected.- Serving: solid cloud with transparent eyes.@@ -14,37 +14,61 @@ The macOS status item is a monochrome template at creation and after everystatus refresh. Menu text, lifecycle behavior, desktop pet, Dock/applicationicons, and non-macOS tray rendering keep their existing behavior.-## Assets and rendering+## Visible-size correction after rc9-`desktop/src-tauri/icons/tray/` contains the approved 18px and 36px PNGs,-encoded as RGBA for Tauri with identical decoded pixels.-Tauri embeds the 36px images at compile time; the pinned tray implementation-sets their logical height to 18pt. macOS therefore has full Retina detail and-scales the same image on 1x screens. The 18px exports preserve the approved-1x artwork for inspection. There is no new runtime decoder or dependency.+The original 36x36px exports contained only about 24x21px of visible artwork.+At the tray's 18pt logical image height, the cloud was only about 10.5pt tall.+The owner requested a size/padding correction while retaining V1's design.++After the first size-correction preview, Max requested exactly 16pt of visible+height. The final exports are 20x18px at 1x and 38x36px at 2x. Visible bounds+are 18x16px and 36x32px respectively. The top/bottom guards are 1px at 1x and+2px at 2x; both exports have a fully transparent 1px horizontal guard.++`icons/tray/source/` preserves the original 192x192px V1 source images. Each+export is resampled directly from its source alpha, never from the old small+PNGs. Find the nonzero-alpha bounding box, center it, and apply one uniform+scale that fits within the target content bounds; use Lanczos downsampling.+Export black RGB with the resampled alpha as RGBA, clearing only the explicit+guard pixels to discard resampling ringing. The outlined state's stroke,+eyes, and all status marks are preserved. The differing logical canvas widths+at 1x/2x follow the requested one-pixel horizontal guard at each resolution;+production embeds the 2x export and displays a 19x18pt image with 16pt artwork.++## Native rendering contract++The pinned `tray-icon` 0.24.1 macOS implementation sets `NSImage` height to+18pt and width to `source_width / source_height * 18`. It preserves aspect+ratio instead of forcing a square. A real isolated Tauri probe verified both+36x36px -> 18x18pt and 40x36px -> 20x18pt, at creation and after image refresh.+The final 38x36px exports similarly display at 19x18pt. All four corrected+status images retained `isTemplate() == true`.++Tauri embeds the 2x files; macOS scales them for 1x displays. The 1x exports+remain available for inspection and are covered by the asset test. There is+no new runtime dependency or image decoder.Use `set_icon_with_as_template` for refreshes: the pinned macOS implementationof plain `set_icon` resets the template flag.## Validation-- Compare all eight decoded RGBA buffers byte-for-byte with the approved preview.-- Extend the existing tray test boundary to validate dimensions, monochrome- alpha, distinct status silhouettes, and the shared starting/stopping image.-- Build the desktop bootstrap UI; run formatting, focused Rust tests and lint.-- Exercise native template creation and refresh in an isolated tray-only- preview if the local desktop permits capture. It must not start a Runtime,- register product plugins, or modify the installed Avibe application.-- Require exact-head Codex review, no unresolved threads and passing CI.- Do not request a review through a comment, merge, or release.--## Local evidence--All eight decoded RGBA buffers match the selected V1 preview exactly. Desktop-bootstrap and Workbench UI builds, Rust formatting, and all-target/all-feature-workspace Clippy passed. The focused tray tests passed.-A temporary tray-only Tauri program displayed all four images in the real macOS-menu bar. After `set_icon_with_as_template`, every native image reported-`isTemplate() == true` and an 18x18pt size. A cropped menu-bar screenshot was-captured; the probe was then stopped and removed from the worktree. This proves-native image rendering and replacement, not the full packaged Runtime lifecycle.+The existing asset test protects monochrome transparency, dimensions and+canvas boundaries at both sizes. It now also requires exactly 16/32px of visible height and the requested+transparent guards. The initial occupancy assertion failed on rc9 assets for+excess padding; the final exact-height assertion also rejects the intermediate+17pt preview that the owner considered too large. Existing state tests still cover distinct+states and the shared starting/stopping image.++Native visual acceptance compares all four states alongside other installed+apps in the real menu bar, in light and dark appearance. Verify the system+appearance is Automatic before and after capture and restore temporary+transparency changes. Measure the filled cloud and neighboring QQ/WeChat icons+with the same brightness threshold in the 2x screenshot; target 32px each. The probe is temporary, uses a separate identifier,+and enables no product plugins, windows, or Runtime. Its source must be removed+from the worktree after capture. This evidence covers native rendering, not+the full packaged Runtime lifecycle.++Require exact-head Codex review, zero unresolved threads and passing CI. Wait+for Max to approve the screenshots before merging. Do not post a review-trigger+comment, publish a release, or modify the installed application.