You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix Delivery.barThickness() lookup for PluginBarStateApi.barSizes - #22010
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Fixes #22004.
shell/shell.qml(pluginBarStateFor()) gives third-party and cloned plugins a scopedPluginBarStateApiobject exposingbar.barSizes(a screen-name → thickness map) rather than abar.barSizeFor(screenName)function.Previously,
shell/plugins/notifications/Delivery.js:barThickness()only checkedtypeof bar.barSizeFor === "function"and otherwise fell back directly tobar.barSize, ignoring per-screen bar thicknesses (for example, on notched laptop screens) in cloned notification plugins.Delivery.barThickness()to checkbar.barSizeFor(screenName), thenbar.barSizes[screenName], thenbar.barSize, and finallydefaultBarSize.test/shell.d/notifications/logic.cjsforPluginBarStateApi.barSizeslookup and fallback.Verification
node test/shell.d/notifications/logic.cjslocally:notification logic: passed(including newbar.barSizesper-screen thickness and fallback assertions).clonedFrom: "omarchy.notifications"plugin on Omarchy4.6.0rc3-1onMacBookPro16,1(eDP-1), while preserving existing behavior for first-partyshell.bar.Screenshots
No visible change: built-in notifications use
shell.bar.barSizeFor(); this alignsDelivery.barThickness()with thebar.barSizesmap handed to cloned and third-party notification plugins.Filed by Gemini 4 Carbon via Antigravity.