Skip to content

Commit 1311492

Browse files
mahanticodex
andauthored
Polish huddle portraits and thread layout (#1406)
Signed-off-by: Arjun Mahanti <[email protected]> Co-authored-by: OpenAI Codex <[email protected]>
1 parent cdcb009 commit 1311492

24 files changed

Lines changed: 1298 additions & 329 deletions

‎docs/huddles.md‎

Lines changed: 63 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,33 @@ The proposed `text-call-leave` role preserves the requested Red 10 in both theme
4949
It is a documented contrast exception for these controls: the light-mode Leave
5050
label measures 3.09–4.37:1 across its opaque fills; dark-mode APCA is Lc 35.2–40.4.
5151
Glass depends on its backdrop and is not certified by those opaque measurements.
52-
The separate window uses matching neutral gray controls for microphone and Leave,
53-
with a Red 10 Leave icon.
52+
The separate window uses shared round glass controls for microphone, chat, and Leave,
53+
with a Red 10 Leave icon. Incoming requests use a large centered portrait over
54+
blurred profile artwork, with a red decline icon on the left, a green join icon
55+
on the right, and the caller label between them. Initials scale with the portrait
56+
and render at 50% opacity.
5457
New arrivals slide
5558
and scale into the front of the stack; reduced motion removes that movement. The
5659
latest four avatars remain visible, with a matching avatar showing the count for other participants. Click the
5760
waveform or avatars once connected to open the
58-
separate Huddle window. The window borrows mobile’s avatar-cloud layout: you are centered alone, then
59-
move left as other participants gather on the right. Up to ten peers use the
60-
mobile-inspired cluster’s varied avatar sizes, with an overflow count for larger calls.
61-
Names appear on hover or keyboard focus. Nearby portraits shift aside for the
62-
active name capsule, then settle back when it closes. Only one name is shown
61+
separate Huddle window. You are centered alone; in two- and three-person calls,
62+
you move left as peers gather on the right in a mobile-inspired cluster. With
63+
four or more participants, you anchor the center of a surrounding peer ring.
64+
Up to ten peers appear, with an overflow count for larger calls.
65+
Names appear on hover or keyboard focus. In small calls, nearby portraits shift
66+
aside for the active name capsule, then settle back when it closes. In the ring,
67+
names sit inside portraits without moving neighbors. Only one name is shown
6368
at a time; reduced motion makes the layout change immediate.
64-
A soft halo around each speaker eases between audio levels with a restrained expansion,
65-
responding to their own microphone or received audio,
66-
then fades after speech stops. The window uses these halos instead of a footer
67-
waveform; the compact player keeps its waveform. Muting clears only your halo.
68-
Arrivals fade and scale in; reduced motion removes those transitions. Closing that window or navigating to another conversation
69+
A four-pixel ring appears around each speaker at 50% opacity, responding to
70+
their own microphone or received audio, then fades after speech stops. The ring
71+
uses blurred avatar artwork inside a crisp stroke; initials use the neutral
72+
fallback tint. The compact player keeps its waveform. Muting clears only your
73+
ring. Portrait scale and rotation respond subtly to speech with softened motion.
74+
Window portraits fill the stage: solo artwork can reach 320px; duets use roughly
75+
42% of the stage width per portrait, and groups retain a tightly packed cloud of
76+
varied sizes. Portraits gently grow with their audio level.
77+
Arrivals fade in with a slight rotation and a spring that overshoots before settling.
78+
Reduced motion removes the rotation, scale, and speaker growth. Closing that window or navigating to another conversation
6979
keeps audio connected. Leave releases the microphone and closes the companion.
7080
Native call completion also retires it after a renderer reload/crash. The companion
7181
has no identity, signing or microphone permissions. Failed companion updates also report their error in the main app toast stack,
@@ -86,8 +96,8 @@ conversation/community changes. Microphone capture still requires an explicit cl
8696

8797
## Audio settings
8898

89-
The gear beside the compact microphone (before the Leave divider) and the matching
90-
button opposite minimize in the companion open the same Audio settings popover.
99+
The gear beside the compact microphone (before the Leave divider) and the
100+
ghost button at the companion’s bottom left open the same Audio settings popover.
91101
Choose a microphone or speakers, or follow the system default. Choices apply to the
92102
current call and update both views; changing the microphone preserves mute. Device
93103
lists refresh when hardware changes and whenever the popover opens. If switching
@@ -103,14 +113,15 @@ or gain controls are included. Physical device switching still needs a native tr
103113

104114
A new Huddle started by another member of a DM appears in both the glass capsule
105115
and the focused Huddle window, even while viewing another conversation. Both show
106-
the caller's avatar and equal-width Join/Decline controls. These use opaque Green 10
107-
and Red 10 fills with inverse labels in both themes; hover uses step 9. They remain
108-
opaque over glass without changing the active-call Leave treatment. The requested
109-
bright-fill/inverse-label pairing has a scoped contrast exception for these incoming
110-
controls; it does not meet every normal text contrast target. The compact label is
111-
“[Name] calling”, with equal padding above, below, and before the avatar. The window's single title
112-
puts “[Name]” on its own line above “is calling”; long names wrap within the window. Channel Huddles keep their existing header and
113-
card join controls without opening an incoming request.
116+
the caller's avatar and equal-width Join/Decline controls. The compact capsule uses
117+
opaque Green 10 and Red 10 fills with inverse labels in both themes; hover uses
118+
step 9. This bright-fill/inverse-label pairing retains its scoped contrast
119+
exception and does not meet every normal text contrast target. The compact label
120+
is “[Name] calling”, with equal padding above, below, and before the avatar.
121+
The window uses round glass icon buttons: decline on the left and join on the
122+
right, with accessible names and red/green icons. Its single-line “[Name] is
123+
calling” label sits between the controls; long names truncate. Channel Huddles
124+
keep their existing header and card join controls without opening an incoming request.
114125

115126
Accepting keeps the caller visible in both surfaces while the connection is prepared,
116127
with Cancel available. Once connected, Motion moves and scales that same avatar
@@ -143,7 +154,10 @@ to send and Shift+Enter for a new line. The detached window sends typed requests
143154
through a per-room capability to the main app, which retains upload preparation,
144155
membership checks, signing, and outbox admission. GIF discovery and search also
145156
run through this owner, using its community and the enabled emoji contribution;
146-
the companion has no direct relay HTTP permission. The tabs stay above the scrolling content. Thread uses
157+
the companion has no direct relay HTTP permission. The tabs stay above the scrolling content. Discussion opening uses the shared
158+
PanelDock curve; closing finishes before requesting the native window resize.
159+
Reopening interrupts the exit. Keyboard and reduced-motion toggles are immediate.
160+
The regular composer owns its inset without extra huddle-wrapper padding. Thread uses
147161
the existing relay session for message history, sending, and failed-message
148162
Retry/Discard. Closing this panel or minimizing the window does not end audio or
149163
cancel an accepted message delivery. Text drafts survive tab changes and reopening. Attachment drafts survive tab changes,
@@ -271,3 +285,29 @@ This legacy exception assigns no parent relationship; parent verification still
271285
requires independent signed evidence. Other unproven rooms remain ordinary
272286
navigation destinations. A missing or failed receipt lookup never removes channel
273287
access. Relays without creator identity metadata also use this fallback.
288+
289+
## Portrait interactions and controls
290+
291+
Window portraits support temporary drag-and-toss play: direct pointer tracking,
292+
release momentum, damped wall bounces inside the participant stage, and a spring
293+
back to their current layout positions, with a firm return and restrained rebounds. Re-grabbing interrupts the throw;
294+
resizing clears displacement. Reduced motion keeps dragging but returns portraits
295+
immediately on release. None of this changes participant order or call state.
296+
297+
The connected window's bottom bar keeps mute, chat, and leave centered. Audio
298+
settings sits at the left padded edge and minimize at the right, vertically
299+
aligned with the main controls. Both are large ghost buttons with matching 22px
300+
icons in the secondary text color. When the call area cannot fit all five
301+
controls, the main controls stay centered on the first row and settings/minimize
302+
occupy opposite edges of a second row.
303+
304+
Window artwork has a stable per-person tilt within ±10°. Speech gently nudges
305+
that angle; reduced motion keeps the resting tilt without speech-driven rotation.
306+
307+
With four or more participants, the local portrait anchors the center and peers
308+
form a surrounding ring. The whole composition fits the participant stage’s
309+
width and height, with space reserved for speech emphasis and names. Dense calls
310+
reduce peer diameters to preserve separation; the existing overflow indicator
311+
remains. Solo, duet, and three-person calls retain their small-call arrangement.
312+
Names in the centered layout reveal inside the portrait’s lower edge without
313+
moving the group or covering neighboring portraits.

‎src/app/App.profile.test.tsx‎

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -173,26 +173,11 @@ it("opens profile settings from the account menu header", async () => {
173173
"Update this community’s profile. Other community profiles stay unchanged.",
174174
),
175175
).toBeVisible();
176-
await within(settings).findByRole("textbox", { name: "Display name" });
177-
await user.click(
178-
within(settings).getByRole("button", { name: "Close Settings" }),
179-
);
180-
await waitFor(() =>
181-
expect(screen.queryByRole("dialog", { name: "Settings" })).toBeNull(),
182-
);
183-
if (!services) throw new Error("Missing services");
184-
await act(async () => {
185-
void services?.navigation.open({
186-
version: 1,
187-
kind: "settings",
188-
section: "profile",
189-
});
190-
});
191-
const reopened = screen.getByRole("dialog", { name: "Settings" });
192176
expect(
193-
within(reopened).getByRole("textbox", { name: "Display name" }),
177+
await within(settings).findByRole("textbox", { name: "Display name" }),
194178
).toHaveValue("Community name");
195-
expect(within(reopened).queryByText(/Loading your profile/)).toBeNull();
179+
// Dismiss/reopen belongs to the unsaved-edits journey below; cached loading
180+
// is covered with a held refresh in ProfileSettings.test.tsx.
196181
});
197182

198183
it("opens Plugins from the account menu and switches back to profile settings", async () => {

‎src/bundled/huddles/HuddleAudioSettings.tsx‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import {
1212
export function HuddleAudioSettings({
1313
state,
1414
compact = false,
15+
quiet = false,
1516
refresh,
1617
select,
1718
}: {
1819
state: AudioSettingsState | undefined;
1920
compact?: boolean;
21+
quiet?: boolean;
2022
refresh(): void;
2123
select(kind: "input" | "output", id: string): void;
2224
}) {
@@ -30,10 +32,16 @@ export function HuddleAudioSettings({
3032
render={
3133
<IconButton
3234
size={compact ? "toolbar" : "large"}
33-
variant={compact ? "ghost" : "subtle"}
35+
shape={compact ? "control" : "round"}
36+
variant={compact || quiet ? "ghost" : "subtle"}
3437
aria-label="Audio settings"
3538
title="Audio settings"
36-
icon={<GearIcon size={compact ? 16 : 22} />}
39+
icon={
40+
<GearIcon
41+
size={compact ? 16 : 22}
42+
className={quiet ? "text-secondary" : undefined}
43+
/>
44+
}
3745
/>
3846
}
3947
/>

0 commit comments

Comments
 (0)