Skip to content

fix(Comix): solve Cloudflare/WebView UA with app level update#216

Merged
niclimcy merged 1 commit into
inkdex:0.9/stablefrom
acepilot147:fix/comix-cloudflare-app-level
Jun 13, 2026
Merged

fix(Comix): solve Cloudflare/WebView UA with app level update#216
niclimcy merged 1 commit into
inkdex:0.9/stablefrom
acepilot147:fix/comix-cloudflare-app-level

Conversation

@acepilot147

Copy link
Copy Markdown
Contributor

Summary

Supersedes #213. Solves the Comix Cloudflare/WebView User-Agent mismatch at the app level using the new 1.0.0-alpha.91 toolchain, replacing the in-extension UA workaround that was rejected on #213. The chapter WebView now runs under the app's default UA via source.userAgent and the extension adopts cloudflareBypassCompleted in place of the deprecated saveCloudflareBypassCookies.

  • Set source.userAgent so the WebView's own loads + same-origin API XHRs carry the UA cf_clearance
  • Swap deprecated saveCloudflareBypassCookiescloudflareBypassCompleted.
  • Bump @paperback/toolchain + @paperback/types to 1.0.0-alpha.91 (the existing ^…-alpha.89 range already permitted it; lockfile refreshed). The other 10 extensions still compile against the deprecated-not-removed API.
  • Fix a live chapter bug: the "$1100" rewrite replacement was mis-parsed (the $1 backreference swallowed the trailing digits), turning limit=20 into page=1100 and returning zero chapters — now a function replacement.

Checklist

Making changes

For updates to existing extensions

  • Bumped the version value in pbconfig.ts for each modified extension.

For new extensions

  • Generated tests with npx paperback-cli test --generate EXTENSION_NAME.

Testing changes

  • npm run conformance passes.
  • npm test -- EXTENSION_NAME passes.
  • Bundled the extension and verified it works in the Paperback app.

Committing changes

  • Commit messages follow the existing convention (type(Scope): summary, e.g. fix(EXTENSION_NAME): ...).

AI assistance

Pick one:

  • This PR contains no AI-assisted changes.
  • This PR is AI-assisted. I manually reviewed every change and added an Assisted-by: Claude Code:claude-opus-4-8 trailer to each AI-assisted commit.

@acepilot147 acepilot147 force-pushed the fix/comix-cloudflare-app-level branch from 6edf425 to 10811fc Compare June 12, 2026 23:24
…lpha.91)

Replace the WebView User-Agent workaround (rejected in inkdex#213) with the first-class alpha.91 APIs: set source.userAgent so the WebView runs under the app's default UA that cf_clearance is bound to, and adopt cloudflareBypassCompleted in place of the deprecated saveCloudflareBypassCookies. Bump @paperback/toolchain and @paperback/types to 1.0.0-alpha.91.

Also fix the chapter page-size rewrite: the "$1100" replacement string is mis-parsed (the $1 backreference swallows the trailing digits), turning limit=20 into page=1100 and returning zero chapters; use a function replacement.

Assisted-by: Claude Code:claude-opus-4-8
@acepilot147 acepilot147 force-pushed the fix/comix-cloudflare-app-level branch from 10811fc to 08e1261 Compare June 12, 2026 23:41
@niclimcy niclimcy merged commit bfd0a13 into inkdex:0.9/stable Jun 13, 2026
2 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.

2 participants