Repository navigation
Conversation
…to-expires On small logical viewports (HiDPI panels) the fixed 380px toast width exceeds the screen: on a 720x720 panel at scale 1.6 only 450 logical px remain, so critical battery toasts stack across the whole screen and persist (restored criticals never expire). Clamp toast width to 80% of the logical screen width (keeping the 380px target when there is room) and demote the low-battery warning to normal urgency with a 12s expiry so it auto-expires like any transient toast.
|
No code defect found in the inspected scope. One documentation update is suggested. Verified (source inspection): the popup layout uses the card’s clamped width, and newly issued low-battery warnings receive a finite lifetime without losing their notification-silencing bypass.
Documentation note: Existing-state limitation: previously saved critical battery warnings retain their old urgency and still need dismissal; this change prevents persistence of new warnings rather than cleaning up old ones. Review informationTest scope: Source-only review at Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra Medium performed initial inspection and synthesis, with independent Opus 5.5 High and GPT 6 Sol Xhigh technical reviews. Public claims were checked against pinned source; a fresh Astra Medium check assessed presentation and privacy only. |
|
Reviewed at 703ebfa and run on an Omarchy worker VM, with this branch merged into current What ran. The output was set to scale 4 (320 logical px), and the real
Competing fixes.
If the urgency change is kept, Who checked it. Reviewed by Claude Opus 5.5. No second opinion ran: the configured reviewer, Codex Medium, answered, but omabot's daily review allowance was already spent. So this rests on one model's reading and the worker run above. Waiting on the maintainer to choose between this PR, #11034 and #11415. |
|
Two useful nits in one PR (toast width clamp + shorter battery-warning timeout / lower urgency). For the battery half, also see open PRs that dismiss the warning when AC is plugged in (#14739, #14218, #11415) and storm reports #9670/#10939 — a timeout alone doesn’t clear a sticky critical toast if the shell treats critical as persistent. Toast clamp looks straightforward and still needed on small logical viewports. Might be cleaner to split clamp vs battery policy so the dismiss-on-AC work can land independently. |
|
The head is unchanged at 703ebfa, so the worker run from the earlier comment still stands. This pass asked the second opinion that did not run last time to compare this PR with the fixes it competes with. Both halves have an older open fix, and neither of those has a defect that this PR avoids, so the older ones are the ones to take. Toast width: #11034. It is older, and it clamps the card to the room the popup column actually has: the window width minus the Battery warning: #11415. It is older, and it fixes the stale warning by dismissing it once the battery stops being low. This PR instead lets the warning expire after 12 s while the battery is still low. Critical toasts never expiring is intentional ( Who checked it. Claude Opus 5.5 and Codex Medium each compared the three diffs against current Waiting on the maintainer. The recommendation is #11034 for the width and #11415 for the battery warning, which would make this PR one to close. |
|
Thanks @0xdfi! Two things in here. The battery change: in the new notification engine (#15932), criticals stay until dismissed on purpose, and dismissing the low-battery warning on AC connect is being handled in #14218. The width clamp is still a real issue on the new engine, and it overlaps #11034, which is still open. Closing this one, but thanks for testing it on the CM5. |
What
Two changes so notification toasts scale correctly on small logical viewports and never become undismissable pin walls:
Toast width clamps to the viewport (
shell/plugins/notifications/components/NotificationCard.qml)implicitWidth: Math.min(Style.space(380), Math.round(Screen.width * 0.8))Low-battery warning no longer stacks forever (
bin/omarchy-battery-low)-u critical→-u normal,-t 30000→-t 12000.Why
Found on a CM5 mini-Linux box (720x720 panel, scale 1.6 → 450 logical px). The fixed
Style.space(380)card is 507 logical px wide there (×fontScale 16/12) — literally wider than the screen. Worse: the battery warning is sent as critical urgency, and (a) critical toasts getdurationFor() → 0(no auto-expiry), (b) each threshold flap sends a new notification id (noreplaces_id), and (c) popups are mirrored to disk and restored on shell start. Net effect: 12 immortal, screen-wider-than-display toasts covering the desktop, re-appearing after every reboot, with dismissal only on right-click/long-press.Verified locally
popupStateDir→history).min(507, 0.8·450=360)fits.Happy to split this into two PRs (scaling vs battery urgency) if preferred — they just shipped together because they fixed the same incident.