Skip to content

Remove content-notice gate, add permanent campaign URLs, fix save/load - #223

Merged
The-Running-Dev merged 3 commits into
mainfrom
feature/content-gate-permanent-urls-12f9b8
Aug 7, 2026
Merged

Remove content-notice gate, add permanent campaign URLs, fix save/load#223
The-Running-Dev merged 3 commits into
mainfrom
feature/content-gate-permanent-urls-12f9b8

Conversation

@The-Running-Dev

@The-Running-Dev The-Running-Dev commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What changed, and why. The content-notice modal blocked every session behind a click-through and campaign links were not shareable or resumable. This removes the modal (content notice now shows inline as a non-blocking advisory), makes ?campaign= URLs permanent and auto-starting, and fixes a SaveRecordStore key mismatch (put() keyed by campaignId, get()/resume read by saveId) that made every persisted save unreachable. Brings in the prior spike's portable-campaign JSON pipeline (async runtime loader, all 8 campaigns exported to site/public/campaigns/), which this work builds on.

That async catalog load also broke the W65 real-browser test suite: its fixtures queried for the campaign button and shelf heading synchronously right after render(), so every spec that opened a campaign hit the "Loading catalog…" spinner instead of the shelf. Fixed by switching those queries to findByRole so they wait for the fetch to resolve (site/src/play/browser/fixtures.tsx, accessibility.browser.test.tsx, viewport.browser.test.tsx).

Verified

  • cd src/engine; npm run typecheck && npm run lint && npm test — passed (730/730 tests)
  • cd site; npm run check (format:check, lint, typecheck, unit tests, real-browser suite, build) — passed (43/43 unit, 52/52 browser)
  • ./build/Test-Documentation.ps1 — did not run, out of scope (no design/ or generated-doc changes in this branch)
  • ./docs.ps1 -BuildOnly — did not run, no doc changes

@The-Running-Dev

Copy link
Copy Markdown
Owner Author

/review

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo Fixer

No findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR.

Comment thread site/src/play/composition.ts
Comment thread site/src/play/PlayApp.tsx
Comment thread site/src/play/composition.ts
Comment thread src/engine/package.json
Comment thread site/src/play/PlayApp.tsx Outdated
Comment thread site/src/play/composition.ts
Comment thread site/src/play/PlayApp.tsx Outdated
…, fix save/load

Loading a campaign no longer requires clicking through a blocking notice dialog;
any content advisory now shows inline in the briefing instead. Each campaign gets
a real ?campaign= permalink that loads it directly, including on first page load.

Also fixes local save/load, which was silently broken: saves were written keyed
by campaignId but read back keyed by saveId, so loadGame could never find one
after a reload. The UI now surfaces this with a working "Resume saved run"
button. Along the way, fixed a jsdom test-environment bug where Node's own
global localStorage was shadowing jsdom's with a non-functional stub, which had
been masking persistence bugs in the unit test suite.
The portable-campaign migration made the initial dossier fetch async, but
the W65 browser fixtures still queried for the campaign button and shelf
heading synchronously right after render(), so every spec that opened a
campaign hit the loading spinner instead. Switched those queries to
findByRole so they wait for the catalog fetch to resolve.
- composition.ts: put() now removes the superseded save blob once the new
  record and index are safely written, instead of leaving every prior
  autosave orphaned in localStorage under its old saveId.
- PlayApp.tsx: the ?campaign= auto-start effect now checks findLocalSave()
  first and resumes an existing run, matching the manual briefing path
  instead of always starting a fresh session.
- PlayApp.test.tsx: covers the permalink-resume path.
@The-Running-Dev
The-Running-Dev force-pushed the feature/content-gate-permanent-urls-12f9b8 branch from 40779d0 to a85e01a Compare August 7, 2026 20:16
@The-Running-Dev
The-Running-Dev merged commit 5d9442d into main Aug 7, 2026
5 checks passed
@The-Running-Dev
The-Running-Dev deleted the feature/content-gate-permanent-urls-12f9b8 branch August 7, 2026 20:24
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