Consume @openshock/svelte-core in the captive portal#483
Merged
Conversation
Bump @openshock/svelte-core to ^0.2.2 and consume it through package-name subpaths and JS barrels (components, stepper, typeguards, ui/*) instead of the $core/$hadcn filesystem aliases and raw .svelte file paths, which made Vite's optimizer crawl/pre-bundle the library and break styling/hydration. - LightSwitch and the sonner Toaster are now self-contained; drop the prop wiring and adopt svelte-core's color-scheme state (initializeColorScheme), removing the local ColorSchemeStore. - app.css imports @openshock/svelte-core/theme.css (canonical design tokens + self-registering Tailwind @source) instead of an inlined copy, keeping only the firmware-specific .kbd/.code helpers. - Remove $core/$hadcn aliases from vite.config.ts (keep $lib).
Contributor
Change file check✅ OK — 1 valid change file(s) added in this PR. |
|
Ready to review this PR? Stage has broken it down into 9 individual chapters for you: Chapters generated by Stage for commit fe18017 on Jun 30, 2026 12:24am UTC. |
Mirror the Frontend migration: replace the unpublished @openshock/svelte-core registry dependency with a Turborepo workspace git submodule at frontend/packages/svelte-core. - Add svelte-core submodule (pinned to 94adb47, matching Frontend) - pnpm workspace now includes packages/*; turbo.json drives build:deps - package.json: svelte-core -> workspace:*, add core alias and turbo, prefix dev/build/check with pnpm build:deps - Anchor root .gitignore packages -> /packages so it no longer ignores frontend/packages - Ignore .turbo cache
svelte-core could resolve a different svelte patch (5.56.3) than the captive-portal root, producing two unrelated Snippet types and svelte-check errors. Add a pnpm override to force a single svelte version, mirroring the frontend PR's dedupe fix.
The change file had bullet lines directly under the title with no section header, so the release-tool parser counted 4 lines in the title area and rejected it (only one title line is allowed above sections). Move the detail bullets under a ## Release Note section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrate the captive-portal frontend to consume the shared @openshock/svelte-core library (
^0.2.2) instead of vendoring its own copies of the shadcn UI, components, theme, and utilities.How it consumes the library
@openshock/svelte-core/ui/*,/components,/stepper,/typeguards, …) — never raw.sveltefile paths or filesystem aliases intodist. Raw.svelte/alias imports make Vite's dep optimizer crawl and pre-bundle the library, which breaks the dependency scan, hydration, and styling.app.cssimports@openshock/svelte-core/theme.css(the canonical design tokens + its self-registering Tailwind@source), replacing the inlined theme copy. Only the firmware-specific.kbd/.codehelpers are kept. This is what makes Tailwind generate the library's component classes (otherwise components render misaligned/unstyled).LightSwitchand the sonnerToasterare used in their self-contained form; the localColorSchemeStoreis removed in favour of svelte-core's color-scheme state (initializeColorScheme).$core/$hadcnaliases are removed fromvite.config.ts($libkept).Verification
svelte-check: 0 errors / 0 warningsMirrors the same migration done in the cloud frontend.