Skip to content

feat(F1/F6): unify watch implementations into FileWatcher - #113

Merged
detain merged 1 commit into
masterfrom
step11.2-file-watcher
Jul 1, 2026
Merged

feat(F1/F6): unify watch implementations into FileWatcher#113
detain merged 1 commit into
masterfrom
step11.2-file-watcher

Conversation

@detain

@detain detain commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Unify Command::pollChanges and WatchRunner::pollChanges into a single FileWatcher class
  • New file detection for --watch (without --tui) that was previously broken
  • inotify backend on Linux, polling fallback; FSEvents noted as future work
  • Unit tests for FileWatcher

Acceptance Criteria

  • --watch picks up newly-added files
  • Unified FileWatcher used by both CLI and TUI
  • Native backend (inotify) when available; polling fallback otherwise
  • No breaking changes to --tui behavior
  • FileWatcher has unit tests

Unify Command::pollChanges and WatchRunner::pollChanges into a single
FileWatcher class with inotify backend (Linux), polling fallback, and
new-file detection. Removes the old mtime-only polling in WatchRunner
and the defunct pollChanges/snapshotMtimes from Command.

- New FileWatcher class with detectNewFiles/detectDeletedFiles/
  detectModifiedFiles and syncFromFileList
- FileChangeType enum (Created, Modified, Deleted)
- inotify backend on Linux, polling fallback
- FileWatcher unit tests
- TTY watch mode uses ConsoleLogger for visibility into backend
- --watch help text updated (removed 'poll-based')
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@detain
detain merged commit 14c2154 into master Jul 1, 2026
0 of 6 checks passed
@detain
detain deleted the step11.2-file-watcher branch July 1, 2026 10:01
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 7 high · 8 medium · 85 minor

Alerts:
⚠ 100 issues (≤ 0 issues of at least minor severity)

Results:
100 new issues

Category Results
Documentation 35 minor
ErrorProne 7 medium
Security 7 high
CodeStyle 50 minor
Complexity 1 medium

View in Codacy

🟢 Metrics 67 complexity · 0 duplication

Metric Results
Complexity 67
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

detain pushed a commit that referenced this pull request Jul 1, 2026
Phase 11 complete:
- 11.2: FileWatcher unification (PR #113, merged 14c2154)
- 11.3: Async/queued serve (PR #114, merged c7072ea)
- 11.4: phpdup init wizard (PR #115, merged 722ec5e)
- 11.5: Per-pair match explainability (PR #116, merged d764267)
- Fix 11.1b status (was pending, actually merged 9b2e2ed)
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