Skip to content

fix: deploy the redesigned variant gallery as the site index#48

Merged
detain merged 1 commit into
masterfrom
fix/deploy-redesigned-index
Jun 30, 2026
Merged

fix: deploy the redesigned variant gallery as the site index#48
detain merged 1 commit into
masterfrom
fix/deploy-redesigned-index

Conversation

@detain

@detain detain commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Problem

Recent commits redesigned the root index.html (the variant gallery — grid layout + hover-preview cards), but those changes never appeared on https://detain.github.io/phlix-website/.

Root cause: tools/build.mjs generates dist/index.html from a hardcoded indexPage() function and never reads the root index.html. The redesigned page was added in 88d670a/64b7790 but build.mjs was never updated to use it, so the deploy (pages.ymlnpm run build) kept publishing the old plain list. dist/ is gitignored and built fresh in CI, so the stale committed dist was irrelevant — the build itself was the problem.

A secondary issue: the redesigned page discovers variants via fetch('dist/') and links to dist/<folder>/. On GitHub Pages dist/ is the publish root (no dist/ subpath, no directory autoindex), so discovery would silently fall back to only 5 variants/set — losing variants 6–20 of sets 06–09.

Fix

  • build.mjs: deploy the hand-authored root index.html as dist/index.html, injecting window.__PHLIX_VARIANTS__ with the real list of built variant folders.
  • index.html: manifest-aware — when the manifest is present it renders from it with root-relative ./<folder>/ paths; with no manifest (local repo-root preview) it keeps the existing dist/ discovery. No change to local dev.

Verification

  • npm run builddist/index.html is the redesigned gallery with all 157 built variants.
  • Served dist/ on a static host (no autoindex) + Playwright: 20 design sets, 157 cards, hrefs/iframes resolve to ./<folder>/index.html, set 09 shows all 17 cards (not 5).
  • Passes lint:html, lint:js, and format:check. (Pre-existing lint:css failures in variant CSS are unrelated and not run by the deploy workflow.)

build.mjs emitted a hardcoded indexPage() and never used the
redesigned root index.html, so the new gallery never reached the
deployed dist/. It now reads root index.html and injects a manifest
of the real built variant folders.

Root index.html is made manifest-aware: when build injects
window.__PHLIX_VARIANTS__ it renders from that list with
root-relative ./<folder>/ paths (dist/ is the GitHub Pages publish
root and has no directory listing, so the runtime fetch('dist/')
discovery cannot work there). Local repo-root preview is unchanged.

Co-Authored-By: Claude Opus 4.8 <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 f4138f3 into master Jun 30, 2026
1 of 3 checks passed
@detain detain deleted the fix/deploy-redesigned-index branch June 30, 2026 08:24
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 high

Alerts:
⚠ 2 issues (≤ 0 issues of at least minor severity)

Results:
2 new issues

Category Results
Security 2 high

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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