Commit da0ae54
Add redirect checker to block PRs with deleted pages missing redirects (#666)
* Add redirect checker to block PRs with deleted pages missing redirects
Adds a GitHub Action and local script that compares the branch to main,
detects deleted markdown files, and ensures each has a corresponding
redirect entry in next.config.ts. Prevents broken bookmarks and SEO issues.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Move agent-frameworks and mcp-clients to get-started, enhance redirect checker
Content moves:
- Move guides/agent-frameworks/* to get-started/agent-frameworks/*
- Move guides/tool-calling/mcp-clients/* to get-started/mcp-clients/*
- Add wildcard redirects for moved content
- Fix stale _meta.tsx references
Redirect checker enhancements:
- Interactive mode prompts for redirect destinations
- Validates existing redirects for placeholder text (REPLACE_WITH, TODO, FIXME)
- Catches circular redirects (source == destination)
- Verifies destination pages exist
- Detects both deletes and renames
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* 🤖 Regenerate LLMs.txt
* 🤖 Regenerate LLMs.txt
* Fix bugbot issues in redirect checker script
- Fail with error when base branch is unavailable instead of silent success
- Fix root page URL path handling (app/en/page.mdx -> /:locale)
- Only check page.md/mdx files (skip non-routable markdown like README.md)
- Use cut with tab delimiter instead of awk to handle filenames with spaces
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Enhance redirect checker script for better file handling
- Adjusted the script to use cut for field extraction, improving handling of deleted and renamed page files.
- Updated informational messages to redirect stderr, ensuring clarity in user prompts.
This improves the user experience when managing redirects in the Arcade platform.
* fixes
* Add script to auto-update internal links from redirects
Companion to check-redirects.sh - this script reads redirect mappings
from next.config.ts and updates any internal links in MDX/TSX files
that point to old (redirected) paths.
Usage: ./scripts/update-internal-links.sh [--dry-run]
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix internal links to use correct /get-started/ paths
Update internal links and redirect destinations that were incorrectly
pointing to /guides/ paths when the actual pages are under /get-started/:
- /guides/agent-frameworks/* -> /get-started/agent-frameworks/*
- /guides/tool-calling/mcp-clients/* -> /get-started/mcp-clients/*
- /home/quickstart -> /get-started/quickstarts/call-tool-agent
- /home/hosting-overview -> /guides/deployment-hosting
Files updated across MDX docs, TSX components, and next.config.ts redirects.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Add auto-fix mode for redirect checker and integrate into pre-commit
Changes to check-redirects.sh:
- Add --auto-fix flag that automatically inserts redirect entries
into next.config.ts when pages are deleted
- Uses placeholder destinations that must be replaced before merge
Changes to pre-commit hook:
- When page files are deleted, runs check-redirects.sh --auto-fix
- Auto-adds redirect entries and stages next.config.ts
- Blocks commit until placeholder destinations are replaced
- When next.config.ts is staged, runs update-internal-links.sh
to fix internal links pointing to redirected paths
Workflow:
1. Delete page -> commit blocked, redirect entry auto-added
2. Update placeholder destination in next.config.ts
3. Commit again -> internal links auto-fixed, commit succeeds
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix auto-fix insertion using awk instead of perl
The perl -pe approach failed because redirect entry strings contain
special characters (colons, slashes, quotes) that broke perl syntax.
Switch to awk with a temp file approach which handles arbitrary
content safely.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Add redirect chain detection and auto-collapsing
When a redirect points to a destination that itself has a redirect
(a chain like A → B → C), the script now:
1. Detects the chain during validation
2. In --auto-fix mode, automatically collapses it (A → C)
3. Updates next.config.ts with the collapsed redirect
This handles the case where an old redirect (e.g., from a previous
migration) points to a page that is now being deleted/moved.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Improve error messages for redirect validation
- Pre-commit hook now shows appropriate message based on error type:
- Placeholder message only when REPLACE_WITH_NEW_PATH exists
- Generic "fix issues shown above" for other errors
- Invalid redirect errors now include step-by-step fix instructions
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Merge main into feature/redirect-checker
- Accept main's llms.txt (auto-generated)
- Include workflow fix (set -o pipefail)
- Include new Copilot Studio MCP client docs
- Include LLM setup guide
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Merge main to resolve conflicts
* Move setup-arcade-with-your-llm-python to correct location
- Move page from guides/ to get-started/agent-frameworks/ (correct location)
- Update internal links in Next Steps section
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Remove duplicate page and add redirect
- Remove page from guides/ (merged from main) since it was moved to get-started/
- Add redirect from old guides/ path to new get-started/ path
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* 🤖 Regenerate LLMs.txt
* 🤖 Regenerate LLMs.txt
* Update app/en/get-started/agent-frameworks/crewai/use-arcade-tools/page.mdx
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/en/get-started/agent-frameworks/google-adk/overview/page.mdx
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update app/en/get-started/agent-frameworks/mastra/use-arcade-tools/page.mdx
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Rewrite redirect scripts in TypeScript
- Rewrite check-redirects.sh as check-redirects.ts
- Rewrite update-internal-links.sh as update-internal-links.ts
- Add folder rename detection (R status) to pre-commit hook
- Update GitHub Actions workflow to use TypeScript scripts
- Add pnpm scripts: check-redirects, update-links
Benefits of TypeScript:
- Consistent with rest of codebase
- Uses fast-glob instead of bash find
- Easier to read and maintain
- Better error handling
- Properly parses next.config.ts
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix linter errors in TypeScript redirect scripts
- Refactor regex matching to avoid assignment in expressions
- Extract magic numbers to named constants
- Rename variables to avoid shadowing
- Replace increment operators with += 1
- Collapse nested if statements
- Fix formatting issues
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix redirect checker to only check staged changes in pre-commit
- Add --staged-only flag to check-redirects script
- When --staged-only is set, use git diff --cached instead of git diff HEAD
- Update pre-commit hook to pass --staged-only
- Fix chain collapse to follow entire chain to final destination
(previously only resolved one hop)
Fixes:
- Script no longer flags file deletions in working directory that
haven't been staged for commit
- Redirect chains like A→B→C→D are now fully collapsed to A→D
in a single run
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Fix MCPClientGrid import path in call-tool-client quickstart
Component is at get-started/mcp-clients/, not guides/tool-calling/mcp-clients/
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* Use replacer functions in regex replace to avoid pattern expansion
String replacement patterns like $1, $2, $& in paths would be incorrectly
expanded by the regex engine. Using replacer functions ensures the new
path is inserted literally.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
---------
Co-authored-by: Rachel Lee Nabors <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent 9c57848 commit da0ae54
File tree
46 files changed
+1220
-82
lines changed- .github/workflows
- .husky
- app
- _components
- en
- get-started
- agent-frameworks
- crewai
- custom-auth-flow
- use-arcade-tools
- google-adk
- overview
- use-arcade-tools
- langchain
- auth-langchain-tools
- use-arcade-tools
- use-arcade-with-langchain
- user-auth-interrupts
- mastra
- overview
- use-arcade-tools
- user-auth-interrupts
- openai-agents
- overview
- use-arcade-tools
- user-auth-interrupts
- setup-arcade-with-your-llm-python
- vercelai
- mcp-clients
- claude-desktop
- cursor
- visual-studio-code
- quickstarts
- call-tool-agent
- call-tool-client
- guides
- create-tools/mcp-gateways
- deployment-hosting/on-prem
- tool-calling
- home
- references/changelog
- resources/integrations/productivity/gmail
- public
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+1220
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
32 | 77 | | |
33 | 78 | | |
34 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 2 deletions
File renamed without changes.
Lines changed: 2 additions & 2 deletions
0 commit comments