Skip to content

feat: Load optional UI plugin layers - #115

Open
nfebe wants to merge 4 commits into
devfrom
feat/optional-ui-plugin-layers
Open

nfebe wants to merge 4 commits into
devfrom
feat/optional-ui-plugin-layers

Conversation

@nfebe

@nfebe nfebe commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Load optional pages and translations from installed plugin layers. Hide integration links when their pages are absent.

@nfebe
nfebe force-pushed the feat/optional-ui-plugin-layers branch from eacbb7e to cb30023 Compare October 20, 2026 21:35
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Deploying trakli-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: cb30023
Status: ✅  Deploy successful!
Preview URL: https://4d3ce8c2.trakli-dev.pages.dev
Branch Preview URL: https://feat-optional-ui-plugin-laye.trakli-dev.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying webui with  Cloudflare Pages  Cloudflare Pages

Latest commit: cb30023
Status: ✅  Deploy successful!
Preview URL: https://8a3ac5cd.webui-9fh.pages.dev
Branch Preview URL: https://feat-optional-ui-plugin-laye.webui-9fh.pages.dev

View logs

@sourceant

sourceant Bot commented Oct 20, 2026

Copy link
Copy Markdown

Code Review Summary

Nuxt config now extends optional UI plugin layers listed in TRAKLI_UI_LAYERS, with Vitest including layer tests and allowing their files. A new check:plugins script lints and format-checks configured layers, and useExtensionSlots hides descriptor links whose local routes are not installed. PLUGINS.md documents setup and constraints.

🚀 Key Improvements

  • Runtime-configurable layer loading keeps plugin UI out of the host by default.
  • scripts/check-plugin-layers.mjs adds lint and Prettier checks for installed layers.
  • Sidebar/settings links to absent plugin routes are filtered, with a regression test.

💡 Minor Suggestions

  • || takes the first present href, so a contribution is gated on onboarding.href even when the card's own card.href route exists (and vice versa). A working link then disappears from a slot. Check every local href and skip only when none resolve.

@sourceant sourceant Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

continue;
}

const href = ui.onboarding?.href || ui.card?.href;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

|| takes the first present href, so a contribution is gated on onboarding.href even when the card's own card.href route exists (and vice versa). A working link then disappears from a slot. Check every local href and skip only when none resolve.

Suggested change
const href = ui.onboarding?.href || ui.card?.href;
const localHrefs = [ui.onboarding?.href, ui.card?.href].filter(
(href): href is string => typeof href === 'string' && href.startsWith('/')
);
if (localHrefs.length && localHrefs.every((href) => !router.resolve(href).matched.length)) {
continue;
}

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.

1 participant