Skip to content

feat(控制台): Console P4 操作者双生与配线架界面 - #52

Merged
Dandre126 merged 4 commits into
mainfrom
cursor/console-p4-operator-twin-a9cc
Aug 20, 2026
Merged

feat(控制台): Console P4 操作者双生与配线架界面#52
Dandre126 merged 4 commits into
mainfrom
cursor/console-p4-operator-twin-a9cc

Conversation

@Dandre126

@Dandre126 Dandre126 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Workspace detail now has a read-only operator twin of the line, and the Console page is restyled as a finished one-level family patchbay. Version stays 0.7.8. Do not merge this PR as a release cut.

Why

The operator sitting next to harness CLI needs one page that answers: what is this 开发线 family doing right now, and what one overlay decision should I leave? That is not a second IDE and not a command-center dump.

P4 product

On the existing workspace detail (no new top-level nav; hash stays #w/<alias> and #w/<alias>/family|events|channel):

  • 计划 — Objective wave swimlanes from existing Objectives only. objective_wave fills those lanes; unknown ids do not invent backlog.
  • 里程碑incomplete | complete | repair_required only.
  • 阶段 — eight Task columns in the existing state machine. Click opens the existing Task summary. Live task_status moves a known task only.
  • 谁在跑in_progress tasks: executor, latest dispatch facts, whether a matching board event landed, plus one redacted latest ledger line.
  • Existing family / events / channel / artifacts stay on the same page. ADR 0005 is unchanged: the only POST is family channel decision|contract|ack. Copy actions stay --dry-run without --yes.

Missing or truncated wave / dispatch / board / ledger fail closed. Workspace GET does not create .dyro/events.lock and does not append events.jsonl or ledger in place.

Live merge (P0 + GET floor)

GET already projects the full overlay. The first SSE/poll page is the oldest 50 rows. mergeTwinFromEvents applies only rows newer than GET projected_seq, and only when GET overlay_complete is true. A truncated or missing tail fail-closes to the snapshot. empty_operator_twin defaults overlay_complete false, so a workspace() config fallback cannot treat an unread overlay as complete.

Inverted locks:

  • P0. Inventory capture can succeed while _workspace_config raises. test_workspace_fallback_empty_twin_fail_closes_before_prefix_merge asserts that GET twin is overlay_complete false, then feeds that exact GET data plus a 50-row in_progress/board prefix through renderOperatorTwin + mergeTwinFromEvents. Expect no 谁在跑 / 会审已落下. Goes red if empty_operator_twin keeps overlay_complete: True and _operator_twin returns it unchanged.
  • P1-1. A real overlay with more than 50 rows (early task_statusin_progress + board, inventory done) must put that last seq on workspace()["data"]["operator_twin"]["projected_seq"]. The live harness feeds that exact GET data through twinFromData / renderOperatorTwin and the first 50 events. Expect done, running=[], no 会审已落下.
  • P1-2. After a truncated events.jsonl, project_operator_twin and workspace() must report overlay_complete is False. The live case uses only twinFromData + renderOperatorTwin (no harness restubs) then mergeTwinFromEvents of the prefix page.

Token plan

Implemented from this palette (also in styles.css):

Token Hex Role
--bay #141A1F page well
--chassis #1E272E raised plate
--plate #2A343C inset jack
--ticket #E4DDD0 instrument label
--mute #8E9388 oxidized legend
--filament #C9864A live copper thread only

Type: ui-serif nameplates, ui-sans-serif body, ui-monospace IDs/CLI. Layout: overview is a quiet strip; workspace is a room with the family bay in camera focus, the twin as the now-reading, and inventory/proofs receded. Signature: one-level family graph as a living patchbay. One motion: edge light on merge/sync (and a brief wave-lane pulse). prefers-reduced-motion turns the filament off.

No three.js, WebGL, npm UI kits, Google fonts, icon CDNs, WebSocket, or service worker. CSP + textContent only. New CSS/JS stay in the wheel manifest with digests.

Tests lock

  • Live prefix cannot undo snapshot 阶段 / 谁在跑 / 会审
  • GET projected_seq is the live floor for a real >50-row overlay
  • Truncated overlay GET is overlay_complete false; prefix merge cannot invent 谁在跑
  • Config-fallback empty twin is overlay_complete false; prefix merge cannot invent 谁在跑
  • board_landed requires a matching board for that task
  • Ghost objective_wave does not invent a lane; other-task board does not land
  • Inspection rejects plan ids not in objectives and running rows not in in_progress
  • Workspace GET does not change events.jsonl or ledger hashes
  • Ledger drops blocked keys even when values are safe tokens
  • Assets ban WebSocket / serviceWorker / webgl (case-insensitive)
  • Live tablist is exactly family|events|channel
  • Family badges still say 未检查, never 干净 / 远端已绑定
  • Copyable CLI has --dry-run and never --yes

CHANGELOG is under Unreleased only. Not merge-ready as a release cut.

Open in Web Open in Cursor 

Workspace detail projects a fail-closed operator twin (计划 / 里程碑 /
阶段 / 谁在跑) and restyles the page as a one-level family patchbay.
Version stays 0.7.8.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dyro Error Error Aug 20, 2026 11:08pm
dyro-engineering-flow Error Error Aug 20, 2026 11:08pm

@Dandre126
Dandre126 marked this pull request as ready for review August 20, 2026 22:23
Live ingest no longer replays an events prefix over the GET snapshot.
Inspection binds twin rows to inventory. Tests invert each P0/P1 polarity.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
Lock GET projected_seq and overlay_complete onto the first live page
with inverted tests: a real >50-row overlay must supply the merge floor,
and a truncated GET must fail-close before prefix merge.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
workspace() config fallback returned empty_operator_twin unchanged
with overlay_complete true, so a live prefix could invent 谁在跑
and 会审已落下. Default the empty twin fail-closed.

Co-authored-by: Dandre Yang <Dandre126@users.noreply.github.com>
@Dandre126
Dandre126 merged commit 21c7e98 into main Aug 20, 2026
9 of 11 checks passed
@Dandre126
Dandre126 deleted the cursor/console-p4-operator-twin-a9cc branch August 20, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants