wangjia
b461a476a2
feat(client): 免费版连接倒计时 + 到点切断 + 灰按钮 + 看广告加时( #21 前端)
...
四端共享 Dart 实现,配合 #21 后端账户级卡控:
- me.dart: 加 quota_cap_min(当日总额度 = daily + 看广告 bonus,进度条分母)。
- quota_provider: total 取 quotaCapMin;isExhausted;markExhausted(倒计时归零本地置耗尽
+ 登录态拉 me 校准);watchAd() async 调 /ads/unlock(占位 ad_token=uuid)→ 刷新 me,返回 granted。
- connection_provider: 连接时锁定 _freeRemainingSec(会员 null 不倒计时);复用 elapsed 计时器
每 tick 算 freeCountdown,归零 → _onFreeQuotaExhausted(主动切断不报节点异常 + markExhausted);
倒计时用墙上时钟(后台漏跳回前台补上、准时切);连接遇后端 QUOTA_EXHAUSTED 兜底置耗尽。
- connect_button: enabled/onDisabledTap —— 额度耗尽 off 态灰化(锁图标),点击弹加时。
- quota_card: 三态(连接倒计时 mm:ss / 未连接剩余分钟 / 耗尽今日已用完);移动「看广告加时」、桌面「升级会员」。
- ad_reward_dialog(新): 移动端占位广告(播放中→3s→加时→奖励);桌面版硬 10 分钟提示去移动端/升级。
- l10n(zh/en): 倒计时/已用完/看广告加时/占位广告/桌面升级 双语。
- 测试: quota isExhausted/markExhausted;连接倒计时归零自动切断+置耗尽(注入时钟);
额度卡三态 widget;/me 契约含 quota_cap_min;golden 更新(Linux 权威基线 quota_low/exhausted)。
- 文档: docs/free-quota-ad.html + 登记 docs/index.html。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-07-02 00:33:21 +08:00
wangjia
e6f622d605
docs: 设备数量限制 + 超限 UX 设计文档( #16 ) + 登记 index
...
ci-pangolin / Lint — shellcheck (push) Has been cancelled
ci-pangolin / OpenAPI Sync Check (push) Has been cancelled
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Has been cancelled
ci-pangolin / Flutter — analyze + test (push) Has been cancelled
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (push) Has been cancelled
ci-pangolin / Codegen Drift — token 生成物未漂移 (push) Has been cancelled
ci-pangolin / Go — build + test (push) Has been cancelled
ci-pangolin / E2E Smoke — L4 进程级端到端 (push) Has been cancelled
ci-pangolin / Go — integration (mysql/redis testcontainers) (push) Has been cancelled
ci-pangolin / Golden — 视觉回归 (components + auth) (push) Has been cancelled
沿用家族样式;涵盖决策(登录闸/踢旧/自动清理)、DB(无 schema 变更)、后端
(devices CheckDeviceLimit + auth 登录闸)、前端(DeviceLimitScreen)、验证与不在本轮。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-07-01 19:26:51 +08:00
wangjia
e2440e44cc
docs: 补 CLAUDE.md 移动端/跨端统计章节 + 新增 urltest 排障文档
...
ci-pangolin / Lint — shellcheck (push) Has been cancelled
ci-pangolin / OpenAPI Sync Check (push) Has been cancelled
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Has been cancelled
ci-pangolin / Flutter — analyze + test (push) Has been cancelled
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (push) Has been cancelled
ci-pangolin / Codegen Drift — token 生成物未漂移 (push) Has been cancelled
ci-pangolin / Go — build + test (push) Has been cancelled
ci-pangolin / E2E Smoke — L4 进程级端到端 (push) Has been cancelled
ci-pangolin / Go — integration (mysql/redis testcontainers) (push) Has been cancelled
ci-pangolin / Golden — 视觉回归 (components + auth) (push) Has been cancelled
- CLAUDE.md:加「移动端(iOS/iPad+Android)原生隧道」「跨端实时统计+urltest 延迟」两节——
libbox 构建前置(JDK 17/包名/gitignore)、clash_api 注入正解、libbox 单 client Group 坑、
Dart 共享广播流、连接态跳直连实测;附「最后在线取 last_seen」一句。
- 新增 docs/connect-latency-urltest.html(排障/Runbook):四端 urltest 实现 + 根因链 + 打点法,
登记进 docs/index.html。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-30 22:56:10 +08:00
wangjia
23bf3077c8
docs(kb): 流量记账口径知识库 — 连接页实时(含直连) vs 统计页累计(仅代理)
...
记录两处上下行数字口径差异:连接页来自内核 Clash API 全局吞吐含直连,
统计页来自节点 v2ray_api per-user 计数仅代理;差额=直连,设计使然。
含对账口径警示。登记进 docs/index.html 知识库分类。决策:保持现状不改连接页口径。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-29 21:04:50 +08:00
wangjia
889cff4556
docs(plan): 设备&会话管理 实现计划 P1-P6(md执行源 + html阅读版 + 登记 + 链接)
...
新增 docs/superpowers/plans/2026-06-29-device-session-management.md(执行真相,
checkbox) + docs/device-session-management-plan.html(阅读版);登记进 index.html
「实现计划」;总方案顶部加「→ 实现计划」链接。P1 设备注册打通→P2 sessions表+
在线→P3 强制退出/清除→P4 每设备流量→P5 2FA(future)→P6 UI重做。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-29 00:15:35 +08:00
wangjia
31ac76e3d5
docs(design): 设备&会话管理 + 每设备流量归因 全局设计(HTML)
...
新增 docs/device-session-management-design.html 并登记进 docs/index.html
「设计方案」分类。覆盖三端:控制面 sessions 表绑设备 + RegisterIfAbsent
接线、数据面每设备 dp_uuid 记账(usage_device_daily)、前端「我的设备」
(在线/客户端版本/最后登录 + 强制退出/清除登录信息)。核心洞察:后端大半
已建但 RegisterIfAbsent 未接线致 devices 表空。含 P1–P5 实现路线。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-28 23:29:47 +08:00
wangjia
1a6eb7ac9a
docs(stats): stats-overhaul 计划/测试清单 + index 登记
...
- stats-overhaul 实现计划(md 真相源 + html 阅读版)
- 功能×测试覆盖清单(feature-test-coverage-checklist.html)
- docs/index.html 登记上述文档
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-28 18:13:49 +08:00
wangjia
e7b37d7719
test(ci): 刀3 — CI 单点韧性:runner 离线告警(缺口③)
...
ci-pangolin / Lint — shellcheck (pull_request) Successful in 9s
ci-pangolin / OpenAPI Sync Check (pull_request) Successful in 23s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (pull_request) Successful in 5s
ci-pangolin / Flutter — analyze + test (pull_request) Failing after 37s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (pull_request) Successful in 6s
ci-pangolin / Codegen Drift — token 生成物未漂移 (pull_request) Successful in 4s
ci-pangolin / Go — build + test (pull_request) Successful in 19s
ci-pangolin / E2E Smoke — L4 进程级端到端 (pull_request) Successful in 17s
ci-pangolin / Go — integration (mysql/redis testcontainers) (pull_request) Successful in 4m16s
ci-pangolin / Golden — 视觉回归 (components + auth) (pull_request) Successful in 15s
ci-pangolin / Lint — shellcheck (push) Successful in 5s
ci-pangolin / OpenAPI Sync Check (push) Successful in 23s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Successful in 6s
ci-pangolin / Flutter — analyze + test (push) Failing after 15s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (push) Successful in 5s
ci-pangolin / Codegen Drift — token 生成物未漂移 (push) Successful in 5s
ci-pangolin / Go — build + test (push) Successful in 7s
ci-pangolin / E2E Smoke — L4 进程级端到端 (push) Successful in 19s
ci-pangolin / Go — integration (mysql/redis testcontainers) (push) Failing after 4m29s
ci-pangolin / Golden — 视觉回归 (components + auth) (push) Successful in 13s
CI 整条吊在一台 mac,关机/掉线即全停且无人知道。新增
deploy/runner/runner-deadman.sh(仿 bootstrap/monitor/deadman-watch.sh):
放另一台常在线主机,每 3 分钟查 gitea Actions API 里 mac-pangolin-2 的 status,
连续 offline 到阈值 → Telegram 告警,恢复也通知;API 取不到时跳过不误报。
响应字段已对照真 gitea API 核验({"runners":[{"name":...,"status":"online"}]}),
shellcheck 干净,实跑验证 online→不告警、缺失→进告警分支。
docs/ci-runner.md 增「韧性」节(告警部署 + cron/launchd)并标注持久化激活仍待
本机手动跑(pkill/launchctl,Claude 跑不了);验证段 job 数 9→10。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-25 23:04:35 +08:00
wangjia
55d368d98b
docs(test): 测试架构补「⑩ 已知缺口/测试盲区」单一跟踪源
...
把散在对话里的盲区收进架构文档,作为单一跟踪源(补一项划一项):
- A 覆盖盲区:前端统计上屏数值未验证(诉求半覆盖)、真实流量数据路径
(注入非真出网,最大盲区)、原生隧道层零自动化、契约双份可能漂移。
- B 运维/工程缺口:CI 单点 mac(持久化未激活)、go-integration 裸宿主脆性、
analyze 严格化(B1)+ golden 全集(B2)被 stats-overhaul 耦合阻塞、
golden 本地难重生。
每项标严重度 + 现状为什么 + 何时怎么补;同步登记 docs/index.html。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-25 21:30:54 +08:00
wangjia
034a585e3b
docs(ci): runner 设置记录(决定用 1 个 mac-pangolin-2 + 清理/持久化)
...
ci-pangolin / Lint — shellcheck (pull_request) Successful in 5s
ci-pangolin / OpenAPI Sync Check (pull_request) Successful in 17s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (pull_request) Successful in 6s
ci-pangolin / Flutter — analyze + test (pull_request) Successful in 39s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (pull_request) Successful in 5s
ci-pangolin / Codegen Drift — token 生成物未漂移 (pull_request) Successful in 5s
ci-pangolin / Go — build + test (pull_request) Successful in 2m5s
ci-pangolin / E2E Smoke — L4 进程级端到端 (pull_request) Successful in 2m13s
ci-pangolin / Golden — 视觉回归 (components + auth) (pull_request) Successful in 31s
记录 pangolin CI 的 self-hosted runner:决定保留 1 个(mac-pangolin-2,项目级、
mac host 模式、label nas、复用 jiu 的 relay 13000),含 config、为何 host+mac、
relay 原因、已删 orphan(mac-pangolin id5)的清理命令、持久化(launchd)TODO。
登记进 docs/index.html。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-25 18:52:54 +08:00
wangjia
29ddd5b453
docs(test): 测试框架架构 + 开发规范五支柱文档
...
- docs/test-architecture.html:分层测试金字塔(L0契约→L4 E2E) + 契约接缝
数据流 + 四类诉求映射 + CI 流水线 + E2E 拓扑,5 张内联 SVG/表格图
- docs/dev-conventions.html:可测试性五支柱(接缝即接口/契约单源/纯逻辑分离/
错误是值/可观测) + 支柱↔测试层咬合矩阵 + 反例对照表 + 执行机制四道闸
- docs/index.html:登记两份文档到知识库/调研,双向互链
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-24 23:25:14 +08:00
wangjia
e4db3beba6
Merge branch 'main' into feature/pangolin-ios
...
ci-pangolin / Lint — shellcheck (push) Has been cancelled
ci-pangolin / OpenAPI Sync Check (push) Has been cancelled
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Has been cancelled
ci-pangolin / Flutter — analyze + test (push) Has been cancelled
# Conflicts:
# client/lib/bridge/vpn_bridge_provider.dart
# docs/index.html
2026-06-23 10:05:20 +08:00
wangjia
53a2ee0b74
docs(client/ios): plan 增 HTML 阅读版 + 登记索引(双产物:.md 执行/.html 阅读)
2026-06-22 19:27:45 +08:00
wangjia
84912f4dea
docs(client/ios): iOS+iPad 支持设计方案(TestFlight 里程碑)+ 新建 docs 索引
...
五条工作线:libbox iOS 框架 / Provider 对齐 macOS 修复 / App Group IPC /
iPad 布局横屏适配 / TestFlight 分发;头号风险 NE ~50MB 内存红线设双闸。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-22 19:06:20 +08:00
wangjia
64c427cf11
docs(android): Android 设计方案+KillSwitch 知识库(HTML)+文档索引+实现计划
...
- docs/android-client-design.html / killswitch-design.html / index.html
- docs/superpowers/plans/2026-06-22-android-client.md
- todo/ KillSwitch 三端待办(#1 mac/#2 Android/#3 Windows)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-06-22 18:44:50 +08:00