Repository navigation
Show the full 127-unit tray tooltip by setting cbSize in a vendored tray-icon - #1015
Conversation
Keep the 127-unit tooltip budget now that cbSize is set.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performed
|
|
@coderabbitai On the "No Unapproved Dependencies" pre-merge check: the maintainer approved patching tray-icon as a follow-up PR to #1007, and the PR description now records that under "Dependencies". The PR adds no new crate. tray-icon 0.21.3 was already in the graph through Tauri. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
I verified that:
The existing dependency-policy Learning already permits changes with maintainer approval recorded in the PR description. No policy exception is needed. This is my assessment of that check, not confirmation that its recorded status has changed. 🧠 Learnings used
You are interacting with an AI system. |
Summary
Follow-up to #1007. tray-icon 0.21.3 builds every
NOTIFYICONDATAWwith..zeroed()and never setscbSize, so Explorer reads the pre-Windows 2000 layout and shows only the first 64 UTF-16 units of the tooltip. #1007 fitted the tooltip into that 64-unit tip, which leaves room for one provider line.Tauri 2 requires tray-icon 0.21.x, and 0.21.3 is the newest release, so a version bump can't fix this. The tray-icon
devbranch already setscbSizeat these call sites.This PR:
vendor/tray-iconand uses it through[patch.crates-io]in the rootCargo.toml.vendor/tray-iconis excluded from the workspace.Cargo.lockonly loses tray-icon's registry source and checksum lines.src/platform_impl/windows/mod.rsin the vendored copy (vendor/tray-icon/PATCHED.mdlists the changes):NOTIFYICONDATAWpassed toShell_NotifyIconWsetscbSize: size_of::<NOTIFYICONDATAW>()(icon set, tooltip set, add, remove);szTipalways keeps its NUL.TRAY_TOOLTIP_MAX_UTF16intray_bridge.rsfrom 63 to 127. The test-onlyWIDE_BUDGETis removed, since the real budget is now 127. The legacy-limit test becomesfit_tooltip_keeps_two_typical_provider_lines_whole.The vendored tree matches the crates.io package except for the patched file and
PATCHED.md(git diff --no-indexagainst the registry copy; Cargo's.cargo-okand.cargo_vcs_info.jsonare omitted). Drop the vendored copy and the patch entry once a tray-icon release with the fix is usable by Tauri.Commits:
Vendor tray-icon 0.21.3 unchanged as a crates.io patchSet NOTIFYICONDATAW.cbSize in vendored tray-icon and use the full tooltipMerge main into fix/tray-icon-cbsize(a87fd43d0): main has the squashed Fit the tray tooltip into the 64-unit tip Windows actually shows #1007; the conflict intray_bridge.rskeeps this branch's 127-unit budget and drops Fit the tray tooltip into the 64-unit tip Windows actually shows #1007's separateWIDE_BUDGETtest constant, which is no longer needed.Dependencies
The maintainer approved patching tray-icon as a follow-up PR to #1007. This PR adds no new crate. tray-icon 0.21.3 was already a dependency through Tauri, and the vendored
vendor/tray-icon/Cargo.tomlis the published crate's own manifest, unchanged.Cargo.lockkeeps the same tray-icon version and dependency list. Only its registrysourceandchecksumlines are removed, because the crate now resolves from the path patch.Checks
cargo fmt --all -- --check: clean (the vendored crate is outside the workspace and isn't formatted).cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml: 814 passed, 0 failed onf51000e8d; 820 passed, 0 failed on the mergea87fd43d0.cargo clippy --all-targets -- -D warningson both manifests: clean on the merge.pnpm notices:check: OK, 371 components (the vendored crate keeps its license files).rust/crate is unchanged; CircleCI runs both manifests.Proof
Windows 11, fresh debug build of this branch (head
f51000e8d), isolated home, 5 seeded providers (CODEXBAR_SEED_USAGE_JSON), proof window on the second display. The tooltip was read through UI Automation (the tray icon'sNameunderShell_TrayWnd) without taking focus. Explorer prefixes the name with "CodexBar Desktop " (17 units).CodexBar\nClaude: 58% left • Resets in 2h 50m….CodexBar\nClaude: 58% left • Resets in 1h 02m\nCodex: 82% left • Resets in 1h 02m\nCursor: 35% left • Resets in 1h 02m…. That's 116 units of tooltip text, past the old 64-unit cut, with whole lines and…marking the dropped lines.Not covered