feat: file upload for local subscriptions & large content optimization#20
Open
123hi123 wants to merge 1 commit intoResinat:masterfrom
Open
feat: file upload for local subscriptions & large content optimization#20123hi123 wants to merge 1 commit intoResinat:masterfrom
123hi123 wants to merge 1 commit intoResinat:masterfrom
Conversation
Backend:
- Strip `content` from List/Create/Update subscription API responses to
prevent transferring large local subscription bodies (e.g. 67 MB) on
every 30-second poll, which caused 700+ MB browser memory usage
- GetSubscription still returns full content for single-item retrieval
Frontend (SubscriptionPage):
- Add file upload button for local subscriptions (create & edit forms)
using FileReader + useRef to avoid rendering large content in textarea
- Show file loading state ("读取中...") and large file submit state
- Display node count in create/update success toasts
- Separate edit validation schema: skip content requirement when editing
an existing subscription that already has nodes
- Show "N nodes loaded (content managed by server)" hint instead of
empty textarea when editing large local subscriptions
- Add i18n keys for all new UI strings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FileReader+useRefto store content in memory without rendering it in a<textarea>, preventing browser freeze on large files (e.g. 67 MB / 189K nodes).contentfrom list API responses: TheListSubscriptions,CreateSubscription, andUpdateSubscriptionAPI responses no longer include thecontentfield. This prevents transferring large subscription bodies on every 30-second poll, which previously caused 700+ MB browser memory usage.GetSubscriptionstill returns full content for single-item retrieval.Test plan
🤖 Generated with Claude Code