Files
buzz/mobile/lib
Stephen Barnes 7681371b94 fix(mobile): clear the Duo top edge in the Activity header (#9807)
## Summary

On iPhone Duo, the Activity page's custom header put Close and the
"Activity" title 8 points below the window's top edge. The Duo panes
report no top safe area beside the strip, so the 8-point row padding was
the only clearance. This happened on the cover display and in the inner
display's wide layout.

Other Duo pane headers already reserve 24 points above their 44-point
controls (`FrostedAppBar` and the native bar in
`IosNavigationBar.swift`). Activity now does the same:

- `activity_page.dart`: on iOS with a Duo strip, the header row's top
padding is `duoHeaderTopClearance` (24). Otherwise it stays `Grid.xxs`
(8). The bottom padding stays 8.
- `duo_toolbar.dart`: adds `duoHeaderTopClearance = 24`.
- `frosted_app_bar.dart`: uses the constant in place of its literal `+
24`. No value change.

**Pareto:** better on the Duo cover and in the wide layout. No change on
regular iPhones (no strip), Android, or the Duo inner display in
portrait (no side strip; it already has an 82-point top inset). No new
rebuild dependencies: `strip` was already read through
`DuoToolbarScope.maybeStripOf`.

### Related issue

None found.

### Testing

- New widget test `Activity header clears the top edge on …` checks the
header row's top edge on the Duo cover (466×678, right strip), the Duo
wide layout (951×669), an iPhone (62-point top inset), and Android. It
fails on `main` for both Duo cases (8, expected 24) and passes with this
change.
- `dart format --set-exit-if-changed .` and `flutter analyze`: clean.
- `flutter test` (mobile): passes on macOS.
- iOS 27.2 simulators, measured in points from the top edge:

| Device / layout | Before | After |
|---|---|---|
| Duo cover, Close and title row | 8 | 24 |
| Duo wide layout, title row (Close in the rail) | 8 | 24 |
| iPhone 18 Pro | 70 | 70 |

#### Before / after

Captured on iOS 27.2 simulators. Before is `main` at `9c0bcd6239`, after
is this branch at `4400d021b`. In each pair, before is on the left and
after is on the right.

Duo cover display: open Activity from the bell, hold, then Close.


https://github.com/user-attachments/assets/5bda190c-cadf-44a8-9a8e-58bc68838e7b

![Duo cover display, before and after: Close and title move from 8 to 24
points below the top
edge](https://github.com/user-attachments/assets/30b34987-0477-4cae-8a42-3b451fa00d06)

![Duo inner display, wide layout, before and after: the Activity title
row moves from 8 to 24 points; Close stays in the
rail](https://github.com/user-attachments/assets/1f4690cf-9cf5-47e8-afd2-7554c5f27351)

![Duo inner display, portrait (unfolded), before and after: no change;
Close at 19 points under the measured header from
#9795](https://github.com/user-attachments/assets/ac6465a9-0855-4842-b9e7-d790cdb467e5)

![iPhone 18 Pro, before and after: no
change](https://github.com/user-attachments/assets/a9674077-99fe-47a8-b432-ccd07cfe390c)

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

Signed-off-by: Stephen Barnes <799470+smbarne@users.noreply.github.com>
Co-authored-by: Stephen Barnes <799470+smbarne@users.noreply.github.com>
2026-11-20 14:20:38 -05:00
..