fix: deploy the redesigned variant gallery as the site index#48
Merged
Conversation
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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 2 high |
🟢 Metrics 0 complexity · 0 duplication
Metric Results Complexity 0 Duplication 0
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.
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.
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.mjsgeneratesdist/index.htmlfrom a hardcodedindexPage()function and never reads the rootindex.html. The redesigned page was added in88d670a/64b7790butbuild.mjswas never updated to use it, so the deploy (pages.yml→npm 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 todist/<folder>/. On GitHub Pagesdist/is the publish root (nodist/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 rootindex.htmlasdist/index.html, injectingwindow.__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 existingdist/discovery. No change to local dev.Verification
npm run build→dist/index.htmlis the redesigned gallery with all 157 built variants.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).lint:html,lint:js, andformat:check. (Pre-existinglint:cssfailures in variant CSS are unrelated and not run by the deploy workflow.)