Files Changed: per-session file watcher for reliable external-change refresh - #845
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 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. Comment |
jeonghun-jj-lee
marked this pull request as ready for review
September 6, 2026 22:45
jeonghun-jj-lee
force-pushed
the
844-file-watcher-bridge
branch
from
September 6, 2026 23:33
97ba8c9 to
39de237
Compare
Extends MergeOpts with an optional crossProjectStatus map that overrides the status of cross-project files in the merged output (e.g. 'deleted' from a filesystem watcher notification). Tests: 3 new cases (override, no-match, empty map). Part of #844
Per-session targeted file watcher using per-directory VS Code FileSystemWatchers. Events are filtered against the watched file set and debounced (300ms per file). The watch set is idempotent — calling updateWatchSet() replaces the set, adding/removing watchers as needed. Part of #844
…lowlists - Import and instantiate FileWatcherBridge in ChatPanel constructor - Handle 'watch-files' messages from the iframe (updates watch set) - Add 'watch-files' to Lane 1 allowlist (iframe → extension) - Add 'fs-diff-invalidate' to Lane 2 allowlist (extension → iframe) - Both renderHtml and renderTransitionHtml updated - Bridge disposed via the disposables array on panel cleanup Part of #844
…egration - Add crossProjectStatus signal for tracking deleted cross-project files - Listen for fs-diff-invalidate from the FileWatcherBridge: update crossProjectStatus on deletion/recreation and bump diff_version - Send watch-files reactively whenever reviewDiffs() recomputes - Pass crossProjectStatus into mergeServerAndToolDiffs Part of #844
Add build:app step and dist/app/ copy to both local and remote rebuild scripts, plus the appBundleDir VS Code setting. Ref #822.
The amicode service (#822) was booting on an ephemeral port, which meant every window reload gave the iframe a new origin. This destroyed the app's localStorage on each reload — losing Developer Tools repo paths, titlebar positions, and all other persisted app state. Fix: derive the service port as opencodePort + 1 (e.g. 43117 → 43118). The origin stays stable across reloads, so localStorage persists. Falls back to ephemeral if the derived port is busy (the service always boots). Changes: - server.ts: start() accepts optional port (0 = ephemeral, the default) - amicode_service_wiring.ts: port option threaded through, with fallback - extension.ts: passes configuredPort + 1 when the engine port is pinned Part of #844
jeonghun-jj-lee
force-pushed
the
844-file-watcher-bridge
branch
from
September 7, 2026 02:21
a31d116 to
0b08306
Compare
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #844
Per-session targeted
FileWatcherBridgein the extension host that watches every file the session has touched (via VS Code's nativeFileSystemWatcherwithRelativePatternfor arbitrary paths). When any watched file is created, changed, or deleted, the bridge postsfs-diff-invalidateto the chat iframe, which bumpsdiff_versionand triggers the existing server-diff refetch chain.Changes
accumulate-diffs.ts: AddedcrossProjectStatustoMergeOpts— cross-project files can be marked as deleted by the filesystem watcheraccumulate-diffs.test.ts: 3 new tests for crossProjectStatus override logicfile_watcher_bridge.ts: NewFileWatcherBridgeclass — per-directory watchers, debounced events, idempotent watch setchat_panel.ts: WiresFileWatcherBridge, handleswatch-files/fs-diff-invalidatemessages, disposes on cleanupsession.tsx: Sendswatch-filesreactively fromreviewDiffs(), listens forfs-diff-invalidate, maintainscrossProjectStatusmap