Skip to content

fix: keep the iOS app's screen whole when the keyboard shows and hides - #2434

Merged
yansfil merged 1 commit into
mainfrom
fix/ios-keyboard-frame
Nov 11, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/ios-keyboard-frame

Conversation

@yansfil

@yansfil yansfil commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

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

  • Decide: nothing.
  • Risky files: 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

  • Layer: unit, in the app's test target (the controller in a window, keyboard notifications posted to it) and the pure frame function.
  • Catches: a frame measured from the view's own bounds: three layout passes would leave 80 points of 480 instead of 280, and the hide would not restore 480. Reasoned from the old code, not run against it.
  • Repeat: run once on the build machine, 26 app tests green.
  • Waits: none.

Evidence

  • Verified: build-ios.sh build on the build machine: the app builds and its Swift tests pass, the two new ones among them.
  • Not verified: a real keyboard on a real iPhone, including that the page no longer scrolls under the status bar; the operator tries it on the next TestFlight build.

@yansfil
yansfil added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit c000fb4 Nov 11, 2026
45 checks passed
@yansfil
yansfil deleted the fix/ios-keyboard-frame branch November 11, 2026 05:48
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:

![1-keyboard](https://github.com/yansfil/pr-assets/blob/main/hide/feat-phone-list-chips-and-typing/91f01e9/1-keyboard.png?raw=true)

The list before and after at 390, then 320 (the width iOS Display Zoom
gives) and 375 dark:

![2-list](https://github.com/yansfil/pr-assets/blob/main/hide/feat-phone-list-chips-and-typing/91f01e9/2-list.png?raw=true)

다시 볼 것 before and after:

![3-star](https://github.com/yansfil/pr-assets/blob/main/hide/feat-phone-list-chips-and-typing/91f01e9/3-star.png?raw=true)

## 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.
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