Skip to content

redesign the terminal composer as a unified input surface - #28

Merged
h3nock merged 6 commits into
mainfrom
feature/composer-design-refresh
Aug 1, 2026
Merged

redesign the terminal composer as a unified input surface#28
h3nock merged 6 commits into
mainfrom
feature/composer-design-refresh

Conversation

@h3nock

@h3nock h3nock commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Redesign the terminal composer as a single full-width input surface that better uses the available space and keeps related controls together.

  • Place the editor above the composer action row.
  • Keep attachment and close controls on the left, with dictation and send on the right.
  • Allow the editor to grow to six lines before scrolling.
  • Collapse the same composer surface into a compact recording or transcription state.
  • Adapt the dictation waveform to the available center space while preserving control spacing.

Keyboard behavior

  • Dock mode continues to send keyboard input directly to the terminal.
  • Opening the composer does not force the keyboard to appear.
  • Tapping the editor opens the keyboard normally.
  • If the keyboard is already visible, ownership transfers between the terminal and composer without dismissing and presenting it again.
  • A short downward drag on the composer handle dismisses the keyboard while keeping the composer open.
  • The first keyboard session explains the drag gesture.
  • Closing the composer returns an active keyboard to the terminal and preserves the draft.
  • Recording and transcription do not change the existing keyboard state.

Terminal geometry

Reserve the full settled composer height from the terminal viewport so terminal content remains above the composer.

The temporary compact dictation height is excluded from viewport sizing. This avoids unnecessary terminal resizes while recording or transcribing. Once dictation finishes, the composer naturally returns to the height required by the resulting draft.

Validation

  • Full unit test suite passes.
  • Composer keyboard ownership and viewport transitions are covered by UI tests.
  • Dictation start, stop, cancellation, transcription, and restart flows are covered.
  • Keyboard-visible and keyboard-hidden dictation states were visually verified.
  • Composer resizing and waveform geometry were verified on the simulator.
  • The final build was installed and exercised on a physical iPhone.

Screenshots

Summary by CodeRabbit

  • New Features

    • Added keyboard dismissal controls, including an accessibility action, hint, and downward drag gesture.
    • Added a composer close action alongside attachment controls.
    • Expanded text input support to six lines.
    • Improved dictation visualization across different screen widths.
    • Added support for restoring the keyboard by tapping the editor.
  • Bug Fixes

    • Improved bottom keyboard-chrome sizing and layout stability.
    • Maintained keyboard and viewport behavior more reliably while composing.
    • Improved composer transitions and interaction locking during submission.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ceff77f-3027-4147-b6ae-cda3f726d64f

📥 Commits

Reviewing files that changed from the base of the PR and between 42cf47b and 0d920a1.

📒 Files selected for processing (2)
  • RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift
  • RemuxAppUITests/RemuxAppUITests.swift
🚧 Files skipped from review as they are similar to previous changes (2)
  • RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift
  • RemuxAppUITests/RemuxAppUITests.swift

📝 Walkthrough

Walkthrough

The pull request changes the composer to a full-width layout with keyboard dismissal and close controls. It adds settled bottom-chrome reservation, width-aware dictation meters, terminal-owned keyboard handling, and expanded unit and UI test coverage.

Changes

Composer and keyboard chrome

Layer / File(s) Summary
Composer layout and controls
RemuxApp/Sources/Ghostty/GhosttyComposeBar.swift
Composer sizing uses separate editing and dictation metrics. The composer adds keyboard dismissal, close controls, accessibility actions, drag handling, and six-line text input support.
Dictation meter sizing
RemuxApp/Sources/Ghostty/GhosttyComposeBar.swift, RemuxApp/Sources/Ghostty/GhosttyComposerDictationController.swift, RemuxApp/Sources/Ghostty/GhosttyDebugComposerDictationBackend.swift, RemuxAppTests/GhosttyPhoneChromeLayoutTests.swift
Dictation history uses a shared capacity. The meter limits visible bars by lane width and available samples.
Bottom-chrome reservation and presentation
RemuxApp/Sources/Ghostty/GhosttyKeyboardChrome.swift, RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift, RemuxAppTests/GhosttyPhoneChromeLayoutTests.swift
Bottom-chrome measurement retains valid settled heights and ignores transient values. Composer and keyboard controls use the standard input-control group.
Surface keyboard integration and validation
RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift, RemuxAppTests/GhosttyTerminalInputCoordinatorTests.swift, RemuxAppUITests/RemuxAppUITests.swift
Surface integration wires direct composer opening, keyboard dismissal, terminal ownership, submission guards, viewport reservation, and full-width interaction tests.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GhosttySurfaceScreen
  participant GhosttyComposeBar
  participant KeyboardViewportTransitionCoordinator
  GhosttySurfaceScreen->>GhosttyComposeBar: Provide keyboard visibility and dismissal state
  GhosttyComposeBar->>GhosttySurfaceScreen: Invoke keyboard dismissal callback
  GhosttySurfaceScreen->>KeyboardViewportTransitionCoordinator: Dismiss keyboard state
  KeyboardViewportTransitionCoordinator->>GhosttySurfaceScreen: Complete viewport transition
