Skip to content
Source
Sign inSign up
TanStack/cli

fix(create): missing header/footer in router template #426

Openouvreboite(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/426/headopened

They seems to have been removed in february's refactoring. Without the header/footer the quick start instructions on the index page (ex: "Update src/components/Header.tsx and src/components/Footer.tsx for brand links.") makes little sense.

edit: I disagree with CodeRabbit that this is a new feature. That's a bug fix since those header/footer were present initially.

Summary by CodeRabbit

  • New Features
    • React Router-only starter projects with examples enabled now show a shared header and footer across pages, with branding and links tailored to TanStack Router.
  • Bug Fixes
    • Restored the header and footer in the examples-enabled React Router-only layout. The default React Router-only starter remains without these elements.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      The React Router-only starter now displays the shared header and footer when examples are enabled and the scaffold is not blank. The header and footer use Router-specific text. Smoke tests cover the examples-enabled and default scaffolds.

      Changes: Router-only React layout

      Layer / File(s)Summary
      Conditional layout and Router branding
      packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs, packages/create/src/frameworks/react/project/base/src/components/Header.tsx.ejs, packages/create/src/frameworks/react/project/base/src/components/Footer.tsx.ejs
      The root template imports and renders the header and footer when includeExamples && !blank in router-only mode. The components display Router-specific attribution, heading, and documentation link in that mode.
      Scaffold options and smoke coverage
      packages/cli/tests-e2e/helpers.ts, packages/cli/tests-e2e/router-only-smoke.spec.ts, .changeset/router-only-react-layout.md
      The fixture supports explicit examples flags. Smoke tests check layout visibility, navigation, and the default scaffold’s absent banner and footer. The Changeset declares patch releases for @tanstack/create and @tanstack/cli.

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix

      Suggested reviewers: tannerlinsley

      Merge Risk: Minimal · up to 58b97

      The Router-only starter regains its header and footer when examples are enabled, and the default scaffold is unchanged. The header's imports and links resolve in that scaffold, and smoke tests cover both configurations. No merge-blocking risk was identified.

      Pre-merge checks: Passed 4 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Docstring CoverageWarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…Write docstrings for the functions missing them to satisfy the coverage threshold.
      Passed Passed checks: 4 passed
      Check nameStatusExplanation
      Description CheckPassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title checkPassedThe title clearly and concisely describes the main change: restoring the missing header and footer in the router template.
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Docstring Coverage

      Explanation

      Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (4 skipped: 4 unsupported.)

      Resolution

      Write docstrings for the functions missing them to satisfy the coverage threshold.

      Finishing Touches
      Generate unit tests (beta)
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Warning

      Some tools did not complete. Review the errors below.

      ESLint

      If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

      packages/cli/tests-e2e/helpers.ts

      Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser. The file was not found in any of the provided project(s): packages/cli/tests-e2e/helpers.ts

      packages/cli/tests-e2e/router-only-smoke.spec.ts

      Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser. The file was not found in any of the provided project(s): packages/cli/tests-e2e/router-only-smoke.spec.ts

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share
      Recent review info
      Run configuration
      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: c7c8ab5f-a16a-4cce-8e27-ba828e68e102
      Commits

      Reviewing files that changed from the base of the PR and between ceecc794743fd4b5538fdea3c565ce07cdf0e57f and 58b97d015b9a9ba248203b9af0de610f0ddee6a6.

      Files selected for processing: 6
      • .changeset/router-only-react-layout.md
      • packages/cli/tests-e2e/helpers.ts
      • packages/cli/tests-e2e/router-only-smoke.spec.ts
      • packages/create/src/frameworks/react/project/base/src/components/Footer.tsx.ejs
      • packages/create/src/frameworks/react/project/base/src/components/Header.tsx.ejs
      • packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs

      Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

    2. 🦋 Changeset detected

      Latest commit: 58b97d015b9a9ba248203b9af0de610f0ddee6a6

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 7 packages
      NameType
      @tanstack/createPatch
      @tanstack/cliPatch
      create-start-appPatch
      create-tanstack-appPatch
      create-tanstackPatch
      create-tsrouter-appPatch
      @tanstack/create-startPatch

      Not sure what this means? Click here to learn what changesets are.

      Click here if you're a maintainer who wants to add another changeset to this PR

Sign in to join this conversation.