Skip to content

Keep JSON links relative#333

Open
ProtonsAndElectrons wants to merge 7 commits into
tscircuit:mainfrom
ProtonsAndElectrons:fix-relative-json-links-27
Open

Keep JSON links relative#333
ProtonsAndElectrons wants to merge 7 commits into
tscircuit:mainfrom
ProtonsAndElectrons:fix-relative-json-links-27

Conversation

@ProtonsAndElectrons
Copy link
Copy Markdown

@ProtonsAndElectrons ProtonsAndElectrons commented May 21, 2026

/claim #27

Summary

  • keep the shell-generated json link path-relative instead of deriving it from the full request URL
  • apply the same behavior to the origin React shell and D1/Cloudflare render shell
  • add D1 render coverage so proxied HTTPS pages do not emit absolute JSON hrefs
  • refresh the stale 7-Zip setup archive URLs from 24.08 to 25.01 so the required Bun Test workflow can run on cache misses

Validation

  • bun test cf-proxy/test/render.test.ts
  • bun test test/render.test.ts (from cf-proxy)
  • bunx biome format lib/middlewares/with-ctx-react.tsx cf-proxy/src/render.ts cf-proxy/test/render.test.ts
  • bunx tsc --noEmit
  • cd cf-proxy && bunx tsc --noEmit
  • official 7-Zip URL probes for 7z2501-linux-x64.tar.xz, 7z2501-linux-arm64.tar.xz, and 7z2501-mac.tar.xz returning 200
  • origin shell smoke test verifying http://.../components/list renders href="/components/list.json?..."
  • git diff --check

Note: bun run format:check ... invokes the repo-wide biome format .; on this Windows checkout it reports pre-existing CRLF-only diagnostics across unrelated files, so I used direct Biome checking for the touched files above. CI format check is passing on the Linux checkout.

AI-assisted with Codex; scoped to the relative JSON-link behavior plus the minimal CI setup URL refresh needed for the test job.

@ProtonsAndElectrons
Copy link
Copy Markdown
Author

CI is green now (format-check, type-check, and test all pass on 9890ad6). This is ready for maintainer review when you have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant