Skip to content

feat(application-starter): inject migration guide URLs into final prompt#830

Open
tannerlinsley wants to merge 1 commit intomainfrom
feat/starter-migration-guide-urls
Open

feat(application-starter): inject migration guide URLs into final prompt#830
tannerlinsley wants to merge 1 commit intomainfrom
feat/starter-migration-guide-urls

Conversation

@tannerlinsley
Copy link
Copy Markdown
Member

@tannerlinsley tannerlinsley commented Apr 15, 2026

When the user brief indicates a Next.js or Remix/React Router migration, append an instruction telling the downstream agent to fetch the relevant tanstack.com migration guide and follow it. Keeps the guide out of the analyze stage and out of the UI; only affects the final generation prompt.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Remix framework migration detection and support
    • Migration guide URLs are now automatically integrated and provided based on detected framework type

When the user brief indicates a Next.js or Remix/React Router migration,
append an instruction telling the downstream agent to fetch the relevant
tanstack.com migration guide and follow it. Keeps the guide out of the
analyze stage and out of the UI; only affects the final generation prompt.
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 15, 2026

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit 7051583
🔍 Latest deploy log https://app.netlify.com/projects/tanstack/deploys/69dfcd7df7e8eb0008f085c2
😎 Deploy Preview https://deploy-preview-830--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 34 (🔴 down 25 from production)
Accessibility: 90 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 97 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

Added Remix migration detection capabilities to the application builder with framework-specific guide URLs and helper functions, then integrated guide URL resolution into prompt generation to conditionally enhance migration instructions for the model agent.

Changes

Cohort / File(s) Summary
Migration Detection & Guide URLs
src/components/application-builder/shared.ts
Added remixMigrationPattern regex, isRemixMigrationInput() function, and framework-specific guide URL constants (STARTER_NEXTJS_MIGRATION_GUIDE_URL, STARTER_REMIX_MIGRATION_GUIDE_URL). Implemented getStarterMigrationGuideUrl() to return appropriate guide URL based on framework detection.
Prompt Generation Integration
src/utils/application-starter.server.ts
Updated imports to include getStarterMigrationGuideUrl. Enhanced buildPromptGenerationRequest() to derive migration guide URL from input and conditionally append instruction directing the agent to fetch and follow the guide as primary migration reference.

Sequence Diagram

sequenceDiagram
    participant User
    participant AppBuilder as Application Builder
    participant Migration as Migration Detection
    participant Prompt as Prompt Generator
    participant Agent as Model Agent

    User->>AppBuilder: Provide input (Next.js/Remix project)
    AppBuilder->>Migration: Check framework type
    Migration->>Migration: Test against migration patterns
    Migration-->>AppBuilder: Return guide URL
    AppBuilder->>Prompt: Build generation request with guide URL
    Prompt->>Prompt: Conditionally append migration instruction
    Prompt-->>Agent: Send enhanced prompt
    Agent->>Agent: Fetch guide URL & follow steps
    Agent-->>User: Generate migration guidance
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit hops through migration paths so fine,
With Remix and Next.js now joining in a line,
Guide URLs bloom like clover in the spring,
Our prompts grow wiser—what wonders they will bring! 🌱✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding migration guide URL injection into the final prompt for application starters.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/starter-migration-guide-urls

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/application-builder/shared.ts`:
- Around line 61-62: Update the constant STARTER_REMIX_MIGRATION_GUIDE_URL in
shared.ts to point to the correct TanStack Router migration doc path by
replacing the stale '/docs/guide/how-to/migrate-from-react-router' segment with
'/docs/how-to/migrate-from-react-router'; ensure any code that references
STARTER_REMIX_MIGRATION_GUIDE_URL (e.g., application-starter.server.ts) will now
generate agent instructions that link to the valid URL returning HTTP 200.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5944f156-d711-4898-adaa-4313d64c787d

📥 Commits

Reviewing files that changed from the base of the PR and between c030f08 and 7051583.

📒 Files selected for processing (2)
  • src/components/application-builder/shared.ts
  • src/utils/application-starter.server.ts

Comment on lines +61 to +62
export const STARTER_REMIX_MIGRATION_GUIDE_URL =
'https://tanstack.com/router/latest/docs/guide/how-to/migrate-from-react-router'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify both URL variants and compare status/location.
set -euo pipefail

for u in \
  "https://tanstack.com/router/latest/docs/guide/how-to/migrate-from-react-router" \
  "https://tanstack.com/router/latest/docs/how-to/migrate-from-react-router"
do
  echo "=== $u ==="
  curl -sSIL "$u" | sed -n '1,8p'
  echo
done

Repository: TanStack/tanstack.com

Length of output: 849


🏁 Script executed:

#!/bin/bash
# Verify the URL constant exists in shared.ts
echo "=== Checking src/components/application-builder/shared.ts ==="
if [ -f "src/components/application-builder/shared.ts" ]; then
  sed -n '60,65p' "src/components/application-builder/shared.ts"
else
  echo "File not found. Searching for it..."
  find . -name "shared.ts" -type f 2>/dev/null | head -5
fi

Repository: TanStack/tanstack.com

Length of output: 391


🏁 Script executed:

#!/bin/bash
# Verify the URL usage in application-starter.server.ts
echo "=== Checking src/utils/application-starter.server.ts ==="
if [ -f "src/utils/application-starter.server.ts" ]; then
  sed -n '405,415p' "src/utils/application-starter.server.ts"
else
  echo "File not found. Searching for it..."
  find . -name "application-starter.server.ts" -type f 2>/dev/null | head -5
fi

Repository: TanStack/tanstack.com

Length of output: 869


🏁 Script executed:

#!/bin/bash
# Search for STARTER_REMIX_MIGRATION_GUIDE_URL in the codebase
echo "=== Searching for STARTER_REMIX_MIGRATION_GUIDE_URL ==="
rg "STARTER_REMIX_MIGRATION_GUIDE_URL" --max-count 10

Repository: TanStack/tanstack.com

Length of output: 304


Fix the Remix migration guide URL path.

The URL in src/components/application-builder/shared.ts (line 62) uses a stale path (/docs/guide/how-to/...). The current TanStack Router migration doc path is under /docs/how-to/.... The current URL returns HTTP 500 error, while the correct path returns HTTP 200. This broken URL is used to generate instructions for agents in src/utils/application-starter.server.ts, directing them to an invalid page.

🔧 Proposed fix
 export const STARTER_REMIX_MIGRATION_GUIDE_URL =
-  'https://tanstack.com/router/latest/docs/guide/how-to/migrate-from-react-router'
+  'https://tanstack.com/router/latest/docs/how-to/migrate-from-react-router'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const STARTER_REMIX_MIGRATION_GUIDE_URL =
'https://tanstack.com/router/latest/docs/guide/how-to/migrate-from-react-router'
export const STARTER_REMIX_MIGRATION_GUIDE_URL =
'https://tanstack.com/router/latest/docs/how-to/migrate-from-react-router'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/application-builder/shared.ts` around lines 61 - 62, Update
the constant STARTER_REMIX_MIGRATION_GUIDE_URL in shared.ts to point to the
correct TanStack Router migration doc path by replacing the stale
'/docs/guide/how-to/migrate-from-react-router' segment with
'/docs/how-to/migrate-from-react-router'; ensure any code that references
STARTER_REMIX_MIGRATION_GUIDE_URL (e.g., application-starter.server.ts) will now
generate agent instructions that link to the valid URL returning HTTP 200.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant