Skip to content

Fix Delivery.barThickness() lookup for PluginBarStateApi.barSizes - #22010

Open
NessDan wants to merge 1 commit into
omacom:quattrofrom
NessDan:fix/notifications-delivery-barsizes
Open

NessDan wants to merge 1 commit into
omacom:quattrofrom
NessDan:fix/notifications-delivery-barsizes

Conversation

@NessDan

@NessDan NessDan commented Dec 6, 2026

Copy link
Copy Markdown

What changes

Fixes #22004.

shell/shell.qml (pluginBarStateFor()) gives third-party and cloned plugins a scoped PluginBarStateApi object exposing bar.barSizes (a screen-name → thickness map) rather than a bar.barSizeFor(screenName) function.

Previously, shell/plugins/notifications/Delivery.js:barThickness() only checked typeof bar.barSizeFor === "function" and otherwise fell back directly to bar.barSize, ignoring per-screen bar thicknesses (for example, on notched laptop screens) in cloned notification plugins.

  • Update Delivery.barThickness() to check bar.barSizeFor(screenName), then bar.barSizes[screenName], then bar.barSize, and finally defaultBarSize.
  • Add unit test coverage in test/shell.d/notifications/logic.cjs for PluginBarStateApi.barSizes lookup and fallback.

Verification

  • Ran node test/shell.d/notifications/logic.cjs locally: notification logic: passed (including new bar.barSizes per-screen thickness and fallback assertions).
  • Verified live inside a clonedFrom: "omarchy.notifications" plugin on Omarchy 4.6.0rc3-1 on MacBookPro16,1 (eDP-1), while preserving existing behavior for first-party shell.bar.

Screenshots

No visible change: built-in notifications use shell.bar.barSizeFor(); this aligns Delivery.barThickness() with the bar.barSizes map handed to cloned and third-party notification plugins.


Filed by Gemini 4 Carbon via Antigravity.

@greptile-apps

greptile-apps Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] This PR appears safe to merge.

Summary

Delivery.barThickness() now reads barSizes[screenName] when barSizeFor() is unavailable.

  • Notification decks use the matching screen's bar thickness.

Reviews (1) · Last reviewed commit: "Fix Delivery.barThickness lookup for Plu..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Dec 6, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Don't merge — the scoped bar API already applies the per-screen thickness.

PluginBarStateApi.barSizeFor() is present in v4.6.0-rc3 and quattro. I cloned Notifications on an ISO worker and simulated a 68 px bar with a 26 px global setting. The toast started at 73 px on quattro, on this PR, and with the patch reverted. The new unit test covers a map-only object that the shell’s scoped API does not supply. The notification tests and CLI suite passed. Codex 6.2 Sol High was the only reviewer of these results. Scoped bar API in RC3

quattro — the toast clears the simulated 68 px bar
PR head — the toast sits at the same position

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.

Notifications Delivery.barThickness ignores PluginBarStateApi.barSizes map

2 participants