Commit Graph

176 Commits

Author SHA1 Message Date
caoqianming bc8b5a24ab fix(feeder): render units in app-config panel, remove from platform-config
- Delete feeder source-panel override (units no longer in platform config)
- Extract buildUnitCard() and render to both unitList and unitConfigList
- Guard null DOM refs for removed unit buttons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:31:10 +08:00
caoqianming 63cf3d8c67 docs: update API doc references for per-app split
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:20:29 +08:00
caoqianming cea7726106 feat(ops): register log and doc routes from shared core
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:19:21 +08:00
caoqianming b651b6af66 refactor(core): move doc handler to core and split API.md per app
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:18:51 +08:00
caoqianming 4761e88c81 refactor(core): move log handler to shared platform core
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 13:36:26 +08:00
caoqianming 9955498e24 feat(feeder): add three-tab UI (ops / app-config / platform-config)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 13:34:18 +08:00
caoqianming c961fc0298 refactor(web): create feeder overrides for unit-dependent pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 13:32:43 +08:00
caoqianming 7ff40c1aa3 refactor(web): remove unit references from core HTML pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 13:32:02 +08:00
caoqianming 837e648b7d docs: update README for workspace and web split layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:41:47 +08:00
caoqianming a3bc280c0f chore: remove obsolete root src/ (migrated to crates)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:36:27 +08:00
caoqianming 797e96cbb5 refactor(ops): add ops web scaffold and update router for split dirs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:33:30 +08:00
caoqianming f9f9915012 refactor(feeder): update static file serving for split web dirs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:21:17 +08:00
caoqianming 9bbbb82459 refactor(web): move feeder HTML, JS, and index into web/feeder
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:17:51 +08:00
caoqianming 8cea26cb07 refactor(web): move shared HTML partials and CSS into web/core
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:15:14 +08:00
caoqianming 56e404555b refactor(web): split modals into core and feeder unit-modal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:12:10 +08:00
caoqianming c3037e52cf docs(code): clean garbled rust comments 2026-04-16 15:40:28 +08:00
caoqianming 60452f9065 test(workspace): verify dual-app release builds 2026-04-16 13:17:41 +08:00
caoqianming 3cc13ccf1e feat(ops): add operation-system app skeleton 2026-04-16 12:59:31 +08:00
caoqianming c562bcc10b feat(feeder): create dedicated feeder distributor app crate 2026-04-16 12:38:58 +08:00
caoqianming 9a3d1f5ebb refactor(core): move websocket runtime and command infrastructure 2026-04-16 11:16:56 +08:00
caoqianming de1879bbf2 refactor(events): add shared event envelopes with namespaces 2026-04-16 09:52:31 +08:00
caoqianming 7d83cf27dd fix(feeder): restore downstream wiring after shared-core extraction 2026-04-16 08:38:47 +08:00
caoqianming 3d18a65c7d refactor(core): move platform data and connection modules 2026-04-16 08:23:49 +08:00
caoqianming 6b3c52e45e refactor(core): finish model import cleanup 2026-04-15 16:20:53 +08:00
caoqianming a1e2536844 refactor(core): complete model and util move 2026-04-15 16:08:58 +08:00
caoqianming b34c898089 refactor(core): move model and util modules into shared crate 2026-04-15 13:14:24 +08:00
caoqianming cf26a1f319 feat(core): add shared platform skeleton 2026-04-15 12:55:52 +08:00
caoqianming 1fdfc4e5fc build(workspace): add dual-app workspace manifests 2026-04-14 16:29:52 +08:00
caoqianming fb6a34a2d9 chore(git): ignore local worktrees directory 2026-04-14 16:00:24 +08:00
caoqianming c472360061 docs(plan): add existing system implementation proposals 2026-04-14 15:56:06 +08:00
caoqianming 87450af171 docs(plan): add dual-app shared-core implementation plan 2026-04-14 15:49:08 +08:00
caoqianming e2a2d4a55e docs(architecture): add dual-app shared-core design 2026-04-14 15:34:24 +08:00
caoqianming 43bbc36106 docs: 一些文档修改 2026-04-01 08:22:34 +08:00
caoqianming 3f517c5f48 feat(app): prevent multiple instances 2026-03-31 10:18:57 +08:00
caoqianming 7a8b0e6ce7 docs(api): document rem_local field and REM control behavior
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:52:21 +08:00
caoqianming 737f32af8f fix(event): rem_recovered as warn with manual restart reminder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:47:44 +08:00
caoqianming 7ae952f93e feat(event): add RemLocal/RemRecovered events for REM-triggered auto-stop
When any equipment's REM signal switches to local mode, fire a dedicated
`unit.rem_local` event (with unit + equipment context) and record it to
the event log. Also fire `unit.rem_recovered` when all REM signals return
to remote. AutoControlStopped is still fired alongside RemLocal when
auto was running at the time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:39:17 +08:00
caoqianming 4227747852 feat(control): stop auto-control and disable buttons when REM goes local
- Add `rem_local: bool` to UnitRuntime; set true when any equipment's
  REM signal is false with good quality
