Repository navigation
Conversation
[Beta] Generated file diffTime updated: Mon, 30 Nov 2026 10:36:56 GMT Apple
File has changed Integration
File has changed Windows
File has changed |
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/spapaseit/onboarding-picker-poc")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/spapaseit/onboarding-picker-poc
git -C submodules/content-scope-scripts checkout origin/pr-releases/spapaseit/onboarding-picker-pocPin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "3aa20f8c1cecd446c439c3e590fda1f4bd6f9296")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/spapaseit/onboarding-picker-poc
git -C submodules/content-scope-scripts checkout 3aa20f8c1cecd446c439c3e590fda1f4bd6f9296 |
65343f8 to
8b994f0
Compare
8b994f0 to
4532b1d
Compare
… useId for aria ids
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
/cc @kamte for visibility |
|
@claude review |
There was a problem hiding this comment.
Findings marked 🟡 are optional suggestions and need no follow-up push.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🟡
special-pages/pages/onboarding/app/v4/data/existing-favorites.js— Users with any bbc.com favorite, such as the homepage or bbc.com/sport, see BBC News already ticked and locked, so they cannot add it.existingSiteIdscompares hostnames only. That is enough for sites that live at a host root. It is not enough forbbcNews, whose URL ishttps://www.bbc.com/news(data.js). Fix: when the suggested site's URL has a path beyond/, also require the favorite's path to start with that path, keeping the hostname-only rule for root URLs such as YouTube and Gmail.Why this was flagged
Native answers
shouldShowTopSitesPickerwithshow: trueandexistingFavorites: ["https://www.bbc.com"], for example after the user imported the BBC homepage.applyPickerAnswer(global.js:200) copies the list into the picker step.existingSiteIds(existing-favorites.js:25-31) turns both URLs intohostKey'bbc.com', so thebbcNewssite matches. PickerContent.js:568-585 then renders BBC News witharia-checkedtrue anddisabled. It also leaves BBC News out ofpicks, so the user can never send it inaddFavorites, although they do not have BBC News as a favorite. The base branch has no picker, so this is new. Nothing guards against it: the unit tests cover only root-URL sites, and the docs in onboarding.md and picker-step.json describe the hostname-only rule without mentioning sites that carry a path.Verification: nit.
hostKey(existing-favorites.js:12-18) reduces a URL tonew URL(url).hostname.replace(/^www\./, '')and drops the path. data.js:338 defines{ id: 'bbcNews', url: 'https://www.bbc.com/news', ... }, so any bbc.com favorite matches bbcNews. PickerContent.js:96-97 and 113 render it witharia-checkedtrue anddisabled={done || existing}, so it never goes out inaddFavorites.
shakyShane
left a comment
There was a problem hiding this comment.
Thanks! there's a couple of small questions in there, but then a larger ask to be much more ruthless with regards to agent generated code.
- trim integration test count down to just a handful (avoid trying to enumerate every failure case ever and just focus on common flows)
- question if the unit tests have any additional value at all, or if they are just the LLM's reasoning record... feel free to drop them all or just leave ones that are genuinely capturing an algorithm not exercised seen in the integration tests
- trim almost all comments, leaving the minimum where they have genuine value (most are just the LLM recording it's own work/thoughts)
Nice work!
…op the double-click guard
…ndler, not an effect
…lpers and unit tests
| }; | ||
| // Reduced motion: no animation plays, so animationend won't fire | ||
| useEffect(() => { | ||
| if (isReducedMotion && exiting) onExitComplete?.(); |


Asana Task/Github Issue: https://app.asana.com/1/137249556945/task/1218157738560967
Description
To pin down the page↔native messages early, this adds a
topSitesPickeronboarding step where the user picks suggested sites to add as favorites. The site list is the one the experiment ships with. This PR does not include icons on purpose.topSitesPickeris opt-in and sits aftercustomize. It shows only when native lists it ininit.steps.shouldShowTopSitesPickerrequest. The response is{ show: boolean, existingFavorites?: string[] }. I chose a page-side ask over native pushingexcludeafter the import, because native then decides at the moment the user reaches the step, including users who skipped the import.topSitesPicker. A failed request, an answer withoutshow: true, or no answer within 2 seconds skips the picker, and a late answer is ignored. While it waits, the page sits in the reducer'sexecutingstatus, so Next and the row controls are disabled and other actions are dropped.topSitesPickerstays in the order until the answer arrives.stepDefinitions.topSitesPickercarriessites(id,url,title,section). Schema inmessages/types/top-sites-picker-step.json.existingFavoritesarrives in the answer, not inonConfigUpdate. The genericexcludeinonConfigUpdatestill works for other steps.app/v4/data/data.js. Gmail and Outlook savemail.google.comandoutlook.live.com, wheregmail.comandoutlook.comredirect, so they match the favorites people import.init.region(ISO 3166-1 alpha-2, e.g.GB). A picker site can carry aurlByRegiontable keyed on that region, or aurlTemplatewhose{locale}comes from the page language. Amazon lists its stores inurlByRegionand falls back to amazon.com. Wikipedia useshttps://{locale}.wikipedia.org, so every edition works without a list. I put the variants in the site data rather than in page code, so the list can move to native or remote config without the page naming a site. Asiteslist that native sends is resolved the same way.www., show as picked and locked. I chose that over hiding them so a user who just imported YouTube sees it there.addFavoritesnotify,{ favorites: [{ id, url, title }] }, without the existing favorites. Skip sends nothing.app/global.js). The reducer now acceptstitle-completewhile a value saves.onExitCompleteso that it is only called once per step exit instead of every render. This removes the need for the past-the-last-step guard when reduced motion is on.Mock URL params
Previews run against the mock transport, which these params steer.
readme.mdlists them all.existingFavorites=<url>,<url>topSitesPicker=hideshow: false, so the page skips the picker.region=<code>init.region. Unlisted codes get amazon.com.locale=<lang>steps=<id>(repeatable)init.steps.topSitesPickermust be listed.page=<id>page=topSitesPickeropens the picker without asking native, which suits styling work only.platform=windowsdebugStateThere is no param for a slow or missing answer. The 2-second timeout is covered by Playwright on Windows, which holds the request.
Review notes, unfixed
executingfor that toggle, and anadvancelanding then throws. It affects every settings step, so it belongs in its own change.error-boundaryincluded, so a render error in that window wouldn't reachfatal.onConfigUpdateduring the wait and then answers yes,stepCompletedreportsnext: 'topSitesPicker'.page=topSitesPicker, shows without native being asked. Real orders start withwelcome.detail > 1clicks for a moment after any step change would cover every step. That belongs in its own change.?region=with an empty value hidesinit.region(??rather than||).withResolvedSiteUrlstakes an object, unlike the otherwith*methods. A two-letter language with no Wikipedia edition gives a favorite that doesn't open.config-updatepushes don't resolve site URLs, though native doesn't send sites that way today.onboarding.mddoesn't listinit.regionyet. TheisBusycomment inSettingsContent.jsand the comment on locks inTopSitesPickerContent.jspredate the ask. New tests inline locators rather than adding page-object helpers.main: a leftoverconsole.log('KV', ...)inSettings.withStepDefinitions, and a "Side effects" comment inapp/global.jsthat no longer matches its branch.Testing Steps
npm run build && npm run lintcd special-pages && npm run test-unitcd special-pages && npx playwright test pages/onboarding --reporter listEach preview starts on
customize. Skip its three rows, then click Next.https://www.amazon.co.uk.https://www.amazon.deand Wikipedia ishttps://de.wikipedia.org.https://www.amazon.com.Checklist
Please tick all that apply: