[BUG] Grouped routes in Next.js using parentheses are not autocompleted
Environment
- Platform (select one):
- [x] Anthropic API
- Claude CLI version: 1.0.17
- Operating System: Linux
- Terminal: Cursor Terminal
Bug Description
Grouped routes using parentheses in Next.js (e.g., (dashboard), (authenticated), (public)) are not autocompleted or discoverable via file search unless page.tsx is explicitly typed. This negatively affects developer productivity and discoverability of deeply nested routes.
Steps to Reproduce
- Set up a Next.js app using the App Router with grouped routes like
(dashboard)/settings/page.tsx. - Open your IDE or file search tool (e.g., VSCode).
- Attempt to search for "settings" or "dashboard" or "page" (without full
page.tsx). - Observe that no autocomplete or file match is shown unless
page.tsxis typed.
Expected Behavior
Grouped route directories and files inside them should be indexed and autocompleted in file search, even if the folder name is wrapped in parentheses.
Actual Behavior
Grouped routes are hidden from autocomplete unless page.tsx is explicitly typed, making navigation and discovery harder.
Additional Context
This behavior is specific to the Next.js App Router with grouped routes and affects developer workflows, especially in large codebases with deep route structures. Screenshots can be provided if necessary.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