Commit b14c2ab
Duck.ai: + menu in omnibar and fire button in the chat input (#8705)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1214157224317277/task/1215159003631560?focus=true
### Description
Last piece of the iOS Ship Review nav model for Duck.ai. Two coordinated
changes, both scoped to Duck.ai fullscreen context (no change anywhere
else):
1. **Omnibar fire → "+" menu.** In `ViewMode.DuckAI` the omnibar's fire
icon is replaced by a "+" that opens a popup menu. The swap is derived
from the view mode at render time (no separate state flag that can
drift), and `tabsMenu` follows whichever of fire/+ is visible via a
barrier.
2. **Fire button moves into the chat input.** In a Duck.ai chat (bottom
bar) the fire button sits at the leading edge of the input row, outside
the card so the card's rounded corners don't clip it. The trailing
in-widget fire is hidden there so the user only ever sees one fire
affordance, and the leading fire hides while the input is focused.
**The "+" popup menu** (`popup_chat_menu.xml`, shown anchored via the
shared `PopupMenu.showAnchoredView` so it positions above/below
depending on whether the omnibar is at the top or bottom):
| Item | Action |
|---|---|
| New Chat | `openNewDuckChat` → `NativeAction.NEW_CHAT` |
| New Voice Chat | `duckChat.openVoiceDuckChat()` |
| New Tab | `launchNewTab` (fresh NTP) |
| New Fire Tab | `launchNewTab` (same as New Tab for now) |
**New Fire Tab** is only shown when `FireModeAvailability.isAvailable()`
is true (feature flag + WebView MultiProfile support), re-checked each
time the menu opens, so we don't surface it to users who can't use Fire
Mode.
Outside fullscreen mode (legacy Intent path), nothing changes — the
omnibar never enters `ViewMode.DuckAI`.
Stacks conceptually on #8699 (toggle removal + back arrow) and #8700
(new-tab navigation), but is independent and lands on its own.
### Steps to test this PR
_Omnibar fire → +_
- [x] On a normal browser tab the omnibar shows the fire icon
(unchanged).
- [x] Open a Duck.ai chat. The omnibar shows **+** where fire was; the
fire icon is gone; the tabs button stays correctly positioned next to
it.
- [x] Switch back to a browser tab — fire returns, + is gone. Confirm +
never appears on NTP or in custom tabs.
_+ popup menu_
- [x] Tap **+** in a Duck.ai chat. A popup opens anchored to the +
(above it when the omnibar is at the bottom, below when at the top).
- [x] **New Chat** starts a fresh chat.
- [x] **New Voice Chat** opens voice mode.
- [x] **New Tab** opens a fresh New Tab Page.
- [ ] **New Fire Tab** opens a fresh New Tab Page (same as New Tab for
now).
_New Fire Tab gating_
- [ ] With Fire Mode available (flag on + supported WebView), **New Fire
Tab** is present.
- [x] With Fire Mode unavailable (flag off or unsupported WebView),
**New Fire Tab** is hidden and the rest of the menu is intact.
_Fire button in the chat input_
- [x] In a Duck.ai chat (bottom bar), a fire icon sits at the leading
edge of the input row, fully visible (not clipped by the card corners).
- [x] The trailing in-widget fire (next to tabs/menu) is not shown in
chat.
- [x] Tap the leading fire — the fire / clear-data dialog opens, same as
the omnibar fire.
- [x] Focus the input — the leading fire hides; defocus — it reappears.
- [x] On a browser tab, the trailing fire is shown and the leading fire
is hidden (unchanged).
_Legacy mode (fullscreen mode off)_
- [ ] Disable the Duck.ai fullscreen-mode flag. No UI changes anywhere —
Duck.ai opens via the legacy Intent path and the omnibar never enters
DuckAI view mode.
### UI changes
| Before | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|
---------
Co-authored-by: David Gonzalez <malmstein@Davids-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9d2fa89 commit b14c2ab
15 files changed
Lines changed: 398 additions & 27 deletions
File tree
- app/src/main
- java/com/duckduckgo/app/browser
- nativeinput
- omnibar
- res/layout
- browser/browser-ui/src/main/res/values
- duckchat/duckchat-impl/src
- main
- java/com/duckduckgo/duckchat/impl/ui/nativeinput/views
- res
- drawable
- layout
- values
- test/kotlin/com/duckduckgo/duckchat/impl/ui
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
| |||
634 | 636 | | |
635 | 637 | | |
636 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
637 | 642 | | |
638 | 643 | | |
639 | 644 | | |
| |||
789 | 794 | | |
790 | 795 | | |
791 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
792 | 815 | | |
793 | 816 | | |
794 | 817 | | |
| |||
1423 | 1446 | | |
1424 | 1447 | | |
1425 | 1448 | | |
| 1449 | + | |
1426 | 1450 | | |
1427 | 1451 | | |
1428 | 1452 | | |
| |||
3768 | 3792 | | |
3769 | 3793 | | |
3770 | 3794 | | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
3771 | 3806 | | |
3772 | 3807 | | |
3773 | 3808 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
| 545 | + | |
544 | 546 | | |
545 | 547 | | |
546 | 548 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| 287 | + | |
286 | 288 | | |
287 | 289 | | |
288 | 290 | | |
| |||
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| 339 | + | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
| |||
566 | 569 | | |
567 | 570 | | |
568 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
569 | 575 | | |
570 | 576 | | |
571 | 577 | | |
| |||
843 | 849 | | |
844 | 850 | | |
845 | 851 | | |
| 852 | + | |
846 | 853 | | |
847 | 854 | | |
848 | 855 | | |
849 | 856 | | |
850 | 857 | | |
| 858 | + | |
851 | 859 | | |
852 | 860 | | |
853 | 861 | | |
| |||
859 | 867 | | |
860 | 868 | | |
861 | 869 | | |
862 | | - | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
863 | 875 | | |
864 | 876 | | |
865 | 877 | | |
| |||
Lines changed: 50 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
28 | 25 | | |
29 | 26 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
38 | 31 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
48 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
502 | 510 | | |
503 | 511 | | |
504 | 512 | | |
| |||
535 | 543 | | |
536 | 544 | | |
537 | 545 | | |
538 | | - | |
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| |||
549 | 556 | | |
550 | 557 | | |
551 | 558 | | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
552 | 579 | | |
553 | 580 | | |
554 | 581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
0 commit comments