Skip to content

Skip hidden file events before target filtering#60

Open
apple-ouyang wants to merge 1 commit into
vrtmrz:mainfrom
apple-ouyang:codex/skip-hidden-file-event-filter
Open

Skip hidden file events before target filtering#60
apple-ouyang wants to merge 1 commit into
vrtmrz:mainfrom
apple-ouyang:codex/skip-hidden-file-event-filter

Conversation

@apple-ouyang

Copy link
Copy Markdown
Contributor

Summary

  • skip dot-prefixed storage events before the normal target-file filter when internal file synchronisation is disabled
  • add a regression test that verifies hidden files do not call vaultService.isTargetFile

Why

When syncInternalFiles is disabled, hidden paths are already non-targets. However, storage events for paths such as .git/objects/... still reached later target filtering, which could emit noisy database-backed "not target" logs before being skipped.

Verification

  • vitest run src/lib/src/managers/StorageEventManager.unit.spec.ts --config vitest.config.unit.ts (red before fix, green after fix)
  • npm run test:unit
  • npx tsc --noEmit
  • npx eslint src/lib/src/managers/StorageEventManager.ts src/lib/src/managers/StorageEventManager.unit.spec.ts (source file checked; the spec file is ignored by the repository ESLint config and reports a warning only)

npm run check did not complete in my local environment because generate-types.mjs calls Deno, and that command is not installed here. Please run CI tests.

Avoid sending dot-prefixed storage events through the normal target-file
filter when internal file synchronisation is disabled. This keeps paths such
as .git/objects from reaching later database-backed filters that can emit
noisy "not target" logs.

Add a regression test for the early skip path.
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.

1 participant