Skip to content

feat(R1.5): config/slot extensibility audit — branding, menu, defaultTheme from config#30

Merged
detain merged 1 commit into
masterfrom
feat/R1-5-config-slot-audit
Jun 2, 2026
Merged

feat(R1.5): config/slot extensibility audit — branding, menu, defaultTheme from config#30
detain merged 1 commit into
masterfrom
feat/R1-5-config-slot-audit

Conversation

@detain

@detain detain commented Jun 2, 2026

Copy link
Copy Markdown
Owner

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 of config.app in the Placeholder).

PhlixAppConfig extensions

  • branding (wordmark/logoSrc/logoAlt/tagline) → drives the shell's #logo slot.
  • menu (MenuItem[], icons typed IconName, external hrefs sanitized against javascript:/data:/vbscript: + target/rel-safe) → drives the #nav slot, 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

  • createPhlixApp provides the resolved config under phlixConfig and seeds defaultTheme only for first-time visitors (!hasStoredPreferences()).
  • applyStoredThemeEarly(defaultTheme?) and a new exported hasStoredPreferences().
  • Barrel exports MenuItem, BrandingConfig, HomeRow, hasStoredPreferences.

Verification (run top-level)

No consumer bump (the aligned @phlix/ui v0.8.0 tag lands next, at R1.6).

🤖 Generated with Claude Code

…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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@detain detain merged commit d8c443a into master Jun 2, 2026
@detain detain deleted the feat/R1-5-config-slot-audit branch June 2, 2026 04:58
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.
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