Skip to content

fix(worker): move Pages Function under apps/web for Git integration - #1023

Merged
d-o-hub merged 3 commits into
mainfrom
fix/pages-functions-location
Aug 21, 2026
Merged

fix(worker): move Pages Function under apps/web for Git integration#1023
d-o-hub merged 3 commits into
mainfrom
fix/pages-functions-location

Conversation

@d-o-hub

@d-o-hub d-o-hub commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

The Pages Git integration did not detect functions/ at the repo root (preview deployment had no _routes.json/_worker.js, and /api/health returned a 404). The Pages project root is apps/web, so the function must live at apps/web/functions/. Moves functions/api/[[path]].tsapps/web/functions/api/[[path]].ts (import path updated).

The Pages Git integration did not detect functions/ at the repo root —
the project root is apps/web, so the function must live at
apps/web/functions/ for the Cloudflare build to compile and serve it.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@d-o-hub
d-o-hub requested a review from d-oit as a code owner August 21, 2026 07:47
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploying do-epub-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5fc12af
Status: ✅  Deploy successful!
Preview URL: https://2d4c3a0e.do-epub-studio.pages.dev
Branch Preview URL: https://fix-pages-functions-location.do-epub-studio.pages.dev

View logs

@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

Copy link
Copy Markdown

Bundle budget (gzipped, ADR-107 §3)

Budgets: main JS 180 KB · main CSS 30 KB · any lazy chunk 80 KB

Bundle budget (gzipped + brotli) — ADR-107 §3

File Kind Gzipped (KB) Brotli (KB) Budget (KB) Status
assets/admin-route-D1m5yjfu.js lazyChunkJs 98.74 85.41 100.00
sw.js lazyChunkJs 65.99 57.50 100.00
assets/reader-core-CCaTjPeS.js lazyChunkJs 62.32 54.10 100.00
assets/react-vendor-BWRAodvC.js lazyChunkJs 54.56 47.38 100.00
assets/reader-route-bZ__2e5r.js lazyChunkJs 30.78 26.16 100.00
assets/index-lxeV6mJB.css mainCss 12.20 10.33 30.00
assets/index-K1eNMIq7.js mainJs 10.47 9.42 180.00
assets/ru-BFpz1sY8.js lazyChunkJs 9.18 7.77 100.00
assets/hi-CjfB2fJC.js lazyChunkJs 8.92 7.57 100.00
assets/ja-BpwuN48i.js lazyChunkJs 8.40 7.23 100.00
assets/ar-CJd7Fger.js lazyChunkJs 8.35 7.11 100.00
assets/ko-DrNhOfFi.js lazyChunkJs 8.11 6.97 100.00
assets/fr-B2glrN9V.js lazyChunkJs 7.98 7.23 100.00
assets/de-CM5WUkd4.js lazyChunkJs 7.98 7.26 100.00
assets/zh-CT2YkEZX.js lazyChunkJs 7.90 6.39 100.00
assets/es-B_vuzGMg.js lazyChunkJs 7.77 6.83 100.00
assets/pt-D0DIqPaV.js lazyChunkJs 7.74 6.96 100.00
assets/nl-uJMZFlPr.js lazyChunkJs 7.68 6.99 100.00
assets/it-DekLQttw.js lazyChunkJs 7.64 6.93 100.00
assets/LoginPage-DQV1qlDp.js lazyChunkJs 3.20 2.84 100.00
assets/SettingsPage-BniEU6Xb.js lazyChunkJs 2.65 2.33 100.00
assets/workbox-CBSeueJ2.js lazyChunkJs 2.20 1.96 100.00
assets/CatalogPage-DyHT1ugh.js lazyChunkJs 1.81 1.61 100.00
assets/MyLibraryPage-B5r1wUxb.js lazyChunkJs 1.60 1.40 100.00
assets/HelpPage-22pU0srT.js lazyChunkJs 0.79 0.68 100.00
assets/rolldown-runtime-Dd_uD5pT.js lazyChunkJs 0.61 0.53 100.00
assets/__vite-browser-external-CKnVkMRn.js lazyChunkJs 0.11 0.09 100.00

Budgets: main JS 180 KB · main CSS 30 KB · lazy chunk 100 KB
Files measured: 27 · Violations: 0

Baseline delta comparison

Route Entry Δ (KB) Total Δ (KB) Total Δ (%) Entry Fail Total Fail Status
reader 0.04 2.53 0.95%
catalog -0.00 2.40 1.36%
admin 2.20 2.40 1.38%

The Pages Git integration only detects functions/ under the project root
(apps/web), not at the repo root — verified by deploying both. Update the
GOAP plan, ADR, runbook, and learnings to the correct location.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation agents labels Aug 21, 2026
apps/web/functions/api/[[path]].ts is a runtime entry point bundled by
Cloudflare at deploy time, never imported by app source, so knip flags
it as an unused file. Add it to the apps/web ignore list.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@repowise-bot

repowise-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

✅ Health of changed files: 9.6 → 9.6 (+0.1)
⚠️ Change risk: moderate, riskier than 43% of this repo's commits.

📋 At a glance
1 hotspot touched · 1 file with recent fix history · 2 dead-code findings · no tests touched. Scoped to (root).

✅ Health gate: passed

📌 Before you merge

  • No test file imports the changed files and none were touched: consider adding coverage
🔎 More signals (2)

🔥 Hotspot touched (1)

  • knip.config.ts: 4 commits/90d, 0 dependents · primary owner: d-oit (92%)

💀 Dead code (2 findings)

  • 💀 knip.config.ts (file-level) (confidence 0.40)
  • 💀 knip.config.ts config (confidence 0.40)

👀 Suggested reviewers @d-oit


📊 See the full report for this PR
Your repo map with this PR's blast radius lit up, every caller of the contracts it changes, and health before and after. No sign-in. · ⭐ Star Repowise · 📥 Install bot · Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot · Updated 2026-08-21 08:32 UTC (since the last push: health 10.0 to 9.6, 1 more file)

@d-o-hub
d-o-hub merged commit 6d37211 into main Aug 21, 2026
28 checks passed
@d-o-hub
d-o-hub deleted the fix/pages-functions-location branch August 21, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents area:web documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants