Skip to content

fix(feed): import EmbeddedAppViewer from the @elizaos/ui barrel (view-bundle guard fix) - #10549

Merged
lalalune merged 1 commit into
developfrom
fix/develop-session-fixes
Jun 30, 2026
Merged

lalalune merged 1 commit into
developfrom
fix/develop-session-fixes

Conversation

@lalalune

Copy link
Copy Markdown
Member

What

Fixes a build-breaking bug on develop found while reviewing the recently-landed view-architecture PRs: plugins/plugin-feed/src/components/FeedView.tsx imports EmbeddedAppViewer from the deep subpath @elizaos/ui/components/apps/EmbeddedAppViewer.

The view-bundle import guard (packages/scripts/view-bundle-import-guard.mjs) only allows specifiers that are keys in DynamicViewLoader's HOST_EXTERNAL_IMPORTERS map. That deep subpath is not a key, so plugin-feed's built dist/views/bundle.js externalises an import the host can never rewrite → the view fails to load in the browser (Failed to resolve module specifier) and build-views fails the guard.

Fix

One line: import from the bare @elizaos/ui barrel, which is an allowed key. Both barrels re-export the symbol, so it resolves in both build paths:

  • view-bundle runtime → importUiRootCompatindex.ts:159 (export * from "./components/apps/EmbeddedAppViewer")
  • app-renderer alias → browser.ts:34 (export * from "./components/apps/EmbeddedAppViewer.tsx")

This matches the plugin's own documented contract ("EmbeddedAppViewer (from @elizaos/ui)" in plugins/plugin-feed/CLAUDE.md).

Evidence

# before: bundle imports the deep subpath -> guard fails
# after fix, rebuilt dist/views/bundle.js:
$ rg -o 'from "@elizaos/ui[^"]*"' plugins/plugin-feed/dist/views/bundle.js | sort -u
from "@elizaos/ui"               # <- bare barrel (allowed key)
from "@elizaos/ui/agent-surface"
from "@elizaos/ui/components/ui/button"
from "@elizaos/ui/platform"
from "@elizaos/ui/spatial"
from "@elizaos/ui/state"
# deep subpath GONE; biome check clean

Context

Surfaced during an adversarial sub-agent review of this session's landed/competing PRs (#10366 deploy, #10412 camera/wearables, #10434 companion, steward removal, #10333 benchmark lanes, #10408 external-dataset). All others verified good; notably the views review's claimed "wearables Settings section never registers" was refuted — facewear is auto-loaded via the elizaos.appRegister vite discovery (CI-asserted in plugin-registrations.test.ts). This feed import is the one real, build-breaking bug.

🤖 Generated with Claude Code

…a deep subpath

On develop, FeedView imports EmbeddedAppViewer from the deep subpath
`@elizaos/ui/components/apps/EmbeddedAppViewer`. The view-bundle import guard
(packages/scripts/view-bundle-import-guard.mjs) only allows specifiers that are
keys in DynamicViewLoader's HOST_EXTERNAL_IMPORTERS map; that deep subpath is
NOT a key, so plugin-feed's built view bundle externalises an import the host
can never rewrite — the view fails to load in the browser ("Failed to resolve
module specifier") and build-views fails the guard.

`@elizaos/ui` (bare) IS an allowed key; the root barrel (index.ts:159 — the
view-bundle runtime target via importUiRootCompat) AND the browser entry
(browser.ts:34 — the app-renderer alias target) both re-export EmbeddedAppViewer,
so importing from the bare barrel resolves in both build paths. Matches the
plugin's documented contract ("EmbeddedAppViewer (from @elizaos/ui)" in
plugins/plugin-feed/CLAUDE.md).

Verify: rebuilt dist/views/bundle.js imports only allowlisted @elizaos/ui
specifiers (no deep subpath); both index.ts and browser.ts export the symbol.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b5d11348-9902-4ba8-a30a-4758f5016af4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/develop-session-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NubsCarson NubsCarson mentioned this pull request Jun 30, 2026
20 tasks
@lalalune
lalalune merged commit b901653 into develop Jun 30, 2026
31 of 35 checks passed
@lalalune
lalalune deleted the fix/develop-session-fixes branch June 30, 2026 18:59
@claude

claude Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant