Skip to content

wip tui: ship the bundled prompt composer - #119

Draft
khoi wants to merge 9 commits into
mainfrom
tui
Draft

wip tui: ship the bundled prompt composer#119
khoi wants to merge 9 commits into
mainfrom
tui

Conversation

@khoi

@khoi khoi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Why

Supaterm needs a first-party prompt surface that ships with the app and accepts text, files, and images dropped into a terminal pane. A small Rust binary lets the app expose it on pane PATH without adding a socket command or a second launch path.

What changed

This adds a bundled prompt composer with a responsive Supaterm wordmark, a Tab-driven three-agent picker, grapheme-aware editing, Shift-Enter newlines, file-drop parsing, and [Image n] labels for detected images.

Long prompts reflow with pane width, grow to one-third of pane height, and keep the cursor visible through a stable scroll viewport. The terminal size is polled so redraws still track pane changes when a resize event is lost.

The latest main is merged. Its Ghostty and zmx builds, signed bundle layout, release checks, socket protocol, and CLI changes remain intact. The prompt now ships as signed code at Contents/MacOS/commands/supaterm; Supaterm panes put that directory and Contents/MacOS on PATH.

The pinned Rust 1.95.0 setup installs rustfmt and Clippy from mise.toml, which is the shared source used by local builds and CI. Build caching, packaging, release signing, UI smoke coverage, and docs include the prompt.

Verification

  • make -C apps/mac test-supaterm-tui: 54 passed; rustfmt and Clippy passed with warnings denied
  • make mac-check, make mac-build, make mac-test: 1,473 mac test cases passed
  • make mac-test-e2e: 44 passed
  • make mac-inspect-dependencies, make mac-scan-dead-code, make mac-warm-cache
  • make docs-check docs-validate docs-build
  • Web format, type checks, and 33 tests
  • 42 release-script tests plus release generation, cached generation, unsigned Release build, ad hoc re-sign, DMG creation, code-sign checks, and DMG verification

The repository runs UI shards in CI, so the new bundled-command PATH smoke test is covered there. Local checks did not use Developer ID credentials or Apple notarization.

Note

Enter remains a no-op. This PR builds the prompt and agent picker only; it does not launch the selected agent.

khoi added 7 commits August 1, 2026 14:37
Supaterm needs an owned prompt surface that ships with each app build. A
separate Rust binary keeps terminal input and rendering outside the macOS
process while using the pane PATH contract for launch.

Treat pasted file paths as prompt atoms so image labels stay correct as
users edit. Build and release gates now create and embed the same locked
arm64 binary.
The first pass used a heavy block title and text stand-ins, which made the
agent row read as status instead of a control.

Use a narrow wordmark, a full-height bolt, and the bundled marks. Keep the
selection local until the launch path exists.
Background colors used for letter gaps can appear as solid bars when
terminal cells do not match the surrounding surface.

Draw the full wordmark with foreground glyphs on the terminal background
so its gaps remain clear in every theme.
Overwriting a cached executable after macOS had mapped it left a valid
binary that the kernel killed on launch.

Test a new file before moving it into the cache so a failed build keeps
the last working binary.
The default terminal input mode did not report modified Enter keys, and
all Enter events used the same no-op path.

Request clear modified-key events for the TUI session and restore the
terminal mode on every exit. Shift-Enter now inserts a newline while
plain Enter still does nothing.
Long prompts could outgrow the pane and cursor movement always pinned the
last row to the bottom. Resize redraws also depended on the terminal
forwarding a resize event.

Keep a wrapped prompt viewport stable while the cursor stays visible, and
poll the backend size so the layout reflows even when that event is lost.
@khoi khoi added the enhancement New feature or request label Aug 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4787c8567e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

## Compose a prompt

```bash
supaterm

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the bundled skill for the new command

The docs now advertise a new user-facing supaterm command, but the integrations/supaterm-skills gitlink remains unchanged from the parent commit. Because Project.swift embeds that pinned skill into the app, installed discovery skills will not describe this new workflow; update the submodule content and bump its gitlink with the CLI change.

AGENTS.md reference: AGENTS.md:L14-L16

Useful? React with 👍 / 👎.

@tuist

tuist Bot commented Aug 2, 2026

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supatermUITests 1m 10s 0a1142a0d

Keep the prompt in its own signed command directory while preserving the latest native runtimes, socket changes, and release layout. Install every component required by the pinned Rust toolchain in local and CI checks.
@khoi

khoi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Updated tui with origin/main and fixed Rust 1.95.0 setup at mise.toml so local and CI paths install rustfmt and Clippy. The exact mise 2026.3.0 action version was checked locally.

Checks run: 54 TUI tests; rustfmt; Clippy with warnings denied; mac format/lint/build/dependency/dead-code/cache checks; 1,473 mac test cases; 44 mac E2E tests; docs format/type/link/build; web format/type checks and 33 tests; 42 release-script tests; Release build, ad hoc re-sign, DMG build, signature checks, and DMG verification.

All current PR checks pass, including mac unit and E2E tests, the shared UI build, all four UI shards, docs, web, SwiftLint, and required-checks.

Gap: I did not use Developer ID credentials or submit to Apple notarization locally.

Use the component value form accepted by the mise 2026.3.0 action while keeping rustfmt and Clippy attached to Rust 1.95.0.
@khoi
khoi marked this pull request as draft August 2, 2026 23:06
@khoi khoi changed the title tui: ship the bundled prompt composer wip tui: ship the bundled prompt composer Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant