Skip to content

mobile: share one glass capsule for Home's Duo rail controls - #9818

Closed
smbarne wants to merge 2 commits into
duo-home-rail-actionsfrom
duo-rail-grouped-capsule
Closed

smbarne wants to merge 2 commits into
duo-home-rail-actionsfrom
duo-rail-grouped-capsule

Conversation

@smbarne

@smbarne smbarne commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #9817, the PR that moves Home's Activity and Community menu into the Duo rail. The rail drew every action as its own glass circle, so the two controls appeared as separate circles. They now share one vertical glass capsule.

  • IosNavigationAction gains sharesRailBackground, which defaults to off so other screens' rail controls don't change.
  • DuoToolbarPortal merges adjacent actions that set it into one rail control, sized 48 points taller per extra action, and passes the group to the standalone bar as actions.
  • In IosNavigationBar.swift, a standalone bar with actions builds one control group, and standalone groups stack vertically.
  • Single actions keep the existing leading path, keys and avatar-bounds tracking.
  • Home opts both controls in.

On wide Duo, an open conversation's rail controls now start below the shared capsule's real height (108 pt for two controls, 60 pt for one), so the gap below the capsule matches the usual 12 pt.

Before and after

iPhone Duo simulator (iOS 27.2), connected to a local stand-in relay with no channels.

Before (#9817) After (this PR)
Duo cover, Home Duo cover with #9817: bell and avatar as two separate rail circles Duo cover with this PR: bell and avatar in one vertical glass capsule
Duo cover, community menu Community menu from the separate avatar circle Community menu from the shared capsule
Duo unfolded, wide Unfolded wide layout with #9817: two rail circles Unfolded wide layout with this PR: one capsule

Measured from accessibility frames on the cover: bell at y 192 in both; avatar at y 252 with #9817 and y 240 with this PR (one 48 pt step inside the capsule).

Related issue

N/A. Builds on the previous PR in this stack.

Testing

  • New test/shared/widgets/duo_toolbar_test.dart: the detail rail control's top is +60 pt for one leading slot and +108 pt for two (fails on the old 120 pt offset), and adjacent shared actions form one 108 pt capsule.
  • Home Duo journeys now assert one 108-point rail control holding Activity then Community menu, with dispatch through the grouped actions.
  • New native test testStandaloneRailGroupSharesOneVerticalCapsule: one visible glass surface of 48×96, buttons stacked vertically, menu as the primary action.
  • On the rebased commit, dart format and flutter analyze are clean. The full mobile Flutter suite passed in the pre-push hook.
  • Swift RunnerTests on an iPhone 17 simulator (iOS 27.2, Xcode 27.2): 90 of 96 pass, including testStandaloneRailGroupSharesOneVerticalCapsule. The 6 failures are ProfileSetupRecoveryTests axisBehavior checks, which fail the same way on main (9c0bcd623); this stack doesn't touch that code.
  • Exercised on the iPhone Duo simulator: cover display, community menu and unfolded wide. See the captures above. Not yet tested on a physical Duo.

🤖 Generated with Claude Code

https://claude.ai/code/session_012S9h3iGU86Nj5WwYXABMHt

smbarne and others added 2 commits November 20, 2026 20:38
The Duo rail drew every projected action as its own standalone glass
control, so Home's Activity and Community menu appeared as two separate
circles.

IosNavigationAction gains sharesRailBackground. DuoToolbarPortal merges
adjacent actions that set it into one rail control, sized for one more
48-point control per extra action, and passes the group as the
standalone bar's actions. Natively, a standalone bar with actions builds
a single control group whose stack runs vertically, so the actions share
one capsule down the rail. Single actions keep the existing leading
path, keys, and avatar-bounds tracking, so other rail controls are
unchanged. Home opts its two controls in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012S9h3iGU86Nj5WwYXABMHt
Signed-off-by: sbarnes <sbarnes@squareup.com>
Home's two workspace rail controls now share one 108-point capsule, but
DuoToolbarScope still offset an open conversation's rail controls by
60 points per leading slot (120 points). The gap below the capsule was
24 points instead of the 12 points between other rail controls.

Compute both the grouped capsule height and the leading offset from one
helper: 48 points per control plus one 12-point margin. A single control
stays at 60 points, so the other one-slot callers do not change.

Co-authored-by: RemoteHorse <68deea58679ad75e9bf031fa370502f884c022db55043f5f3a19f5d8bb0edfe2>
Signed-off-by: sbarnes <sbarnes@squareup.com>
@smbarne
smbarne force-pushed the duo-rail-grouped-capsule branch from 0eb800d to deb8ace Compare November 20, 2026 20:46
@smbarne
smbarne removed this pull request from stack #9819 November 20, 2026 20:57
@smbarne

smbarne commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing: sbarnes decided to keep Activity and the Community menu as two separate rail controls, so the shared capsule is no longer wanted. #9829 now sits directly on #9817.

@smbarne smbarne closed this Nov 20, 2026
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