Skip to content

fix(mobile): no status-bar gap under the composer, and notification taps open their pane - #186

Merged
devswha merged 11 commits into
devswha:mainfrom
Haeminway1:fix/ios-home-screen-gap-and-notification-tap
Sep 30, 2026
Merged

devswha merged 11 commits into
devswha:mainfrom
Haeminway1:fix/ios-home-screen-gap-and-notification-tap

Conversation

@Haeminway1

@Haeminway1 Haeminway1 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

An installed iPhone app can report an idle visual viewport shorter than its layout viewport. Publishing that height for the whole shell leaves a band below the composer. Use the dynamic viewport while idle and follow the visual viewport while an eligible touch-device text field is focused. Direct xterm typing and pointer changes update that state even when focus stays on the same field.

Notification taps now select their PC and pane before and after focus, fall back to opening the pane URL on focus failure, and preserve the newest intent across delayed focus/opening. An early App-module listener retains messages that arrive before React subscribes, including a cold start with a newer tap.

Validation

  • Integrated main 66328ef, preserving the fix(status): a Codex pane finishes instead of reading RUN for good #193 completion and fix(machines): preserve newer statuses during snapshot refresh #196 snapshot guards and the contributor branch history.
  • At 8bf88fc: 563 unit tests, generated types, typecheck, build, and diff checks pass with Bun 1.4.2. Focused actual-App notification startup and controlled viewport/focus browser probes pass.
  • The earlier integrated frontend passed all 28 browser groups. After the latest main integration its frontend is byte-equivalent except the embedded revision and generated bundle filename. Final-head CI passes both Fast checks and Integration and browser, rebuilding and running the full suite with pinned herdr 0.9.3.
  • Independent notification review accepts the ordering, cold-start queue and App lifecycle. Browser probes use real worker-to-App messages with controlled window creation/focus; they do not establish native notification activation.
  • Fresh owned iOS 27.0 (24A434) Simulator installs of the default and black-translucent variants passed idle/rotation tests. Their measured frontend is equivalent to the current candidate.

Native acceptance gate

The owned combined build 33cfc7b preserves this implementation and #199's absent metadata. Its fresh home-screen installation, icon launch and composer-focus test passes on iOS 27.0 (24A434), with a sharp header and navigator.standalone === true. Keep this candidate draft until essential software-keyboard validation is complete. Software keyboard keys are currently offscreen; accessory-only focus and Done/reopen tests do not count as visible software-keyboard or retained-focus dismissal coverage. Existing-install data continuity and Safari 26 viewport compatibility remain unverified and documented separately. No user install or website data has been removed.

…aps open their pane

In an iPhone home screen app the visual viewport reads shorter than the screen
without a keyboard, so --app-height now follows it only while the keyboard is up.
The service worker names the pane before and after focus() and opens it in a new
window when focus is refused.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b3b9b2a5-2710-4929-826f-e597ce9db41e

📥 Commits

Reviewing files that changed from the base of the PR and between 7da038c and 6faa0c1.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • public/sw.js
  • scripts/mobile-viewport-regression.ts
  • scripts/notification-startup-regression.ts
  • scripts/ui-regression.ts
  • src/App.tsx
  • src/lib/notificationTarget.test.ts
  • src/lib/notificationTarget.ts
  • src/lib/viewport.ts
  • src/pwa-notification.test.ts
 ___________________________________________________________________________________________________
< Test your software, or your users will. Test ruthlessly. Don't make your users find bugs for you. >
 ---------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: bf734865-0568-4654-a860-277cd85de037

📥 Commits

Reviewing files that changed from the base of the PR and between 057b919 and 7da038c.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • DESIGN.md
  • public/sw.js
  • src/components/PaneTerminal.tsx
  • src/lib/viewport.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • On iPhone home screens, the app shell now adjusts to the visible screen while the keyboard is open, removing the empty band below the message composer.
    • Tapping a notification now opens the relevant pane more reliably when the app is in the background, including when the system is slow to bring the app window forward.

Walkthrough

The shell uses 100dvh unless the keyboard is open, when it follows visualViewport. Notification clicks now select the requested pane in an existing window or open a new window at that pane when needed.

Changes

Keyboard-aware viewport sizing

