fix(ui): show large-file error on navigation - #3137
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe package code page now clears loaded file content when the file URL changes before it fetches the new content. ChangesFile content navigation
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
|
Hello! Thank you for opening your first PR to npmx, @farah-bot! 🚀 Here’s what will happen next:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/pages/package-code/`[[org]]/[packageName]/v/[version]/[...filePath].vue:
- Around line 179-180: Disable reactive URL watching in the useFetch call that
creates clearFileContent by adding the watch: false option alongside immediate:
false. Preserve the existing explicit watch handler as the sole owner of
clearing and fetching file content.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 79242046-8b5a-4905-ba5b-fa3ecf04ffce
📒 Files selected for processing (1)
app/pages/package-code/[[org]]/[packageName]/v/[version]/[...filePath].vue
|
Thanks for your first contribution, @farah-bot! 💪 We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role. |
🔗 Linked issue
fixes #3125
🧭 Context
navigating from a previewable file to a file that is too large still showed the previous file until refresh.
📚 Description
clears the previous file content when the file url changes, so the large file error appears immediately during navigation.
tested manually by navigating from
README.mdtoindex.d.ts.before
before.mp4
after
after.mp4