Commit Graph

188 Commits

Author SHA1 Message Date
caoqianming 093fc5035b docs: add next-steps plan after PlatformContext completion
Four remaining improvements for the dual-app split:
1. Migrate platform handlers (tag/page/source/point/equipment) to core
2. Add event namespace prefixes (platform.*/feeder.*/ops.*)
3. Register platform routes in ops app
4. Ops business logic (pending requirements)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 09:22:26 +08:00
caoqianming 429c2d0b17 refactor(core): fill PlatformContext with pool/connection/websocket
- PlatformContext now holds pool, connection_manager, ws_manager
- bootstrap_platform returns PlatformBuilder for pre-Arc setup
- Feeder AppState embeds PlatformContext (state.platform.pool etc.)
- Ops AppState embeds PlatformContext with real DB connection
- Remove WebSocket type duplication: feeder re-exports from core
- Add subscribe_room/send_to_room/remove_room_if_empty to WebSocketManager

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 09:11:03 +08:00
caoqianming 368faf290a fix(web): restore all web UI files accidentally deleted
The web/core, web/feeder, and web/ops directories were mistakenly
committed as deletions. Restore from f8757a7.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 08:43:02 +08:00
caoqianming 6102ed712f refactor(web): remove legacy feeder/ops/core web files after split
Clean up old web module files that were superseded by the per-app
split architecture. Includes plan documentation for the migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 08:36:32 +08:00
caoqianming f8757a757e i18n(feeder): replace all English UI text with Chinese
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 09:12:15 +08:00
caoqianming 268c5f76af refactor(feeder): remove auto control buttons from unit cards
Start Auto / Stop Auto / Ack Fault belong in the ops view only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 09:04:27 +08:00
caoqianming 01d8418e5c refactor(feeder): remove start/stop buttons from equipment in platform config
Equipment start/stop operations belong in the ops view only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 09:03:35 +08:00
caoqianming 6b9e396044 refactor(feeder): remove batch set-unit from platform config
Batch equipment-unit assignment is now handled via the "选择设备"
modal in app-config. Remove the batch toolbar, checkbox selection,
and related JS/state from the equipment panel in platform config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 09:00:18 +08:00
caoqianming 3a9b52864b fix(feeder): compact card grid for units and equipment selection modal
- Fix unit-config-list grid by increasing specificity over .list flex
- Equipment selection modal uses card grid (auto-fill 150px) instead
  of one-per-line list
- Widen modal to accommodate card grid

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:56:01 +08:00
caoqianming 3e026e1b99 feat(feeder): unit card grid in app-config with equipment selection modal
- Unit cards in app-config use CSS grid (auto-fill 260px min) for
  compact card layout across the full page
- Each card shows bound equipment tags and a "选择设备" button
- Equipment selection modal allows multi-select with checkboxes,
  calls batch set-unit API to bind/unbind, then refreshes
- App-config loads both units and equipments on first switch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:43:59 +08:00
caoqianming 2db9fec081 Revert "feat(feeder): card layout for units in app-config, share equipment panel"
This reverts commit 521ccfb800.
2026-04-20 08:40:14 +08:00
caoqianming 521ccfb800 feat(feeder): card layout for units in app-config, share equipment panel
- Unit cards in app-config use CSS grid with auto-fill columns
- Equipment panel (with batch unit assignment) visible in both
  app-config and platform-config views
- App-config loads both units and equipments on first switch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 08:36:34 +08:00
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