Fix Content route commits on slow networks#2372
Conversation
This comment has been minimized.
This comment has been minimized.
Visual recap — generation failedThe visual recap could not be generated for this pull request. This is informational only and does not block the PR. Diagnostic: No plan URL: Repair changed too much of targeted file plan.mdx; expected a localized parser fix. Agent output: Repaired |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
PR #2372 makes a focused Content-route change: ordinary navigations no longer wait for the root locale loader, while action/form-driven revalidation continues to follow React Router's default behavior. It also separates the new-document Page chooser from the broader collaboration readiness gate, preserving usability while collaboration connects while still blocking on edit authorization, body hydration, and database conversion; the Database path retains its stricter editor gate.
The approach is sound and well covered by targeted tests. The shouldRevalidate tests verify both ordinary navigation and action submission behavior, and the body-hydration tests cover the intended Page-choice states. The changelog entry is appropriately scoped. One review agent raised a collaboration-loading concern, but source and tests confirm that excluding that state from the Page button is intentional per the PR's stated behavior; the Database button remains protected by the existing editorCanEdit gate.
Risk assessment: Standard, because this changes route revalidation and editor interaction state, but does not alter authentication, payments, schema, or destructive data behavior. No confirmed reportable bugs found.
✅ Focused route and chooser coverage is included.
✅ Action-driven revalidation behavior is preserved.
✅ Database conversion remains protected against interaction while pending.
🧪 Browser testing: Skipped — dev server is healthy, but browser verification was attempted and could not run because Chrome automation tools were unavailable in executor sessions; all planned cases were marked couldnt_verify/env_issue.
Problem
With global network throttling, creating a page from Content's sidebar left the browser on the previous
/pageroute and replaced the editor with a full skeleton while the root route reloaded locale data. The optimistic page and its Page/Database chooser were therefore hidden even though the new page identity already existed locally.This is the intentionally separate follow-up to the issue found while validating #2363. It does not modify, absorb, or block that PR.
Approach
Let ordinary client-side path navigation commit without re-running the bootstrap-only root locale loader, while retaining React Router's default revalidation for form/action submissions. Separately, let authorized users choose Page while collaboration connects; authorization, body hydration, and database conversion still disable that choice, and Database retains its stricter pending gate.
What changed
Safety and scope
origin/mainand the Fix new-page database conversion race #2363 QA head both produce conflict-free merge trees with this branchVerification
b6522362d39a54d28db5e3b5ef3decef75dad352, including Content DB tests, fast tests, build, typecheck, lint/format, Content parity, security guards, and SSR cold-start smoke/page/<id>route commit measured 65.3 ms with Page enabled and Database disableden-US/ltrlocale stateReview focus
Unrelated observations
pixman-1; one failed-job rerun installed successfully and the actual Content DB suite passed