- Engine check_fault_comm: stop auto-control and fire AutoControlStopped
  when any equipment switches to local mode
- Block start-auto when rem_local (backend + error message)
- Frontend: disable Start Auto button in units/ops views when rem_local
- Frontend: disable equipment Start/Stop buttons in config view when
  unit's rem_local is true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 10:30:43 +08:00
caoqianming 1354f89204 db: enforce unique signal_role per equipment on point
Prevents accidentally binding two points with the same role to the
same equipment at the database level.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:14:27 +08:00
caoqianming 45b2317ee8 feat(docs): add README.md button opening shared doc drawer
Reuses the existing API.md drawer for README; switching between
docs reloads content and updates the drawer title. Backend serves
README.md via /api/docs/readme-md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 16:27:51 +08:00
caoqianming c2cac19f7e fix(points): ensure equipment map is loaded before rendering point list
loadPoints() relies on state.equipmentMap to display bound equipment names.
Running it in parallel with loadEquipments() caused a race condition where
points rendered before the map was populated, showing all as "Unbound".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 16:21:57 +08:00
caoqianming c1c70ed7f6 refactor(web): remove topbar equipment filter 2026-03-26 15:33:19 +08:00
caoqianming 656a2a6b36 feat: api文档更新 2026-03-26 13:55:35 +08:00
caoqianming 68b4eec610 fix(logs): follow rotated log files in stream 2026-03-26 13:41:36 +08:00
caoqianming 9f833f3a5e fix(control): refresh unit mappings on config changes 2026-03-26 13:30:14 +08:00
caoqianming dbfa673468 fix(control): validate unit timing configuration 2026-03-26 13:19:10 +08:00
caoqianming 86e651d9ca refactor(sort): order units and equipment by code 2026-03-26 12:57:01 +08:00
caoqianming ad4b0c0680 docs(api): update control section for fault-guard changes
- start-auto now requires fault_locked=false and manual_ack_required=false
- batch-start-auto now also skips units with manual_ack_required
- add manual_ack_required to pre-flight check list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 11:12:00 +08:00
caoqianming ce8383e815 feat(ops): replace signal dots with pills, gate Start/Stop on REM/FLT
Signal indicators are now wider pill badges (40×20px rect) with the role
label (REM/RUN/FLT) embedded inside, replacing the 10px dot+label rows.

Equipment Start/Stop buttons are disabled when:
- auto control is active
- REM = 0 (device in local mode, not accepting remote commands)
- FLT = 1 (fault active)

Button state reacts in real time to WS signal updates via a per-equipment
syncBtns closure registered in state.opsUnitSyncFns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 11:09:23 +08:00
caoqianming 00c16ae3d7 fix(unit): block auto control start when fault is active or unacknowledged
Prevent starting unit auto control while fault_locked or manual_ack_required,
enforcing that faults must be manually acknowledged before resuming automation.
Also disable the Start Auto button in the frontend with descriptive tooltips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 10:54:10 +08:00