Remove content-notice gate, add permanent campaign URLs, fix save/load - #223
Merged
Merged
Conversation
Owner
Author
|
/review |
Contributor
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
This was referenced Aug 7, 2026
…, 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
force-pushed
the
feature/content-gate-permanent-urls-12f9b8
branch
from
August 7, 2026 20:16
40779d0 to
a85e01a
Compare
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.
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 aSaveRecordStorekey mismatch (put()keyed bycampaignId,get()/resume read bysaveId) that made every persisted save unreachable. Brings in the prior spike's portable-campaign JSON pipeline (async runtime loader, all 8 campaigns exported tosite/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 tofindByRoleso 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 (nodesign/or generated-doc changes in this branch)./docs.ps1 -BuildOnly— did not run, no doc changes