fix(dashboard): spell out what resetting a subscription breaks - #171
Open
echoowall wants to merge 1 commit into
Open
fix(dashboard): spell out what resetting a subscription breaks#171echoowall wants to merge 1 commit into
echoowall wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Triaged: the diff is focused and the implementation is reasonable. I reviewed it before execution, then ran |
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.
问题
用户端订阅卡片上的「重置订阅」确认框目前是:
两行都不带任何信息。用户点完之后普遍不知道接下来该做什么,最常见的误解是「在客户端里点一下更新订阅就行了」。
这个操作实际做了什么
internal/module/subscription/internal/selfsub/resetusersubscribetoken.go在同一次更新里改了两个字段:Token—— 旧的订阅链接立刻失效UUID—— 该用户在节点侧的鉴权凭证,通过getServerUserListLogic下发给各节点,并在delivery里作为 Shadowsocks 类协议的Password所以后果有两层,而现在的文案一层都没讲:旧链接拉不到任何东西,并且客户端里已经导入的那些节点同样会连不上。用户看到的现象是「节点列表还在,但一个都连不上」,这正是最容易产生工单的状态。正确的处理方式是在每一个客户端里删掉旧订阅、用新链接重新添加,只刷新订阅是没用的。
改动
标题改为直接陈述结论,正文拆成三句:后果 / 要做什么 / 什么不受影响。
第三句是必要的。 这颗 destructive 按钮紧挨着「重置流量」,而重置订阅只写
Token和UUID两个字段,套餐、到期时间、已用流量全部原样保留。不写明的话,用户很容易误以为流量会被清零。用「几分钟内」而不是「立即」。 节点侧的用户列表有缓存(
internal/module/network/entity/node/model.go的ServerCacheTTL),凭证失效不是瞬时的。写成「立即」的后果是:用户重置完马上测一把发现还能连,判定这个提示在吓唬人,几分钟后集体掉线再来开工单。确认按钮从通用的「确认」改成「确认重置订阅」,和相邻的「重置流量」拉开距离。
confirmResetSubscription因此改为承载按钮文案,正文另开三个 key —— 这与subscribe.json里confirmUnsubscribe(按钮)+confirmUnsubscribeDescription(正文)的既有命名一致。AlertDialogDescription加asChild:Radix 的 Description 默认渲染<p>,多段正文直接嵌套会产生非法 HTML 结构。text-left用于覆盖AlertDialogHeader的text-center sm:text-left,多段文字在窄屏居中很难读,而这里主要是手机场景。语言包按字母序定点插入,未重排其余行。
验证
biome check通过tsc --noEmit通过