dsh-agent
9a9c9d08e1
refactor(stage4): 集中配置与启动校验,权限守卫 fail-closed,凭据移出仓库
...
配置分层
- 新增 src/server/config.ts:环境变量集中读取 + 启动期校验。
删除公开兜底密钥 ln-bi-default-secret:SSO 模式下 JWT_SECRET 缺失或
短于 32 字符时 assertRuntimeConfig() 直接拒绝启动(已实测)。
- index.ts 不再自己读端口/环境;auth/config.ts 与 auth/login.ts 改为引用集中配置。
权限守卫
- energy / scheduling / hydrogen-heatmap 的守卫由 “user 存在才校验” 改为
“无角色即拒绝”:user 缺失时按无权限处理,不再静默放行(fail-closed)。
- /api/ele/* 此前完全无鉴权,任何已登录用户都能写入电费表;现按能源域
(BI-LEADER-ENERGY) 守卫。
接口契约
- 未匹配的 /api/* 由 200 text/html(SPA) 改为 404 application/json;
未认证时仍是 401,避免向未授权调用方暴露路由是否存在。
- 新增全局 onError 返回 JSON 500。
凭据治理(此前均为 git 跟踪文件中的明文)
- Dockerfile 删除烧进镜像的 JWT_SECRET,改为必须运行时注入。
- docker-compose.yml 删除生产库口令/JWT 密钥/失效的 MILEAGE_DB_*,
改为强制注入写法;补齐 OSS_* 与 NODE_ENV/DEV_BYPASS_AUTH/BI_AUTH_*。
- woodpecker.yml 删除 Harbor base64 凭据改用 secret,pull_request 不再推镜像。
- 删除 scripts-tmp/(含生产库 root 口令)与已跟踪的 .DS_Store;.gitignore 补全。
- 文档中残留的里程库口令改为占位符。
lint / test(128) / build 全绿。
2026-09-11 10:19:07 +08:00
dsh-agent
680c7e0662
refactor(stage3): 下线 5 个无调用方的 legacy 氢能接口
...
先确认调用方再删:/hydrogen/station-board 被单站日报页面(StationDailyApp /
StationDailyDetailView)实际使用,必须保留;其余 5 个确认零调用方。
- 删服务端路由 hydrogen-overview / -overview-detail / -daily / -daily-detail /
-settlement(约 1,080 行),energy/index.ts 保留原有注册顺序语义。
- 删客户端对应请求函数与类型:api.ts 由 202 行精简为 74 行;
types.ts 由 291 行精简为 112 行(只保留 StationBoard / Electric / ETC 闭包)。
- 顺带修正命名:HydrogenDailyQuery -> EnergyRangeQuery(它服务于电能按月接口)。
- routes.test.ts 同步收敛:删除 settlement / overview 两个已下线接口的测试,
'四个处理器' 改为只覆盖电能;路由顺序断言更新为现存 9 条。
电能 SQL 指纹沿用原值,证明取数口径未变。
测试 131 -> 128(删掉的 3 个用例覆盖的是已下线接口)。lint / test / build 全绿。
2026-09-11 10:16:43 +08:00
dsh-agent
7556dbcebc
refactor(stage2): 生产代码移出 src/vendor,氢能收敛为分层 feature
...
src/vendor 语义是'第三方/参考',却装着线上氢能看板并反向 import
src/modules,依赖方向倒挂。本次把生产代码归位并建立氢能分层:
src/modules/energy/hydrogen/
index.tsx 导航入口(原 HydrogenModule.tsx)
api.ts types.ts HTTP 与 DTO
dev-mock-api.ts 仅 dev 的 vite 插件(仍由 vite.config.ts 引用)
model/ 纯逻辑(format / bearing-labels / daily-detail-format)
board/ 经营看板 UI(原 vendor energy-h2-bi-board)
station-daily/ 单站日报 UI(原 vendor energy-h2-station-daily)
drill/ 下钻弹层 UI(原 hydrogen-bi-v2 的 UI 部分)
common/ 工具与共享组件(原 vendor common + prototype-download)
fonts/ JetBrains Mono(原 vendor resources/design-system)
- UI 与 CSS 逐字节保留,仅移动位置与改写相对 import。
- 删除自挂载原型入口后遗留的 2 个 annotation-source.json。
- vite.config.ts 与 tsconfig 的路径/exclude 同步清理。
- independent-entry.test.ts 不再硬编码路径,改为断言'两个入口解析到同一文件'。
导入改写用一次性 codemod 完成(按旧位置解析、按新位置重写),
lint / test(131) / build 全绿,可达性分析仍为 0 未引用文件。
2026-09-11 10:14:37 +08:00
dsh-agent
3daa9808ce
refactor(stage1): 删除已证实无引用的死代码
...
按 import 图可达性分析(从 main.tsx / server index+local / vite.config 出发)
删除 0 引用的文件,删除后可达性分析 UNREACHABLE 归零。
- 删旧氢能实现:PrototypeBoard / HydrogenBiV2App / prototype-adapter /
prototype-source 全部 / HydrogenView+Overview+Daily+Settlement+BoardChrome+
StationBoard / hydrogen-overview / hydrogen-daily
- 删死 CSS 4 个(约 12k 行)、删死 vendor 残留(自挂载 index.tsx、AccessGate、SdDatePicker)
- 删 server/mileage-db.ts(含硬编码凭据的死模块)
- DailyRangeControls:移除从未被传入的 vehicleScope/onVehicleScopeChange 死分支
- tsconfig:移除指向已删除/不存在路径的 exclude
测试 146 -> 131(删掉的 3 个测试文件覆盖的是被删的死代码)。
lint / test / build 全绿。
2026-09-11 10:11:33 +08:00
kfluous and HiFox Agent
89dca5c5a4
feat(energy): rotate phone fullscreen drill tables for wider viewing
...
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 18:42:57 +08:00
kfluous and HiFox Agent
7d792933dd
fix(auth): allow non-empty short access passwords
...
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 18:28:39 +08:00
kfluous and HiFox Agent
0dc7e89c1d
feat(auth): add configurable password login with SSO default
...
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 18:22:41 +08:00
kfluous
4430fb75f1
Merge remote-tracking branch 'origin/main' into codex/hydrogen-oneos709
ci/woodpecker/push/woodpecker Pipeline was successful
2026-09-05 18:04:33 +08:00
kfluous and HiFox Agent
df259fc12b
feat(energy): improve hydrogen drill workspace and verification cutoff
...
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 18:04:33 +08:00
kfluous and HiFox Agent
df6b8201e8
fix(ci): use npmmirror for CI and Docker dependency installs
...
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 17:15:28 +08:00
kfluous and HiFox Agent
a177781fe7
feat(energy): integrate self-operated station customers and receipts
...
ci/woodpecker/push/woodpecker Pipeline was canceled
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 17:03:15 +08:00
kfluous and HiFox Agent
637a72c1e9
feat(energy): optimize mobile hydrogen daily and customer lists
...
ci/woodpecker/push/woodpecker Pipeline was canceled
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 15:51:52 +08:00
kfluous and HiFox Agent
98efde3f75
fix(energy): checkpoint validated drill pagination and read-only preview
...
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-05 15:36:09 +08:00
kfluous and HiFox Agent
6c91a6694a
fix(energy): deliver prototype-aligned hydrogen board and acceptance fixes
...
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: HiFox Agent <agents-noreply@hifox.com >
2026-09-03 22:27:23 +08:00
kkfluous
5eb38a4b05
chore: checkpoint local changes
ci/woodpecker/push/woodpecker Pipeline failed
2026-08-25 12:37:58 +08:00
kkfluous
2518d9ee54
chore: bump version to 1.1.15
ci/woodpecker/push/woodpecker Pipeline was successful
2026-08-20 14:36:18 +08:00
kkfluous
62efef0ab9
feat(energy): rebuild hydrogen BI board and drill-through
ci/woodpecker/push/woodpecker Pipeline was successful
2026-08-20 13:59:03 +08:00
kkfluous
37a9f303ec
chore: release v1.1.14
ci/woodpecker/push/woodpecker Pipeline was successful
2026-08-13 12:04:02 +08:00
kkfluous
06fe75b4c7
refactor: modularize application domains
2026-08-13 12:03:34 +08:00
kkfluous
d610e4b841
feat(mileage): add report loading overlay
ci/woodpecker/push/woodpecker Pipeline was successful
2026-08-12 23:17:06 +08:00
kkfluous
7fce6b8474
feat(mileage): refine daily report controls
2026-08-12 23:11:35 +08:00
kkfluous
bd0627d00f
feat(mileage): add daily operations report
2026-08-12 23:05:07 +08:00
kkfluous
17c839a35e
feat(mileage): add statistic-time sorting and refresh control
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-23 15:44:01 +08:00
kkfluous
99b4efda6d
chore: release v1.1.13
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-23 15:12:36 +08:00
kkfluous
6b72f0ce3c
feat(mileage): default to instrument-only source
2026-07-23 15:12:36 +08:00
kkfluous
b0c8d6a5b8
chore: release v1.1.12
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-23 14:11:57 +08:00
kkfluous
d8773ff0a0
feat(mileage): add OneOS source priority controls
2026-07-23 14:11:52 +08:00
kkfluous
becacecc67
chore: release v1.1.11
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-23 12:29:29 +08:00
kkfluous
67f3ec7306
perf(mileage): filter single-vehicle range queries
2026-07-23 12:27:23 +08:00
kkfluous
3f29bed5fa
feat: integrate OneOS mileage APIs and release v1.1.10
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-23 12:19:11 +08:00
kkfluous
4d523cbce0
feat(mileage): add daily mileage columns to main export sheet
...
ci/woodpecker/push/woodpecker Pipeline was successful
- '车辆汇总' sheet now includes per-day mileage columns for date ranges
- Daily columns shown as 'MM-DD里程(km)' between base info and summary cols
- Freeze pane fixed at 7 base columns for horizontal scrolling
- '每日明细' sheet retained as detailed backup
- Bump version to 1.1.9
2026-07-15 14:30:16 +08:00
kkfluous
2b31f8efe8
feat(mileage): add brand multi-select filter and customer fuzzy search
...
ci/woodpecker/push/woodpecker Pipeline was successful
- Add brand multi-select filter (BatchMultiSelect) with 17 brand options
- Replace customer select with SearchableSelect for fuzzy search
- Server-side: add brand to vehicle-info SQL, cache, filters, and monitoring
- Customer filter now uses case-insensitive includes match on server side
- Add brand column to fullscreen table header and body
- Mobile-adaptive: compact inputs, constrained widths, scrollable dropdowns
- Bump version to 1.1.8
2026-07-15 14:25:11 +08:00
kkfluous
ae4b5d30e7
fix: restore mobile navigation typography
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-13 22:02:49 +08:00
kkfluous
392a36a0ec
feat: add vehicle and hydrogen heatmaps
ci/woodpecker/push/woodpecker Pipeline was successful
2026-07-13 21:44:03 +08:00
lingniu
a558db5795
Polish mobile BI filters and summaries
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-27 22:43:43 +08:00
lingniu
b0caa5afcb
feat: polish BI dashboards and bump version
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-27 21:59:33 +08:00
lingniu
5377d2c225
chore: ignore local worktrees
2026-06-23 16:09:54 +08:00
kkfluous
654573ac4b
merge palladium 18t color variant
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-23 13:32:29 +08:00
kkfluous
43f94ed1b8
fix asset vehicle source grouping
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-23 13:16:32 +08:00
kkfluous
fb5789d705
update asset refresh status
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-18 14:18:40 +08:00
kkfluous
94a6e0a75e
update asset validation banner
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-18 14:04:27 +08:00
kkfluous
67c5f9d281
support mileage batch multi-select
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-18 10:18:35 +08:00
kkfluous
91202bdf71
fix asset module database migration
ci/woodpecker/manual/woodpecker Pipeline was successful
2026-06-17 11:53:39 +08:00
kkfluous
c13f341d5e
feat(ui): 页面标题区分能源BI与资产BI,资产页增加OneOS迁移提示滚动条
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-11 15:30:21 +08:00
kkfluous
6962c4ff1c
feat(db): hydrogen 和 mileage 数据库连接支持 Docker 环境变量注入
...
ci/woodpecker/push/woodpecker Pipeline was successful
mileage-db.ts 改为从环境变量读取,硬编码值作为 fallback;
docker-compose.yml 新增加氢站库和里程库的连接参数。
2026-06-09 17:18:32 +08:00
kkfluous
6b7f0eedd9
Revert "fix(mileage): 已到期年度按期末里程统计"
...
ci/woodpecker/push/woodpecker Pipeline was successful
This reverts commit feb950dd59 .
2026-06-03 15:40:13 +08:00
kkfluous
5bb3ceb47a
fix(mileage): 交投高里程车辆标红
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-03 15:10:36 +08:00
kkfluous
cc778f3701
fix(mileage): 导出保留里程小数
ci/woodpecker/push/woodpecker Pipeline was successful
2026-06-03 14:54:30 +08:00
kkfluous
74d6efe261
Revert "fix(mileage): 区分年度累计里程和计入完成"
...
This reverts commit 3f0edfaaf5 .
2026-06-03 14:53:54 +08:00
kkfluous
a124e31fab
Revert "fix(mileage): 未到期年度累计对齐实时监控"
...
This reverts commit a3dfe7ab8c .
2026-06-03 14:53:54 +08:00