[BUG] Grouped routes in Next.js using parentheses are not autocompleted

Resolved 💬 3 comments Opened Jun 8, 2025 by al3rez Closed Sep 19, 2025

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

  1. Set up a Next.js app using the App Router with grouped routes like (dashboard)/settings/page.tsx.
  2. Open your IDE or file search tool (e.g., VSCode).
  3. Attempt to search for "settings" or "dashboard" or "page" (without full page.tsx).
  4. Observe that no autocomplete or file match is shown unless page.tsx is 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