Skip to content

Prototype: mobile: make Home's Duo rail Search, New and Bestie native rail controls - #9837

Draft
smbarne wants to merge 1 commit into
duo-rail-bottom-48from
duo-rail-native-bottom
Draft

smbarne wants to merge 1 commit into
duo-rail-bottom-48from
duo-rail-native-bottom

Conversation

@smbarne

@smbarne smbarne commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Prototype. Not ready for review. This explores option (a) for the Duo cover rail. It is kept as a draft for comparison with #9829. Don't review or merge it.

Summary

Stacked on #9829.

On the iPhone Duo cover display, Home's Search, New and Bestie become native rail controls, in the same style as the rail's Activity and Community menu (and the channel Huddle button). They render as one native vertical glass capsule of three 48 pt controls, 156 pt tall, pinned to the bottom of the rail. #9829 only resizes the existing merging-glass circles.

  • Search: a plain native action.
  • New: a native action whose children become a native menu, the same mechanism as the community menu.
  • Bestie: a native action showing the agent avatar. A tap opens Bestie. A press-and-hold starts voice recording through a new IosNavigationAction.onLongPress. Natively, a 0.5 s UILongPressGestureRecognizer sends actionLongPress with a start / move / end / cancel phase and the finger's travel. The existing Flutter recording pill (waveform, slide-up-to-cancel, spinner) is driven through a new AgentRailLink and shown at the Bestie slot.
  • While recording: Search and New go inert, and Bestie stays mounted, because changing the native actions list mid-hold rebuilds the group and cancels the touch.
  • Layout: the rail's bottom reservation in DuoToolbarPortal goes from 220 pt to 156 pt (duoRailCapsuleExtent(3)).
  • Unchanged: when the Duo is fully open, and on ordinary iPhones, Search, New and Bestie keep their 56 pt horizontal row.

Known gaps and risks

  • A native group rebuild during a hold cancels the recording, for example when the Bestie avatar finishes loading. Recording cancels safely, but abruptly. A real fix would update native controls in place.
  • VoiceOver:
    • The native Bestie button exposes only tap, so "Record transcript" and "Discard transcript" aren't reachable while idle.
    • During recording, Search and New are inert to touch but still reachable by VoiceOver.
  • The New menu is flat, so it loses the "Solo" / "Team" section titles and the divider.
  • The "no Bestie yet" avatar and the in-button resolving spinner become the plain agent glyph.
  • The vertical MergingNavigationGlass path and IosMessageCreateButton.navigationAxis are now unused on the Dart side.

Before and after

iPhone Duo simulator (iOS 27.2), connected to a local stand-in relay with no channels. Every image has a BEFORE (#9829) or AFTER (this PR) label bar.

Before After
Duo cover, Home Before, #9829: Search, New and Bestie as three separate 48 pt circles After, this PR: Search, New and Bestie in one native 48 x 156 pt glass capsule
Duo cover, New menu open Before, #9829: Flutter menu with Solo and Team sections After, this PR: flat native menu
Duo cover, Bestie press-and-hold attempt Before, #9829: Bestie avatar during a simulated hold After, this PR: Bestie glyph dimmed during a simulated hold
Duo fully open (unchanged) Before, #9829: 56 pt horizontal row After, this PR: same 56 pt horizontal row

Measured from accessibility frames on the cover: Search / New / Bestie go from three 48 pt circles at y 482 / 542 / 602 (60 pt pitch) to one capsule with 48 pt controls at y 500 / 548 / 596 (48 pt pitch). They stay centered at x 418, the same line as the bell and avatar.

Visible differences from #9829: Bestie shows the plain agent glyph, not the animated avatar. The New menu is flat and its order is reversed, because iOS reverses menus that open from the bottom edge.

Not captured: an actual Bestie recording. A simulated long press in the simulator didn't start one in either build.

Related issue

N/A. Builds on #9829 in this stack.

Testing

  • dart format and flutter analyze are clean, just file-size-check passes, and the full mobile suite passes (5,718 passed, 71 skipped).
  • home_page_test.dart was split into home_page_harness.dart and home_page_duo_rail_test.dart. The Duo journey checks the bottom capsule's size, bottom pin and center line, the actions' order, New's children, Bestie's avatar, Search opening search, the inert overlay during recording, and the horizontal bar when wide.
  • bestie_transcription_control_test.dart drives start / move / end / cancel through the rail link. ios_navigation_bar_test.dart covers the longPress payload and the actionLongPress dispatch.
  • Extended Swift testStandaloneRailGroupSharesOneVerticalCapsule: one vertical capsule of Search / New / Bestie, with a 0.5 s long-press recognizer only on Bestie.
  • Simulator captures: above.
  • Full Swift RunnerTests (123 tests, -parallel-testing-enabled NO): everything passes except 6 assertions in 2 ProfileSetupRecoveryTests cases (axisBehavior), which also fail on main (9c0bcd623).

🤖 Generated with Claude Code

On a Duo cover rail, Home's bottom group is now one native glass capsule
of three 48 pt IosNavigationBar controls, pinned to the rail bottom
(replacing the 220 pt reservation with the capsule's own 156 pt):

- Search: plain native action.
- New: native action whose children are a UIMenu, like the Community menu.
- Bestie: native agent avatar. Tap opens Bestie. Press-and-hold is
  recognized natively (new IosNavigationAction.onLongPress, a
  UILongPressGestureRecognizer and an actionLongPress channel call) and
  forwarded through an AgentRailLink to the existing voice surface.

DefaultAgentLauncher stays mounted beside the capsule, unseen and inert
while idle, publishes the native action, and draws the existing voice pill
while a hold is in progress. Wide Duo and ordinary iPhone keep
MessagesNavigationBar; its now-unused vertical branch is removed.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
Signed-off-by: Stephen Barnes <sbarnes@block.xyz>
@smbarne
smbarne added this pull request to stack #9836 November 20, 2026 21:15
@smbarne smbarne changed the title mobile: make Home's Duo rail Search, New and Bestie native rail controls (prototype) Prototype: mobile: make Home's Duo rail Search, New and Bestie native rail controls Nov 20, 2026
@klopez4212

Copy link
Copy Markdown
Contributor

🤖 Thanks for exploring this in a prototype. We’ve tried this navigation pattern on Duo before. With the features Home has today, I think we’d be unlikely to adopt it. It’s worth revisiting if we get to a point where people need to switch between distinct tabs.

@smbarne

smbarne commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Thanks for exploring this in a prototype. We’ve tried this navigation pattern on Duo before. With the features Home has today, I think we’d be unlikely to adopt it. It’s worth revisiting if we get to a point where people need to switch between distinct tabs.

Yeah I need to pull back on the full native for the bottom controls. However - it would be really nice if activity and the settings were in the right rail. Would you agree and accept a smaller, paired down PR around that?

This branch has not been deployed

No deployments
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