Skip to content

Fix inactive Connect button on cached simulator pages - #63

Merged
avni merged 2 commits into
mainfrom
codex/fix-cached-simulator-connect
Oct 27, 2026
Merged

avni merged 2 commits into
mainfrom
codex/fix-cached-simulator-connect

Conversation

@crnicholson

Copy link
Copy Markdown
Contributor

Cached simulator HTML still references entry.Dgpr0kmR.js after the Windows upload deployment, but that asset returns 404. The editor never initializes, leaving Connect badge with no click handler.

Preserve hashed JavaScript, imported chunks, and CSS from the previous two successful Pages deployments. Keep the current HTML and assets authoritative, and record each build's own asset list so old files expire instead of accumulating indefinitely.

Validation:

  • Reproduced the live empty editor and inactive Connect button; confirmed its referenced script returns 404.
  • Downloaded the exact prior Pages artifact and served its cached simulator HTML against the new build. After preservation, its original script loads, the editor initializes, and Connect lists the simulated badge apps.
  • Tested the production browser UI with a simulated E: disk: Connect, app listing, install with read-back confirmation, cancellation, and visible invalid-folder errors.
  • 251 editor tests and 14 app-description tests pass. Production build, built URL verification, and git diff --check pass.

Browser disk tests use simulated directory handles. Physical Windows USB testing remains pending. The live site requires this PR to be merged and deployed.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 18:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The deployment workflow can fail before deploying the current site when a selected artifact has expired after its default one-day retention, with no explicit retention policy or fallback for missing artifacts.

1 open issue
What changed in this PR

This PR addresses inactive controls on cached simulator pages by preserving older build assets so the editor can still initialize.

Changes:

  • Retrieve assets from the previous two successful Pages deployments.
  • Preserve matching assets without replacing current files, and record each build’s own assets to prevent indefinite accumulation.
  • Add regression coverage for asset preservation, current-file precedence, and expiration.
File Description
tests/​page-assets.test.mjs Tests preservation, exclusions, current-file precedence, and asset expiration.
scripts/​preserve-page-assets.mjs Copies eligible historical assets and writes the current build’s asset manifest.
.github/​workflows/​deploy.yml Downloads previous deployment artifacts and preserves assets before upload.

Review effort: Balanced

Comment thread .github/workflows/deploy.yml Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the changes preserving assets used by cached simulator pages.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@avni
avni merged commit e56e038 into main Oct 27, 2026
5 checks passed
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.

3 participants