Repository navigation
Interactive command/output block controls (Warp-like block actions) #85
Description
Goal
Explore future per-block interactive controls on command/output blocks, similar to modern block-oriented terminals. Design/research tracking only — no implementation or exact control set committed here.
Behavior
- Controls are hidden by default.
- Reveal on hover or keyboard focus of the block.
- Controls sit on the right edge of the block where width allows.
Potential actions (not a final list)
- Rerun
- Edit & rerun
- Copy command
- Copy output
- Copy both
- Inspect
- Find/search within output
- Filter output
- Bookmark/pin
Every action must have a keyboard equivalent — controls are not mouse-only.
Shift-selection safety
Shift+mouse is native terminal text-selection (see the passive-hover work merged for #20 / PR #82, which established Shift-suppression for hover/click). Any future block-action affordance must respect the same rule: Shift+click/drag must always fall through to native text selection and must never reveal, focus, or trigger a block action.
Related
- Nested execution activity rows and hierarchical command details #47 (nested execution activity rows) is the closest existing structured-execution work but is scoped to hierarchical sub-activity presentation, not persistent per-block action controls — this issue is a distinct concern.
- Ongoing polish: mouse, Unicode, completions, history, performance, and installation #20 (mouse/hover polish) established the Shift-selection-safety precedent this must follow.
v0.4 interaction decision
Potential actions include rerun, edit & rerun, copy command/output/both, inspect, find/filter output, and bookmark/pin. Controls remain hidden until passive hover or keyboard focus and align right when space permits. Every mouse action needs a keyboard equivalent. Shift is native terminal-selection mode: Shift+click/drag must never reveal or activate actions, expand/collapse blocks, or interrupt selection. Preserve the v0.3 passive-hover invariant.
Roadmap update: action set and block bounds
Actions to cover:
- Copy command / output / both
- Rerun and edit & rerun
- Fold / unfold (the same state as Ctrl+O and mouse expansion; respects Output folding modes: Off, Smart and Always #136 folding modes)
- Bookmark / pin
- Jump to previous/next block, failed block, or bookmark
- Search / filter within output
- Inspect (Command inspector: Warp-like cursor-context command/flag intelligence #84)
Block bounds come from the transcript presenter (#122), which also defines Chat block bounds (#124): in Chat, controls attach to the command or output block that owns the row. Block actions share an action registry with the command palette (#146), so every action is also reachable by keyboard.
Activity
raiseCatError commentedon Oct 1, 2026
Current v0.8 findings (base #241): TranscriptPresenter stamps blockStartId from OutputBuffer structural ownership, including Chat rows; completed records retain authoritative plain command/output. Palette items are declared actions and UiAction supplies keyboard semantics. Existing Shift+mouse decoder suppression and passive hover are the interaction seam.
Useful v1: one shared block-action registry for copy command/output/both, explicit rerun, edit into composer without execution, and fold/unfold. Keyboard focus traverses completed blocks; Enter opens their actions in the existing keyboard palette. Passive hover reveals a compact right-aligned Actions affordance on the owning visible row when it fits; narrow rows retain keyboard access without overwriting output. Clicking opens the same palette, never executes directly. Rerun uses the normal visible submission path. Copy reads records, never screen cells. Inspector can remain composer-contextual; defer historical documentation browsing, bookmarks/pins, filters and annotations.
No stored output mutation or per-motion transcript-wide action scan; visible-row decoration and cached presenter bounds suffice. Shift reports are discarded before hit-testing. Tests must cover mouse suppression, keyboard-only actions, Chat ownership and narrow fallback. Implementation will be a separate milestone issue; this remains research.
raiseCatError commentedon Oct 1, 2026
Implementation is tracked separately in #243 / PR #245. This issue remains research/design; see the findings above.
raiseCatError commentedon Oct 4, 2026
Implemented on the v0.16 branch (PR #303,
feature/v016-platform-portability-agents). Research parent. The v1 block actions shipped as #243:tests/blockActions.test.ts. Bookmarks, pins and annotations stay unscheduled. It was part of the integrated build the maintainer physically validated in the earlier v0.16 QA pass; closing with the implementation.