-
Notifications
You must be signed in to change notification settings - Fork 666
Add manual refresh buttons to file preview #2680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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