Skip to content

refactor: share interop helpers and remove agent-rule violations - #1452

Open
fhammerschmidt wants to merge 7 commits into
masterfrom
fix/1421-shared-interop
Open

fhammerschmidt wants to merge 7 commits into
masterfrom
fix/1421-shared-interop

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Share Algolia configuration checks and the highlight.js and react-markdown bindings across the apps. Move the react-markdown dependency to the shared package and replace the duplicate Cypress bindings with one typed module.

Use one typed clipboard helper in the docs, guide and playground. Await writes before showing success, handle failures and retries, and reset feedback when the copied content changes. Keep the legacy fallback and restore focus and selection after it runs.

Replace raw JavaScript and Obj.magic with typed bindings and DOM refs. Check React elements before reading their props in MDX helpers. Replace Belt calls with Stdlib and remove the unused metadata helper and hook.

Use the selected warning suggestion's DOM parent for scrolling. This avoids depending on a parent ref that React may not have attached yet.

Use MemoryRouter in component tests. Add a browser test of the built guide for native Back/Forward navigation and restored editor content.

Configure Pages Functions to use the automatic JSX runtime. The OG image function then works without its raw React import.

Part of #1421.
Fixes #1410
Fixes #1412

Share clipboard writes, Algolia validation, highlighting, Markdown and Cypress bindings. Replace raw JavaScript and unsafe casts with typed interop, migrate Belt calls to Stdlib, and isolate router tests with MemoryRouter.

Add clipboard and MDX regressions, including exact meta element iteration and share feedback reset coverage.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T09:37:54.085166Z 94ca39f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
guide 04c2c3d Commit Preview URL

Branch Preview URL
Oct 12 2026, 12:31 PM

Remove the unused metadata helper and kebab-case export already covered by the final dead-code cleanup. Match the pending API array access and visual-test router paths to avoid overlapping edits.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94ca39f25d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/docs/src/components/CodeExample.res Outdated
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch master at commit a62233b. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 84 84 0
Accessibility 80 80 0
Best practices 100 100 0
SEO 92 58 -34

Download the full Lighthouse reports and baseline

Commit 8aaa817 · Cloudflare preview

Configure the Functions JSX transform to import React runtime helpers automatically. Add a deployed OG image regression that checks the PNG signature, catching missing runtime imports that bundling alone does not detect.
Restore a shared typed clipboard fallback with focus and selection cleanup. Scroll warning suggestions through their DOM parent, and cover keyboard scrolling and fallback copying in Cypress. Add guide browser Back/Forward coverage against the production build in CI.
Use IPv4-first DNS ordering for the guide browser test step so React Router prerender requests reach the preview server in the Playwright container. Keep localhost URLs unchanged.
Deny the native Clipboard API and stub the legacy copy command to return false when checking error feedback. Confirm cleanup after failure and retain native permission recovery and repeated copying coverage.
Wait for CodeMirror and the initial compiler output before clicking Settings in the warning suggestion regression. This avoids clicking server-rendered controls before React attaches their handlers.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

This branch was successfully deployed

2 active deployments
guide-preview — 04c2c3d2 Deployed Oct 12, 2026 by github-actions[bot]
preview — 04c2c3d2 Deployed Oct 12, 2026 by github-actions[bot]
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.

AGENTS.md rule violations Three clipboard implementations; duplicate Algolia check; duplicate bindings

1 participant