Skip to content

feat(tui): render durable task mutation history - #4241

Closed
me2seeks wants to merge 9 commits into
apache:mainfrom
me2seeks:feat/4179-tui-task-mutation-history
Closed

feat(tui): render durable task mutation history#4241
me2seeks wants to merge 9 commits into
apache:mainfrom
me2seeks:feat/4179-tui-task-mutation-history

Conversation

@me2seeks

@me2seeks me2seeks commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • hydrate task_create and task_update cards from the Runtime Host durable Task mutation projection
  • render up to 20 created tasks inline; summarize larger creates in the live TUI and show every item in /transcript
  • keep pagination, history restarts, exact Session/revision validation, stale-request fencing, and immutable-scrollback notices inside the CLI adapter/controller
  • batch correlations by both the 128-item limit and the Host canonical 192 KiB encoded-byte budget
  • return hydration results only after every batch succeeds, so a later failure cannot publish partial Task history

Authority and scope

The TUI does not parse tool-result prose or reconstruct Task history from the current Task snapshot. It consumes the Host-owned immutable presentation keyed by (turnId, toolCallId) and fails closed on Session, revision, correlation, or operation mismatches. task_list and task_get remain unchanged.

This PR depends on #4239. Until #4239 merges, the GitHub diff also contains its Runtime Host protocol commits. The TUI commits are d8d0efa, 4d52b12, and 53593f1 on the current rebased head.

UX

  • 1-20 created tasks: show the complete list at the original tool-call position
  • 21+ created tasks: Added N tasks · /transcript to view full list
  • updates: show the Task key, prior and next status, subject, and durable reason/evidence
  • entries already frozen in terminal scrollback keep their rendered lines and receive one tail notice pointing to /transcript

Verification

  • maka-agent full test suite on latest main: 664 passed, 0 failed
  • focused Task mutation driver tests: 7 passed, including byte-aware start/continue batches and later-batch failure
  • Runtime Host and CLI builds passed
  • lint and format checks passed
  • two independent pre-commit and exact-head reviews: 0 blockers

Part of #4179.

@github-actions github-actions Bot added the effort/XL Over 1000 readable lines label Aug 30, 2026

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found three P1 blockers, one P2, and one P3 on exact head e0e5e4246c45082877c3e36af3e6d8da36dbf179. Two P1s are inherited from dependency PR #4239: the current-main compatibility-epoch collision and rejection of supported nested Code Mode tool-call identifiers. I documented those in the dependency review. The incremental P1 allows durable model-controlled task text to emit terminal control sequences. The incremental P2 repeatedly re-queries immutable history, and the P3 announces that unavailable details are ready. Details and fixes are inline.

I ran 95 focused tests across the TUI hydration/rendering suites, the complete Runtime Host Session driver suite, and the Task mutation protocol/projection suites; all passed. Production-seam probes separately reproduced the nested-ID rejection, preserved OSC-52 bytes in final terminal output, and the contradictory frozen notice. The exact-head test, windows_recovery, and label checks are green. The stack still conflicts with current main at the compatibility epoch, so merge-result validation must wait for the rebase.


Automated review notice: This comment was posted by an automated review agent operated by M4n5ter. It is not an independent human review and does not replace one.

Comment thread packages/cli/src/pi-transcript-tools.ts Outdated
Comment thread packages/cli/src/pi-task-mutation-hydration.ts
Comment thread packages/cli/src/pi-task-mutation-hydration.ts
@me2seeks
me2seeks force-pushed the feat/4179-tui-task-mutation-history branch 2 times, most recently from 6888356 to c2f7561 Compare August 30, 2026 16:10
@me2seeks
me2seeks force-pushed the feat/4179-tui-task-mutation-history branch from c2f7561 to 53593f1 Compare August 30, 2026 16:38
@Astro-Han

Copy link
Copy Markdown
Contributor

Thanks for rebasing and continuing to harden the Task mutation presentation.

Before we spend more review time on the current 3,700-line direction, I think we need to reconcile it with #2290. That RFC has already converged on SessionTodo as a narrow current snapshot and tracks eventual removal of the model-facing task_* tools, mutation-event history, paginated query protocol, claim/settle paths, and the current Task panel.

This PR moves in the opposite direction by adding a new durable Task mutation-history query, continuation contract, global validation, wire batching, and TUI hydration around the authority #2290 intends to retire.

Could we pause this PR until the SessionTodo contract is settled? If a semantic mutation timeline is still needed afterward, it can be designed against the smaller surviving authority rather than extending the current Ledger first. Please push back if #2290’s accepted direction has changed or this history has an independent obligation that survives the migration.

AI-assisted review disclosure: Codex assisted with comparing this exact head against #2290; Astro-Han verified the architectural conflict and owns this position.

@me2seeks

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #4338 and the merged SessionTodo cutover in #4351. This TUI projection depended on #4239 and the retired Task Ledger mutation-history contract; TUI now renders settled SessionTodo tool results from the Host-owned current snapshot.

@me2seeks me2seeks closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants