Skip to content

fix(tui): route all ACP tools through ClientToolCell, fix rendering bugs#420

Merged
CSRessel merged 5 commits intomainfrom
fix-edit-cell-indentation
Apr 5, 2026
Merged

fix(tui): route all ACP tools through ClientToolCell, fix rendering bugs#420
CSRessel merged 5 commits intomainfrom
fix-edit-cell-indentation

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

@CSRessel CSRessel commented Apr 5, 2026

Summary

🤖 Generated with Nori

  • Fix Read/Search rendering: Auto-detect as "Explored" in display_lines via is_exploring_snapshot() instead of falling to generic "Tool [completed]" format
  • Fix transcript formatting: Execute tools use shell-style $ command in transcript_lines; exploring cells use "Explored" format (previously swapped)
  • Simplify dispatch: All ACP tool kinds route through ClientToolCell natively, removing the exec-like adaptation path that converted Read/Search into fake ExecCommandBegin/End events (-29 lines net)

Test Plan

  • 4 new unit tests covering the three bugs + regression guard
  • 1198 unit tests pass
  • 10 E2E ACP tool call tests pass
  • Clippy and rustfmt clean

Share Nori with your team: https://www.npmjs.com/package/nori-skillsets

CSRessel and others added 5 commits April 5, 2026 11:56
ClientToolCell::render_edit_lines was applying prefix_lines on diff
content that create_diff_summary already indented, producing 8-space
indent instead of 4. Unified Move/Edit/Delete header promotion and
removed the redundant wrapping.
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
Read/Search tools now auto-detect as exploring in display_lines via
is_exploring_snapshot(), rendering as "Explored" instead of falling to
the generic "Tool [completed]" format. Execute tools get a dedicated
transcript renderer using shell-style "$ command" format. The exec-like
adaptation path that converted Read/Search into fake ExecCommandBegin/End
events is removed (-29 lines net).
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
- Collapse handle_client_tool_snapshot wrapper into single method
- Merge second impl ClientToolCell block into the first
- Use .dim() Stylize helper instead of Style::default().add_modifier()
- Add comment explaining why all merged exploring call_ids are tracked
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
The ACP protocol sends tool_call events in two phases: first a pending
event with title "Read File" and no path, then a tool_call_update with
the real path/query. apply_snapshot was updating the primary snapshot
but not the exploring_snapshots vec, so exploring cells displayed stale
titles like "Read Read File" instead of "Read hello.txt".

- apply_snapshot now propagates updates into exploring_snapshots
- Deferred completed_client_tool_calls tracking from merge-time to
  flush-time (via flush_active_cell) so non-terminal updates aren't
  blocked
- flush_active_cell tracks all exploring group call_ids on flush
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
@CSRessel CSRessel merged commit 3eed63b into main Apr 5, 2026
3 checks passed
@CSRessel CSRessel deleted the fix-edit-cell-indentation branch April 5, 2026 19:47
CSRessel added a commit that referenced this pull request Apr 5, 2026
…nding

Replace the dead `task_complete_pending: bool` field with
`session_phase: SessionPhaseView` on ChatWidget. The phase is updated
from TurnLifecycle events:
- Started → Prompt
- Completed → Idle
- Cancelling → Cancelling
- Aborted/finalize_turn → Idle

This is the first step toward removing the duplicated turn-state
tracking between TUI and backend. The old `is_task_running` flag on
BottomPane remains for now (it controls UI rendering details); the new
`session_phase` field is the backend-authoritative source of truth.

Also fix owner_request_id in 5 ToolSnapshot constructors from #420 merge.
🤖 Generated with [Nori](https://noriagentic.com)

Co-Authored-By: Nori <contact@tilework.tech>
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