Skip to content

Allow partial subscription imports and unify download User-Agent - #229

Merged
yiguodev merged 6 commits into
mainfrom
codex/subscription-import-compatibility
Oct 18, 2026
Merged

yiguodev merged 6 commits into
mainfrom
codex/subscription-import-compatibility

Conversation

@yiguodev

Copy link
Copy Markdown
Contributor

Summary

A single invalid complete configuration could reject an otherwise usable subscription. Import valid configurations individually and keep existing data when none are usable or the validation service fails.

- reject the subscription on the first invalid configuration
+ skip rejected configurations and retain accepted configuration graphs intact
+ commit when the selected mode has usable entries; otherwise preserve existing data

Use one v2rayN/<OneXray version> <OneXray UA> default for all downloads. Prefill new subscription forms and existing empty UA fields without saving on display or cancel; preserve explicit per-subscription overrides. Remove the global UA selector, its preference, and the unused WebView dependency.

Evidence

  • Before: Mixed valid/invalid configuration regression tests failed with FormatException; ordinary subscription forms could open with an empty UA field.
    After: Partial-import coverage verifies accepted graphs and cache preservation; form coverage verifies default values, custom input preservation, and cancel without saving.
  • Latest verification: 48 download and subscription form tests passed, flutter analyze --no-pub reported no issues, the layer dependency check passed, and git diff --check passed.
  • Device runtime validation was not performed.

Merge Danger

Door: two-way

No database schema changes. Reverting restores the previous import and UA behavior.

Blast Radius: downloads

The shared default UA now includes the compatibility prefix for Geodata and other downloads as well as subscriptions. Explicit subscription overrides remain request-scoped.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 06:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T08:03:49.844913Z 32d8d2e New commits
🔒 Security Review ✅ Completed 2026-10-18T08:04:30.187039Z 32d8d2e New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 06:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: 1fb8807e42

ℹ️ 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".

Comment thread lib/pages/servers/import/controller.dart Outdated
Copilot AI balanced review requested due to automatic review settings October 18, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: b23e9c343a

ℹ️ 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".

Comment thread lib/pages/servers/import/controller.dart Outdated
Comment thread lib/service/servers/subscription/service.dart Outdated
Copilot AI balanced review requested due to automatic review settings October 18, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@yiguodev
yiguodev merged commit 857dd95 into main Oct 18, 2026
1 check passed
@yiguodev
yiguodev deleted the codex/subscription-import-compatibility branch October 18, 2026 08:09
AnatomikPerq added a commit to AnatomikPerq/hp-client that referenced this pull request Oct 21, 2026
…nload User-Agent

A subscription whose complete configurations partly fail validation now
keeps the accepted ones. Every download sends one User-Agent,
"v2rayN/<version> <app>/<version> (...)", and the system-browser option
is gone.

Fork changes on top: the app token stays HyperClient (Remnawave's JSON
fallback matches /^v2rayN\/\d+\.\d+\.\d+/ with no minimum version, so
0.1.0-beta.x qualifies), and nodes taken from complete configurations
keep the fork's names (remarks, then the tag) and mux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants