Skip to content

iOS: shrink accessory-bar buttons to min width + consistent icon sizes - #5599

Closed
lawrencecchen wants to merge 1 commit into
mainfrom
feat-ios-accessory-min-width
Closed

lawrencecchen wants to merge 1 commit into
mainfrom
feat-ios-accessory-min-width

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Makes every terminal accessory-bar button hug its content (compact, min-width) and normalizes icon sizes. iOS-only change (lives entirely in Packages/CmuxMobileTerminal, .iOS(.v18)); the macOS app does not build this package.

Two dogfood reports this fixes:

  1. Tab/Esc/Ctrl-C/Ctrl-D (and others) were too wide. They were floored at 44pt (accessoryButtonMinWidth via greaterThanOrEqualToConstant), so short labels could never get narrower than 44pt. Modifier (⌃⌥⌘) and icon buttons (zoom/paste) were truly fixed at 44pt (equalToConstant). All three creation paths (makeAccessoryButton, makeCustomAccessoryButton, makeToolbarSettingsButton) now use a single greaterThanOrEqualToConstant floor lowered 44 → 34 (a usable tap-target minimum), so every button sizes to its intrinsic content. The shared horizontal content inset dropped 10 → 8, which also tightens the wider text buttons like Tab. Floor removal is the lever for the short glyphs; the inset cut is what compacts the longer labels.
  2. Icon sizes looked inconsistent / too big. All SF Symbols now share one accessoryButtonSymbolConfig, and its point size dropped 14 → 13: an SF Symbol's bounding box reads larger than text at the same size, so 13pt keeps paste/zoom/arrows/settings/keyboard-toggle visually in line with the 14pt text keys instead of looming over them. The keyboard toggle also dropped from its own private 16pt config onto the shared one. The arrow keys (↑↓←→) became arrow.up/down/left/right SF Symbols so they render at the same size as the other icons instead of as oversized Unicode glyphs. New localized accessibility labels (en + ja) added for the now-image-only arrow buttons.

