Skip to content

fix(dashboard): spell out what resetting a subscription breaks - #171

Open
echoowall wants to merge 1 commit into
perfect-panel:developfrom
echoowall:fix/reset-subscription-warning
Open

fix(dashboard): spell out what resetting a subscription breaks#171
echoowall wants to merge 1 commit into
perfect-panel:developfrom
echoowall:fix/reset-subscription-warning

Conversation

@echoowall

@echoowall echoowall commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

问题

用户端订阅卡片上的「重置订阅」确认框目前是:

  • 标题:提示
  • 正文:您确定要重置订阅吗?

两行都不带任何信息。用户点完之后普遍不知道接下来该做什么,最常见的误解是「在客户端里点一下更新订阅就行了」。

这个操作实际做了什么

internal/module/subscription/internal/selfsub/resetusersubscribetoken.go 在同一次更新里改了两个字段:

  • Token —— 旧的订阅链接立刻失效
  • UUID —— 该用户在节点侧的鉴权凭证,通过 getServerUserListLogic 下发给各节点,并在 delivery 里作为 Shadowsocks 类协议的 Password

所以后果有两层,而现在的文案一层都没讲:旧链接拉不到任何东西,并且客户端里已经导入的那些节点同样会连不上。用户看到的现象是「节点列表还在,但一个都连不上」,这正是最容易产生工单的状态。正确的处理方式是在每一个客户端里删掉旧订阅、用新链接重新添加,只刷新订阅是没用的。

改动

标题改为直接陈述结论,正文拆成三句:后果 / 要做什么 / 什么不受影响。

第三句是必要的。 这颗 destructive 按钮紧挨着「重置流量」,而重置订阅只写 TokenUUID 两个字段,套餐、到期时间、已用流量全部原样保留。不写明的话,用户很容易误以为流量会被清零。

用「几分钟内」而不是「立即」。 节点侧的用户列表有缓存(internal/module/network/entity/node/model.goServerCacheTTL),凭证失效不是瞬时的。写成「立即」的后果是:用户重置完马上测一把发现还能连,判定这个提示在吓唬人,几分钟后集体掉线再来开工单。

确认按钮从通用的「确认」改成「确认重置订阅」,和相邻的「重置流量」拉开距离。confirmResetSubscription 因此改为承载按钮文案,正文另开三个 key —— 这与 subscribe.jsonconfirmUnsubscribe(按钮)+ confirmUnsubscribeDescription(正文)的既有命名一致。

AlertDialogDescriptionasChild:Radix 的 Description 默认渲染 <p>,多段正文直接嵌套会产生非法 HTML 结构。text-left 用于覆盖 AlertDialogHeadertext-center sm:text-left,多段文字在窄屏居中很难读,而这里主要是手机场景。

语言包按字母序定点插入,未重排其余行。

验证

  • biome check 通过
  • tsc --noEmit 通过

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@web-ppanel

Copy link
Copy Markdown
Contributor

Triaged: the diff is focused and the implementation is reasonable. I reviewed it before execution, then ran bun run check, bunx tsc --noEmit -p apps/user/tsconfig.json, and the user app test suite (16 tests); all passed. I did not merge because merging into develop would trigger the repository’s Build and Release workflow, while this triage run explicitly prohibits any action that triggers a release workflow. Leaving this PR open for a maintainer-controlled merge.

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