Repository navigation
fix: keep the iOS app's screen whole when the keyboard shows and hides - #2434
Merged
Merged
Conversation
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 12, 2026
…ows like the desktop (with-hide#2441) ## Summary Three phone changes the operator asked for after using the app on a real iPhone. Stacked on with-hide#2432, whose detail-chip link this reuses. - **Typing keeps the end in view**: when the keyboard comes up over the reply bar, a conversation or terminal read at its bottom moves down with it, so the newest line and the reply field show together. Someone scrolled up to older lines keeps their place. In a browser or Home Screen app the page now takes the height the keyboard leaves (the iOS app's web view already shrinks, with-hide#2434). - **Row marks like the desktop's**: after the task name, the pull requests that name the agent (one as `#number` with its state's mark, several as counts per state) and, on a Conductor's row only, its mission's chip with `!` and `k/n`. The name shrinks first; the marks stay. - **The revisit ★**: a starred task shows the desktop's star, in the mark's place inside 다시 볼 것 and small after the name elsewhere. This needs one new optional field from the core (`starred`, left out when false); an older Mac sends none and its rows look as before. The keyboard, before (left) and after, dark and light; the screen is cut by the keyboard's height:  The list before and after at 390, then 320 (the width iOS Display Zoom gives) and 375 dark:  다시 볼 것 before and after:  ## Review - **Decide**: the row marks only show; tapping the row opens the detail, whose chips (with-hide#2432) open the mission or pull request page. A step worker's row gets no mission chip, as on the desktop. - **Decide**: the phone has no text-size setting and ignores iOS Dynamic Type, so the "largest text" case is iOS Display Zoom (a 320-wide screen), captured above. - **Decide**: two App Store screenshots go stale: `01-agents` (the first row now wears the mission chip, a working row its PR mark) and `04-missions` (the demo mission now has a Conductor, so its page offers the Conductor's chat). - **Risky files**: `hide-core/src/agent_state/tally.rs` - one optional field on the phone's row; no protocol number changes. - **Risky files**: `web/src/mobile/mobile.css` - the phone page's height follows `visualViewport` (`web/src/mobile/viewport.ts`); it falls back to the full height where there is none. - **Risky files**: `web/src/components/mission-chip.tsx`, `mission-tone.tsx`, `revisit-mark.tsx` - the chip's face and the star's shape are split out so the phone draws them without the desktop's store or hover; the desktop's chip and star render as before. - **Cost**: the terminal tab's half-width lines and short scroll-back are a hided matter and are handled separately; nothing here touches them. ## Tests - **Layer**: e2e (phone relay fixture), unit (jsdom page render of the demo with the phone's real store), core unit. - **Catches**: a detail that lets the keyboard hide its newest line, and one that drags a reader who scrolled up (planted: no follow on resize; the e2e failed). - **Catches**: a mission chip on a step worker's row (planted; the test failed), a missing PR mark or star, a star on an unstarred row; the core sending `starred` for an unstarred row. - **Catches**: a browser page that does not take the visual viewport's height, or keeps it after stopping. - **Repeat**: `phone-relay.spec.ts` (21), `src/mobile` and `src/components` unit tests, and the core and hided tests whose names contain `phone` (116), locally green. - **Waits**: none added. ## Evidence - **Verified**: web typecheck, lint, design contract, unit and e2e above, rustfmt, captures in light and dark at 390, 375 and 320. - **Not verified**: a real keyboard on an iPhone, in the iOS app and in Safari (Playwright cannot raise one; the e2e and the captures shrink the screen instead), which is for the operator to try.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On an iPhone, tapping the reply field left most of the screen black, and it stayed black after the keyboard went away.
The shell made room for the keyboard by taking the keyboard's height off the view's bounds, but Capacitor makes the web view the controller's own view, so each layout pass took the height off a view that had already shrunk, and hiding the keyboard set it to those shrunken bounds.
The frame is now measured from the window, and the web view's own keyboard handling is taken off so room is made once.
No screenshot: native frame handling of the iOS app; the simulator runs here have no software keyboard, and the broken state was reported from a phone.
Review
mobile/ios/App/HideShell/Sources/HideShell/ShellViewController.swift- removes the web view's own keyboard observers, as Capacitor's keyboard plugin does, so nothing else may rely on WebKit's inset for the keyboard.Tests
Evidence
build-ios.sh buildon the build machine: the app builds and its Swift tests pass, the two new ones among them.