Skip to content

Layered run UI, one-command start, and live-testing fixes, accept DL-011 (+DL-014) - #39

Closed
jimutt wants to merge 6 commits into
feat/dld-goal-ext-loopfrom
feat/dld-goal-ext-ui
Closed

Layered run UI, one-command start, and live-testing fixes, accept DL-011 (+DL-014)#39
jimutt wants to merge 6 commits into
feat/dld-goal-ext-loopfrom
feat/dld-goal-ext-ui

Conversation

@jimutt

@jimutt jimutt commented Aug 25, 2026

Copy link
Copy Markdown
Owner

What

Layered run UI: footer status line, a five-line widget above the editor whose height is invariant across run sizes (unit-tested), transcript cards as entry renderers (TUI-only, outside LLM context), and a board overlay on demand. Surfaces repaint on session_start, turn_end, agent_end, and after every command; they clear when no run is active.

One-command run start: /dld-goal start DL-014..DL-022 expands the range, derives a slug, guards preconditions, creates the run, adds items, and dispatches the first continuation. Positional, flag, and range forms all work. Starting without decisions refuses instead of creating an empty run.

Fixes from live testing and the holistic review: parseStartArgs no longer drops the first positional decision, subdirectory sessions resolve the git root, verification re-runs only on new evidence, dispatch claims the item before sending it, the first failure retries instead of blocking, suspension covers the write path, pause aborts the current turn, and bounds measure active time from the event log rather than wall-clock since creation.

Also: the collision detector no longer flags a branch's own open PR as a collision.

Stacks on #38.

jimutt and others added 6 commits August 21, 2026 23:40
Four surfaces matched to what each costs: a footer status line, a
five-line widget above the editor whose height is invariant across run
sizes (unit-tested), transcript cards as entry renderers (TUI-only,
outside LLM context), and a board overlay on demand. Surfaces repaint on
session_start, turn_end, agent_end, and after every command; they clear
when no run is active.

start now takes decisions directly and tolerates natural syntax:
/dld-goal start DL-014..DL-022 expands the range, derives a slug
(dl-14-22), guards preconditions, creates the run, adds one item per
decision, and dispatches the first continuation. Positional, flag, and
range forms all work. Starting without decisions refuses instead of
creating the empty run the user hit live.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
list-taken-ids scanned open PRs for decision IDs and treated every hit
as taken. A branch with an open PR containing its own decisions — the
normal case after pushing work — collided with itself, and
guard-preconditions refused to start a run on decisions the branch owns.

A PR whose headRefName matches the current branch is now excluded from
the taken set. Verified against the repo that reported it: the same
range that produced nine false collisions now reports none.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
From the holistic review and live testing:

- parseStartArgs no longer drops the first positional decision
- projectRoot resolves the git root so subdirectory sessions see the
  same .dld/ the scripts write to
- onTurnEnd gates on suspension and only re-verifies when new evidence
  arrived, not on every turn while an item sits in verifying
- Dispatch claims the item (implementing) before dispatching so the loop
  is single-threaded; no more re-dispatch livelock
- attempts counts completed attempts without a double bump, so the
  first failure retries instead of blocking immediately (DL-004)
- refreshSurfaces uses the same project root resolution

User-driven:

- Esc suspends the loop instead of watching it restart: an aborted turn
  (stopReason: aborted) clears the pending dispatch and suspends until
  /dld-goal resume. DL-014 amends DL-008.
- /dld-goal pause calls ctx.abort() so pausing mid-turn stops the
  current work, not just the next dispatch.
- Bounds and the status line measure active time from the event log's
  pause/resume markers, not wall-clock since creation. A run resumed
  after a week no longer shows 703m of nothing.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
Moderates from the review:

- Two turn_end handlers merged into one; refreshSurfaces ran twice per turn
- /dld-goal resume runs guard-preconditions.sh resume before flipping
  status, per DL-004
- The dead token first-check dropped; the post-await check is the one
  that does work
- reviewNagged clears on invalidate so a new run's items get their own
  warning
- /dld-goal status renders the board instead of dumping raw state.json
- The board component's unused disposed variable removed

Simplifications:

- stateMutations removed from run-state.ts: no production callers, and
  the only tested delegation layer was the dead one
- cardLines/CardData removed: the loop builds card lines inline, and
  the unused renderer was the worst of both shapes
- The fake's unused surface dropped: registerMessageRenderer,
  registerTool, sendUserMessage, and their recording maps were only
  exercised by the fake's own self-test

docs/plan/goal-loop.md build order updated to reflect Stages 1 and 2
complete.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
…R stack

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
The sandbox proxy blocked 0.84.x, so package.json said ~0.84.2 while
package-lock.json had 0.83.0. npm ci requires them to agree. Pinning to
~0.83.0 keeps the lockfile as the source of truth; the peer range is
"*" so the extension runs against whatever pi version is installed.

Co-Authored-By: Claude Opus 5 <noreply@pi.dev>
Generated-By: pi 0.84.2
@jimutt

jimutt commented Aug 25, 2026

Copy link
Copy Markdown
Owner Author

Superseded by feat/pi-harness-extension — all commits from this branch are merged there. See #41 for the findings log on top.

@jimutt jimutt closed this Aug 25, 2026
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.

1 participant