Project task text and tool folders from the shared client views

Merged
VA
1d ago
+5538-9328

Problem

Native composition still used the temporary TaskFileViews/task_compat renderer and a second client session/journal, while the browser read followed ClientViews. Task text, tool files and command history had separate representations. Replayed command answers could hide tool rows, and retaining prompt/UI files in the answer window could exhaust display capacity.

Design

Native task, UI-session and document snapshot/follows feed the same ClientViews file index used by WasmClientViews. TaskQueryView and ToolQueryView borrow accepted files and shared segments. Markdown consumes new bytes, preserves text/reasoning/stdout/stderr boundaries, resets between turns/outcomes, and invalidates replaced sources or changed retained prefixes.

Immutable command outcomes have one ordering index containing sequence/task metadata, with no retained text/error payload. Plain text borrows its canonical file; JSON escape decoding is transient. Native and WASM use this ordered projection, including full-width sequences and exact file identity for ties.

Answer rows and tool rows have independent presentation caches. Archiving an answer suppresses only duplicate task text; headings/output remain visible. Screen borrows the tool tail directly. Find now consumes TranscriptRows, a borrowed composition of those same wrapping caches, for counting, navigation, viewport selection and painting. Contiguous slices retain the existing search fast path; matches crossing the answer/tool boundary use the same prefix matcher without flattening either cache.

Tool stdout/stderr have one rendering source: stream files, with a shared 20-source-line bound before Markdown parsing. Result metadata supplies status/exit code, never a second output echo. Nonstreaming fallback is bounded and retires on stream admission. Goal/plan render caches share file descriptors and rebuild only when their files change.

Decisions

  • Signed head d6ee99a7eb39718d06d9b1ca2f0d992e6762628e includes main 2eb8a99a3aa05d8ad131c3fa6f0cb6aa1f298d87 (#912 and #934) through a signed merge. Preserve main's search, thinking indicator, visible-row work, child-agent runtime, requester attribution and model-checking feature union. Deleted compatibility/journal modules remain deleted. Public FileValue::new constructs external fixtures without exposing requester metadata. No rebase or force push.
  • The defect class behind the saved-history failure was conflating per-file admission with total retained display. PerFileByteLimit and DisplayWindowBudget are distinct types. The answer selection retains command outcomes only; history, drafts, catalogs and UI files have their own live queries and never compete for answer capacity. Archive clearing reads CommandSession's existing layout query. Snapshot and follow use the same bounded selection and retirement cursor.
  • Filesystem authorization remains with FileQuerySource. File mutation and folding stay together when selecting push sources, so cancellation cannot consume a publication without exposing it to views. Renderer caches are disposable; no additional canonical or persisted state is introduced. Cache identity includes typed authority and the accepted file cut.
  • Durable request recovery remains FileClient's platform-backed outbox and cursors. Local execution remains LocalHarness. This adds no store, socket, gateway, protocol or server surface.
  • Pure renderer fixtures use one snapshot constructor with no I/O/executor entry. Integration scenarios retain real provider snapshot/follows. Workspace-lineage fixtures use ordinary turn admission after main changed /delegate to file-driven agent admission; main's separate child-agent lifecycle scenarios were also qualified. No legacy result field or lifecycle fallback is restored.
  • Portable command-outcome tests exercise CommandOutputView/settled instead of the native-only completion helper. Both serde rejection and semantic rejection remain covered, including malformed enum tags.

Deletions

Delete TaskFileViews, task_compat, TaskProjection, DocumentViews, the legacy client/session/transport/filesystem journal, their exclusive format/model tests and two obsolete fuzz targets. Repoint native rendering and tests to ordinary file publications. The remaining file/query recovery suites exercise the shared production path. No compatibility export or second persisted transcript remains; native and WASM followed-handle assertions cover the shared projections. No README changes.

Against included main2eb8a99a3: +5,529/-9,309, net -3,780 lines across 152 files. The standalone TUI fuzz lockfile is reconciled with main's dependency graph: 23 required packages added, no existing package versions replaced.

Tests

Current main merge (signed pushed d6ee99a7e), through bs.ps1: only formatting conflicts were resolved. Main sorted legacy imports in GraphCoder's execution_feedback.rs and presentation.rs; keep the migrated imports and test bodies. Main formatted one assertion in deleted client_session.rs; keep it deleted. No behavior or test assertion changes. Focused build of the GraphCoder test binary passed7m06s; the3presentation tests passed .07s and1execution-feedback property passed .06s. Windows GNU harness/harness-tui/GraphCoder --lib --tests check passed44.14s (64.2s whole job). Scripts: gc-client-823-format-build.sh, format-tests.sh, tail-windows.sh. Per the user's narrowed gate, no140/183suite, default-feature proof or fuzz rerun. Clean tree; no active or queued lane job. Stopped after push and recording results; no CI wait or additional merge.

Previous review delta at1e4f46a46, all through bs.ps1:

  • 140 focused tests passed, every suite under one second: renderer39 .49s; native-input6 .01s; composed-row properties/controls6 .02s; search43 .58s; wrapping4 .03s; screen work4 .01s; screen integration14 .01s; search integration13 .05s; portable outcomes11 .07s.
  • Canonical native test build: 9m31s, then built binaries reused. Source/search/render tests passed before the #934 merge; their production sources are unchanged by that merge. The final portable malformed-input assertion was tested in the default-feature build below. No full183 rerun for these two findings.
  • Requested cargo test --locked -p acyclic-harness --lib --no-run with default features: passed4m39s after merging #934; all11 output tests then passed from that binary.
  • Merged-tree Windows GNU harness/GraphCoder/harness-tui --lib --tests check passed37.02s (75.6s whole job). Existing main warnings remain. The last commit only updates the independent fuzz lockfile.
  • Pinned nightly-2026-07-01 ASAN transcript_search: 407 runs in4s, all7 checked-in seeds including the answer/tool Unicode seam. Fuzz build passed12.52s; final minimal lock reconciliation/build passed2.15s without changing the tested source or existing dependency versions.

Shrinking properties compare match count/order and complete painted symbols with an independently joined Unicode source. Real TaskFileClient scenarios cover tool details, tool-only matches, next/previous navigation, highlighting and reopen. Omitted-tool controls fail the same checks. Borrowing the source asserts exactly zero allocations; a retained-row copy control fails it. Existing search slice/memory/work bounds and negative controls pass. Completion/replay uses the real task+text outcome shape and retains tools; exact counters and independent differential fixtures reject whole-task hiding and repeated tool-tail copies. Budget properties cover full prompt history, drafts, UI writes/removals and independently varying answer retention, with the shared-budget control.

Commands: Q:/lanes/gc-client-823-find-build.sh (--no-run), find-tests.sh (built source/search/screen groups), find-render-tests.sh (unchanged built render/input groups), default-build.sh, tail-windows.sh, find-fuzz-build.sh and find-fuzz-run.sh, all prefixed gc-client-823-. Canonical features remain tui,terminal,filesystem-local,native-execution,grpc,test-support,model-checking,search-http; combined packages prefix these with acyclic-harness/. Default-feature proof is the explicit additional user-requested configuration. No bootstrap or incremental override.

Earlier broader migration checks remain scoped to their heads:183focused tests plus3child-agent tests passed at12be5bf12;430tests across27suites and ui_prompt ASAN250runs/4s passed at55c5a6d8f. Shipping WASM/package gates were not repeated for this native review delta; previous followed parity, contracts, TS/types, Chromium attach/reconnect and installed-package gates are recorded in the PR history. No current-head shipping qualification is implied.

Follow-ups

Execution writers must publish per-step completion/usage files before claiming complete live usage totals. Reuse Bash's canonical request/stdout/stderr/result publication for other adapters. Bind attention publication and per-consumer durable delivery progress to notification files from #828. Finish fs-publication-driven diff integration. These remaining lane items are handed to Claude in Q:/lanes/handoff-gc-client.md; this PR does not introduce another representation for them.