Skip to content

feat: Google Messages New conversation and New group UI - #599

Merged
an1ndra merged 17 commits into
Developfrom
feat/google-messages-new-group
Dec 2, 2026
Merged

an1ndra merged 17 commits into
Developfrom
feat/google-messages-new-group

Conversation

@an1ndra

@an1ndra an1ndra commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Matches the Google Messages start-chat flow, checked against the live app and its decompiled resource names.

  • New conversation: white To: field ("Type name, phone number, or email") and a full-width light-blue Create group pill. Tapping a contact starts a 1:1; a typed number offers Send to.
  • New group conversation: the same field in plural form, contacts in one rounded card with dividers and Mobile +number subtitles, check circles, and round chips (avatar + name) in the To field. With two picks the hint becomes Anyone else?, the title New group MMS, and a blue Next → pill appears bottom-right.
  • Repository.createGroup creates the thread from scratch (first address primary, everyone a recipient) and does not touch an existing 1:1. The contacts permission callback now reloads Contacts so the picker is populated immediately after the grant.

Verification:

  • ./gradlew :app:testDebugUnitTest green, including NewGroupFlowWiringTest, NewChatScreenFocusTest, RulesFirstReadTest.
  • scripts/test-new-group.sh drives Start chat → Create group → type Alex → type Mom → Next and asserts the chat opens with both names and two recipients: 7 passed / 0 failed on emulator-5556.
  • Checked against the live Google Messages APK: contact_bar_hint_empty, contact_bar_hint_filled, contact_picker_title_mms_group, start_chat_top_app_bar_title_single/group resource names and values match.

- New conversation is the Google Messages start-chat screen: a white "To:"
  field ("Type name, phone number, or email") and a full-width light-blue
  "Create group" pill, with no contact browser until something is typed.
  A typed number offers "Send to"; a contact starts a 1:1.
- Create group opens "New group conversation": the same To field in plural
  form, every contact in one rounded card with dividers and "Mobile +number"
  subtitles, check circles, and a chip (avatar + name) per pick. With two chips
  the hint becomes "Anyone else?", the title "New group MMS", and a blue
  "Next →" pill appears at the bottom-right.
- Repository.createGroup builds the thread from scratch and leaves an existing
  1:1 untouched; AppViewModel.createGroup opens it.
- The contacts permission callback reloads Contacts, so a picker opened right
  after the grant is not empty.
- French apostrophes use typographic quotes so aapt2 accepts the plurals.
- The New conversation page uses Google Messages' #F0F4F9 surface, an 8dp
  inset white To field, and the pale-cyan Create group pill with the dark navy
  label; the whole 48dp row is the touch target while the pill itself is 36dp.
- New group contacts are separate rounded cards with 6dp gaps instead of one
  card, matching the live app; selected rows use a fully rounded secondary
  container and the To chips sit inline.
- LightColors.surfaceContainer is now #F0F4F9, the colour Google Messages
  paints under both screens.
- Next from the group picker now opens Google Messages' naming screen:
  overlapping member avatars, "Group name (optional)", the visibility note,
  and a Done pill. Done saves the name (or keeps the generated one) and opens
  the chat; Back does the same.
- New conversation hides Create group while typing; results are one rounded
  card with dividers and Mobile +number subtitles.
- Contact search matches a word start, not an inner letter: "T" finds "Prize
  Team"/"T1", not "Dr. Patel Clinic".
- New group hides the list until typing and shows Anyone else? from the first
  chip.
- The Add group name screen now has Google Messages' geometry: 56dp member
  avatars in a 96dp block, a 52dp white field, the Clear text control, the
  "100 characters remaining" note (the name is capped at 100), and the Done
  pill at the live app's exact place above the keyboard.
- Short codes paint as "Mobile 198" instead of the contacts provider's stored
  "1 98", matching Google Messages' subtitle.
Live measurement on the emulator (1080x2400, 420dpi) now matches:

- 57dp member avatars at +/-19dp in a 96dp block (GM's container is
  414..664 x 420..670; ours 416..664 x 422..670).
- The field hint starts at 105px like GM's, the Clear text control sits at
  GM's exact [923,773][986,836], and the counter is invisible until the field
  has text, then reads "7/100" at GM's [105,888][930] line.
- The visibility note lands on GM's 972 baseline, and the Done pill is at
  [901,1357][986,1410] against GM's [901,1354][985,1407].
…ming

Live measurements on the emulator (1080x2400, 420dpi) now agree:

- The To field is 46dp, the Create group pill 40dp tall at a 12dp inset
  (32..1047 x 392..496, exactly the live band), and the results rows are 72dp
  with 2dp gaps of the page colour instead of a drawn divider.
- A typed number offers "Send to 555-1239" with the typed digits as the
  subtitle, the same title and subtitle lines the live app paints at
  418..481 / 481..534.
- The matched word start is painted in the accent colour, as Google Messages
  highlights the T in "Prize Team".
- The group naming screen shows two people at 56dp diagonally (414..664 x
  420..670) and three at 48dp as one above a pair (414..665 x 436..671 against
  the live 414..664 x 437..670).