Loading

Possibly related PRs

  • h3nock/remux#20: Changes the same GhosttySurfaceScreen and terminal keyboard chrome behavior.
  • h3nock/remux#23: Introduces related composer, dictation, keyboard chrome, and surface integration.
  • h3nock/remux#26: Also changes composer and dock layout controls.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: redesigning the terminal composer as a unified input surface.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/composer-design-refresh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@h3nock
h3nock marked this pull request as ready for review August 1, 2026 20:26

@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: 42cf47bb7c

ℹ️ 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".

Comment thread RemuxApp/Sources/Ghostty/GhosttyKeyboardChrome.swift

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift (1)

197-202: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the duplicated top-padding constant.

bottomChromeFallbackHeight hardcodes + 4 here, and line 445 applies .padding(.top, 4) to the same chrome view. These two literals must stay in sync for the fallback height to match the real measured height before the reservation settles. Extract a named constant (for example GhosttyKeyboardChromeSizing.composerRowTopPadding) and use it in both places to remove the duplication risk.

♻️ Proposed fix to remove the duplicated literal
+    static let composerRowTopPadding: CGFloat = 4
             let bottomChromeFallbackHeight = GhosttyKeyboardChromeSizing.baselineHeight
-                + 4
+                + GhosttyKeyboardChromeSizing.composerRowTopPadding
                 + chrome.bottomPadding
-                        .padding(.top, 4)
+                        .padding(.top, GhosttyKeyboardChromeSizing.composerRowTopPadding)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift` around lines 197 - 202,
Extract the shared top-padding value into a named constant on
GhosttyKeyboardChromeSizing, then replace the hardcoded +4 in
bottomChromeFallbackHeight and the .padding(.top, 4) usage in the chrome view
with that constant so fallback and measured heights remain synchronized.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift`:
- Around line 197-202: Extract the shared top-padding value into a named
constant on GhosttyKeyboardChromeSizing, then replace the hardcoded +4 in
bottomChromeFallbackHeight and the .padding(.top, 4) usage in the chrome view
with that constant so fallback and measured heights remain synchronized.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f426cf46-6367-44a3-b6de-c3fafd41891a

📥 Commits

Reviewing files that changed from the base of the PR and between 0e0573c and 42cf47b.

📒 Files selected for processing (8)
  • RemuxApp/Sources/Ghostty/GhosttyComposeBar.swift
  • RemuxApp/Sources/Ghostty/GhosttyComposerDictationController.swift
  • RemuxApp/Sources/Ghostty/GhosttyDebugComposerDictationBackend.swift
  • RemuxApp/Sources/Ghostty/GhosttyKeyboardChrome.swift
  • RemuxApp/Sources/Ghostty/GhosttySurfaceScreen.swift
  • RemuxAppTests/GhosttyPhoneChromeLayoutTests.swift
  • RemuxAppTests/GhosttyTerminalInputCoordinatorTests.swift
  • RemuxAppUITests/RemuxAppUITests.swift

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 1, 2026

Copy link
Copy Markdown

Deploying getremux with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0d920a1
Status: ✅  Deploy successful!
Preview URL: https://805a41c1.getremux.pages.dev
Branch Preview URL: https://feature-composer-design-refr.getremux.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying remux with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0d920a1
Status: ✅  Deploy successful!
Preview URL: https://9aacdd78.remux-agx.pages.dev
Branch Preview URL: https://feature-composer-design-refr.remux-agx.pages.dev

View logs

@h3nock
h3nock merged commit c2d2fca into main Aug 1, 2026
6 checks passed
@h3nock h3nock mentioned this pull request Aug 2, 2026
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