feat(application-starter): inject migration guide URLs into final prompt#830
feat(application-starter): inject migration guide URLs into final prompt#830tannerlinsley wants to merge 1 commit intomainfrom
Conversation
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.
✅ Deploy Preview for tanstack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughAdded 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
Sequence DiagramsequenceDiagram
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
src/components/application-builder/shared.tssrc/utils/application-starter.server.ts
| export const STARTER_REMIX_MIGRATION_GUIDE_URL = | ||
| 'https://tanstack.com/router/latest/docs/guide/how-to/migrate-from-react-router' |
There was a problem hiding this comment.
🧩 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
doneRepository: 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
fiRepository: 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
fiRepository: 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 10Repository: 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.
| 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.

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