Skip to content

Add subscription usage and bulk refresh#114

Merged
PhoenixNil merged 1 commit into
mainfrom
agent/subscription-bulk-refresh
Jul 25, 2026
Merged

Add subscription usage and bulk refresh#114
PhoenixNil merged 1 commit into
mainfrom
agent/subscription-bulk-refresh

Conversation

@PhoenixNil

Copy link
Copy Markdown
Owner

Summary

  • Parse and persist provider subscription-userinfo traffic and expiry metadata.
  • Display available usage and expiry in subscription cards, with localized bulk-refresh progress.
  • Refresh all subscriptions with bounded concurrency, serialize server saves, and retry zero-result subscriptions with a Clash-compatible user agent.

Why

Providers often expose quota and expiry only through response headers or require a Clash-compatible user agent. Updating several subscriptions one at a time also made keeping subscription data current unnecessarily tedious.

User impact

Subscription cards now show traffic usage and expiry when the provider exposes them, and the management dialog offers an Update all action with progress feedback.

Validation

  • dotnet test XrayUI.Tests\XrayUI.Tests.csproj --no-restore --verbosity minimal — 65 passed
  • dotnet build XrayUI-dev.csproj --no-restore --configuration Debug --verbosity minimal — succeeded with 0 warnings and 0 errors

@PhoenixNil
PhoenixNil marked this pull request as ready for review July 24, 2026 20:33

@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: e7d49c42e8

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

<TextBlock Text="{x:Bind TrafficLineText, Mode=OneWay}"
FontSize="12"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Visibility="{x:Bind HasTraffic, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Show expiry when a subscription has no finite quota

For providers that report an expiry but an unlimited quota (total=0) or omit total, HasTraffic is false even though HasExpiry is true. This hides the new traffic/expiry line and instead displays the URL, so the provider's expiry metadata is never shown. Make this visibility depend on either traffic or expiry (and hide the URL under the same condition).

Useful? React with 👍 / 👎.

@PhoenixNil
PhoenixNil merged commit ff0e2cb into main Jul 25, 2026
6 checks passed
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.

1 participant