Skip to content

Remove Suspense wrappers from public policy routes - #372

Open
SaravanakumarR2018 wants to merge 1 commit into
codex/replace-link-with-anchor-tag-in-policiesfrom
codex/remove-suspense-code-from-routes
Open

Remove Suspense wrappers from public policy routes#372
SaravanakumarR2018 wants to merge 1 commit into
codex/replace-link-with-anchor-tag-in-policiesfrom
codex/remove-suspense-code-from-routes

Conversation

@SaravanakumarR2018

Copy link
Copy Markdown
Owner

Motivation

  • The public policy pages were wrapped in Suspense with a LoadingPage fallback but do not require lazy-loading behavior.
  • Simplify routing to render static policy pages directly and avoid unnecessary loading fallbacks.

Description

  • Removed Suspense wrappers for TermsOfServicePage, PrivacyPolicyPage, and RefundPolicyPage in src/frontend/src/routes.tsx so they are now rendered as element={<TermsOfServicePage />} (and equivalents).
  • The change updates only src/frontend/src/routes.tsx and reduces the Suspense-related boilerplate around these routes.

Testing

  • No automated tests were run for this change.
  • CI/build was not executed as part of this change.

Codex Task

@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: cab22855b4

ℹ️ 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 on lines 379 to 382
<Route
path="terms-of-service"
element={
<Suspense fallback={<LoadingPage />}>
<TermsOfServicePage />
</Suspense>
}
element={<TermsOfServicePage />}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore Suspense boundary for lazy policy pages

These policy routes still render React.lazy components (TermsOfServicePage, PrivacyPolicyPage, RefundPolicyPage are declared with lazy(...) at the top of this file). With the Suspense wrappers removed, navigating to these routes will throw at runtime (“a component suspended while rendering, but no fallback UI was specified”) because this branch of the route tree only has ContextWrapper/Outlet and no ancestor Suspense boundary. This means public policy pages will fail to render in production unless a higher-level Suspense is reintroduced.

Useful? React with 👍 / 👎.

@github-actions
github-actions Bot requested a deployment to staging January 13, 2026 14:46 In progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant