Plugin entries that extend another app pull in that app's UI, and every core UI container is named `ui`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
Start in src/services/resolution/load.ts and trace resolveComposableReference, getAssociatedUi, and withAssociatedUi to see how a plugin entry inherits app.ui; then inspect the descriptor schema and the UI merge helpers named in the issue. The proposed opt-out affects schema and merge behavior, while unique container names involve build and host resolution. Done means an extended plugin no longer loads the provider's whole UI when opted out, without breaking core UI loading.
索引モデルが issue の本文から書いたものです。
説明
Problem
When a child app extends another app's plugin, e.g.
plugins: {
nostr: { extends: "bos://nearbuilding.near/nostr.nearbuilders.org#plugins.nostr" },
}
resolveComposableReference (src/services/resolution/load.ts) also copies the extended app's app.ui onto the plugin entry (getAssociatedUi → withAssociatedUi). The host then loads that whole app UI as a plugin UI on every page of the consumer.
Every app's core UI container is named after ui/package.json, so it's ui in practice: var ui, chunks in self.chunk_ui. Two containers with the same global name end up on one page. The second remoteEntry.js overwrites window.ui, and the host's ui/Hydrate resolves to the other app's UI.
Seen in
-
nearbuilders.org (NEARBuilders/nearbuilders.org#305) consumes nostr.nearbuilders.org's plugin.
-
The page loads both
localhost:3003/remoteEntry.jsand nostr'sremoteEntry.js, bothvar ui. -
Hydration runs nostr's
__federation_expose_Hydrate, whose bundledreact-dom/client19.2.4 meets the sharedreact19.2.9:[Hydrate] Failed: Minified React error #527 (19.2.9 vs 19.2.4) -
Matching React versions only hides it: the consumer still hydrates with the other app's
Hydrate. -
Renaming the provider's UI package (e.g.
nostr_ui) doesn't work either. The host addresses the core UI asuiunless the config hasapp.ui.name, which a core UI can't publish, so the provider's own SSR breaks (Cannot read properties of undefined (reading 'call')).
Proposed fix
- Opt-out (small, unblocks consumers now): let a plugin entry drop the attached UI, e.g.
plugins.nostr.ui: nullorfalse.getEntryAssociatedUiandmergeAssociatedUitreatnullas "no override" today, and the descriptor schema would need to allow it.- nearbuilders.org has its own nostr screens and only needs the plugin's API.
- This also keeps the provider's routes out of the consumer's route tree.
- Unique container names (general): build each app's core UI under a per-app container name, e.g. derived from account and domain. The host would resolve the core UI by the name in the published config instead of the hard-coded
ui, so composed UIs can't collide.
Workaround without a framework change: the provider publishes a second, plugin-only config without app.ui, and consumers extend that.
Versions
everything-dev / platform 2.0.0-rc.24, every-plugin 3.0.0-rc.14.
- 主要言語
- TypeScript
- スター
- 5
- フォーク
- 3
- 平均マージ
- 9時間 48分
- マージ済み PR(30日)
- 152
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NEARBuilders/everything-dev のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
NEARBuilders/everything-dev#628 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NEARBuilders/everything-dev#400 ·
メンテナーはふだん 1 日以内に返信
-
Onboarding at events: translate /onboard, use "community" wording, and handle failed invite lookupsオープン
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
NEARBuilders/everything-dev#653 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
NEARBuilders/everything-dev#652 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NEARBuilders/everything-dev#651 ·
メンテナーはふだん 1 日以内に返信
NEARBuilders/everything-dev の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
scaleway/ultraviolet#7089 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tencent-connect/dsh-qqbot#81 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Pen taps on sidebar rows start a drag and lose their click対応中かも @makhnatkin が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
clangd/vscode-clangd#1009 ·