Skip to content

fix(server): reduce editor scan work and retain partial results - #11071

Open
CodeZeno wants to merge 3 commits into
pingdotgg:mainfrom
CodeZeno:fix/windows-editor-discovery
Open

CodeZeno wants to merge 3 commits into
pingdotgg:mainfrom
CodeZeno:fix/windows-editor-discovery

Conversation

@CodeZeno

@CodeZeno CodeZeno commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Reuse PATH directory listings during editor discovery to reduce repeated filesystem checks. Return and cache editors found within four seconds if the scan takes longer. Preserve filesystem case-sensitivity behaviour and add tests for directory caching, fallback checks, and partial results.

Why

T3 Code on my Windows 11 machine would show an empty 'Open' list as it would timeout while looking for available editors. Even if some were found, they were thrown out if it reached the timeout.
The reason was 29,568 file checks being performed (22 commands (editors), 56 paths (my windows PATH), 12 file extensions and 2 case checks)

UI Changes

Before:
before

After:
after

Checklist

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

Summary by CodeRabbit

  • Bug Fixes

    • Editor discovery now returns successfully detected editors even when another probe stalls or times out.
    • Completed discovery results remain available for subsequent requests.
    • Command lookup is more reliable on case-sensitive file systems and safely falls back when directory contents cannot be read.
  • Performance

    • Repeated command lookups within the same operation reuse directory information, reducing unnecessary file-system checks while preserving PATH priority.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 10, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9cbe171

Macroscope's review found this PR approvable — The PR makes a focused correction to existing editor discovery: it reuses PATH listings and preserves editors found before a slow probe times out. Runtime changes are confined to this discovery path, with fallback behavior and partial-result caching covered by targeted tests.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: df74768f-0f22-4f4d-aec4-350a492ed4cf

📥 Commits

Reviewing files that changed from the base of the PR and between 9cbe17114685f839dd79edca10ece8ca25de97c0 and 1be2536.

📒 Files selected for processing (4)
  • apps/server/src/process/externalLauncher.test.ts
  • apps/server/src/process/externalLauncher.ts
  • packages/shared/src/shell.test.ts
  • packages/shared/src/shell.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The shell resolver now caches PATH directory listings and handles listing errors. Editor discovery now returns and caches completed probes after a four-second timeout.

Command discovery and editor probing

Layer / File(s) Summary
Cached PATH directory resolution
packages/shared/src/shell.ts, packages/shared/src/shell.test.ts
Command resolution caches directory listings, applies platform-specific case handling, and falls back to file probes for non-NotFound errors.
Bounded editor discovery
apps/server/src/process/externalLauncher.ts, apps/server/src/process/externalLauncher.test.ts
Editor discovery now times out after four seconds and caches completed probes. Tests cover timeout recovery and memoization.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, utkarshusername

Merge Risk: ⚪ Minimal · up to 1be25

Completed editor discoveries remain available when a later probe times out, with no confirmed merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary changes: reducing editor scan work and retaining partial results during timeouts.
Description check ✅ Passed The description includes the required What Changed, Why, UI Changes, and Checklist sections. It explains the problem, solution, testing scope, and provides before-and-after screenshots for the UI chan…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@CodeZeno
CodeZeno force-pushed the fix/windows-editor-discovery branch from 9cbe171 to 1be2536 Compare September 16, 2026 06:07
@CodeZeno

Copy link
Copy Markdown
Contributor Author

@coderabbitai help

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai review --preview-config to test the unmerged CodeRabbit configuration on a draft PR. The requester must have repository write access; preview results are non-authoritative.
  • @coderabbitai rate limit to show your current review rate limit status.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai track in a human-authored review thread to track the original finding until CodeRabbit verifies it is fixed.
  • @coderabbitai fixed in a tracked review thread to verify the current code against the original finding.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
  • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
  • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai emit path instructions to emit generated path-specific review instructions for this repository.
  • @coderabbitai generate project vocabulary to list vocabulary that is specific to this repository.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues in the current review thread, or all unresolved review comments when used in the PR conversation.
  • @coderabbitai fix-ci to automatically fix failing CI checks in a stacked pull request.
  • @coderabbitai fix-ci commit to automatically fix failing CI checks by committing fixes to the current branch.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@CodeZeno

Copy link
Copy Markdown
Contributor Author

@coderabbitai run pre-merge checks

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
✅ Actions performed

Running Pre-merge checks. Results will be posted in the summary comment once complete.

This branch has not been deployed

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

Labels

size:M 30-99 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