Skip to content

fix: reach the service from replacement bars - #135

Open
thenitai wants to merge 1 commit into
omarchy-QOL:devfrom
thenitai:fix/replacement-bar-service
Open

thenitai wants to merge 1 commit into
omarchy-QOL:devfrom
thenitai:fix/replacement-bar-service

Conversation

@thenitai

@thenitai thenitai commented Nov 2, 2026

Copy link
Copy Markdown

Problem

With a replacement bar such as Station selected, the Syncthing panel shows no data. Omarchy still runs the plugin's service, but the shell it gives third-party widgets on a replacement bar has no service lookup, so bar.shell.serviceFor(moduleName) returns null.

Fix

  • OmarchyService publishes itself in a new hosts/omarchy/Bridge.js and clears itself on destruction.
  • OmarchyPanel still prefers serviceFor. Only when that returns null does it poll the bridge once a second, so the built-in bar's path is unchanged.
  • The library sits beside the service and panel so both import the same instance.

This is the same pattern as crmne/omatasks#27, SirWizardLizard/omarchy-caldav-calendar#24 and nabdalla-prog/Rimuru-screentime#2.

Testing

  • Added tests/replacement-bar.test.sh, which also runs from plugin-ui.test.sh. It covers the bridge fallback, serviceFor taking priority, and a retired service not clearing its replacement. It fails when the service stops publishing.
  • architecture and plugin-acceptance-lint pass on this branch.
  • folder-overview and dropdown-search fail on my desktop session. On unpatched main they fail with the same errors; I didn't run unpatched dev.
  • Live check: the same patch on the installed main build (not this dev branch), on Omarchy 4.0.6 under Station. After a shell restart the panel shows folders, devices and file totals.
  • Not tested live under the built-in bar.

🤖 Generated with Claude Code

Omarchy gives third-party widgets on a replacement bar such as Station a
shell whose serviceFor returns null, so the panel opens with no data.

The service now publishes itself in a library beside the panel, and the
panel falls back to it when the direct lookup returns nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ilyaZar

ilyaZar commented Nov 2, 2026

Copy link
Copy Markdown
Member

@thenitai nice catch

maybe two questions for me to understand this better

  1. are you using the bar regularly, and tested the fix on your machine ?
  2. are there other replacement bars you are aware of that might have a similar issue

the first question is bc. then I know how much effort I have to put into testing the station bar myself (testing myself is fine, I just want to have the info)

the second, bc I can build on your fix to make it work across different replacement bars if there are other popular and regularly used candidates

thanks for the PR

@thenitai

thenitai commented Nov 2, 2026

Copy link
Copy Markdown
Author
  1. are you using the bar regularly, and tested the fix on your machine ?

I've installed Station 2.2.0 and ran into a few plugins that don't support this. I've submitted a PR to each plugin. Apparently, many (including myself) did not know about this. As Station allows you to tweak the bar and uses a replacement bar, the issue became apparent. Again, not all plugins (including my own) have that issue. So not really sure why. I've checked the code with Opus 5.5 and Astra 6 if that helps to make it easier :)

  1. are there other replacement bars you are aware of that might have a similar issue

No. Station is also the first and only system that does something to the bar but frankly I love it.

image

@ilyaZar

ilyaZar commented Nov 2, 2026

Copy link
Copy Markdown
Member

nice, thanks for the reply !

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants