Skip to content

feat(app): v2 cleaner UX 10 — chat in two colours: a solid question, an unboxed answer, numbered sources - #20795

Closed
Itaxh1 wants to merge 2 commits into
BasedHardware:mainfrom
Itaxh1:feat/v2-chat-messages
Closed

Itaxh1 wants to merge 2 commits into
BasedHardware:mainfrom
Itaxh1:feat/v2-chat-messages

Conversation

@Itaxh1

@Itaxh1 Itaxh1 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: Chat reads as a conversation in two colours, the ink and the canvas. Your message is a solid pill at the right in the accent (black in light, white in dark) with the Messages tail; Omi's answer is plain text on the page with no box; the conversations it drew on are a numbered list under the answer, matching the [n] markers in the words. Every control is the ink at an opacity instead of an outline, the way iOS draws fills. The message box is one filled field that keeps its colour while a reply streams in, and a voice note that failed to transcribe says why in the field with Try Again where Send sits. UI only, no backend change, same screens, taps and data as today. A tenth part of the v2 cleaner UX; it needs #20342 first. Screenshots below, from an iPhone 15 Pro Max.

Part 10 of the v2 cleaner UX (tracked in #20719). The plan and merge order are in #20342. This PR needs #20342 (the design foundation) merged first; until then it also lists that PR's 21 files. This PR's own change: compare (17 files, +882 / −259; no translation changes, every string already exists).

What changed and why

Chat today draws both sides in grey boxes on a dark page, with emoji tiles for the sources and a loud red "Error" when a voice note fails. Users read it as a web page inside the app. This PR keeps every feature and restyles the thread so it reads like a native conversation.

  • Your message (user_message.dart): a solid pill in OmiColors.accent with onAccent words, the Messages tail at its bottom corner, and quoted "Ask about this" context inside the pill above the words.
  • Omi's answer (ai_message.dart, markdown_message_widget.dart): text on the page, no card, no fill. Body 17/1.45, headings never smaller than the words, list bullets at the words' size. A [n] pointing at a source is a small tertiary marker inside its sentence (a markdown InlineSyntax), not its own line.
  • Sources (ai_message.dart): a plain numbered list under the answer, title over date, hairlines between, the number matching the marker. No emoji, no chevron, no card. Tapping a row still opens the conversation with the same loading spinner in the number's place.
  • An app's answer carries the app's avatar and name above it (_AppByline), looked up from AppProvider when the message has no sender attached.
  • Fills, not outlines (chat_bubbles.dart → ChatInk): the close circle, the follow-up chip, the starter questions, the app pill in the composer, a task or chart card inside an answer and a failed reply are all textPrimary at an opacity (5.5% light / 10% dark), with no border. When a chat app is chosen, a capsule in the header shows it and opens Chat Apps, like the composer pill does.
  • The message box (page.dart): one filled field with no edge, the same colour at the live edge and when scrolled, so it never blinks while a reply streams in (an earlier cut turned it solid on scroll and read as a blink on every tool call).
  • A kept recording (voice_recorder_widget.dart, page.dart): after a transcription fails, or when a recording is found from last time, the field says why in words ("Failed to transcribe audio" / "Recording found") in secondary ink with the kept waveform dimmed beside it; discard stays at the left of the button row and a filled Try Again circle takes Send's place. Before, a red "Error" label and a refresh glyph were crammed into the waveform row with a lone × below.
  • Action bar (message_action_bar.dart): Copy, Helpful, Not Helpful and Share as 15 pt tertiary glyphs on 44 pt targets, aligned to the text.

Everything else is as on main: streaming, thinking blocks, charts, task cards, file attachments, Chat Apps, the Latest chip, ratings, Clear Chat.

Screenshots

From an iPhone 15 Pro Max running this branch on top of #20342 (the summary bullets are blurred; they are the author's own conversations). Before is main's chat: grey bubbles on both sides, emoji source tiles.

Light Dark
Light: an answer with five numbered sources, the follow-up pill and the filled message box Dark: the same answer, white ink on black

Product invariants affected

none (check_mobile_ux_contract.py INV-UI-3: no hand-rolled UI increase across the changed files).

How it was verified

  • bash app/test.sh (the full hermetic suite) on this branch: 4,677 passed, 14 skipped, 0 failed (plus the 138 spine/contract tests of its first phase), exit 0.
  • dart analyze lib/pages/chat test/widgets: no new issues (the infos are all on main). dart format --line-length 120: clean.
  • .github/scripts/check_mobile_ux_contract.py --changed-files … --base HEAD: OK.
  • scripts/pr-preflight with this body: passed.
  • On the phone: the combined v2 build with this chat ran on an iPhone 15 Pro Max on 2026-10-06 (light and dark, the screenshots above); the kept-recording state was exercised with the network off. The last change (the message box keeping one colour instead of turning solid on scroll) was verified by the widget test below and has not been on the phone yet.

Tests

  • test/widgets/chat_message_style_test.dart (new, 7 tests): the question is a solid accent pill with the tail and onAccent words; the answer has no decorated box around its MarkdownBody; the answer's words are larger than the question's callout and no heading is smaller; a [1] marker is footnote-sized and tertiary inside its sentence; the sources are a numbered list with one hairline, no emoji; the follow-up is a filled pill with no outline and a failed reply a filled box; the action glyphs are 15 pt tertiary on 44 pt targets.
  • test/widgets/chat_memory_voice_controls_test.dart: a kept recording (failed or found) says why in words with no "Error" label or refresh glyph, Try Again sits to the right of discard and calls retry(), discard still works; the message box keeps its one colour while four reply steps stream in and while the user scrolls up and back.
  • Existing chat suites (chat_scroll_layout_test, chat_citation_taps_test, chat_ux_contract_test, chat_presentation_test, chat_content_block(s)_test, semantics_baseline_test, test/pages/chat) pass unchanged.

Failure class (fixes)

Failure-Class: none

Review in cubic

Itaxh1 added 2 commits October 5, 2026 04:49
…ith a tail, an unboxed answer, numbered sources

Chat reads as a conversation in the ink and the canvas. The user's words sit in a
solid accent pill with the Messages tail; Omi's answer is text on the page with no
box; the conversations it drew on are a plain numbered list under the answer,
matching the [n] markers in the words (a markdown InlineSyntax, footnote-sized and
tertiary). Everything else is the ink at an opacity instead of an outline: the
close circle, the follow-up and starter pills, the app pill in the composer, a
task or chart card inside an answer, a failed reply. When a chat app is chosen a
capsule in the header shows it and opens Chat Apps; an app's answer carries the
app's avatar and name.

The composer is one filled field with no edge and keeps its colour whether the
thread is at its live edge or scrolled, so it never blinks while a reply streams
in. A recording that failed to transcribe, or one found from last time, says why
in words in the field with the kept waveform dimmed beside it; discard stays at
the left of the button row and Try Again takes Send's place, instead of a red
Error label and a refresh glyph crammed into the waveform row.

UI only. Same screens, taps and data as main; no backend change; no new strings.
Stacked on the design foundation (BasedHardware#20342).
@Itaxh1
Itaxh1 requested a review from Git-on-my-level October 6, 2026 07:38
@Git-on-my-level

Copy link
Copy Markdown
Member

Reviewed this head (2ebb79c) statically, file by file. This is a coherent, well-executed restyling of the chat thread, and the supporting design foundations and tests are solid. Some notes before a maintainer signs off:

What I verified

  • user_message.dart — the solid accent pill (OmiColors.accent / onAccent) with the tail, quoted context inside the pill; presentation-only, message text and callbacks unchanged.
  • chat_bubbles.dart (new) — ChatInk.fill/fill2/sep centralize the "ink at an opacity" materials; every consumer (chat_starters.dart, chat_followup_chip.dart, chat_block_chrome.dart, chart_message_widget.dart) swaps border+surface for these fills consistently, keeping 44 pt targets and keys intact.
  • markdown_message_widget.dart — the new _SourceMarkerSyntax (\[\d{1,2}\](?!\()) renders [n] markers as inert styled text, and its negative lookahead correctly leaves real markdown links [1](url) untouched. Answer typography moved to OmiType.body 17/1.45 with headings never smaller than the words.
  • ai_message.dart — the _AppByline addition gives app answers a name/avatar so mixed threads read as two voices; typing indicator restyled without behavior change.
  • voice_recorder_widget.dart — the failed-transcription state now explains itself in words (never red) with Try Again in the button row; the retry() path gained coverage in chat_memory_voice_controls_test.dart.
  • omi_canvas.dart / omi_tokens.dart — the OmiCanvas InheritedWidget (correct no-rebuild lookup) plus 16 new palette fields; light canvas is white with grouped-grey cards, dark values match the existing surfaces so dark mode doesn't shift.
  • pubspec.yaml + assets/fonts/ — Instrument Sans bundled with its SIL OFL 1.1 license file shipped; no new package dependencies.
  • .github/scripts/dead_code/flutter.allowlist.json — the device_tile.dart entry is honest and self-expiring (removed once feat(app): v2 cleaner UX 6/9 — Flat Home: white canvas and glass header #20328/feat(app): v2 cleaner UX 8/9 — conversation rows show their device, Try again in line #20717/feat(app): v2 cleaner UX 9/9 — Daily Recaps: flat rows, counts that open their lists #20718 land); thanks for documenting the sequencing.
  • Tests — chat_message_style_test.dart (+196) and omi_canvas_test.dart (+206) directly pin the new visual contract; good investment.

Before merge

  1. Merge order: this needs feat(app): v2 cleaner UX 1/9 — design foundation (no visible change) #20342 first, and the overall chat visual direction (two-colour thread, unboxed answers) is a product call — leaving for human maintainer review rather than an automated verdict.
  2. CI on this head: Hygiene, Formatting, Mobile Release Eligibility and the backend merge gate passed, but Dart Analyze & Tests and the iOS/Android compile checks were skipped here. Please make sure the Dart suite (including the new widget tests) runs green on this head before merge — e.g. via the full-CI label or a maintainer re-run.

Nice work — the diff is cohesive around one outcome, the docs (README.md, ux-contract.md, changelog entries) match the code, and the test coverage is unusually good for a styling PR.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution flutter flutter work labels Oct 6, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Reviewed the full diff statically (CI is gated on fork PRs, so the substantive jobs never ran — nothing here was executed).

This is a coherent, genuinely two-sided restyle and the craft shows. Per file:

  • app/lib/pages/chat/widgets/user_message.dart — the accent pill with the Messages tail is the strongest change; quoted context now renders inside the pill, and HumanMessage.fill/ink correctly source OmiColors.accent/onAccent so both palettes stay correct.
  • app/lib/pages/chat/widgets/markdown_message_widget.dart — the custom _SourceMarkerSyntax that rewrites [n] into a footnote-styled tertiary marker is the riskiest rendering change here (a new md.InlineSyntax on every answer); the scaled heading floor (never smaller than body) is a nice accessibility touch.
  • app/lib/pages/chat/widgets/ai_message.dart — ConversationSourcesList switching from emoji tiles to numbered rows that match the [n] markers is a real information-design improvement; _AppByline giving app answers a name/avatar is a behavior addition riding along in the restyle.
  • app/lib/pages/chat/widgets/chat_bubbles.dart — ChatInk.fill/fill2/sep centralizes the opacity system; good that every call site (charts, content blocks, starters, follow-up chips) now routes through it instead of hand-rolled borders.
  • app/lib/ui/omi_tokens.dart + omi_canvas.dart + omi_glass.dart + omi_line_icon.dart + omi_segmented_control.dart + omi_grouped_page.dart — this is the design-foundation layer shared with feat(app): v2 cleaner UX 1/9 — design foundation (no visible change) #20342 (canvas inheritance for page/card colours, glass floats, inline SVG glyphs, Cupertino segmented control). OmiCanvas deliberately uses getInheritedWidgetOfExactType (no rebuild dependency) — correct for a static marker.
  • app/lib/pages/chat/widgets/voice_recorder_widget.dart — failure copy replacing the red error (with kept dimmed waveform + Try Again in the button row) reads like a genuine UX fix, not just restyling.
  • app/pubspec.yaml + app/assets/fonts/* — Instrument Sans bundled with its OFL 1.1 license text (InstrumentSans-OFL.txt) and registered at weights 500/600/700; licensing is clean.
  • .github/scripts/dead_code/flutter.allowlist.json — the device_tile.dart entry is honestly reasoned (unreachable until feat(app): v2 cleaner UX 6/9 — Flat Home: white canvas and glass header #20328/feat(app): v2 cleaner UX 8/9 — conversation rows show their device, Try again in line #20717/feat(app): v2 cleaner UX 9/9 — Daily Recaps: flat rows, counts that open their lists #20718 land), but note this edits dead-code enforcement data, which is part of why the PR sits in maintainer-review territory rather than pure app code.
  • app/test/widgets/chat_message_style_test.dart (new, incl. RTL mirror assertions), app/test/widgets/ui/omi_canvas_test.dart (new, palette-reset hygiene), app/test/widgets/chat_memory_voice_controls_test.dart (extended with retry-branch coverage) — real assertions, not snapshots; since the analyze/test jobs are skipped on fork PRs, please make sure they run on this branch or expect to re-run them after retargeting onto feat(app): v2 cleaner UX 1/9 — design foundation (no visible change) #20342.
  • Also checked: chart_message_widget.dart, chat_block_chrome.dart, chat_starters.dart, chat_followup_chip.dart, chat_chrome.dart, chat_composer_parts.dart, message_action_bar.dart (48pt targets → 44pt HIG alignment with Transform.translate for glyph alignment), omi_button.dart (wrapLabel), omi_icon_button.dart, omi_settings.dart, omi_sheet.dart, omi_search_field.dart, omi_locked_preview.dart, header_circle_button.dart, device_tile.dart, page.dart, ui.dart, gen files, changelog entries, README/docs updates — all presentation-only, no data-model or behavioral regressions spotted; docs match the implemented visuals.

Two things for the maintainer:

  1. The [n]-marker syntax assumes well-formed source numbering in AI output; malformed or out-of-range markers fall back to plain text (verified in the syntax), so no crash path, but the pairing of marker number to list row is worth an eye in practice.
  2. Bundle impact: four TTF weights added. If Settings/Home/Tasks are the only Instrument Sans surfaces, consider whether all four weights are referenced.

UI-only as claimed: no backend, auth, data, or workflow changes; every user-facing string reuses an existing l10n key. Leaving the product-direction call (the new chat look) and the stacked merge order behind #20342 to human maintainer review; needs-maintainer-review already reflects that.

AI-generated maintainer feedback on behalf of the Omi maintainers.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feat(app) v2 cleaner UX part 10 (chat colours) - mobile feature, approve-only

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2 cleaner UX 10: chat restyle — mobile UI feature, part of the known v2 UX series (not flagged). Approve-only; depends on #20342 landing first.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Itaxh1 v2 cleaner UX (chat colours) -- feature, approve-only

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Itaxh1 v2 cleaner-UX series — feature (mobile/flutter), explicitly carved out as normal per standing memory (self-bounty flag applies elsewhere on this account, not this series) — approve only, not a

@undivisible

Copy link
Copy Markdown
Collaborator

Superseded by #20835. Closing; please follow that PR.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Itaxh1 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants