Skip to content

fix(playground): install theme from demo-bundle release ZIP instead of git:directory - #102

Merged
dknauss merged 2 commits into
mainfrom
fix/playground-zip-install
Jul 2, 2026
Merged

fix(playground): install theme from demo-bundle release ZIP instead of git:directory#102
dknauss merged 2 commits into
mainfrom
fix/playground-zip-install

Conversation

@dknauss

@dknauss dknauss commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Problem

The live browser WordPress Playground fails git:directory theme installs with Fw.createHash is not a function, so both Try in Playground demos errored at the install step (verified live).

Switching to a plain ZIP install is not enough on its own: the runPHP seed step requires get_theme_file_path('playground/seed-content.php'), plus playground/seed-content.json and the binary media in playground/media/. That whole playground/ tree is intentionally export-ignored in .gitattributes, so a clean theme archive (GitHub source zipball, or any git archive) strips it and the seed step fatals.

Fix

Install the theme from a dedicated demo-bundle release asset through the WordPress Playground CORS proxy. The bundle (dirtbag-playground-demo.zip, published on the playground-demo prerelease) contains the theme and the playground/ seed payload, so the demo is self-contained. Theme distribution archives stay clean — the export-ignore rules are untouched.

  • blueprint-main.json and blueprint-stable.jsonreleases/download/playground-demo/dirtbag-playground-demo.zip via the CORS proxy.
  • Both now preview the same pinned demo snapshot; retitled the stable one accordingly.

Regenerating the bundle

When demo content changes, rebuild and re-upload the asset:

mkdir -p /tmp/dbb/dirtbag
git checkout-index -a -f --prefix=/tmp/dbb/dirtbag/   # includes export-ignored playground/
(cd /tmp/dbb && zip -rqX dirtbag-playground-demo.zip dirtbag)
# upload dirtbag-playground-demo.zip to the playground-demo release

(A CI job attaching this asset on release would remove the manual step.)

Verification

Live-booted the branch blueprint in a real browser: theme installs and activates, homepage renders with the seeded content (Roadside Almanac, Field Notes, post list) and the media-based site logo. No blueprint errors.

🤖 Generated with Claude Code

… of git:directory

The live browser Playground fails git:directory installs with
'Fw.createHash is not a function'. Install the theme from the GitHub
source archive (which includes the playground/ seed-content helpers the
runPHP step needs) through the CORS proxy. main tracks refs/heads/main;
stable pins the v0.1.14 tag archive.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c03dc652e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"refType": "branch",
"path": "/"
"resource": "url",
"url": "https://wordpress-playground-cors-proxy.net/?https://github.com/dknauss/dirtbag/releases/download/playground-demo/dirtbag-playground-demo.zip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the main preview tracking main

With this URL, the blueprint-main.json demo no longer installs the main branch; it installs the same playground-demo release asset as the stable snapshot. The public badge and blueprint metadata still present this as the main-branch preview (README.md:8, playground/blueprint-main.json:5-7, and docs/development.md:119), so after changes land on main the Playground link will keep booting the old demo bundle and will not show or catch regressions until someone manually replaces that release asset.

Useful? React with 👍 / 👎.

"refType": "commit",
"path": "/"
"resource": "url",
"url": "https://wordpress-playground-cors-proxy.net/?https://github.com/dknauss/dirtbag/releases/download/playground-demo/dirtbag-playground-demo.zip"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the stable preview tied to a release

Because the stable blueprint now installs the mutable playground-demo asset instead of the v0.1.14 commit, the “stable tag” entry points at whatever demo bundle was most recently uploaded rather than the published release it is supposed to preview. The README/docs still advertise this link as the stable tag preview (README.md:8, docs/README.md:19, docs/development.md:118), so re-uploading the demo bundle for newer content would silently change the stable preview and make release-regression checks against the tagged theme impossible.

Useful? React with 👍 / 👎.

…stall

# Conflicts:
#	playground/blueprint-main.json
#	playground/blueprint-stable.json
@dknauss
dknauss merged commit da90f31 into main Jul 2, 2026
9 of 10 checks passed
@dknauss
dknauss deleted the fix/playground-zip-install branch July 2, 2026 14:25
dknauss added a commit that referenced this pull request Jul 4, 2026
…atch, Playground/HelpHub tracking (#107)

* docs: refresh WP contribution status; fix dangling gallery-comment link

- two-factor #877 merged 2026-06-29 (was "proposed")
- two-factor #859 closed by accident, reopened as #917 — point tracker at #917
- gutenberg #79380 now proposed upstream in #79440; note Dirtbag backs that PR
- docs/repro/README.md: the gallery-caption comment draft was never written;
  replace the broken link with an honest "not yet drafted" note

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(repro): add held core fix for gutenberg #79372 (Post Title float)

Post Title links are display:inline-block in the shared style.scss, which stops
the title wrapping around floats / shape-outside on the front end. Archaeology
shows the inline-block was added in gutenberg#30666 solely to silence an editor
RichText "inline container" warning — it has no front-end purpose. The held fix
moves it to an editor-only editor.scss so the front-end link stays inline.

Patch verified to git-apply cleanly against current gutenberg trunk. Held pending
a maintainer signal on the (triaged) issue; theme-side float variant remains the
local fix. Also link the reserve fix from the repro README float section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: track HelpHub #1817 (shipped) and Playground #3875 contributions

- Documentation-Issue-Tracker #1817: admin-email HelpHub content merged + closed Done
- wordpress-playground #3875: git:directory browser-bundle bug Dan filed (the one
  Dirtbag works around in #102/#103); open, regression-test suggested upstream

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: update Playground #3875 status — fix in flight via #3882

adamziel's #3879 (first pass, closed) consolidated into ashfame's #3882 (open):
isomorphic-git browser-ESM alias across all browser-facing packages + Playwright
git:directory regression test + localhost CORS-proxy bypass. Fixes #3875; Dirtbag
CORS-proxy ZIP workaround retirable once it merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: note #3875 fix verified on #3882 preview build

Drove the #3882 Playground preview build (playground.wordpress.net/?pr=3882) with a
git:directory installTheme of dknauss/dirtbag — clones and activates cleanly, no
createHash error. Fix confirmed working, pending merge + production deploy before
switching dirtbag blueprints back off the CORS-proxy ZIP workaround.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dknauss added a commit that referenced this pull request Jul 4, 2026
…ed in prod

The wordpress-playground git:directory browser bug (#3875) is fixed on trunk (the
vite-resolve-isomorphic-git browser-ESM alias, PR #3882) and deployed to production.
Verified: a git:directory installTheme of dknauss/dirtbag at the pinned v0.1.3 commit
clones and activates on production playground.wordpress.net with no createHash error.

Revert blueprint-theme-test.json off the CORS-proxy archive-ZIP workaround (#102/#103)
back to git:directory, dropping its dependency on the third-party proxy. Refresh the
contributions-tracker #3875 entry to note the production deploy and retirement.
blueprint-main/stable keep the rolling release-asset ZIP by design.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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