Add manual refresh buttons to file preview#2680
Conversation
Adds refresh icon buttons to all file preview types (code editor, markdown, PDFs, images) allowing users to reload file content from disk without closing and reopening the preview. - Added refresh button to preview header icon buttons - Implemented refreshCallback in all preview components - Made fullFileAtom reactive to refreshVersion changes - Works for: code files, markdown, PDFs, images, videos, audio 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded@stevenvo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 54 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| useEffect(() => { | ||
| model.refreshCallback = () => { | ||
| globalStore.set(model.refreshVersion, (v) => v + 1); | ||
| }; |
There was a problem hiding this comment.
Streaming refresh button performs no reload
In StreamingPreview the refresh callback merely increments refreshVersion, but that atom is never read when building the streaming URL or rendering the media, so clicking the new refresh icon causes no re-render or cache-busting. For PDFs/images/audio/video the button therefore does nothing—content stays stale unless the path/connection changes—undermining the new manual refresh feature for all streaming file types.
Useful? React with 👍 / 👎.
de33e97 to
0671f0c
Compare
Summary
Adds refresh icon buttons to all file preview types, allowing users to reload file content from disk without closing and reopening the preview.
Problem
When files are modified externally (by another editor, git operations, build tools), the Wave Terminal file preview doesn't automatically update. Users had to close and reopen the preview to see changes.
Solution
Implementation
Test Plan
🤖 Generated with Claude Code