Skip to content

Fix issue where context is not attach on first use#7790

Merged
malmstein merged 6 commits intodevelopfrom
fix/aitor/duckai/page-content-not-attach-first-use
Feb 24, 2026
Merged

Fix issue where context is not attach on first use#7790
malmstein merged 6 commits intodevelopfrom
fix/aitor/duckai/page-content-not-attach-first-use

Conversation

@aitorvs
Copy link
Collaborator

@aitorvs aitorvs commented Feb 21, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1211654189969294/task/1213386554167128?focus=true

Description

On first time use the page content is not attached.

Repro steps:

  • fresh install and go through onboarding to get to the point where contextual can be used
  • go to eg. bbc.com and tap on duck.ai icon to open the contextual sheet
  • sheet opens and shows the first time run
  • "attach page content" placeholder is shown alongside the chip suggestions
  • tap on the "summarize" suggestion chip OR tap on placeholder
  • Expected: content is attached
  • ❌ Actual: content is NOT attached

Steps to test this PR

The following repro steps should now work

Repro steps:

  • fresh install and go through onboarding to get to the point where contextual can be used
  • go to eg. bbc.com and tap on duck.ai icon to open the contextual sheet
  • sheet opens and shows the first time run
  • "attach page content" placeholder is shown alongside the chip suggestions
  • tap on the "summarize" suggestion chip OR tap on placeholder
  • Expected: content is attached
  • ❌ Actual: content is NOT attached

Note

Low Risk
Small, localized change to when a JS subscription event is emitted; main risk is timing/regression in contextual sheet analytics or page-context attachment triggering.

Overview
Fixes first-run Duck.ai contextual mode not attaching page content by triggering page-context collection when the contextual bottom sheet is shown.

Moves the page-context subscription event send out of the omnibar click path into a new BrowserTabViewModel.collectPageContext() called from BrowserTabFragment.showDuckChatContextualSheet, and adds unit tests to verify the event is emitted only when explicitly collecting context (and not during onboarding).

Written by Cursor Bugbot for commit 7f779d0. This will update automatically on new commits. Configure here.

Copy link
Collaborator Author

aitorvs commented Feb 21, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@malmstein
Copy link
Contributor

@aitorvs I’ve made a few changes, mostly consolidating when the page context is collected to make sure it’s always there. Take a look and we can discuss.

Copy link
Collaborator

Choose a reason for hiding this comment

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

📝 [actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2086:info:6:27: Double quote to prevent globbing and word splitting [shellcheck]

Copy link
Collaborator

Choose a reason for hiding this comment

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

📝 [actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2086:info:3:32: Double quote to prevent globbing and word splitting [shellcheck]

Copy link
Contributor

@cursor cursor bot left a comment

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 and found 1 potential issue.

runs-on: macos-latest

steps:
- name: Check app-version value
Copy link
Contributor

Choose a reason for hiding this comment

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

PLACEHOLDER validation removed but default value remains

Low Severity

The PLACEHOLDER input validation check was removed from release_create_task.yml, but the workflow_dispatch input still has default: 'PLACEHOLDER' on line 15. While the orchestrator workflow runs release_create_tag.yml first (which now has the check), release_create_task.yml can still be triggered independently via manual dispatch. A manual trigger without changing the default would create an Asana task named "Android Release PLACEHOLDER".


Please tell me if this was useful or not with a 👍 or 👎.

Fix in Cursor Fix in Web

@malmstein malmstein force-pushed the fix/aitor/duckai/page-content-not-attach-first-use branch from 137b396 to 94d9280 Compare February 24, 2026 13:27
Copy link
Contributor

@joshliebe joshliebe left a comment

Choose a reason for hiding this comment

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

Works well, LGTM 👍

@malmstein malmstein merged commit cdc2625 into develop Feb 24, 2026
12 checks passed
@malmstein malmstein deleted the fix/aitor/duckai/page-content-not-attach-first-use branch February 24, 2026 14:13
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.

4 participants