Skip to content

Feat(web,server): respect Claude gitignore settings in @ picker and show partial results#1661

Open
lnieuwenhuis wants to merge 4 commits intopingdotgg:mainfrom
lnieuwenhuis:main
Open

Feat(web,server): respect Claude gitignore settings in @ picker and show partial results#1661
lnieuwenhuis wants to merge 4 commits intopingdotgg:mainfrom
lnieuwenhuis:main

Conversation

@lnieuwenhuis
Copy link
Copy Markdown
Contributor

@lnieuwenhuis lnieuwenhuis commented Apr 1, 2026

What Changed

I updated the @ file picker so it now honors Claude’s effective respectGitignore setting instead of always filtering ignored files in git workspaces. I also surfaced a partial-results hint in the composer when workspace search is truncated, so users can tell when the picker is only showing a subset of matches.

Why

This fixes the @ picker behavior for workflows that intentionally keep local files ignored but still need to reference them in prompts. The partial-results hint makes large workspaces less confusing by explaining why a query may not show everything.

UI Changes

The composer file picker now shows a small hint when search results are truncated. When the search returns no visible matches but the backend indicates partial results, it tells the user to refine the query. When results are visible, it shows a compact “showing partial results” note below the list. Screenshots for the "no results", "partial results" and regular "full" results:
Screenshot 2026-04-01 at 18 37 45
Screenshot 2026-04-01 at 18 38 02
Screenshot 2026-04-01 at 18 38 24

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes

Note

Medium Risk
Changes workspace indexing/search behavior to optionally include .gitignored files based on user/project Claude settings, which can alter what paths are exposed and cached. Low complexity UI tweaks, but backend behavior change affects a core picker/search path.

Overview
The @ file picker now respects Claude’s effective respectGitignore setting instead of always filtering ignored files in git workspaces, by adding a claudeSettings resolver and keying the workspace index cache by { cwd, respectGitignore }.

Workspace search tests were extended to cover the new behavior (including cache/precedence and a gitignored-inclusion scenario), and the composer command menu UI now shows a partial results hint whenever the backend reports truncated search results (both for empty and non-empty lists).

Written by Cursor Bugbot for commit eff049f. This will update automatically on new commits. Configure here.

Note

Respect Claude's respectGitignore setting in the @ file picker and show partial results hint

  • Reads the respectGitignore boolean from Claude settings files (~/.claude.json, ~/.claude/settings.json, .claude/settings.json, .claude/settings.local.json), defaulting to true.
  • Updates WorkspaceEntries search and indexing in WorkspaceEntries.ts to skip gitignore filtering when respectGitignore is false, falling back to a full filesystem scan.
  • Caches the resolved setting per workspace (TTL 5s) and segments the workspace index cache by the flag so both modes can coexist.
  • Adds a partialResultsHint prop to ComposerCommandMenu that surfaces a message in the @ picker when file search results are truncated.
  • Behavioral Change: workspaces with respectGitignore: false in Claude config will now surface previously ignored files (e.g. .agent/, build artifacts) in the @ file picker.

Macroscope summarized eff049f.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cd56b243-7c0f-4de0-b1a2-840a6546daf6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Apr 1, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 1, 2026

Approvability

Verdict: Needs human review

This PR introduces a new feature that reads Claude's gitignore settings and changes what files appear in the @ picker accordingly. Since this introduces new runtime behavior based on external config files and affects file visibility, human review is warranted.

You can customize Macroscope's approvability policy. Learn more.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant