Repository navigation
Conversation
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.
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/jacek/ntp-omnibar-default-model-refresh")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jacek/ntp-omnibar-default-model-refresh
git -C submodules/content-scope-scripts checkout origin/pr-releases/jacek/ntp-omnibar-default-model-refreshPin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "e08835c0bdca6835d882565078eabff55c1661f6")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jacek/ntp-omnibar-default-model-refresh
git -C submodules/content-scope-scripts checkout e08835c0bdca6835d882565078eabff55c1661f6 |
[Beta] Generated file diffTime updated: Mon, 30 Nov 2026 11:42:02 GMT AppleFile has changed Chrome-mv3File has changed IntegrationFile has changed WindowsFile has changed |
|
@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/new-tab/app/omnibar/components/suggested-prompts/SuggestedPrompts.js— With per-tab picks, a tab that turns on Create Image from the image-edit chip gets a notice based on the default model, not its own.enableImageGenerationstill callssetImageGenerationActive(true)without the tab's model, and only Omnibar.js:413 was updated. Fix: passselectedModel?.idhere whenkeptPerTabis true, exactly as Omnibar.js does. Better still, move that argument into one shared helper so every activation path sends the tab's model. WithoutmodelId, native can only fall back to the sharedselectedModelId.Why this was flagged
Trigger:
enablePerTabModelPickandenableUpdatedCreateImageare both on, and the tab has a pick that differs from the default. The user takes the image chip's file-picker path (SuggestedPrompts.js:155), which callsenableImageGeneration(). That sendsomnibar_setImageGenerationActiveas{ active: true }with nomodelId. The new contract (omnibar.md and setImageGenerationActive.notify.json) says native builds the model-switch notice frommodelIdwhen the page keeps the pick. Native therefore builds the notice from the defaultselectedModelId; the mock does the same withmsg.params.modelId ?? config.selectedModelId. Example: the tab is ongpt-5-mini, which can create images, and the default is Haiku. The page does not switch models, yet native shows a spurious "Now using ..." notice. Or the notice names the wrong previous model. The Omnibar.js toggle path was updated but this sibling call site was not.Verification: The mechanism is in SuggestedPrompts.js. Line 155 (
handleFileChange) callsenableImageGeneration(), and line 98 doesif (updatedCreateImageEnabled) setImageGenerationActive(true);with no modelId. This PR updated only the tools-menu path, Omnibar.js:413. Without modelId, native can only fall back to its stored default.
moon0326
left a comment
There was a problem hiding this comment.
Great work! Claude found a few issues that should be addressed, but most of the changes work as expected. It would have been helpful to include a link to the native PR and instructions on how to test it in the Testing Steps, since this branch requires native changes to be fully tested.
In addition to the issues Claude found, I think the following is worth looking into:
Suggestion: We should also send the current tab's model ID.
|
@moon0326 thanks for the review! Addressed everything in 81c543d..70cc9d8:
Native PR: duckduckgo/apple-browsers#8583. Could you take another look? |


Asana Task/Github Issue: https://app.asana.com/0/0/1220714550200174/f
CC: @aataraxiaa
Description
Keeps the NTP omnibar's Duck.ai model and reasoning-effort pick per tab, like the mode. Native opts in with a new config capability, so older native builds keep the shared pick.
OmnibarConfig.enablePerTabModelPick: whentrue,selectedModelId/selectedReasoningEffortare the new-chat default. A tab without a pick shows them and follows default changes. The page never writes picks throughomnibar_setConfig.omnibar_selectModel(modelId,previousModelId) andomnibar_selectReasoningEffort(reasoningEffort) report picks so native can count them and settle usage-limits messages without keeping them.omnibar_onUserDefaultModelChange(no params): native sends it when the user changes their default model in Duck.ai settings, and every tab drops its pick.OmnibarConfig.imageGenerationModelId.omnibar_setImageGenerationActivenow carriesmodelId(the tab's model) so native can build the notice.Testing Steps
npm run test-unitandnpx playwright test omnibar-model-pick.spec.js --project=integrationinspecial-pages.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01JfpYVVoQJdeXThNQa1JWGP