Repository navigation
iOS: keep the files chip visible while the keyboard is up - #10802
Conversation
… surface Red half of the regression pair. Since #10594 the host slides the full-height render wrapper up so the render bottom rides the composer bar while the keyboard is up; the files chip is anchored to the surface's own top edge, so the slide carries it above the clipped-visible area and the only Files control disappears whenever the keyboard is shown. Also passes the keyboard frame tracker to GhosttySurfaceHostView in the existing full-height pin test: #10687 added the required parameter without updating this call site, and no CI lane compiles cmuxFeatureTests, so the target has been compile-broken since. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…keyboard is up The chip anchored to the surface's top edge plus safeAreaInsets.top. Since #10594 keyboard motion no longer resizes the surface: the host slides the full-height render wrapper up so the render bottom rides the composer bar, which carries the surface's top edge — and the chip with it — above the clipped-visible area. The only Files control was therefore unreachable whenever the keyboard was shown. The chip now anchors below the highest clipping ancestor's visible top (falling back to safeAreaInsets.top, so resting placement is unchanged and hosts that do not slide are unaffected). A display-link follow re-pins it frame-by-frame during keyboard legs using presentation layers, the same pattern as the dock's absorption follow, with a rest guard so the walk is skipped entirely while nothing can be sliding. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe artifact chip now uses host-view Auto Layout constraints. Host re-homing keeps its position stable during keyboard transitions. Popover coordinates use the host reference view. Tests cover sizing, anchoring, and keyboard invariance. Workspace anchor identifiers and action access also changed. ChangesArtifact Chip Keyboard Tracking
Workspace Updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The PR keeps the Files control visible during keyboard presentation and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant GhosttySurfaceHostView
participant GhosttySurfaceView
participant GhosttySurfaceArtifactChipHost
participant KeyboardFrameTracker
GhosttySurfaceHostView->>GhosttySurfaceView: Move artifact chip to host
GhosttySurfaceView->>GhosttySurfaceArtifactChipHost: Install host constraints
KeyboardFrameTracker->>GhosttySurfaceHostView: Report keyboard frame
GhosttySurfaceHostView->>GhosttySurfaceArtifactChipHost: Preserve host-relative chip layout
🚥 Pre-merge checks | ✅ 23 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (23 passed)
Full details: Cmux Swift Actor IsolationExplanation No actor-isolation failure is introduced. Full details: Cmux Swift Blocking RuntimeExplanation PASS. The PR adds no blocking or timing-based synchronization to production Swift. The changed production files add Auto Layout constraints and view re-homing only; primitive counts are unchanged from the PR base. The only new Full details: Cmux Browser Automation Off-MainExplanation PASS: The PR diff changes only iOS terminal/shell files and tests. It does not modify Full details: Cmux Expensive Synchronous LoadExplanation PASS: The full PR diff adds only UIKit layout/re-homing, coordinate normalization, a namespaced workspace ID fallback, an access-level change, and tests. No production Swift diff adds or moves Full details: Cmux Cache Substitution CorrectnessExplanation PASS: The production diff changes UIKit layout, host re-homing, popover coordinate normalization, access control, and ID construction. It does not replace a fresh authoritative read with a cached value in a persistence, history, undo, or snapshot path. The nearby Full details: Cmux No Hacky SleepsExplanation PASS. The pull request diff changes only Swift production files and Swift tests. It introduces no TypeScript, JavaScript, shell, or build/runtime-script changes covered by Full details: Cmux Algorithmic ComplexityExplanation PASS — The complete PR diff introduces no scalable nested scan or per-target rescan. Full details: Cmux Swift ConcurrencyExplanation PASS. The pull-request diff adds no background Dispatch queue, Combine state, new internal completion-handler API, or fire-and-forget production Task. The only added concurrency syntax is awaited Full details: Cmux Swift `@Concurrent`Explanation PASS. The diff adds no Full details: Cmux Swift Package BoundariesExplanation PASS. The production diff stays inside existing SwiftPM targets: Full details: Cmux Swiftpm LockfilesExplanation PASS. The PR range changes only Swift source and test files under Full details: Cmux Swift LoggingExplanation The PR diff adds or changes no logging statements. The changed production Swift files contain no added Full details: Cmux User-Facing Error PrivacyExplanation PASS. The production diff changes UIKit layout, view re-homing, coordinate normalization, and model access. It adds no user-facing error, alert, command-output, API-error, or recovery text. The added test strings and developer comments are explicitly allowed. Existing recovery-alert code in the coordinator is not modified by this diff. Full details: Cmux Full InternationalizationExplanation PASS. The complete PR diff from merge base e96f1b0 changes eight Swift source/test files and adds no localization catalogs, Info.plist entries, web messages, or locale registry files. The only added quoted text is in TerminalArtifactChipKeyboardTests.swift, which the rule explicitly exempts. Production additions are layout code and developer comments; no new user-facing text is introduced. Full details: Cmux Swiftui State LayoutExplanation PASS. The aggregate PR diff from Full details: Cmux Architecture RethinkExplanation PASS. The cumulative diff adds no prohibited production timing, blocking, observer, lock, or polling repair path. The only Full details: Cmux Swift Auxiliary Window Close ShortcutsExplanation PASS — The PR changes UIKit terminal views, artifact-chip constraints, popover coordinate normalization, and one access modifier. The combined PR diff adds no NSWindow, NSPanel, NSWindowController, SwiftUI Window/WindowGroup, close-shortcut override, or auxiliary-window identifier code. The test changes use UIWindow only as a test fixture, which the rule allows. Full details: Cmux Source ArtifactsExplanation PASS. The aggregate diff changes only seven existing Swift source and test files under Full details: Cmux No Test Or Debug Seam In Production SourceExplanation PASS. The PR adds no test/debug seam in production source. The new Full details: Cmux No Ambient Global StateExplanation PASS. The production diff adds no file-scope API function, mutable global variable, static-only namespace, or new runtime singleton. The new Full details: Description checkExplanation The description clearly explains the problem, implementation, rationale, regression tests, and related fixes. However, it does not use the required Summary and Testing sections, and it omits the required Demo Video, Review Trigger, and Checklist sections. Resolution Add the required template sections. Include a concise Summary, explicit Testing and manual verification details, a demo video or attachment, the review-trigger comment block, and the completed checklist items. Preserve the existing technical explanation under the appropriate sections.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
#10662 assigns the namespaced group id (MobileWorkspaceGroupPreview.ID) directly to anchorWorkspaceID (MobileWorkspacePreview.ID), which does not compile for the iOS app. Convert through rawValue, the same idiom the group preview initializer already uses for its empty-group fallback. Carried on this branch only to unblock the tagged iOS build; same patch offered to main separately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Second iOS compile break from #10662: groupActionCapabilities(for:) was declared fileprivate in WorkspaceListTableCoordinator.swift but is called from the +Actions extension file, so the iOS app does not compile. Widen to internal. Carried on this branch only to unblock the tagged iOS build; same patch offered to main separately. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ad of following the keyboard Replaces the display-link follow from the previous commit with the same adoption the dock already uses: GhosttySurfaceHostView re-homes the chip container (moveArtifactChip(to:), mirroring moveBottomDock(to:)) and the container is constraint-anchored to the host's safe-area top. The keyboard slides only the render wrapper, never the host, so the chip is keyboard-invariant by construction — no per-frame presentation-layer reads, no visible-top ancestor walk, no drift guards. Hostless surfaces (tests) keep the surface-anchored fallback with identical resting placement. Also fixes the artifact-files popover anchor: it was normalized against the surface's bounds, which drift downward by the slide while the keyboard is up; it now normalizes against the view backing the SwiftUI representable. The regression tests now assert the stronger contract directly: the chip's frame in host coordinates is identical before, during, and after a keyboard seat ride. The earlier slid-clip-ancestor unit test modeled the follower design's topology and is superseded by the host-space invariance test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4c0a26e iOS 27: restore the will-only keyboard seat for composer bar pinning (manaflow-ai#10810) cf8e251 iOS: keep the files chip visible while the keyboard is up (manaflow-ai#10802)
Problem
Since #10594 the keyboard no longer resizes the terminal:
GhosttySurfaceHostViewslides the full-height render wrapper up so the render bottom rides the composer bar. The files chip was anchored to the surface's own top edge (safeAreaInsets.top + 8), so the slide carried it above the clipped-visible area and the only Files control disappeared whenever the keyboard was shown.Fix
The chip is chrome, not render.
GhosttySurfaceHostViewadopts the chip container into its own keyboard-invariant coordinate space (moveArtifactChip(to:), mirroringmoveBottomDock(to:)), constraint-anchored 8pt below the host's safe-area top with the same tap-target floor and width ceiling the old manual frame pass enforced. The keyboard slides only the render wrapper, so the chip is keyboard-invariant by construction: no keyboard math, no per-frame following. Hostless surfaces (tests, previews) keep a surface-anchored fallback with identical resting placement.This also fixes the artifact-files popover anchor, which was normalized against the surface's bounds and would have drifted downward by the slide while the keyboard is up; it now normalizes against the view backing the SwiftUI representable.
(The first fix iteration used a display-link follow that re-derived the chip's visible-top inset per frame; it was replaced in
d1e0609with the constraint adoption above after review feedback that a follower is the wrong shape for this.)Commits
Regression pair: commit 1 adds the failing tests, later commits the fix. The final tests assert the chip's frame in host coordinates is identical before, during, and after a keyboard seat ride, end to end through the real host and surface.
Note: no CI lane currently compiles
cmuxFeatureTests(thecmux-iosscheme's only testable iscmuxUITests), which is how #10687 silently compile-brokeTerminalKeyboardFullHeightPinTestsby adding a requiredkeyboardFrameTracker:parameter; commit 1 also repairs that call site.This branch also carries the two main-red iOS compile fixes from #10813 (required to build any iOS archive from current main).
HIG
Checked Virtual keyboards: "Using the [keyboard] layout guide also helps you keep important parts of your interface visible while the virtual keyboard is onscreen." This fix restores exactly that for the Files control; no deliberate deviation.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests