Skip to content

chore: ignore additional directories to avoid maxing out watched files#4327

Open
bryce-seifert wants to merge 2 commits into
bitfocus:mainfrom
bryce-seifert:chore/ignoredDirCoverage
Open

chore: ignore additional directories to avoid maxing out watched files#4327
bryce-seifert wants to merge 2 commits into
bitfocus:mainfrom
bryce-seifert:chore/ignoredDirCoverage

Conversation

@bryce-seifert

@bryce-seifert bryce-seifert commented Jul 16, 2026

Copy link
Copy Markdown
Member

Alternative approach from #4240

In my testing being more restrictive on the ignored directories has fixed up the EMFILE watcher errors with large amount of modules, while keeping chokidar in place.

Summary by CodeRabbit

  • Improvements
    • Development file watching is now more focused on relevant build outputs, generated content, configuration, and documentation.
    • Irrelevant directories and unsupported file types are ignored more consistently, reducing unnecessary reloads.
    • Multiple development watchers now use the same filtering behavior to improve workflow stability and reliability.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 736651f2-7630-46e3-b7ec-7bf6805c8e97

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4f5fd and 5000996.

📒 Files selected for processing (2)
  • launcher/main.js
  • tools/dev.mts
🚧 Files skipped from review as they are similar to previous changes (2)
  • launcher/main.js
  • tools/dev.mts

📝 Walkthrough

Walkthrough

Development watchers now share centralized ignored-directory and watched-extension rules. The main watcher observes narrower artifact and documentation paths, while launcher and extra-module watchers use the shared ignore predicate.

Changes

Development watcher filtering

Layer / File(s) Summary
Centralized ignore rules
launcher/main.js, tools/dev.mts
Adds ignored-directory sets, watched-extension allowlists, and shared isIgnoredPath helpers for chokidar filtering.
Watcher configuration integration
launcher/main.js, tools/dev.mts
Replaces inline ignore callbacks, narrows the main watcher to selected build, configuration, and documentation paths, and enables initial-file ignoring.

Poem

Watchers hum through folders bright

JS and JSON catch the light

Hidden paths now drift away

Build files guide the watchful day

One shared rule keeps paths in line ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: expanding ignored directories to reduce watcher load and prevent file-watching limits.
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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0cd7d89c-fc09-451c-be07-6b7c882d2b87

📥 Commits

Reviewing files that changed from the base of the PR and between 594c909 and 7b4f5fd.

📒 Files selected for processing (2)
  • launcher/main.js
  • tools/dev.mts

Comment thread launcher/main.js
@Julusian

Copy link
Copy Markdown
Member

I will look at this, but an idea I have been wondering about recently is maybe trying to ditch the tsc step and invoke tsx watch main.ts instead.

That would mean being able to stop the tsc --watch invocation, chokidar to handling just the dev-modules, and leaving tsx watch which I believe works based off the import graph rather than everyhthing on disk.

But this likely requires some tweaks to many build things to get it all happy (keeping shared-lib importable could be interesting)

Feel free to look into this, or I can look at this PR as it stands, Im happy either way

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants