Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Plugin entries that extend another app pull in that app's UI, and every core UI container is named `ui`

オープン
#636 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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.js and nostr's remoteEntry.js, both var ui.

  • Hydration runs nostr's __federation_expose_Hydrate, whose bundled react-dom/client 19.2.4 meets the shared react 19.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 as ui unless the config has app.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

  1. Opt-out (small, unblocks consumers now): let a plugin entry drop the attached UI, e.g. plugins.nostr.ui: null or false. getEntryAssociatedUi and mergeAssociatedUi treat null as "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.
  2. 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NEARBuilders/everything-dev のほかの issue

NEARBuilders/everything-dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。