Layer / File(s) Summary
Direct typing and keyboard-aware sizing
DESIGN.md, src/components/PaneTerminal.tsx, src/lib/viewport.ts, CHANGELOG.md
The terminal marks active direct typing on coarse-pointer devices outside chat view. Viewport synchronization updates --app-height only while data-keyboard is present and responds to visual viewport resize and scroll. The design and changelog describe the sizing behavior.

Notification pane selection

Layer / File(s) Summary
Notification click handling
public/sw.js
The service worker sends pane selection before focusing an existing window, then sends it again after focus succeeds. If focus rejects, or no window exists, it opens a window at the pane URL. The changelog also records this fix.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: devswha

Merge Risk: ⚪ Minimal · up to 7da03

The changes address keyboard-aware shell sizing and notification pane selection without an established merge-blocking issue. Real-iPhone confirmation remains useful follow-up validation.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 7da03

The change preserves the existing machine-and-pane selection format and login gate. No new authorization bypass was established. Remaining uncertainty concerns asynchronous selection ordering and server-side ownership enforcement.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated effect is changing machine/pane selection in an existing app window or initializing another app window. The fallback uses a fixed root-relative destination with encoded identifiers, not a payload-selected external URL. Backend enforcement is needed to bound which machines and panes those identifiers may access.

Trust Boundaries and Controls

  • observed — The page-side receiver listens on navigator.serviceWorker, validates the message type and pane field, and forwards identifiers into existing selection handling. The login gate still controls terminal mounting. These client controls do not establish server-side machine/pane ownership authorization.

Resilience and Maintainability Implications

  • observed — Focus rejection now invokes a pane-preserving fallback. There is no rollback of the earlier selection if opening that window also fails. Separately, stale-pane recovery cancels obsolete asynchronous reads and treats a failed read as insufficient evidence to discard the selected pane.
🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely identifies both primary fixes: removing the mobile status-bar gap and opening the intended pane from notification taps.
Description check ✅ Passed The description includes the required Change and Validation sections. It explains the problems, resulting behavior, test results, integration status, and known validation limits, including incomplete …
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@devswha
devswha marked this pull request as draft September 30, 2026 11:23
devswha added a commit that referenced this pull request Sep 30, 2026
…lur, #164) (#199)

Refs #164.

Fresh iPhone home-screen installs drawing below the status bar avoid the
portrait header blur seen with `black-translucent`. Remove that metadata
and retain the existing shell, sticky header, viewport code and
safe-area padding. Existing installs can retain their original
status-bar layout.

The testing guide distinguishes the contributor's fresh physical-iPhone
iOS 27.0.0 dark/light report, the independently tested explicit-default
Simulator control, and this exact absent-meta candidate. It keeps the
user install intact and describes draft/queue/settings, pairing and
notification boundaries without promising automatic migration or
advising unconditional removal.

## Validation

