Skip to content

feat: app bar and thread drawer in the example - #38

Open
divyanshub024 wants to merge 5 commits into
feat/message-menu-and-text-selectionfrom
feat/example-thread-drawer
Open

feat: app bar and thread drawer in the example#38
divyanshub024 wants to merge 5 commits into
feat/message-menu-and-text-selectionfrom
feat/example-thread-drawer

Conversation

@divyanshub024

@divyanshub024 divyanshub024 commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

The example gets app chrome: a flat AppBar in the Flow tokens with the thread's title (its opening question), a drawer button and a new-chat action, and a Drawer holding a FlowThreadList over the screen's conversations. Stacked on #37.

  • The screen now holds a map of threads; _messages is the active one, so the chat wiring is unchanged. Switching threads stops any stream and clears the pending attachments.
  • One package change alongside: FlowChatView re-reads its jump-to-latest state from the thread's first metrics, so a thread keyed per conversation does not carry the last one's button.

Screenshots

App bar Drawer
attached separately attached separately

How this was verified

  • iPhone 17 Pro simulator: title updates on send, the drawer lists the thread under Today with the selection fill, new chat from the bar and the drawer.
  • flutter analyze clean in example/; dart format . applied.

Checklist

  • flutter analyze lib and flutter analyze in example/ and playground/ are clean
  • dart format . applied
  • Exercised in the playground — with a stage demo added or updated if this is a new component or variant
  • Any new entry under dependencies: in pubspec.yaml is flutter.dev-published, forces no configuration on hosts that never use the feature, and is argued in this PR
  • Nothing model-facing — no prompts, schemas, or provider/network calls
  • New public API is exported from lib/flow_ui.dart and documented in docs/ and the README table
  • CHANGELOG.md updated for user-facing changes, with breaking changes called out
  • PR title follows conventional commits (feat:, fix:, refactor:, docs:, chore:)

Note

Low Risk
Example-app-only UI and local state; no package API or auth/network changes.

Overview
The example chat screen gains multi-conversation hosting and navigation chrome, without changing the flow_ui package.

Message state moves from a single list into a thread map with an active id; _messages stays a getter/setter on the active thread so send/stream logic is largely unchanged. Users can open threads and start new chats from a Flow-styled AppBar (title from the first user message) and a drawer wired to FlowThreadList. Per-thread composer drafts are saved when switching; switching also stops in-flight generation and clears pending attachments. Streaming and late image measurement call _update with the originating thread id so replies still land on the right conversation if the user navigates away mid-stream. FlowThread gets a ValueKey per thread for separate scroll state, and _stop no-ops when nothing is generating.

Reviewed by Cursor Bugbot for commit 1809303. Bugbot is set up for automated code reviews on this repo. Configure here.

@divyanshub024
divyanshub024 force-pushed the feat/message-menu-and-text-selection branch from 51e42af to bc6e368 Compare August 29, 2026 22:16
@divyanshub024
divyanshub024 force-pushed the feat/example-thread-drawer branch from 4adc173 to 690dc0b Compare August 29, 2026 22:16
Comment thread example/lib/main.dart
@divyanshub024
divyanshub024 force-pushed the feat/message-menu-and-text-selection branch from bc6e368 to f7a766e Compare August 30, 2026 07:43
@divyanshub024
divyanshub024 force-pushed the feat/example-thread-drawer branch from 690dc0b to b25f82a Compare August 30, 2026 07:44
Comment thread example/lib/main.dart
@divyanshub024
divyanshub024 force-pushed the feat/message-menu-and-text-selection branch from f7a766e to f14a149 Compare August 30, 2026 08:07
@divyanshub024
divyanshub024 force-pushed the feat/example-thread-drawer branch from b25f82a to 2afa483 Compare August 30, 2026 08:07
Comment thread example/lib/main.dart
Comment thread example/lib/main.dart
Comment thread example/lib/main.dart
@divyanshub024
divyanshub024 force-pushed the feat/message-menu-and-text-selection branch from f14a149 to b5bb110 Compare August 30, 2026 08:24
@divyanshub024
divyanshub024 force-pushed the feat/example-thread-drawer branch from 2afa483 to 3909fce Compare August 30, 2026 08:24
@divyanshub024
divyanshub024 force-pushed the feat/message-menu-and-text-selection branch from b5bb110 to 7630fb1 Compare August 30, 2026 08:36
@divyanshub024
divyanshub024 force-pushed the feat/example-thread-drawer branch from 3909fce to 1809303 Compare August 30, 2026 08:36

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1809303. Configure here.

Comment thread example/lib/main.dart
@divyanshub024
divyanshub024 force-pushed the feat/example-thread-drawer branch from 1809303 to 7abb40f Compare August 30, 2026 08:45
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