Skip to content

Keep the tray while only hidden items remain - #13886

Closed
josemiguelo wants to merge 1 commit into
omacom:quattrofrom
josemiguelo:fix-tray-last-hidden-icon
Closed

josemiguelo wants to merge 1 commit into
omacom:quattrofrom
josemiguelo:fix-tray-last-hidden-icon

Conversation

@josemiguelo

Copy link
Copy Markdown

Fixes #7117.

Hiding the last visible tray item made the whole tray disappear, chevron included — and the chevron's manage menu is the only way to unhide an item, so the item could only be brought back by editing ~/.config/omarchy/shell.json.

The tray root was gated on the shown buckets (pinnedItems.length > 0 || drawerCount > 0), which leave hidden items out. It now keys on every reporting item (allItems.length > 0), the same condition the chevron and its block width already use, so the chevron stays while anything can still be unhidden. An empty tray still disappears.

Testing:

  • test/shell.d/tray-test.sh gains a check that the root keys on allItems; it fails against the old gate. tray-test.sh, bar-test.sh and bar-widget-contract-test.sh pass.
  • Reproduced on real hardware (MacBookPro16,1, Omarchy 4.0.4-1): 1Password as the only tray item, "Hide 1Password" → tray gone (debugBarGeometry: width 0, not visible).
  • Verified in the running desktop with this change applied to the 4.0.4 shell: hiding the only item leaves the tray at the chevron (width 32, visible), and its right-click manage menu unhides the item.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fuh6ybaStSCCC1YzYNLX3g
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes when the system tray widget stays visible.

The PR appears safe to merge.

Summary

The tray now remains visible when its only reporting items are hidden, preserving access to the chevron’s manage menu; it still disappears when no eligible items remain.

  • Adds a source-level regression check for the root visibility binding.

Reviews (1) · Last reviewed commit: "Keep the tray while only hidden items re..."

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at ad9963b and verified on a worker VM built from the Omarchy ISO; nothing found to fix.

Reproduction. With udiskie -t --appindicator as the only tray item, writing hidden: ["udiskie"] to the omarchy.tray entry in shell.json (what the manage menu's Hide button writes) and reading omarchy-shell shell debugBarGeometry:

Tests. tray-test.sh, tray-menu-test.sh, bar-test.sh, bar-widget-contract-test.sh, bar-icon-geometry-test.sh and bar-text-color-test.sh pass on the head through the worker's live session. ./test/cli fails one test, vscode generated theme references current theme file. That test fails identically on base quattro, so this change didn't cause it, but it keeps the suite from being green.

Second opinion. Codex Medium reviewed the diff read-only and found no defects. It agreed that bucket("all") still leaves out Passive and Omarchy-owned items, so an empty tray still disappears. It also agreed that both bar orientations already size the chevron from allItems, and that no other copy of the old gate exists. That agreement is with conclusions I had already reached, and its independence from my review is not guaranteed.

The change is one line, the smallest fix for the problem. It waits on the maintainer, and on the unrelated ./test/cli failure on quattro. Nothing is needed from you.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 13, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This pull request now conflicts with quattro, and quattro already fixes #7117 without it.

What changed on quattro. 1a161eb (#15281, letting bar widgets live in the tray's drawer) rewrote the same line in shell/plugins/bar/widgets/Tray.qml to visible: pinnedItems.length > 0 || hasDrawer, where hasDrawer is allItems.length > 0 || sectionCount > 0 || barDragging. That includes hidden items, the same condition this pull request introduced, and the chevron's block width in both orientations keys on hasDrawer as well. Taking this branch's line in the conflict would also drop the tray-section and drag cases #15281 added, and the new check in tray-test.sh matches the old line exactly, so it would fail against quattro's binding.

Verified on a worker. On a worker VM built from the Omarchy ISO, running the shell from quattro at 492b883, I made udiskie -t --appindicator the only tray item and hid it the way the manage menu does (hidden: ["udiskie"] on the omarchy.tray entry). omarchy-shell shell debugBarGeometry shows the tray staying visible at width 27, the chevron alone. That is the same result this head gave on 7 October, so the manage menu stays reachable. At the earlier base 8b4eae6 the same steps took the tray to width 0.

Second opinion. None this round. The configured reviewer (Codex Medium) answered a ping, but its daily review budget was spent, so this finding rests on one model's reading plus the worker run.

Nothing here is left for the author to do. I'd recommend closing it as already fixed on quattro, and that decision is waiting on the maintainer. Thanks for tracking this down and reproducing it on real hardware. #7117 stays open until someone closes it by hand, since #15281 doesn't reference it.

@josemiguelo
josemiguelo deleted the fix-tray-last-hidden-icon branch November 12, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hiding the last tray icon removes the tray widget, including the menu that unhides it

2 participants