LearnNewsExamplesServices
Frontmatter
id18314
titleUnify Dock and Neural Link undo on the group cursor
stateClosed
labels
enhancementaitestingarchitecturecoredashboard
assigneesneo-opus-ada, neo-gpt, neo-gpt-emmy
createdAtSep 4, 2026, 8:17 PM
updatedAtSep 23, 2026, 1:27 AM
githubUrlhttps://github.com/neomjs/neo/issues/18314
authorneo-gpt
commentsCount7
parentIssue18303
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 18312 Commit multi-workspace dock transactions atomically, [x] 18310 Add immutable per-group transaction history and cursor, [x] 18309 Bind transaction groups across window generations, [x] 18308 Hard-cut dock topology persistence to keyed workspace records
blocking[x] 18316 Add Workstation multi-window undo, redo, save, and reload
closedAtSep 23, 2026, 1:27 AM

Unify Dock and Neural Link undo on the group cursor

Closed v13.2.0/archive-v13-2-0-chunk-19 enhancementaitestingarchitecturecoredashboard
neo-gpt
neo-gpt commented on Sep 4, 2026, 8:17 PM

Reopened 2026-09-22 for original AC-2. The merged Group source and agent/human cursor work remains delivered. The open boundary is deployed Neural Link undo/redo/list/save/replay with a real groupId; direct-service tests and one agent-write arm do not exercise that transport. Closeout evidence.

Context

The Engine already exposes Neural Link begin/commit/undo/redo through a private TransactionService keyed by writer/session, while ordinary dock UI gestures bypass it. DockService#buildDockReverse creates one-holder snapshots and a second dock-side undo authority. D#18224 resolved that these must be migrated, not supplemented.

The Problem

Two histories over one heap disagree under interleaving: writer A can undo an older whole-document snapshot over a newer human B mutation. A Group cursor must reverse B before A regardless of origin. Deleting the whole legacy sessions map in the first dock increment would also break non-dock commands before their compensation path exists.

The Architectural Reality

All dock origins—human gesture, Workstation action, Neural Link dock operation, restore—target one Group. Neural Link commands select a Group and operate its latest cursor, not one writer's private latest entry. Non-dock command execution remains on the legacy service until migrated; mixed batches are refused.

The Fix

Route dock begin/commit/undo/redo/list/save/replay into manager.Transaction; delete DockService#buildDockReverse and dock-side recordUndo; preserve non-dock sessions temporarily; return structured Group/cursor results through the existing tool surface. The delivered cut must be net-negative across replaced undo code.

Ordinary popup admission

The all-dock-origin cut includes ordinary tear-out birth: admit a full Workspace and its semantic document through the Group claim before the first committed pop-out, then record that transition through the same Group history. A documentless reservation is provisional native-window admission only; it must not survive as the committed popup representation. Preserve the live pane subtree, compensate failed admission, and delete the replaced bare-vessel document/promotion ownership in the same cut. Placement consumes the admitted document in #18313; the complete user journey is proved in #18316. This supplies #18311's already-planned popup-as-Workspace prerequisite without changing its extraction scope.

Accepted Group lifecycle boundary

Per D#18150 step 3 and its terminal mapping, this leaf accepts admissions, connection cache, vessel ownership and retirement directly into the settled Group. The tearOutAdmissions, tearOutConnects, tearOutPanes and tearOutRetirements state and corresponding lifecycle methods must leave Workspace with their teardown; forwarding wrappers or a renamed intermediate dock owner do not discharge the cut. #18311 retains pane-handoff choreography and the native identity witness. Transaction stays generic, with dock participant and native effect seams supplied by its consumers. Accepted by @neo-gpt as #18314 owner; implementation remains open until the deletion and behavior are proved.

The same cut owns the remaining Workstation vesselWorkspaces owner-lookup consolidation against Group participant identity, as required by #18318 AC-4. Full popup documents already alias their Workspace owner; the remaining lookup must not become a second participant-membership authority. Euclid retains final consumer integration alongside Emmy's NativeLifecycle contribution. This is accepted work, not a completed acceptance claim.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
dock undo authority D#18224 criterion 7 one Group cursor across all writers missing Group fails closed Neural Link docs/JSDoc agent/human interleave arm
NL commands current TransactionService tools target Group, report Group cursor/history non-dock commands retain old path tool docs exact tool contract tests
dock reverse builder current DockService deleted none source cleanup zero-call/zero-symbol census
mixed batch first-increment constraint rejected before partial replay structured refusal docs mixed red control

Decision Record impact

Depends on amended ADR 0029 and the Group transaction contract.

Decision Record

No new ADR; this is the authority migration required by #18303.

Discussion Criteria Mapping

Owns criterion 7 and criterion 3's deletion ledger for the undo surface.

Acceptance Criteria

  • Every dock-origin transaction enters the Group history; ordinary human gestures no longer bypass recording.
  • Neural Link dock undo/redo/list/save/replay resolve a Group and operate its shared cursor.
  • Agent A dock, human B mutation, undo twice reverses B then A through exactly one authoritative history.
  • DockService#buildDockReverse and dock-side recordUndo are deleted with no parallel compatibility path.
  • Non-dock command execution remains functional on the legacy service until its own migration; mixed dock/non-dock batches refuse before any partial replay.
  • Structured refusals propagate without being treated as successful effects.
  • The PR records a net-negative source deletion ledger for the replaced dock undo paths.

Out of Scope

Migrating every non-dock command, Workstation button styling, or cross-Group undo.

Avoided Traps

No second adapter history; no writer-private cursor; no wholesale sessions-map deletion; no partial mixed replay; no close-target overclaim for non-dock migration.

Related

Part of #18303. Blocked by immutable history and atomic commit.

Origin Session ID: 01a06b6d-3323-7fa0-a10b-bbc4871c8780

Retrieval Hint: D18224 one undo authority DockService buildDockReverse TransactionService Group cursor

Creation freshness: live latest-open and all-status A2A sweeps found no equivalent authority-migration leaf.

tobiu cross-referenced by PR #340 on Sep 6, 2026, 1:32 PM
tobiu referenced in commit 5d11053 - "docs(dock): state the Workspace facade contract and guard its two-way import rule (#18318) (#18385) on Sep 6, 2026, 4:00 PM
tobiu referenced in commit 3a0773c - "feat(dock): unify popup ownership and the Group undo cursor (#18314) (#18383) on Sep 6, 2026, 8:03 PM
tobiu closed this issue on Sep 6, 2026, 8:03 PM
tobiu referenced in commit e40bfa8 - "fix(dashboard): DemoB withdraws both native sources when it is destroyed (#18314) (#18386) on Sep 6, 2026, 9:13 PM
tobiu referenced in commit 8560d22 - "test(dock): prove deployed Group transaction tools (#18314) (#19063)" on Sep 23, 2026, 1:27 AM
tobiu closed this issue on Sep 23, 2026, 1:27 AM