fix(tool-rendering): honor native output padding #18

Merged
eleith merged 2 commits from fix/tool-rendering-output-padding into main 2026-11-05 20:22:11 +00:00

Summary

  • Apply public context.outputPad to shared self-shell tool frames via native Text.setPaddingX.
  • Match native narrow-terminal padding clamping before measuring/wrapping, retaining the 210-column content cap with margins outside it.
  • Invalidate layout when padding changes, including rows whose capped paint width is unchanged; preserve stable redraw caches.
  • Reuse the existing clipping-marker fallback when a raw painter (such as bash command chrome) contains wide glyphs in a one-column content area.
  • Include patch changesets for tool-rendering, web-fetch, and web-search-codex; document the shared frame contract.

Validation

  • Full suite: 76 files / 1,458 tests passed.
  • Typecheck, lint, repository formatting, whitespace checks, and all nine extension builds passed.
  • Shared tests cover 0/1 margins, painter widths, resize, cache invalidation, Unicode, narrow terminals, and the content cap.
  • Real SDK ToolExecutionComponent tests exercise default padding and live 1→0→1 changes across all seven built-ins, including errors.
  • Web-fetch, batch, and search tests cover headers, compact/expanded results, search errors, content-width alignment, bounds, and immutable results.
  • Validation used installed Pi 1.5; minimum Pi runtime compatibility and live terminal interaction were not exercised.

Reviews

Independent code, readability, and test reviews are clear. Readability suggestions were applied by extracting the SDK padding matrix into a file-local helper and naming configuration decisions before construction. Final checks passed after those changes.

The user-approved simplification of extensions/tool-rendering/README.md is included as a separate docs-only commit; README formatting and staged whitespace checks passed. No extension-specific padding setting, execution change, or unrelated cache cleanup is included.

## Summary - Apply public `context.outputPad` to shared self-shell tool frames via native `Text.setPaddingX`. - Match native narrow-terminal padding clamping before measuring/wrapping, retaining the 210-column content cap with margins outside it. - Invalidate layout when padding changes, including rows whose capped paint width is unchanged; preserve stable redraw caches. - Reuse the existing clipping-marker fallback when a raw painter (such as bash command chrome) contains wide glyphs in a one-column content area. - Include patch changesets for tool-rendering, web-fetch, and web-search-codex; document the shared frame contract. ## Validation - Full suite: 76 files / 1,458 tests passed. - Typecheck, lint, repository formatting, whitespace checks, and all nine extension builds passed. - Shared tests cover 0/1 margins, painter widths, resize, cache invalidation, Unicode, narrow terminals, and the content cap. - Real SDK `ToolExecutionComponent` tests exercise default padding and live 1→0→1 changes across all seven built-ins, including errors. - Web-fetch, batch, and search tests cover headers, compact/expanded results, search errors, content-width alignment, bounds, and immutable results. - Validation used installed Pi 1.5; minimum Pi runtime compatibility and live terminal interaction were not exercised. ## Reviews Independent code, readability, and test reviews are clear. Readability suggestions were applied by extracting the SDK padding matrix into a file-local helper and naming configuration decisions before construction. Final checks passed after those changes. The user-approved simplification of `extensions/tool-rendering/README.md` is included as a separate docs-only commit; README formatting and staged whitespace checks passed. No extension-specific padding setting, execution change, or unrelated cache cleanup is included.
eleith-gitea-agent Bot added 1 commit 2026-11-05 20:16:47 +00:00
fix(tool-rendering): honor native output padding
ci/woodpecker/pr/web-fetch Pipeline is pending
ci/woodpecker/pr/web-search-codex Pipeline is pending
ci/woodpecker/pr/welcome Pipeline is pending
ci/woodpecker/pr/codex Pipeline was successful
ci/woodpecker/pr/compact-editor-chrome Pipeline was successful
ci/woodpecker/pr/notifications Pipeline was successful
ci/woodpecker/pr/progress Pipeline was successful
ci/woodpecker/pr/title-status Pipeline was successful
ci/woodpecker/pr/tool-rendering Pipeline was canceled
40de6afac0
eleith added 1 commit 2026-11-05 20:18:34 +00:00
docs(tool-rendering): simplify usage notes
ci/woodpecker/pr/codex Pipeline was successful
ci/woodpecker/pr/compact-editor-chrome Pipeline was successful
ci/woodpecker/pr/notifications Pipeline was successful
ci/woodpecker/pr/progress Pipeline was successful
ci/woodpecker/pr/title-status Pipeline was successful
ci/woodpecker/pr/tool-rendering Pipeline was successful
ci/woodpecker/pr/web-fetch Pipeline was successful
ci/woodpecker/pr/web-search-codex Pipeline was successful
ci/woodpecker/pr/welcome Pipeline was successful
ci/woodpecker/push/codex Pipeline was successful
ci/woodpecker/push/compact-editor-chrome Pipeline was successful
ci/woodpecker/push/notifications Pipeline was successful
ci/woodpecker/push/progress Pipeline was successful
ci/woodpecker/push/title-status Pipeline was successful
ci/woodpecker/push/tool-rendering Pipeline was successful
ci/woodpecker/push/web-fetch Pipeline was successful
ci/woodpecker/push/web-search-codex Pipeline was successful
ci/woodpecker/push/welcome Pipeline was successful
c44a952fd1
eleith merged commit c44a952fd1 into main 2026-11-05 20:22:11 +00:00
eleith deleted branch fix/tool-rendering-output-padding 2026-11-05 20:22:11 +00:00
Sign in to join this conversation.