wangjia
|
2930d76cf3
|
feat(routing): 域名级系统锁冲突提示 + 重置默认按钮 + 客户端 follow-up 清理
承接 FT-A(GET /v1/me/routing 含只读 system_locked_domains)。
- RoutingProfile 加只读 systemLockedDomains(fromJson 读/toJson 不输出);
routing_screen 冲突检测扩展到域名类规则(domain/domain_suffix/domain_keyword
命中锁定域名 → systemLocked),ip_cidr 私网启发式保留。
- RoutingProfile.defaults() + RoutingProfileNotifier.resetToDefault()(复用
_persist:乐观更新/失败回滚/存成功后自动重连,保留只读 systemLockedDomains
不丢)+ routing_screen 加「重置默认」按钮与二次确认弹层(新增 3 个 l10n 键)。
- RoutingRule.copyWith 用哨兵支持 note 显式清空为 null;RoutingRule/Builtin/
RoutingProfile 加值相等 operator==/hashCode。
- T8 smartRouteSub 清理:grep 全仓发现 design/prototype/i18n/alias.json →
gen_proto_i18n.mjs(CI 漂移闸)仍有活引用,按计划口径不删,详见
.superpowers/sdd/task-FTB-report.md。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-07-29 06:57:58 +08:00 |
|
wangjia
|
057c11eee2
|
feat(routing): 客户端 model + AccountApi + AsyncNotifier provider
- RoutingProfile/RoutingRule/Builtin 手写 fromJson/toJson/copyWith,对齐服务端
GET/POST /v1/me/routing 契约;enabled 缺省容错默认 true,toJson 恒输出该字段
- AccountApi.routingProfile()/saveRoutingProfile() 封装两端点
- RoutingProfileNotifier(AsyncNotifier):addRule/removeRule/updateRule/reorder/
setMode/setBuiltin 均本地乐观更新后落盘;save() 失败整体回退到变更前 state
并 rethrow(不静默吞,交调用方处理)——Riverpod asyncTransition 的 seamless
copyWithPrevious 会用当前已存 state 覆盖手动挂的错误值,故不用 AsyncError
路径,改走显式回退
|
2026-07-28 08:27:43 +08:00 |
|