Hermes Agent
|
246f21c7f2
|
feat(review): land unified remediation and rules evidence closure
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-18 10:21:38 +08:00 |
|
Hermes Agent
|
25a84c426b
|
feat(admin): add hidden dashboard seed-order tools
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
- add hidden dev-only seed endpoint /api/admin/orders/dev-seed
- overdue_pending_once: create one 2-day-old pending order with draft intake
- cleanup_demo_seed: delete demo-tagged seeded orders
- restrict hidden seed route to non-prod env
- avoid decrypting all orders during cleanup; query ids/tags directly from SQL
- dashboard hidden entry:
- title id=dashboard-title
- dev-seed-panel hidden by default
- opens via 5 title clicks or ?seed-tools=1
- buttons: 补 1 笔超时待办 / 清理演示造数
- dashboard JS:
- postDevSeed()
- panel show/hide
- refresh dashboard after seed/cleanup
- tests:
- route auth + create/cleanup flow
- dashboard HTML/JS structure assertions
- admin UI page exposes hidden entry markup
- verification:
- pytest 69 passed
- browser: ?seed-tools=1 展开面板, 补造后 pending=8 overdue=1 missing=8, 清理后恢复 pending=7 overdue hidden
|
2026-06-17 10:42:14 +08:00 |
|
Hermes Agent
|
fd7174a70e
|
feat(stats+dashboard): expand pending_orders into 3 actionable dimensions
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
## 后端 admin/stats.py
- compute_summary 在单条聚合 SQL 中加两个新字段:
- pending_overdue_24h: status='pending' AND created_at < (now - 24h)
(超时未付,需主动催付)
- pending_missing_intake: status='pending' AND
(order_intakes 无记录 OR order_intakes.status='draft')
(资料待补,需主动跟进)
- LEFT JOIN order_intakes AS i ON i.order_id = orders.id
- 关键 bug 修复: SQL ? 顺序与参数顺序必须匹配,
(overdue_cutoff 在 IN 子句后) 之前误用 (overdue_cutoff, *_REVENUE_STATUSES)
导致 overdue_cutoff datetime 字符串误入 IN 子句,
'completed' 误入 created_at < ? 子句, 收入少算 30%。
已修正为 (*_REVENUE_STATUSES, overdue_cutoff)
- 列名全部限定为 orders.status / orders.created_at,避免与 i.status 歧义
## 前端 admin/static/dashboard.html
- KPI 4 待处理订单卡加 .pending-breakdown 区域
- 两个 pill 标签: pending-tag-overdue(红色,超时) + pending-tag-missing(橙色,资料待补)
- 仅在对应字段 > 0 时才显示
- CSS .pending-tag[hidden] { display: none; } 确保 hidden 属性生效
## 前端 admin/static/dashboard.js
- renderSummary 新增 pending_overdue_24h / pending_missing_intake 渲染
- 至少一个非零才展开 breakdown 区域
## 测试
- conftest.py orders_db fixture 同时建 order_intakes 表,避免 LEFT JOIN 缺表
- test_routes_stats_dashboard.py:
- test_dashboard_empty_db_shape 锁住 summary 必须含 12 字段
- test_dashboard_summary_pending_orders 更新 revenue 期望 (paid + serving 计入)
- 新增 test_dashboard_summary_pending_overdue_24h (2天前 vs 12h前)
- 新增 test_dashboard_summary_pending_intake (submitted/draft/无 intake 4 种组合)
- test_app.py 加 pending-breakdown 结构断言
- pytest 52 passed
## 真实环境验证
- admin/test-pass-123 登录后:
pending=7 overdue=0 missing_intake=7
- 视觉验证: KPI 4 显示 '7' 主值 + '资料待补 7' 橙色 pill
'超时' pill 因 overdue=0 自动隐藏
- 数据一致性: by_status.pending=7 与 summary.pending_orders=7 一致
|
2026-06-16 21:48:18 +08:00 |
|
Hermes Agent
|
ca80d7ba0e
|
feat(stats): add pending_orders to dashboard summary
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
- admin/stats.py compute_summary 在单条聚合 SQL 中加 pending_orders 字段
(status = 'pending' 计数),与 total_orders / total_revenue_cents 共用一条 SQL
- 修复 dashboard '待处理订单' KPI 4 一直显示 0 的问题
- 前端 dashboard.js 已读 summary.pending_orders ?? 0,无需改动
- 测试:
- test_routes_stats_dashboard.py 加 test_dashboard_summary_pending_orders
(3 pending + 2 paid + 1 serving + 1 refunded 验证 pending=3、revenue=30000、
by_status.pending=3 与 summary.pending_orders 一致)
- test_routes_stats_dashboard.py test_dashboard_empty_db_shape 更新 key 集
- test_app.py test_create_app_bootstraps_orders_schema summary 等式加 pending_orders: 0
- 真实环境验证:admin/test-pass-123 登录后 11 orders / 7 pending 与 by_status 一致
|
2026-06-16 21:16:39 +08:00 |
|
Hermes Agent
|
1111bec32a
|
feat(frontend): overhaul /dashboard layout, status badge, and empty states
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
- /dashboard 顶部加 system-status 徽章:尚未连接 / 已连接 / 异常 三态,背景渐变 + 圆点 + 元数据
- 顶部右侧加 quick-refresh / quick-logout 两个语义化动作
- 头部把原 3 个内嵌链接改成 quick-links pill 行,更专业
- 登录区加 id=login-form 与 aria-label,登录成功后自动折叠
- KPI 4 卡:订单数/收入/后台可登录用户/待处理订单
- 每张卡片有 pill 标签与 data-card 钩子
- 订单/收入两张卡加 spark 骨架线,登录后变 loaded
- 空状态文案统一为「登录后查看 · 」
- 趋势图与 3 个分布图统一加 chart-empty 组件,未加载/无数据时显示占位
- JS:
- 加 setStatus / setChartEmpty / markCardsLoading / markCardsEmpty
- 失败或登出时统一清空所有图表并重置为占位
- renderBarChart 在 dataMap 全为 0 时自动走空状态
- 保留 sessionStorage,保留 localStorage 黑名单
- 修复 pending_orders 的算式 bug
- 测试:test_app.py 加 system-status / quick-links / data-card / chart-empty / spark 等新结构断言,锁住产品化文案
|
2026-06-16 20:33:06 +08:00 |
|
Hermes Agent
|
40ee7f4dc0
|
feat(frontend): complete local UI remediation for web, portal, and dashboard
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-16 15:02:01 +08:00 |
|
Hermes Agent
|
3158bb839c
|
fix(payments): close refund domain loop on order side
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-15 09:21:45 +08:00 |
|
Hermes Agent
|
3f46811e49
|
release: cut v2.1
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
|
2026-06-13 14:49:58 +08:00 |
|