Skip to content

feat: persistent input preamble (ITerminal.InputPreamble)#10

Merged
ThatRendle merged 9 commits into
mainfrom
change/persistent-input-preamble
Jun 18, 2026
Merged

feat: persistent input preamble (ITerminal.InputPreamble)#10
ThatRendle merged 9 commits into
mainfrom
change/persistent-input-preamble

Conversation

@ThatRendle

Copy link
Copy Markdown
Contributor

Summary

  • Adds IInputPreamble / ITerminal.InputPreamble — a persistent multi-row band rendered immediately above the input editor, using the same Line/LineBuilder API as status
  • Preamble persists across input submissions; cleared with SetRows() (no args); participates in height budget (truncates before input editor loses rows; status remains sacred); purely presentational (no key interception)
  • Bumps package version 0.2.0-rc.40.2.0-rc.5

Changes

  • IInputPreamble interface + InputPreambleSurface impl (mirrors IStatus/StatusSurface)
  • ITerminal.InputPreamble property on Terminal and HeadlessTerminal
  • RenderModel.FixedRegion.Preamble holder + SetInputPreambleCommand
  • FixedRegionComposer: preamble band emitted above input editor, folded into height-budget arithmetic
  • 6 integration tests covering render position, persistence, clear, budget truncation, key routing, and regression guard
  • Demo sample updated to exercise the surface end-to-end
  • openspec/specs/fixed-region/spec.md updated with new Persistent input preamble requirement

Test plan

  • dotnet build — clean (0 warnings, 0 errors)
  • dotnet test — 872/872 green
  • dotnet format --verify-no-changes — clean
  • openspec validate persistent-input-preamble --strict — valid
  • Run Dcli.Demo sample and confirm preamble renders above input

dmon note: dmon's Terminal UX change consumes ITerminal.InputPreamble and must reference dcli 0.2.0-rc.5.

🤖 Generated with Claude Code

ThatRendle and others added 9 commits June 18, 2026 23:19
Add a persistent input-preamble surface (ITerminal.InputPreamble) that pins
consumer-set styled rows directly above the always-on input editor — the mirror
of StatusSurface, which pins rows below it. Enables a consumer (dmon) to frame
the input with a header rule that stays pinned instead of scrolling away.

MODIFIED fixed-region "Bottom-pinned component stack"; ADDED "Persistent input
preamble". Bumps dcli rc.4 -> rc.5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lift the deferred input prompt-prefix on the base editor: ITerminal.Input gains
SetPrompt(Line/string), rendered inline before the editable region on the first
visual row with a display-width-aware caret offset. Completes dmon's framed
input (the live-line glyph, companion to persistent-input-preamble).

ADDED fixed-region "Input editor prompt prefix". Bumps to the next preview
revision after persistent-input-preamble.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…on 1)

- 1.1 Add IInputPreamble interface to ITerminal.cs mirroring IStatus
- 1.2 Add InputPreambleSurface with nested SetInputPreambleCommand, mirroring StatusSurface exactly
- 1.3 Wire ITerminal.InputPreamble property; Terminal ctor constructs InputPreambleSurface(loop)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…(section 2)

- 2.1 Add PreambleLine rows holder to FixedRegionComposer (parallel to StatusLine)
- 2.2 SetInputPreambleCommand applies Preamble.Rows and marks model dirty
- 2.3 FixedRegionComposer.Compose inserts preamble between above-input overlay and input rows
- 2.4 Budget arithmetic: preamble truncates before editor loses last row; status stays sacred
     Also fix: BelowInput overlay caret offset now includes preamble rows (aboveCount)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…surface (section 3)

- 3.1 Preamble rows render directly above input editor on next frame
- 3.2 Preamble persists across multiple input submissions without re-set
- 3.3 Empty SetRows() clears preamble and returns rows to budget
- 3.4 Budget pressure: preamble truncates, input keeps >=1 row, status stays sacred
- 3.5 Keys reach the input editor with preamble set; caret parks past preamble row
- 3.6 Existing FixedRegionTests pass as regression guard (872 total)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…surface (section 4)

- 4.1 Set a persistent dim-rule preamble in Phase 1 of Dcli.Demo; clear it in Phase 6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 5.1 dotnet build clean (0 warnings, 0 errors)
- 5.2 dotnet test 872/872 green
- 5.3 dotnet format --verify-no-changes clean
- 5.4 openspec validate persistent-input-preamble --strict valid
- 5.5 version bump 0.2.0-rc.4 → 0.2.0-rc.5 in Dcli and Dcli.Testing csproj
- 5.6 CHANGELOG: added IInputPreamble / ITerminal.InputPreamble entry
- 5.7 DEVLOG: updated status and appended section 5 notes
- 5.8 dmon coordination note in DEVLOG

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merged preamble requirement additions into openspec/specs/fixed-region/spec.md:
- Modified bottom-pinned stack requirement to include persistent input preamble
- Added new Requirement: Persistent input preamble (3 prose clauses, 5 BDD scenarios)

Archived to openspec/changes/archive/2026-06-19-persistent-input-preamble/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ThatRendle ThatRendle merged commit 199b5c7 into main Jun 18, 2026
3 checks passed
@ThatRendle ThatRendle deleted the change/persistent-input-preamble branch June 18, 2026 23:56
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