- Preserves contributor `67f5eba8` and integrates main `66328ef`; only
runtime behavior change is omission of the status-bar metadata. Other
HTML tags and all CSS declarations are unchanged.
- Generated types, typecheck, build and diff checks pass with Bun 1.4.2.
Forty existing data-boundary tests pass; these do not prove iOS
removal/re-add retention.
- Independent code/documentation review accepts `8fff966`; the following
documentation-only clarification identifies fresh installs, the baseline
application build, and required combined #199/#186 acceptance.
- Final published-head
[CI](https://github.com/devswha/herdr-web-ui/actions/runs/36708265450)
passes both Fast checks and Integration and browser with pinned herdr
0.9.3.
- Xcode 27.0 (27A266a), iPhone 17 Pro Simulator iOS 27.0 (24A434): the
exact absent-meta build from `8fff966` passes fresh home-screen
installation and portrait/landscape/portrait testing, with a sharp
header and clock. The last commit `ce0f2bf` changes documentation only.
Metadata is null, standalone is true, top safe area is 0 and header
height is 52 CSS px in this environment.
- Combined build `33cfc7b` includes #186's viewport implementation and
this metadata omission; its fresh installed-app launch and
composer-focus test passes. Essential visible-software-keyboard
validation is still pending. The explicit-default control's earlier
rotation, background/reopen and drawer checks remain separate evidence.

Keep draft pending combined #186 header/composer/software-keyboard
acceptance. iOS 26.5 compatibility and owned-install
update/data-lifecycle results remain unverified and documented; no
automatic migration is claimed. A desktop browser or a Safari tab does
not establish that native blur is fixed. No settings, runtime, license,
user installation or website-data reset is part of this change.

---------

Co-authored-by: Yoonwoo-Ha <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: e2e <[email protected]>
Co-authored-by: Hako <[email protected]>
devswha and others added 2 commits September 30, 2026 21:38
…out focusout

A composer removed with its pane can take focus away without a focusout
event, which left data-keyboard set and the shell sized to the visual
viewport after the keyboard closed, bringing back the status-bar gap.
A visual viewport resize now re-reads focus as well as the height.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ap-and-notification-tap

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@devswha

devswha commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Accepted. The combined iOS 27 home-screen check (main + this PR + #199) passed with the software keyboard visible; details are in #199. Maintainer follow-up 7db17d6: when a focused field is removed without a focusout event, the next visual-viewport resize now re-reads focus, so data-keyboard no longer stays set. A regression test covers it and fails without the fix.

@devswha
devswha marked this pull request as ready for review September 30, 2026 12:43
@devswha
devswha merged commit a356063 into devswha:main Sep 30, 2026
3 checks passed
devswha added a commit that referenced this pull request Sep 30, 2026
## Change

Installed apps are on v0.3.34. This PR prepares v0.3.35: the app and
plugin versions go up together, and the Unreleased notes move under the
dated release heading. The two #186 entries are reworded to describe
what changed for the user, in the same style as the rest of the list.

This release includes:
- **Remote runtime v8:** bundles herdr 0.9.3. Each connected PC's bridge
asks for **Update bridge…** once (#191).
- **iPhone home-screen app:**
- The header is no longer blurred on iOS 27 (#199, #164). An existing
install has to be removed from the Home Screen and added again.
  - No band under the composer (#186).
  - Tapping an alert opens its pane (#186).
- **Claude menus:** unnumbered menus such as the folder-trust check are
answerable from the chat. The server confirms only while the cursor is
on the answered row (#200).
- **Two bridges on one herdr:** when another bridge has a pane open,
this one waits for it instead of ending the pane (#197).
- **Pane status:** a Codex pane no longer reads RUN forever (#193), and
a refresh no longer overwrites a newer status (#196).
- **Smaller changes:** Copilot Free is no longer listed for every `gh`
user, and there is a Korean README (#194).

## Validation

- `bun scripts/release-notes.ts 0.3.35` passes.
- Fast checks and Integration and browser must pass before the squash
merge. After the merge, publish with `gh workflow run release.yml --ref
main -f version=0.3.35`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Haeminway1 added a commit to Haeminway1/herdr-web-ui that referenced this pull request Sep 30, 2026
devswha added a commit that referenced this pull request Oct 2, 2026
…es no band under the composer (#349)

On an iPhone home screen app, a band as tall as the status bar (~59pt)
still showed under the composer, even though #186 removed it for the
idle case.

**Why.** `viewport.ts` publishes the visual height as `--app-height`
whenever a text field on a touch screen has focus, on the assumption
that its keyboard is up. iOS keeps the field focused with the keyboard
down in two cases:
- coming back from a dictation keyboard's own app (e.g. Typeless records
in its app, then returns);
- after the keyboard's own close key.

In standalone mode the idle visual viewport is the screen minus the
status bar. So the shell shrank to that height and left the band.

**Fix.** The keyboard also has to take room: the visual viewport must be
more than 150px shorter than the screen (orientation-aware), which a
status bar and a toolbar never are. A focused field with the keyboard
down now gets the full `100dvh` shell. Hardware keyboards on touch
devices also stop shrinking the shell.

**Test.** `scripts/mobile-viewport-regression.ts` now focuses the
composer with the idle 780px visual viewport and expects no keyboard
sizing. It then checks that the keyboard opening (500) and closing (795)
while focus stays are followed.
- On main the new step fails: `observed
{"keyboard":true,"appHeight":"780px","pixels":780}`.
- With the fix the whole viewport contract passes.
- `bun run typecheck` passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Hako <[email protected]>
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.

2 participants