feat(R1.5): config/slot extensibility audit — branding, menu, defaultTheme from config#30
Merged
Merged
Conversation
…Theme from config Make server vs hub diverge purely by config + named slots, never by `if (app === 'hub')` in shared code (audit: no such branching exists). - PhlixAppConfig extended: `branding` (wordmark/logoSrc/logoAlt/tagline) drives the shell's #logo slot; `menu` (icons typed IconName, scheme-sanitized + target/rel-safe external hrefs) drives the #nav slot with a ⌘K trigger; `defaultTheme` seeds a per-app initial theme for first-time visitors (a stored choice always wins, applied pre-mount → no flash/snap-back); `homeRows` established as the R2 Browse config seam. - PhlixApp.vue rewritten to inject 'phlixConfig' and render branding + menu from it (falls back to "Phlix" wordmark + Browse/Settings). safeHref() blocks javascript:/data:/vbscript:; _blank links get rel="noopener noreferrer". - createPhlixApp provides 'phlixConfig' and seeds defaultTheme via hasStoredPreferences(); applyStoredThemeEarly(defaultTheme?) added. - Exported MenuItem/BrandingConfig/HomeRow + hasStoredPreferences(). 239 vitest passing (+9); coverage 92.84% stmts / 96.64% lines. vue-tsc + vite 8 build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
detain
added a commit
that referenced
this pull request
Jun 4, 2026
…Theme from config (#30) Make server vs hub diverge purely by config + named slots, never by `if (app === 'hub')` in shared code (audit: no such branching exists). - PhlixAppConfig extended: `branding` (wordmark/logoSrc/logoAlt/tagline) drives the shell's #logo slot; `menu` (icons typed IconName, scheme-sanitized + target/rel-safe external hrefs) drives the #nav slot with a ⌘K trigger; `defaultTheme` seeds a per-app initial theme for first-time visitors (a stored choice always wins, applied pre-mount → no flash/snap-back); `homeRows` established as the R2 Browse config seam. - PhlixApp.vue rewritten to inject 'phlixConfig' and render branding + menu from it (falls back to "Phlix" wordmark + Browse/Settings). safeHref() blocks javascript:/data:/vbscript:; _blank links get rel="noopener noreferrer". - createPhlixApp provides 'phlixConfig' and seeds defaultTheme via hasStoredPreferences(); applyStoredThemeEarly(defaultTheme?) added. - Exported MenuItem/BrandingConfig/HomeRow + hasStoredPreferences(). 239 vitest passing (+9); coverage 92.84% stmts / 96.64% lines. vue-tsc + vite 8 build clean.
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.
R1.5 — Slot/config extensibility audit
Make server vs hub diverge purely by config + named slots, never by
if (app === 'hub')in shared code. Audit confirmed no such behavioral branching exists (only display-only use ofconfig.appin the Placeholder).PhlixAppConfigextensionsbranding(wordmark/logoSrc/logoAlt/tagline) → drives the shell's#logoslot.menu(MenuItem[], icons typedIconName, externalhrefs sanitized againstjavascript:/data:/vbscript:+target/rel-safe) → drives the#navslot, with a built-in ⌘K trigger. Falls back to the "Phlix" wordmark + Browse/Settings when unset.defaultTheme→ seeds a per-app initial theme for first-time visitors; a stored user choice always wins, applied pre-mount so there's no flash or snap-back to the nocturne default on mount.homeRows(HomeRow[]) → established as the config seam the R2 Browse surface will render.Wiring
createPhlixAppprovides the resolved config underphlixConfigand seedsdefaultThemeonly for first-time visitors (!hasStoredPreferences()).applyStoredThemeEarly(defaultTheme?)and a new exportedhasStoredPreferences().MenuItem,BrandingConfig,HomeRow,hasStoredPreferences.Verification (run top-level)
vue-tsc --noEmitclean ·npm run buildclean (vite 8) · 239 vitest passing (+9).safeHrefscheme guard + new-tabrelhardening (findings chore(deps-dev): Bump the npm_and_yarn group across 1 directory with 2 updates #1/feat(C0.1): phlix-ui repo skeleton #2).No consumer bump (the aligned
@phlix/ui v0.8.0tag lands next, at R1.6).🤖 Generated with Claude Code