Files
codex/codex-rs/tui
Felipe Coury 81ef12b617 Refresh open sidebar file previews when files change (#62583)
## Why

Sidebar previews load a snapshot of the file when opened, so edits on disk
leave the open tab showing stale content.

## What changed

Watch each previewed file’s parent directory through the app server so the
preview refreshes even when an editor saves by atomically replacing the file.
Poll every three seconds when a watch cannot be registered, and resubscribe
when reconnecting to the same backend.

Preserve the text preview’s reading position across reloads, including when
the file temporarily becomes unreadable and then returns.

## Testing

The sidebar test covers atomic saves and recovery after moving a directory
away and back. It checks that the tab shows updated content at the existing
reading position.

GitOrigin-RevId: d5f7507d1a81a118fb10a0febf5e274c18f19d81
2026-11-19 20:13:14 +00:00
..