Repository navigation
Tags
Tags
Create tag 5.304.0.4-internal for internal release.
Create tag 5.304.0.3-internal for internal release.
Add swipe up to start a new Duck.ai chat (#10597) Task/Issue URL: https://app.asana.com/1/137249556945/project/1212810093780571/task/1220622522805255?focus=true Tech Design URL (if applicable): API Proposals URL(s) (if applicable): https://app.asana.com/1/137249556945/project/1212087397361015/task/1220656488841737?focus=true ### Description Swipe up past the end of a Duck.ai chat to start a new chat. - At the bottom of a chat, pulling up slides the chat up and reveals a "New Chat" indicator behind it. A ring fills as the pull grows, with a light haptic tick at each quarter. When it's full it turns into a blue compose button with a stronger haptic. Releasing then starts a new chat; pulling back down before releasing un-arms it. - A new chat behaves like the other new chat entry points: if an empty Duck.ai tab is open, the app switches to it instead of opening another tab. - The pull only starts on a new gesture that begins at the bottom of a conversation. It doesn't start on an empty chat, while a response is streaming, during voice chat, when the input is hidden, or from a long press (text selection). - A fast flick that is still moving when the finger lifts doesn't count, even if the ring is full. - A second finger doesn't cancel the pull; if the pulling finger lifts, the pull continues from the remaining one. - Behind the remote feature flag `duckAiSwipeUpNewChat` (enabled for internal builds). Also fixes an existing bug: a tab showing a shared chat (`duck.ai/share/<id>`) has no `chatID`, so it was treated as an empty chat. Starting a new chat from the browser menu, the tab switcher or chat history switched to the shared chat instead. Adds `Uri.isDuckAiConversation()` to `duckchat-api` (see API Proposal) and uses it in those three places. ### Steps to test this PR Use an internal build (the flag is enabled for internal users), or enable `duckAiSwipeUpNewChat` in the feature flag inventory. _Swipe up to start a new chat_ - [x] Open Duck.ai and send a few messages so the chat is longer than the screen - [x] Scroll to the bottom and lift your finger - [x] Swipe up slowly: the chat slides up with resistance and the "New Chat" ring appears and fills, with light haptic ticks - [x] Keep pulling until the ring becomes the blue compose button: a stronger haptic plays and the button pops - [x] Pull back down a little without releasing: the button turns back into the ring - [x] Pull up again until full and release: the chat slides up and fades, and a new chat tab opens - [x] Go back to the previous tab: the old chat is shown in place _Pulls that should not start a new chat_ - [x] Release before the ring is full: the chat springs back - [x] Flick up very quickly from the bottom: the chat springs back without starting a new chat even if the ring filled. This is a guardrail for very fast flings so it wouldn't be sensitive. - [x] Scroll back up a bit. Then scroll down till you reach the bottom but keep scrolling in one motion without removing your finger (continuous gesture past the bottom): no pull starts. You have to remove your finger and pull again for the pull to apply. - [x] Long press at the text at the bottom of the chat, then drag up, no pull starts. Text selection works - [x] Send a message and swipe up while the response is streaming: no pull starts - [x] On a new, empty chat: no pull starts - [x] On a regular website: no pull starts _Multiple fingers_ - [x] Start pulling with one finger, add a second finger: the pull continues - [x] Lift the first finger and keep pulling with the second: the ring keeps filling smoothly without jumping - [x] Release when full: a new chat opens _Reusing an empty chat tab_ - [x] Open a new empty Duck.ai tab, then switch to a tab with a long chat - [x] Swipe up to start a new chat: the app switches to the empty tab instead of opening another one (tab count remain the same) _Bug fixed: Shared chats_ - [ ] Open a shared Duck.ai chat link (`duck.ai/share/<id>`) (You can share any existing chat) - [ ] Switch to a website tab, and start a new chat from the browser menu: a new chat opens instead of switching to the shared chat - [ ] Repeat from the tab switcher's new chat button and from chat history's new chat: same result _Feature flag off_ - [x] Disable `duckAiSwipeUpNewChat` and kill/restart the app: swiping up at the bottom of a chat does nothing ### UI changes | Rest | Midway | Full | | ------ | ----- | ----- | | <img width="1080" height="2410" alt="rn_image_picker_lib_temp_e49b8666-cf34-40b0-94a3-764dee51a6cb" src="https://github.com/user-attachments/assets/2aca4432-77ae-4cda-868d-6646e3f537eb" /> | <img width="1080" height="2410" alt="rn_image_picker_lib_temp_2ee78acf-95de-489b-b15c-0871b817608d" src="https://github.com/user-attachments/assets/bada748f-0068-4b2a-82a2-16d6d965b3c7" /> | <img width="1080" height="2410" alt="rn_image_picker_lib_temp_3ce40109-0af5-4ab9-8619-deaf103d62a7" src="https://github.com/user-attachments/assets/13eae520-991f-4bf4-98d1-b09a590c3969" /> |
Create tag 5.304.0.2-internal for internal release.
Create tag 5.304.0.1-internal for internal release.
Create tag 5.303.0.9-internal for internal release.
Create tag 5.303.0.8-internal for internal release.
Create tag 5.303.0.7-internal for internal release.
Add App Tracking Protection to verify-android (#10591) Task/Issue URL: https://app.asana.com/1/137249556945/project/1198194956794324/task/1220640554719458 Tech Design URL (if applicable): API Proposals URL(s) (if applicable): None ### Description ## Why Agents had no way to prove an App Tracking Protection change on a device. This adds an AppTP recipe and two proofs to `verify-android`, one for the screens and one for what AppTP is for: blocking trackers in other apps. It replaces #10551, which built a separate harness. ## What changed - `proofs/app_tracking_protection.py` drives the user paths: onboarding and Android's VPN consent, on and off, per-app protection, the report forms up to Submit, and the dev settings. - `proofs/app_tracking_protection_blocking.py` proves the blocking. A probe app (`verify.sh probe`, carried over from #10551) connects to tracker hosts in four TLS segmentation modes. A tracker only counts as blocked when the connection times out and netguard logged a block for the probe's own uid. AppTP's tracker screen must then list the companies it blocked. - `layout.py` reads android CLI 1.1, which nests `android layout` in windows. Without it, every selector in every proof matched nothing. Its new `rows` read pairs each list row's label with the switch beside it, so the proofs never touch another app's protection when a row is cut off at the screen's edge. - `features/app-tracking-protection.md` is the recipe. It says to ask before running the proofs on someone's own phone, and lists what they leave changed: AppTP off, even when a run stops half-way, and the VPN consent granted. Both proofs refuse to run while the VPN (NetP) is on, whose network is also the app's VPN. ## Scope - Covers AppTP and the feature map's wording, which no longer says it is scoped to Duck.ai. - Leaves out Submit on the report form: it sends a breakage report to DuckDuckGo, even from a debug build. - The netguard 1.10.2 "fails before" comparison is documented in the recipe but was not run. ## Tradeoffs - Two proofs rather than one: the UI proof needs no network, while blocking needs live hosts and a second app. - The blocking proof never runs `adb root` itself. When adbd already runs as root, it also runs at the moto g(60)'s `rmem_max` and restores it. Otherwise that run is listed as not verified rather than failing. - Check names and details never carry the names of apps installed on the device, since `pr-summary` publishes them. The app the UI proof toggles is named only in the run's notes. ## Blast Radius Only `.agents/skills/verify-android/` changes. The app, its modules and CI are untouched. The `layout.py` change keeps older CLI output working. ### Steps to test this PR _Prerequisites_: a device or emulator selected as in SKILL.md, preferably an emulator: the proofs leave AppTP off and the VPN consent granted. The blocking proof's `rmem_max` run needs a `google_apis` emulator with `adb root` run first. _AppTP screens_ - [ ] `V=.agents/skills/verify-android/verify.sh; P=.agents/skills/verify-android/prove.py` - [ ] `$V build && $V install` - [ ] `$P .agents/skills/verify-android/proofs/app_tracking_protection.py` ends with `VERDICT PASS` and leaves AppTP off _Blocking_ - [ ] `$P .agents/skills/verify-android/proofs/app_tracking_protection_blocking.py` ends with `VERDICT PASS` - [ ] Without `adb root` it still ends with `VERDICT PASS`, and lists "window like moto" as not verified - [ ] Turn off protection for "Verify Probe" in AppTP > View Apps, and comment out `protect_probe(android)` in the proof. The run is now `VERDICT FAIL` on the tracker checks, not ERROR. Undo both. ### UI changes | Before | After | | ------ | ----- | | No UI changes | No UI changes | ## Verification Runs on an API 34 `google_apis` emulator (sdk_gphone64_arm64) with the app built from this branch's head, except where marked earlier: those ran before the review fixes, with the same app code. | Run | Verdict | |---|---| | AppTP screens | PASS, 34 of 34 checks | | Blocking, adbd as root | PASS, 22 of 22 checks | | Blocking, probe's protection off before the run | PASS, 22 of 22; it found the probe's switch in the last row on screen and turned it back on | | Both proofs with the row pairing broken (first try) | ERROR, and AppTP was turned off after the error | | Blocking, with NetP on (subscription emulator) | ERROR at once: "the VPN (NetP) is on…", nothing changed | | Blocking, without root (earlier) | PASS, 18 of 18 checks; "window like moto" not verified | | Blocking, probe left unprotected and not re-protected (earlier) | FAIL, 9 of 22 checks failed | | Harness self-test | PASS, 4 of 4 offline (now); 10 of 10 on the device (earlier) | The row pairing was also checked on a captured My Apps layout with the top row's name removed, as a cut-off row shows it: every name still paired with its own switch, where the old index pairing gave the next app the cut-off row's switch. ### AppTP screens **Verified:** the user paths reach their end states, and on/off is confirmed through the VPN network, the Settings row and the New Tab Page. **Outcome:** PASS, 34 of 34 checks (35 on a fresh app, which takes the onboarding path). Live services: none. <details><summary>All checks</summary> | Check | Result | |---|---| | switch off before enabling | pass (False) | | Android asks for VPN consent | pass (-) | | lands on the tracker activity screen | pass (DeviceShieldTrackerActivity) | | switch on | pass (True) | | says it is blocking | pass (DuckDuckGo is blocking hidden trackers across your apps.) | | VPN network up | pass | | pixel m_vpn_ev_start_attempt_success_c fired | pass | | pixel m_atp_ev_enabled_tracker_activity_c fired | pass | | activity feed shown (empty message or rows) | pass (1 line(s)) | | Settings row reads On | pass (On) | | New Tab Page card says enabled | pass (App Tracking Protection is) | | turning a protected app off asks to report, naming it | pass | | Report Issue opens the report form | pass (ReportBreakageCategorySingleChoiceActivity) | | category chosen, Submit offered | pass (field reads 'App freezes or crashes', list closed) | | the app's protection off | pass | | the app reads Manually disabled | pass (Manually disabled) | | tracker screen counts one more unprotected app | pass (5 -> 6) | | the app's protection back on | pass | | menu opens the app picker | pass (ReportBreakageAppListActivity) | | pixel m_atp_imp_report_breakage_c fired | pass | | Next opens the report form | pass (ReportBreakageCategorySingleChoiceActivity) | | unprotected count restored | pass (5 -> 5) | | Having Issues? opens its screen | pass (ManageRecentAppsProtectionActivity) | | Disable and Delete Data asks first | pass | | cancel keeps it on | pass | | disable dialog offers three options | pass (['Disable for One App', 'Disable for All Apps', 'Cancel']) | | Cancel keeps the switch on | pass | | switch off | pass | | VPN network down | pass | | asks to re-enable | pass (Re-enable App Tracking Protection to continue blocking trackers across your apps.) | | pixel m_atp_ev_disabled_tracker_activity_c fired | pass | | Settings row reads Off | pass (Off) | | New Tab Page card says disabled | pass (App Tracking Protection disabled.) | | AppTP dev settings open | pass (VpnInternalSettingsActivity) | </details> ### Blocking trackers in another app **Verified:** a third-party app's TLS connections to tracker hosts are dropped by server name, while a control host loads, and AppTP lists the blocked companies for that app. **Outcome:** PASS, 22 of 22 checks with adbd as root. Without root, 18 of 18, with the moto run listed as not verified. Live services: app.adjust.com, api2.branch.io, example.com and the AppTP blocklist download. <details><summary>Modes</summary> | Mode | Results | Window scales | First segments (bytes) | |---|---|---|---| | single | app.adjust.com=TIMEOUT, api2.branch.io=TIMEOUT, example.com=ALLOWED | 6 | [1809] | | window | app.adjust.com=TIMEOUT, api2.branch.io=TIMEOUT, example.com=ALLOWED | 6 | [609] | | split | app.adjust.com=TIMEOUT, api2.branch.io=TIMEOUT, example.com=ALLOWED | 6 | [116] | | late-sni | app.adjust.com=ALLOWED, api2.branch.io=ALLOWED, example.com=ALLOWED | 6 | [1789] | | window like moto | app.adjust.com=TIMEOUT, api2.branch.io=TIMEOUT, example.com=ALLOWED | 12 | [609] | </details> <details><summary>All checks</summary> | Check | Result | |---|---| | baseline, App Tracking Protection off: every host reachable | pass ({'app.adjust.com': 'ALLOWED', 'api2.branch.io': 'ALLOWED', 'example.com': 'ALLOWED'}) | | pixel m_vpn_ev_start_attempt_success_c fired | pass | | single: control example.com allowed | pass (ALLOWED) | | single: app.adjust.com blocked | pass (TIMEOUT, block decision logged) | | single: api2.branch.io blocked | pass (TIMEOUT, block decision logged) | | window: control example.com allowed | pass (ALLOWED) | | window: app.adjust.com blocked | pass (TIMEOUT, block decision logged) | | window: api2.branch.io blocked | pass (TIMEOUT, block decision logged) | | split: control example.com allowed | pass (ALLOWED) | | split: app.adjust.com blocked | pass (TIMEOUT, block decision logged) | | split: api2.branch.io blocked | pass (TIMEOUT, block decision logged) | | late-sni: control example.com allowed | pass (ALLOWED) | | late-sni: app.adjust.com allowed (known limitation) | pass (ALLOWED, block decision logged) | | late-sni: api2.branch.io allowed (known limitation) | pass (ALLOWED, block decision missing) | | window like moto: control example.com allowed | pass (ALLOWED) | | window like moto: app.adjust.com blocked | pass (TIMEOUT, block decision logged) | | window like moto: api2.branch.io blocked | pass (TIMEOUT, block decision logged) | | rmem_max restored after the like-moto run | pass (262144 -> 262144) | | App Tracking Protection still up at the end | pass | | the feed's Verify Probe row opens its trackers | pass (AppTPCompanyTrackersActivity) | | lists the companies netguard blocked for the probe | pass (blocked ['Adjust', 'Branch Metrics'], listed ['Adjust', 'Branch Metrics']) | | blocked just now | pass (Just Now) | </details> ### The blocking proof can fail **Verified:** with the probe app's protection turned off, the proof reports FAIL rather than ERROR or PASS. **Outcome:** FAIL, 9 of 22 checks failed: every blocked mode let the trackers through, and netguard blocked no companies for the probe. "blocked just now" still passed, from an earlier run's history, which is why the companies check is the one that gates. <details><summary>Failed checks</summary> | Check | Result | |---|---| | single: app.adjust.com blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | single: api2.branch.io blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | window: app.adjust.com blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | window: api2.branch.io blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | split: app.adjust.com blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | split: api2.branch.io blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | window like moto: app.adjust.com blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | window like moto: api2.branch.io blocked | FAIL (ALLOWED, block decision missing, no tunnel session (app unprotected, or AppTP logging off)) | | lists the companies netguard blocked for the probe | FAIL (blocked [], listed ['Adjust', 'Branch Metrics']) | </details> ### Not verified - Onboarding and the empty activity feed were not driven again on this emulator, which had already onboarded. They passed on a fresh app in an earlier run. - The netguard 1.10.2 comparison (the recipe's "fails before" route) was not run. <details><summary>Rerun</summary> ``` V=.agents/skills/verify-android/verify.sh P=.agents/skills/verify-android/prove.py $V build && $V install $P .agents/skills/verify-android/proofs/app_tracking_protection.py adb root # optional: adds the moto rmem_max run $P .agents/skills/verify-android/proofs/app_tracking_protection_blocking.py ``` </details>
PreviousNext