Repository navigation
Commit 7043061
fix(web): an open file re-reads on reopen and window focus
> 🤖 claude/anthropic claude-opus-5-5 (high)
## What Changed
- `FilePreviewPanel` calls upstream's `useLiveRefresh` for the open file
- Re-reads on reopen and on window focus
- Same enable rule as the workspace mutation refresh
- Unsaved edits stay in the optimistic file
## Why
An edit made outside T3 Code reports no workspace mutation.
The cached read outlives a closed tab by five minutes, so a reopened file showed old contents until a reload.
Upstream-triage: upstream bug, no upstream fix.
Upstream `pingdotgg#6452` (open) covers the file tree listing, not open file contents.
Part of #1361; the rich editor half is in a companion pull request.
## Close conditions
- [x] **Reopen:** a reopened tab shows disk content
- [x] **Unsaved edits:** never silently discarded
## UI Changes
Built desktop app on an isolated home; disk edited outside the app.
| Case | Capture |
| --- | --- |
| Reopen, before |  |
| Reopen, after |  |
Window focus was checked with a dispatched `focus` event; rich mode showed the new content.
## Verification
- `vp run typecheck` (web) → exit 0
- `vp test run apps/web/src/hooks/useLiveRefresh` → exit 0, 14 passed
- `vp run build:desktop` → exit 0
- `vp run fork:ci` → exit 0
## Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] I included before/after screenshots for any UI changes
- [x] I included a video for animation/interaction changes (n/a)
Claude Opus 5.5 via Claude Code in T3 Code.
## Fork trailers
Fork-Domain: upstream-fixes
Fork-Tier: bugfix
Fork-Upstreamable: yes
<!-- gh-bot:attest {"v":2,"repo":"RSI-Software/t3code-hyprws","ref":"fix/open-file-reread@6a9eff2","agents":[{"role":"host","iface":"claude","provider":"anthropic","model":"claude-opus-5-5","effort":"high","harness":"[email protected]","session":"f01f8046c783"}],"ts":"2026-09-28T23:04:53Z"} -->
Co-authored-by: donjor <[email protected]>1 parent fed0ac0 commit 7043061
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
1175 | 1176 | | |
1176 | 1177 | | |
1177 | 1178 | | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1178 | 1190 | | |
1179 | 1191 | | |
1180 | 1192 | | |
| |||
0 commit comments