Skip to content

Add low-effort slash commands to TUI#13603

Open
moirahuang wants to merge 3 commits into
moira/tui-slash-command-parityfrom
moira/tui-low-effort-slash-commands
Open

Add low-effort slash commands to TUI#13603
moirahuang wants to merge 3 commits into
moira/tui-slash-command-parityfrom
moira/tui-low-effort-slash-commands

Conversation

@moirahuang

@moirahuang moirahuang commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack: 2 of 4. Depends on #13602; followed by #13604.

Adds slash-command effects that the TUI can support without GUI-only panes or orchestration UI: /create-new-project, /export-to-clipboard, /export-to-file, and /cost.

This keeps TUI-specific state transitions local while sharing non-visual behavior with the GUI where practical. Project and review-comment requests go through BlocklistAIController, conversation-file export moves into a shared helper, and /cost validation is shared. Clipboard export uses OSC 52 so text reaches the terminal client's clipboard rather than the headless process host, including tmux passthrough and explicit failure reporting. Successful clipboard and file exports show transient feedback; file feedback includes the destination path and whether an existing file was overwritten.

The PR also includes TUI request and execution plumbing for /pr-comments, but that entry is not currently visible in the local TUI. The GUI has migrated /pr-comments to a bundled skill, while local ./script/run-tui does not yet stage or load bundled skill resources. Fixing local bundled-skill availability is separate follow-up work.

The /compact experience is completed with streamed summary rendering and a dedicated progress label.

In scope

  • Expose and execute /create-new-project, /export-to-clipboard, /export-to-file, and /cost in the TUI.
  • Add the TUI request and execution plumbing needed by /pr-comments.
  • Propagate repository and CWD context needed by repository-aware commands and file export.
  • Extract conversation Markdown export policy from GUI input code for reuse by the TUI.
  • Export clipboard text through OSC 52, including tmux passthrough and clipboard/PRIMARY targets.
  • Show success-colored export confirmation and report clipboard/file failures accurately.
  • Share project-creation, review-comment request, and cost-validation behavior with GUI paths.
  • Render streamed conversation summaries as collapsible transcript sections.
  • Label compaction progress distinctly.
  • Add focused coverage for export behavior and feedback, command support, cost validation, OSC 52 encoding, summary rendering, and progress labels.

Out of scope

  • GUI-only commands that require settings panes, dialogs, or inline selectors.
  • Bundled-skill availability in the local TUI; /pr-comments remains hidden until that infrastructure is available.
  • Semantic command IDs or a cross-frontend handler abstraction.
  • GUI-style structured argument editing for saved prompts.

How to review

  1. Start with app/src/terminal/input/slash_commands/mod.rs and app/src/ai/blocklist/controller.rs for the supported-command boundary and shared non-visual operations.
  2. Review app/src/ai/conversation_export.rs alongside the removal from app/src/terminal/input.rs. Confirm filename, CWD fallback, overwrite reporting, and error behavior remain shared policy rather than TUI policy.
  3. Review crates/warp_tui/src/terminal_session_view.rs for surface-specific command effects, validation, buffer clearing, export feedback, and telemetry.
  4. Review crates/warp_tui/src/clipboard.rs and clipboard_tests.rs for OSC 52 encoding, target selection, flushing, and tmux passthrough.
  5. Review crates/warp_tui/src/agent_block.rs, agent_block_sections.rs, and warping_indicator.rs as one compaction-presentation unit.
  6. Finish with the focused tests for export destinations, command policy, cost, clipboard transport, summary sections, and progress labels.

Linked Issue

No linked issue.

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

https://www.loom.com/share/a1efde950bd840178af79ccd1d788365

Final-stack validation on 2026-07-11:

  • ./script/format — passed.
  • cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings — passed.
  • cargo clippy -p warp_completer --all-targets --tests -- -D warnings — passed.
  • Added focused regression coverage for conversation export, destination feedback, command support, cost validation, OSC 52 transport, summary sections, and progress labels.

Cargo tests and manual TUI validation were not rerun after the final restack.

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Not included; manual TUI validation remains outstanding.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-IMPROVEMENT: Add project setup, conversation export, cost, and compact-progress support to the TUI.

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label Jul 11, 2026

moirahuang commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@oz-for-oss

oz-for-oss Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds TUI support for several low-effort slash commands, shared conversation export logic, native headless clipboard fallback, and TUI rendering for conversation-summary progress.

Concerns

  • This changes user-facing headless TUI behavior, but the PR description explicitly says no screenshots/videos were included and manual TUI validation was skipped. Per the repo's TUI review guidance, please attach acceptable TUI visual evidence such as a terminal transcript, render_to_lines/TuiBuffer::to_lines output covering the new slash-command flows, or a ./script/run-tui capture demonstrating the commands end to end.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@moirahuang moirahuang marked this pull request as ready for review July 11, 2026 17:52
@oz-for-oss

oz-for-oss Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds several low-effort slash command paths to the TUI, extracts shared conversation export behavior, adds a headless native clipboard backend with fallback, and renders conversation-summary progress/sections in the TUI transcript.

Concerns

  • This is a user-facing TUI behavior change, but the PR description explicitly says manual TUI validation was skipped and includes no terminal transcript, render_to_lines/TuiBuffer::to_lines snapshot diff, or ./script/run-tui capture. Please include terminal/render evidence demonstrating the new slash commands and summary presentation end to end.
  • No approved or repository spec context was available for implementation-vs-spec validation.
  • I did not find a diff-line security concern to report in the changed code.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@moirahuang moirahuang force-pushed the moira/tui-low-effort-slash-commands branch from 874801b to 61395a9 Compare July 11, 2026 21:52
moirahuang and others added 3 commits July 11, 2026 17:06
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
@moirahuang moirahuang requested a review from harryalbert July 12, 2026 00:11
@moirahuang moirahuang force-pushed the moira/tui-low-effort-slash-commands branch from 61395a9 to 0427732 Compare July 12, 2026 00:17
@moirahuang moirahuang force-pushed the moira/tui-slash-command-parity branch from 7139365 to e7b6c57 Compare July 12, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant