Skip to content

fix(tui): improve tool details and image paste - #378

Merged
Haz3-jolt merged 2 commits into
Observal:mainfrom
Haz3-jolt:fix/tui-pi-parity
Sep 5, 2026
Merged

fix(tui): improve tool details and image paste#378
Haz3-jolt merged 2 commits into
Observal:mainfrom
Haz3-jolt:fix/tui-pi-parity

Conversation

@Haz3-jolt

@Haz3-jolt Haz3-jolt commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Purpose

Make tool-heavy terminal sessions easier to follow and make image attachment workflows discoverable. This also adds the requested Pi-style clipboard-to-temp-file workflow and the initial tips.json catalog.

Draft pending attached UI screenshots and remaining native-platform verification.

Fixes

Fixes #33
Fixes #35
Fixes #36

Issue #34 is deferred to #380. The scroll-specific changes and tests have been removed from this PR, with the findings and recovery patches retained locally.

Approach

  • Group consecutive tool calls in compact mode with lifecycle counts, recent targets, and expansion hints. Fullscreen clicks toggle one group; Ctrl+O controls global details. Dragging still selects text.
  • Bound and sanitize oversized tool-input previews by characters and wrapped rows. Expanded views have a larger preview budget, with /export retaining access to complete canonical inputs.
  • Show /attach clear beside pending attachments. Ctrl+V saves clipboard images to exclusively created, owner-only temporary files and inserts their paths into the draft. Referenced images upload through the existing SDK blob channel on submission; removing a path omits its image. Failed imports restore the draft.
  • Use operating-system clipboard helpers without new production dependencies. Keep temporary images available for reuse and preserve the existing 20 MiB attachment limit.
  • Use the installed TypeScript parser in the boundary checker so embedded JXA ObjC.import calls are not mistaken for package imports. Existing dependency restrictions remain enforced.
  • Add regression coverage, documentation, changelog entries, SPDX coverage, and the initial clipboard tip.

No wire or canonical-event schema changes. The daemon still owns session state and blob persistence. No sandbox access to host temporary files is granted to model-selected tools.

How was this tested?

Checks rerun after removing #34

  • node --test --test-timeout=30000 packages/sdk/test/projector.test.ts packages/tui/test/app.test.ts packages/tui/test/fullscreen.test.ts packages/tui/test/media.test.ts: 62 passed.
  • pnpm check: passed formatting, lint, type checking, build, tests, package boundaries, and generated-file verification. 521 passed, 8 platform-gated skips.
  • git diff --cached --check: passed.
  • node scripts/check-dco.ts 88944a2ea3a557c5d3f5b4b74111eb18ae3138b1 HEAD: passed for both signed commits.
  • uvx --from reuse==6.2.0 reuse lint: the working-directory run reported five pre-existing untracked scratch files without SPDX metadata. Those files were left untouched. The same command against an export of the exact staged Git tree passed with 312/312 files covered.

The long-session benchmark was not rerun. Its earlier passing measurements depended on the now-deferred SDK history-copy optimization and are not claimed for this trimmed PR.

Live built Axl verification

The retained scope was retested through the built CLI in a real pseudo-terminal, using Azure gpt-5.6-luna and a Bubblewrap-enforced daemon on Linux with Node.js 24.19.0:

  • node /tmp/axl-issue34-retained-live.mjs: passed attachment-removal hints and clearing, four real read calls, compact tool grouping, per-group click expansion/collapse, and Ctrl+O. All four calls had successful canonical results.
  • node /tmp/axl-pi-parity-large-replay.mjs: passed a live replay of the earlier real canonical oversized call at 40 columns. Its 2,486-character input rendered in 47 tool rows with a preview/export hint, without changing canonical input.

The unchanged clipboard workflow was previously verified with node /tmp/axl-clipboard-live-smoke.mjs: a user-provided screenshot became a 0600 temp file and matching blob, and the real model replied IMAGE_RECEIVED without needing host /tmp tool access. This private-clipboard test was not repeated for the scope reduction.

Remaining gaps

No dependencies or lockfile entries changed, so the lockfile audit was not rerun.

Learning

Pi is a read-only behavioral reference, not a source dependency. The implementations are independent and retain Axl's daemon, SDK, sandbox, and canonical-log boundaries.

  • Compared collapsed details and expansion controls with Pi 0.85.0.
  • Cross-checked the supplied Pi checkout at 6c87d9a026677b601e8278030dcf1ad97fe0bd86, which reports version 0.84.3, for clipboard-to-path behavior.
  • Axl intentionally adds consecutive-call grouping and stricter input bounds beyond the referenced Pi behavior.

Checklist

  • I reviewed the complete diff.
  • I added or updated the smallest relevant test for behavior changes.
  • I ran the relevant formatting, lint, type-check, test, boundary, and license checks.
  • Every new file has SPDX metadata, directly or through REUSE.toml.
  • Every commit has a matching DCO Signed-off-by trailer.
  • User-visible changes update CHANGELOG.md.
  • UI changes include screenshots attached to the pull request, not committed to the repository.

AI assistance

  • Generative AI materially assisted this change. Tool and model/version: Pi coding agent 0.85.0; gpt-6-astra via azure-openai-responses.
  • I manually reviewed, understood, and tested the generated work.

Signed-off-by: Hari Srinivasan <harisrini21@gmail.com>
Signed-off-by: Hari Srinivasan <harisrini21@gmail.com>
@Haz3-jolt Haz3-jolt changed the title fix(tui): improve tool details, scrolling, and image paste fix(tui): improve tool details and image paste Sep 5, 2026
@Haz3-jolt
Haz3-jolt marked this pull request as ready for review September 5, 2026 14:03
@Haz3-jolt
Haz3-jolt merged commit 916746b into Observal:main Sep 5, 2026
10 checks passed
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.

Bound rendering of oversized tool-call inputs Make pending attachment removal discoverable Reduce transcript noise from consecutive tool calls

1 participant