Measured against Google Messages on the emulator (1080x2400, 420dpi):

- Group picker rows: 2dp gaps (5px) instead of 6dp, 72dp tall with 12dp screen
  insets, a 14dp white card and a fully rounded #CBDBF2 band for a picked row
  (GM 575..763 inside the 381..569 card rhythm), and a 20dp check circle at
  GM's 917..969.
- The To field matches GM's 46dp band at x 32..1047, and the picker keeps focus
  after a pick so the next name can be typed, as the live app does.
- Contact avatars on New conversation, the group picker (rows and chips) and
  the Add group name screen now paint the contact's initial instead of the
  silhouette; a raw number still gets the silhouette, matching GM's list.
- PersonAvatar gained an optional `initials`; the shared inbox/chat avatar is
  untouched unless a caller passes it.
Measured on the emulator with the system in night mode:

- Start-chat surfaces follow the live app in both schemes: the To field is
  white in light and the page colour (#1E1F20) in dark, result rows and picker
  cards are white / #131314, the Add group name field is white / #333537, and
  the picked band is #CBDBF2 / #343A43.
- The picker's Next pill now sits where GM's does above the keyboard (text top
  1355 against GM's 1354); it and the naming screen share one
  keyboardClearance() helper.
- Chips are labels, not buttons: Delete in the empty To field removes the last
  one, which is what Google Messages does (tapping a chip is a no-op there).
The picker's suggested contacts are one grouped card, not a stack of
separately rounded rows: only the first row rounds its top corners and the
last row its bottom ones, with 2dp on the inner edges and a stadium for a
picked row. Measured off the live app in dark mode: first card 378..567 with
the 14dp top arc matching GM's 381..569, the middle card square, last card
ending in GM's bottom arc; a lone result keeps all four corners.
- The hint was drawn in place of the text field's inner content, so an empty
  To field never painted a caret; it now sits behind the input and the caret
  blinks over it (verified in 3 of 6 consecutive frames at x 193).
- In dark the To field is the page colour and disappeared; it now carries a
  1dp outlineVariant border, matching the field Google Messages draws, while
  the light theme keeps the plain white card.
- Group conversations had a generic silhouette avatar. They now use
  Google Messages' stacked initials (first member top-left, second
  bottom-right) for generated groups, one initial for a named group, a
  contact's initial for 1:1 chats, and the silhouette for bare numbers, in
  both the conversation list and the chat bar.
@an1ndra
an1ndra force-pushed the feat/google-messages-new-group branch from c3392f4 to 442691b Compare December 2, 2026 04:40
An sms-ie backup's MMS records carry a sender, the shipping addresses and the
exporting thread id. The importer only ever read one peer address, so a group
came back as a 1:1 thread per sender. Now:

- SmsIeBackup parses every recipient and the thread id;
- ImportGroups derives the participants (sender + recipients, minus this
  device's own numbers) and a formatting-independent key;
- the import creates one conversation per participant set, writes
  conversation_recipients for every member, generates the group title, files
  later messages of the same thread into it and keeps each incoming bubble's
  sender in messages.address; a merge import finds the existing group by its
  participant set first.

The group details header also uses the stacked ConversationAvatar, so it shows
Alex/Mom like the list and the chat bar.
The chip was 24dp tall around a 20dp avatar with a 2dp start inset, so the
40dp-tall pill's rounded cap cut inside the avatar and the picture overhung the
pale background. It is now a 28dp pill with 4dp padding all round and an 8dp
gap to the name, so the avatar's edge follows the cap.

The chip also used surfaceContainer, which is the page colour in dark and made
the pill invisible against the To field. It now takes a startChatChip role:
#F0F4F9 in light (Google Messages' fill) and #28292C in dark, one step above
the page.
The roster is built from Contacts' Phone rows (name + number), so a typed
email address could never match. Both hints now say "name or phone number" in
all 14 locales instead of advertising a search that does not exist.
- Next only remembers the picked people: the thread is created when the name
  step is finished, so Back from Add group name returns to the picker with the
  chips still set (as Google Messages does) and leaves no half-made group.
- The group avatar now shows up to four members: pairs stack as before, three
  become Google Messages' triangle (26dp circles on a 48dp slot, top centred),
  and four sit in a 2x2 grid. Measured on the live list: a trio draws three
  69px circles, top centre plus the two bottom corners.
The chips branch rebuilds the To field when a pick lands; requesting focus in
the same effect could run before the new node was attached, so the keyboard
went away and the next typed name was appended to the previous query instead
of starting a new search. The effect now waits one frame first, which is what
made a ten-person selection flaky.

Adds scripts/test-new-group-ten.sh: ten picks, Next, name, Done, and a thread
with ten recipients.
No `Color(0x…)` literal appears in New conversation, the group picker or Add
group name; every measured surface keeps its documented content role, and all
seven role pairs clear the 4.5:1 body-text floor in light, dark and amoled
(lowest 6.39:1).
@an1ndra
an1ndra merged commit 55c5e37 into Develop Dec 2, 2026
1 check passed
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