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.
Summary
This is the intentionally separate follow-up to the slow-network issue found while validating #2363. It does not modify or absorb that PR.
Verification
pnpm exec vitest --run app/root.revalidation.test.ts app/components/layout/Layout.layout.test.ts app/components/editor/DocumentEditor.layout.test.ts app/components/editor/body-hydration.test.ts app/components/sidebar/DocumentSidebar.layout.test.ts— 65 passedpnpm typecheck— passedpnpm build— passedpnpm exec oxfmt ...on all modified TypeScript files — cleanorigin/mainand the Fix new-page database conversion race #2363 QA head — cleanReal Content UI QA
Ran the frozen story in a disposable combined checkout of this branch plus #2363, without stacking either PR:
/page/<id>history.pushStatemeasured 65.3 ms; the pending chooser rendered with Page enabled and Database disabledcreate-content-databaserequestsen-US/ltrlocale stateUnrelated observations