Skip to content

fix(config): let a plugin entry opt out of the extended app's ui - #637

Merged
elliotBraem merged 1 commit into
mainfrom
fix/plugin-ui-opt-out
Oct 27, 2026
Merged

elliotBraem merged 1 commit into
mainfrom
fix/plugin-ui-opt-out

Conversation

@itexpert120

Copy link
Copy Markdown
Contributor

What

Lets a plugin entry set ui: false to drop the ui attached from the app it extends.

Implements the opt-out proposed in #636. The general fix there, giving each app's core UI container a unique name, is not part of this PR, so #636 stays open.

Why

A plugin entry that extends another app, such as bos://acct/app#plugins.<id>, gets that app's app.ui attached as the plugin ui. The consumer then loads the provider's whole UI on every page. Both core UI containers are named ui, so the second remoteEntry.js overwrites window.ui and the host hydrates with the provider's Hydrate.

On nearbuilders.org, which uses nostr.nearbuilders.org's plugin, this shows up as [Hydrate] Failed: Minified React error #527.

plugins: {
  nostr: {
    extends: "bos://nearbuilding.near/nostr.nearbuilders.org#plugins.nostr",
    ui: false,
  },
}

Changes

  • ui: false is accepted on plugin entries in both the descriptor schema (bos.app.ts) and the config schema.
  • It survives the authored ↔ config round-trip (toConfigInput / configInputToDescriptor).
  • Resolution returns no associated ui for the entry, and getEntryAssociatedUi ignores the nested app.ui fallback when ui is false.
  • Default behaviour is unchanged: without ui: false, the provider's ui is still attached, and folder-form plugin uis are unaffected.
  • The extends-config skill documents the opt-out; patch changeset added.

Testing

  • New tests:

    • Resolution drops the attached ui with ui: false.
    • ui: false survives the descriptor round-trip.
    • The provider ui is still attached by default.

    The first two fail without the fix.

  • everything-dev package suite: 1633 passed.

    • 9 codegen tests fail locally only when TMPDIR is on a different filesystem (EXDEV on rename). They fail the same way on main and pass with a same-device TMPDIR.
  • tsc --noEmit, biome and oxlint (type-aware) are clean on the changed files.

  • End to end: a local nearbuilders.org v2 linked to this build, with ui: false on plugins.nostr.

A plugin entry that extends another app (bos://acct/app#plugins.<id>)
attaches that app's app.ui as the plugin ui, so the consumer loads the
provider's whole UI on every page. Both core UI containers are named
`ui`, so the second remoteEntry overwrites window.ui and the host
hydrates with the provider's Hydrate.

`ui: false` on the plugin entry now drops the attached ui: accepted by
the descriptor and config schemas, kept through the authored <-> config
round-trip, and resolution returns no associated ui for the entry.
@elliotBraem
elliotBraem merged commit ac9f906 into main Oct 27, 2026
20 checks passed
@elliotBraem
elliotBraem deleted the fix/plugin-ui-opt-out branch October 27, 2026 13:27
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