Skip to content

fix: Stabilize Preview and MCP issue reports - #6572

Merged
kof merged 11 commits into
mainfrom
fix6569
Oct 21, 2026
Merged

kof merged 11 commits into
mainfrom
fix6569

Conversation

@kof

@kof kof commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Problem

A fresh iterative Preview can lose its rendered content on the first client navigation with a React useContext error. MCP issue reports can also miss the page or instance ID needed to locate a problem, and concurrent tool calls can overwrite newer report context with an older snapshot.

Fix

  • Have Vite scan generated routes before the first navigation. This applies to the base React Router template and the Netlify and Cloudflare overlays. It changes local iterative Preview, not saved project data or production routing.
  • Include up to three recent, validated tool targets in MCP issue reports. A project-relative screenshot path is matched to its page ID; the CLI does not store the path, full URL, token, or page content. It cannot read the Builder's current UI selection, but includes an instance ID when a tool call names one.
  • Treat structured MCP error results as failures and serialize report-state writes within a CLI session, so a concurrent older write cannot replace a newer result.

The reporting work from #6574 is now included here. #6574 is superseded.

Verification

  • Reproduced Iterative preview can show a React useContext error on first navigation #6569 twice with CLI 0.306.0 and a cold optimizer cache. With the Vite change, a cold / → /blog navigation and direct article load rendered without browser errors.
  • The config assertion failed without the Vite entry and passed with it. A proposed optimizer test also passed without the fix, so it was removed; the real cold-navigation check remains the behavioral evidence.
  • The new concurrent-write test passed with serialization and failed when the queue was temporarily removed. All 106 focused CLI tests, CLI typecheck, root lint, formatting, and generated API check passed on the combined branch.
  • Earlier checks of the same Preview and reporting code passed: 133 prebuild tests, 144 project-build MCP tests, protocol and Builder reporting tests, affected typechecks, CLI build, generated docs, and CI on the separate PRs.
  • The fixture build passed without changing tracked files. The full local fixture pipeline stopped at sync because the development server returned bundle version bundle-17o6sch while this checkout expects bundle-1sh9iaz. The combined commit passed Linux and Windows fixture checks and all other required CI jobs.
  • Full Luna/low agent evaluations were run earlier on the combined branch: the latest run passed 8 of 9 fixture tasks, while the managed-form assertion failed on an unrelated task. Saved baselines were missing or incompatible, so the command failed overall. No baselines changed. Evaluations were not rerun for this final concurrent-write change.

Checklist

  • Reproduce and fix the first-navigation Preview failure
  • Cover the base, Netlify, and Cloudflare templates and generated fixtures
  • Include safe recent page and instance IDs in MCP issue reports
  • Treat structured MCP errors as failures
  • Serialize concurrent report-state writes and verify the regression test fails without the queue
  • Review documentation impact: Preview usage and user guidance are unchanged; no docs change
  • Run focused local checks and attempt the fixture pipeline
  • Confirm required CI passes on the final combined commit

Closes #6569
Ref #6571

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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 🔄 Running since 2026-10-21T07:43:55.006507Z 171dc08 New commits
🔒 Security Review ✅ Completed 2026-10-21T07:46:52.119034Z 171dc08 New commits
ℹ️ 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.

@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: 2507a6a349

ℹ️ 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 packages/cli/templates/react-router/vite.config.ts
@kof kof changed the title fix: Keep first preview navigation hydrated fix: Stabilize Preview and MCP issue reports Oct 21, 2026
@kof
kof merged commit bc7e58a into main Oct 21, 2026
36 checks passed
@kof
kof deleted the fix6569 branch October 21, 2026 08:09

This branch was previously deployed

1 inactive deployment
development — 171dc085 Deployed Oct 21, 2026 by kof via builder-e2e (shard-2) #22278
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.

Iterative preview can show a React useContext error on first navigation

1 participant