# Changelog

Notable changes to `pi-split-view`. Versioning is [SemVer](https://semver.org/).

## [1.4.0] — 2026-11-03

### Added

- `thinkingScope` config key, toggled with `/split-thinking-scope [turn|session]` (default
  `session`, the existing accumulate-everything behaviour). `turn` makes the Thinking panel
  carry only the current turn's reasoning: a new user message clears the panel's buffer, so it
  no longer fills up with the reasoning of every earlier turn; the text itself still lives in
  the transcript. An interrupted turn used to leave a dangling
  streamed block behind, which the next `thinking.start()` then pushed into the history —
  that residue is dropped along with the rest of the turn. `/split-save` persists the scope, and
  a resumed or branch-switched session reconstructs the same slice instead of every turn.

### Fixed

- Scrolling the Thinking panel away from the end no longer slides under you while reasoning
  streams. The panel body rebuilt a newest-`MAX_BODY_ROWS` window on every 50 ms flush, so a
  fixed scroll offset resolved to different text each time a line arrived — scrolling up was
  impossible to hold. The Thinking panel now walks its whole buffer back to the first row; the
  Tool Usage panel keeps the windowed body it needs. That body is bounded by VISUAL rows
  (`MAX_UNWINDOWED_ROWS`, 4x the normal window) rather than by `MAX_LINES`, because
  `MAX_LINES` counts logical lines and one of them can wrap into hundreds. A buffer past
  either cap still drops its oldest rows, so a very long single turn can shift under a
  scrolled-away panel — that is the remaining limit.
- Scrolling a panel to its top or bottom no longer scrolls the transcript as well. pi's wheel
  routing (`tui-alt-screen.js`, `routeWheel`) hands whatever a nested `ScrollView` did not
  consume to the PRIMARY scroll view even when that panel declares `overscroll: "contain"`,
  so the wheel spilled into the main window at either end of a panel. Panel bodies now consume
  the wheel themselves, which makes the TUI skip that routing entirely (`handleMouse` →
  `handled` → `return { consume: true }`). A body without a `ScrollView` of its own — the files
  dock list — consumes it as well: doing nothing beats scrolling the transcript from under the
  cursor. Visible trade-off: the scrollbar's hover highlight
  is no longer refreshed on wheel — the active-scroll highlight still is. The complete fix
  belongs in pi-tui's `routeWheel`, which should stop before the primary fallback.

## [1.3.1] — 2026-10-27

### Fixed

- Response-only mode (`/split-trim-response`) no longer erases pi's startup transcript: the startup
  banner and the `[Context]`/`[Skills]`/`[Prompts]`/`[Extensions]` resource listing now stay
  visible at the top of the response panel. The panel mounts pi's own live header and
  loaded-resources containers (previously they were unmounted together with the replaced
  transcript), so `ctrl+o` expansion, theme changes and resource refreshes keep working.

## [1.3.0] — 2026-10-27

### Added

- Zooming the Tool Usage panel (`[↗]`) now shows full detail for every tool: its whole
  stored output (up to 20 lines) instead of the 2-line preview, whatever the
  `/split-tools-view` mode.
- Tool results that contain images (e.g. `read` on an image file) render inline in the
  Tool Usage panel in full detail and zoomed views, using pi-tui's `Image` component like
  pi's transcript does (Kitty/iTerm2). Other terminals show pi's text fallback. In the
  (non-zoomed) band the image is a thumbnail of at most 6 rows.
- The zoomed Tool Usage panel shows each `edit` call's coloured diff (up to 150 lines).

### Fixed

- Thinking / Tool Usage panel text rows no longer get a doubled left edge (`│`).
- Tool outputs rebuilt on resume / branch switch are no longer empty (the ingest path got
  the content array instead of the result message).

## [1.2.0] — 2026-10-21

### Added

- Mouse: `[↗]`/`[↙]` header buttons expand a panel over the area above the editor
  (and restore it), `[×]` hides it; drag the band's bottom border to resize its
  height, the Tool Usage panel's left edge for the thinking ↔ tools split, and the
  files dock's left edge for its width (`filesWidth` in the config, saved by
  `/split-save`). Mouse wheel over a panel's frame now scrolls that panel.
- Tool durations in the Tool Usage panel, with a live elapsed counter while a call runs.
- The band hides itself when the terminal is too short to fit it above the transcript.
- `npm test`: unit tests for the pure helpers (moved to `helpers.ts`).

### Changed

- Thinking panel: wrapped rows are memoized per line (only the streaming tail
  re-wraps on a flush), the scrollback window grows from 96 to 400 rows, and flushes
  run every 50 ms instead of 100 ms.
- Resizing the terminal re-applies panel widths in place instead of rebuilding the
  layout, so panel scroll positions survive.

### Fixed

- Response-only mode: the response view is now pi's primary scroll view, so
  PgUp/PgDn, pi's Ctrl+F search and the jump-to-end indicator act on it. They used to
  act on the Thinking panel.
- Thinking panel: long paragraphs without line breaks were cut to their last 600
  characters and re-flowed on every streaming flush, which made the text jump around.
  They are now kept whole (up to 16K characters) and re-flow at most once per ~8K.
- Thinking panel: a streamed chunk over 2,000 characters could drop complete lines
  before they were split out.

## [1.1.0] — 2026-10-16

### Added

- `/split-diff` — toggle the files dock's edit-diff subpanel independently, keeping just
  the touched-files list.
- A dim dashed rule between **successive assistant answers** in response-only mode
  (`/split-trim-response`). It never appears around user messages, and can be switched
  back to plain blank-line spacing with `/split-divider space` or the `answerDivider`
  config key (`"rule"` | `"space"`, default `"rule"`).
- `tsconfig.json` and `npm run typecheck` (`tsc --noEmit`).

### Changed

- `peerDependencies` floored to `>=1.2.0` (was `*`) so API drift is visible.
- Files-dock width computation deduplicated onto one helper.

### Fixed

- `/split-save` now uses a valid notification severity (previously an unsupported
  `"success"`, which pi silently downgraded to a neutral status).
- The `setWidget` factory returns a conformant `Component` (`invalidate()`) and uses the
  theme passed by pi instead of reading a non-existent `tui.theme`.
- The `tool_result` edit-path value is guarded to a string (`{}` → `string` type error).

## [1.0.x] and earlier

See the git history for releases before 1.1.0.