Liquid Glass styling (#5536) and the reorderable built-in behavior (#5579) are unchanged.

Trade-off: #5536 used fixed 44pt to keep single-glyph modifiers visually uniform. Going back to content-hugging may re-introduce small per-glyph width differences (⌃ vs ⌥ vs ⌘); the dogfood ask is explicitly compact over uniform, so that is accepted. The effective tap target is 34×28 (within the sanctioned 32-36 range); the visible chrome hugs content while staying tappable.

Verification: clean iOS simulator build (cmux-ios, arm64). The exact symbol point size (13) is a visual dial; if the icons still read large next to the text, drop it to 12. That final call is dogfood (UIKit layout; not self-verifiable via the IOSurface-only debug screenshot path).

Depends on #5579 (now merged); rebased onto main.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 8, 2026 3:54am
cmux-staging Building Building Preview, Comment Jun 8, 2026 3:54am

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@lawrencecchen, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 2 minutes and 5 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: db7025ee-68eb-47da-be41-9ead70d70f79

📥 Commits

Reviewing files that changed from the base of the PR and between ced847c and e4e3208.

📒 Files selected for processing (3)
  • Packages/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift
  • Packages/CmuxMobileTerminal/Sources/CmuxMobileTerminal/TerminalInputTextView.swift
  • ios/cmux/Resources/Localizable.xcstrings
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-ios-accessory-min-width

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 and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Tightens the iOS terminal accessory bar by making every button content-hugging (min 34pt floor, down from a 44pt fixed/floor) and unifying all SF Symbol rendering to one shared 13pt/medium config.

  • Arrow keys (↑↓←→) are replaced with arrow.up/down/left/right SF Symbols, gaining proper VoiceOver accessibility labels (up_arrow etc.) with en+ja translations in the string catalog — the only two locales the catalog supports.
  • The per-case fixed-width branches in makeAccessoryButton, makeCustomAccessoryButton, and makeToolbarSettingsButton are collapsed to a single greaterThanOrEqualToConstant constraint, and the keyboard-dismiss button's private 16pt symbol config is replaced by the shared 13pt config.
  • The PR description mentions the shared config is "14pt" but the committed code uses 13pt — a harmless documentation drift, worth confirming that 13pt is the intended value.

Confidence Score: 5/5

Safe to merge — iOS-only UIKit layout change with no logic mutations and correct accessibility/localization handling.

All three changed files are narrow and coherent: layout constants change, arrow keys gain SF Symbols and localized VoiceOver labels, and the string catalog adds the expected en+ja entries. No actor isolation, blocking runtime, or state-mutation issues are introduced. The only discrepancy worth a quick check is that the PR description says 14pt but the committed symbol config is 13pt — a description drift, not a code defect.

No files require special attention.

Important Files Changed

Filename Overview
Packages/CmuxMobileTerminal/Sources/CmuxMobileTerminal/GhosttySurfaceView.swift Adds accessibilityLabel and symbolName cases for the four arrow actions so they render as SF Symbols with proper VoiceOver labels instead of Unicode glyphs.
Packages/CmuxMobileTerminal/Sources/CmuxMobileTerminal/TerminalInputTextView.swift Consolidates all button layout to a single shared greaterThanOrEqualToConstant 34pt floor, drops the per-case fixed-width branches, lowers the shared SF Symbol config from 16/14pt to 13pt, and trims horizontal insets from 10 to 8pt so all buttons hug their content uniformly.
ios/cmux/Resources/Localizable.xcstrings Adds four new accessibility-label keys (up_arrow, down_arrow, left_arrow, right_arrow) with both en and ja translations, consistent with every other entry in the catalog.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[TerminalInputTextView setupInputAccessoryView] --> B[makeAccessoryButton for builtin action]
    A --> C[makeCustomAccessoryButton for CustomToolbarAction]
    A --> D[makeToolbarSettingsButton]
    A --> E[dismissButton UIButton.system]
    B --> F{applyAccessoryButtonStyle}
    C --> F
    D --> G[plain UIButton.Configuration with slider.horizontal.3]
    F --> H{action.symbolName?}
    H -- yes --> I[config.image = SF Symbol @ 13pt]
    H -- no --> J[config.attributedTitle = text @ 14pt font]
    I --> K[width >= 34pt]
    J --> K
    G --> K
    E --> L[setImage @ 13pt no UIButton.Configuration]
Loading

Reviews (2): Last reviewed commit: "iOS: shrink accessory-bar buttons to min..." | Re-trigger Greptile

Every terminal accessory-bar button now sizes to its intrinsic content
plus one shared compact horizontal inset, instead of being pinned wide.

Width:
- Tab/Esc/^C/^D and other text buttons were floored at
  accessoryButtonMinWidth (44pt via greaterThanOrEqualToConstant), so the
  short labels could not get narrower than 44pt. Modifier (⌃⌥⌘) and icon
  buttons (zoom/paste) were truly fixed at 44pt (equalToConstant).
- All three creation paths (makeAccessoryButton, makeCustomAccessoryButton,
  makeToolbarSettingsButton) now use a single greaterThanOrEqualToConstant
  floor, lowered 44 -> 34 (tap-target minimum), so every button hugs its
  content and only floors when the glyph is tiny.
- accessoryButtonContentInsets leading/trailing 10 -> 8 so the bar reads
  tight and uniform; this is what shrinks the already-wide "Tab".

Icons: unify all SF Symbols under one shared symbol config. The keyboard
toggle dropped from a private 16pt config to the shared 14pt config, and
the arrow keys (↑↓←→) became arrow.up/down/left/right SF Symbols so they
render at the same size as paste/zoom instead of as oversized Unicode
glyphs. Arrow accessibility labels added (image-only buttons need them).

Liquid Glass styling (#5536) and reorderable built-ins (#5579) are intact.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lawrencecchen
lawrencecchen changed the base branch from feat-ios-toolbar-reorder-builtins to main June 8, 2026 03:23
@lawrencecchen
lawrencecchen force-pushed the feat-ios-accessory-min-width branch from 6988ca4 to e4e3208 Compare June 8, 2026 03:23
@lawrencecchen lawrencecchen added the stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening. label Sep 23, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in cmux backlog Sep 23, 2026

This branch was successfully deployed

1 active deployment
Preview – cmux — e4e32081 Deployed Jun 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-revisit Closed after 30+ days without activity; preserved for possible revisit or reopening.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants