Skip to content

refactor: Routers in tanstack start - #785

Open
aXenDeveloper wants to merge 12 commits into
docs/plugin-first-tanstack-startfrom
refactor/routes
Open

refactor: Routers in tanstack start#785
aXenDeveloper wants to merge 12 commits into
docs/plugin-first-tanstack-startfrom
refactor/routes

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vitnode-prod Ready Ready Preview Sep 3, 2026 5:08pm UTC

@github-actions github-actions Bot added the 🧱 Refactor A code change that neither fixes a bug nor adds a feature label Sep 3, 2026

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

ℹ️ 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".

scrollable
/>
);
return <BreadcrumbCrumbItems crumbs={crumbs} LinkComponent={LinkComponent} />;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Migrate standalone AdminBreadcrumb declarations

When /admin/core renders, both apps/web/src/routes/_admin/admin.core.index.tsx and the app scaffold still register <AdminBreadcrumb> as an ordinary React node. After this change, AdminBreadcrumb reaches this return and emits raw <li> fragments, but breadcrumbTrail classifies the enclosing React element as a normal label, so BreadcrumbTrailContent wraps those fragments in another <BreadcrumbItem> and <BreadcrumbPage>, producing invalid markup such as <li><span><li>…</li></span></li>. Update these remaining declarations to use adminBreadcrumb/breadcrumbGroup, or preserve a standalone list wrapper for this usage.

AGENTS.md reference: AGENTS.md:L51-L52

Useful? React with 👍 / 👎.

@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: 76013f1fd2

ℹ️ 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".

})}
/>
),
breadcrumb: pluginRouteBreadcrumb(spec.module, spec.namespaces),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Omit lazy routes that resolve without a breadcrumb

When a plugin route module omits route.breadcrumb or sets it to false, this still registers a breadcrumb component in staticData. breadcrumbTrail therefore counts the route as a real entry before that component renders null, and BreadcrumbTrailContent emits an empty breadcrumb item/link plus any preceding separator; a breadcrumb-less page such as /example consequently gets a blank breadcrumb bar, and nested routes can leave a stray trailing separator. The absence needs to be resolved before the trail allocates an item, or the lazy wrapper must own the entire item rather than only its content.

Useful? React with 👍 / 👎.

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

ℹ️ 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".

shortTitle: 'VitNode',
title: 'VitNode',
},
plugins: [blogPlugin(), examplePlugin()],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep full plugin factories out of the root client config

Because routes/__root.tsx imports this config, registering blogPlugin() and examplePlugin() here pulls their complete static dependency graphs into the client entry on every page. In particular, @vitnode/blog/config imports admin/content, which statically imports its form layout, editor-field wrapper, table cells, content definitions, and message loaders—the exact graph that content-registry.gen.ts is intended to defer until an admin content route loads. Register only browser-safe plugin identity here (or otherwise separate identity from the full factory) so public routes do not eagerly download and evaluate AdminCP code.

Useful? React with 👍 / 👎.

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

ℹ️ 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".

@@ -109,7 +37,6 @@ export const Route = createFileRoute('/_docs/docs/$')({
robots: 'index, follow',
title: loaderData?.metaTitle,
}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the docs route's not-found boundary

When getDocsPage throws notFound() for a missing slug such as /docs/does-not-exist, the matched branch is /_docs/docs/$; the new main-shell /$ route is a sibling and cannot handle that signal. Without this route's notFoundComponent, the error bubbles to __root and renders the generic root 404, removing the documentation sidebar and navigation that previously remained available around the error. Keep a page-level not-found component on this route.

Useful? React with 👍 / 👎.

@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: 67eee4c59d

ℹ️ 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 +29 to +30
page("/${slug}", {
component: lazy(() => import("./pages/home-page")),

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 Declare the generated page's message namespace

When a newly scaffolded plugin is registered and its locale loader is added to src/locales/packages.ts as documented, this route still requests no plugin messages. pluginRouteMessageNamespaces therefore returns an empty list, while the generated page calls useTranslations(pluginName) for home.title and home.desc; only the root's core.global messages are available, so the starter page fails with missing translations. Add messages: [pluginName] to the generated page() options.

Useful? React with 👍 / 👎.

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

ℹ️ 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".

*/
i18n,

i18n: vitNodeConfig.i18n,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include app messages in the API i18n config

In a generated single-app project, vitnode i18n:create now registers the new locale's loaders in src/locales/app.ts, but this passes only the browser-safe config, which contains the locale list without those loaders. globalMiddleware builds Hono's translation sources exclusively from i18n.messages, so emails and other c.get("i18n") consumers ignore host overrides and fall back to the default language for newly added locales. Merge the server config's messages into the API i18n value, or register an equivalent API message map here.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 Refactor A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant