Fix docs Cloudflare build flow and stabilize workspace checks#1098
Fix docs Cloudflare build flow and stabilize workspace checks#1098richardjoo wants to merge 6 commits into
Conversation
|
|
All contributors have signed the CLA ✍️ ✅ |
Scope checkThis PR changes 554 lines across 26 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
There was a problem hiding this comment.
Pull request overview
This PR updates the docs Cloudflare deployment flow (including a local-only Wrangler config and an MCP/AI Search fallback) and stabilizes workspace validation by adjusting lint/typecheck tooling and hardening flaky tests.
Changes:
- Add Cloudflare docs runbooks + link them from deployment and REST API docs.
- Make docs Worker build/preview work without a configured Cloudflare AI Search binding (local wrangler config + MCP fallback + custom 404).
- Stabilize workspace checks (dedicated oxlint tsconfig, registry-client typecheck via
tsc, and longer timeouts/mocking for flaky tests).
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.oxlint.json | Introduces a dedicated tsconfig for oxlint type-aware runs with targeted excludes. |
| packages/registry-client/tsconfig.json | Adjusts TS lib config for registry-client compilation/typechecking. |
| packages/registry-client/package.json | Switches registry-client typecheck script from tsgo to tsc. |
| packages/registry-cli/src/commands/info.ts | Minor typing simplification for parsed profile handling. |
| packages/core/tests/unit/database/migrations/036_i18n_menus_and_taxonomies.test.ts | Uses toSorted() in migration test assertions. |
| packages/core/src/api/handlers/registry.ts | Preserves SSRF error cause when rethrowing artifact URL rejection. |
| packages/auth/src/passkey/register.test.ts | Increases timeout for RS256 registration test to reduce flakes. |
| packages/auth/src/passkey/authenticate.test.ts | Increases timeout for RS256 assertion test to reduce flakes. |
| packages/admin/tests/locales/LocaleDirectionProvider.test.tsx | Mocks message loading and increases waitFor timeout to stabilize locale-direction test. |
| packages/admin/tests/components/SeoPanel.test.tsx | Tightens assertions for SEO flush-on-unmount behavior. |
| packages/admin/src/lib/api/client.ts | Renames destructured error message var for clarity. |
| packages/admin/src/components/SeoPanel.tsx | Changes flush behavior for pending SEO draft updates. |
| packages/admin/src/components/ContentTypeEditor.tsx | Renames plural label variable for clarity. |
| packages/admin/src/components/ContentEditor.tsx | Removes unused Link import. |
| package.json | Routes lint scripts through the dedicated oxlint tsconfig. |
| e2e/tests/bylines.spec.ts | Removes unused byline IDs from test setup. |
| docs/wrangler.local.jsonc | Adds local-only Wrangler config without AI Search binding. |
| docs/src/worker.ts | Adds MCP search_docs fallback when AI Search binding is missing. |
| docs/src/pages/404.astro | Adds custom Starlight 404 page (Starlight default disabled). |
| docs/src/content/docs/runbooks/index.mdx | Adds runbooks index page. |
| docs/src/content/docs/runbooks/deployment/cloudflare-post-deploy-operations.mdx | Adds Cloudflare post-deploy operational runbook. |
| docs/src/content/docs/reference/rest-api.mdx | Links REST API docs to the Cloudflare post-deploy runbook. |
| docs/src/content/docs/deployment/cloudflare.mdx | Adds “Manage a deployed site via API” section and runbook link. |
| docs/README.md | Documents local preview workflow using the local Wrangler config. |
| docs/astro.config.mjs | Disables default 404 route, adds runbooks to sidebar, tweaks Cloudflare adapter config. |
| .oxlintrc.json | Removes @e18e/eslint-plugin integration and associated rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const flushPendingDraft = React.useCallback(() => { | ||
| if (!pendingTextFlushTimerRef.current) { | ||
| return; | ||
| } | ||
| clearPendingTextFlush(); | ||
| emitChange(currentDraftRef.current); | ||
| }, [clearPendingTextFlush, emitChange]); |
There was a problem hiding this comment.
Good catch. This one was valid.
I updated flushPendingDraft() so it no longer depends on pendingTextFlushTimerRef.current being non-null. It now compares the current draft snapshot against lastEmittedSnapshotRef.current, clears any pending timer, and emits only when there is an unflushed draft. That avoids dropping pending text edits during unmount/content switches after debounce cleanup.
Fixed in commit 44e4413 (Fix SeoPanel pending draft flush).
| editUrl: false, | ||
| pagefind: false, | ||
| hero: { | ||
| tagline: Astro.locals.t("404.text"), |
There was a problem hiding this comment.
This one appears to be a false positive.
Astro.locals.t is provided by Starlight itself via its locals augmentation/middleware. I verified that against @astrojs/starlight/locals.d.ts, which explicitly documents Astro.locals.t('404.text'), and the docs build on this branch renders /404.html successfully.
101d0a2 to
0cdab72
Compare
|
Follow-up on the two Copilot review points:
This one was valid. I updated This fix is included in commit
This one appears to be a false positive. Local validation after the
|
ascorbic
left a comment
There was a problem hiding this comment.
These are generally good changes, but there are quite a few unrelated things in one PR here. Could you split them up into logical parts and open seperate PRs for each?
|
Thanks — agreed. I’m splitting this into smaller logical PRs now and will replace this combined PR with separate focused ones. |
|
Per review feedback, I’ve split this combined PR into focused replacements:
I’m closing this larger PR in favor of those smaller ones. I also intentionally left out the incidental warning-cleanup / broader test-stability edits from the split set for now so each replacement PR stays narrowly scoped. |
What does this PR do?
This PR improves the docs deployment/operations path for Cloudflare-hosted EmDash sites and fixes several workspace-level validation issues that were blocking clean local and CI-style runs.
Closes #
@emdash-cms/registry-clienttypecheck totsc, and stabilizing browser/passkey tests that were flaking under full-suite load.@e18e/eslint-pluginintegration fromoxlint; type-aware lint still runs, but the previouse18e/*rule coverage is intentionally dropped until the upstream JS-plugin crash can be replaced safely.Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure
Screenshots / test output
pnpm typecheckpnpm lintpnpm testpnpm format:checkpnpm --dir docs build