Skip to content

Conversation

@miasma13
Copy link
Contributor

@miasma13 miasma13 commented Nov 28, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/task/1211708488121003
Tech Design URL:
CC:

Description

Testing Steps

Impact and Risks

What could go wrong?

Quality Considerations

Notes to Reviewer


Internal references:

Definition of Done | Engineering Expectations | Tech Design Template


Note

Introduces a feature‑discovery popover for cookie pop‑up stats and wiring to scroll the NTP Protections Report, with supporting pixels, UI hooks, popover API updates, and tests; also refines burn behavior for Autoconsent stats.

  • macOS (CPM/Autoconsent):
    • Add AutoconsentStatsPopoverCoordinator and Presenter to show a feature‑discovery popover (with icon, i18n, auto‑dismiss, click/close handlers) after thresholds; triggered on app active; dismissed on new tab; debug menu hooks added.
    • Emit new Autoconsent popover pixels (shown/closed/clicked/new-tab-opened/autodismissed).
    • Integrate with Tab Bar (dismissing popover on + tab) and AppDelegate wiring; add tests for coordinator/presenter.
  • New Tab Page (Protections Report):
    • Add NewTabPageProtectionsReportScroller and client message protections_scroll; ProtectionsHeading listens and scrolls into view.
    • Improve animated counters to start only when visible and resume on return; minor CSS tweaks.
  • Performance/metrics:
    • getExpandedPerformanceMetrics now supports a timeout (via expandedTimeoutMs feature setting); easing calc refactored.
  • Popover framework:
    • Extend PopoverMessageView(Controller) with featureDiscovery style, clickAction, onClose, and auto‑dismiss callbacks; update existing usages (e.g., updates/broken‑site).
  • Fire behavior:
    • Keep Autoconsent stats on per‑entity burns; still clear on full burns; update tests accordingly.
  • Misc:
    • Add Cookies-Blocked-Color-24 asset and localizations; update project files; bump content-scope-scripts dependency.

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

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Privacy Review task: https://app.asana.com/0/69071770703008/1212252138103836

console.warn("[Service] NOT broadcasting - broadcast is disabled. Source:", source);
return;
}
console.log("[Service] Broadcasting data event. Source:", source);
Copy link

Choose a reason for hiding this comment

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

Bug: Debug console.log statements left in production JavaScript bundle

Numerous debug console.log statements have been added throughout the production JavaScript bundle. These logging statements (prefixed with [Service], [BatchedActivity], [BurnProvider], [ProtectionsProvider], [NormalizeDataProvider], [BurnToProtectionsDataBridge]) will output verbose debugging information to the browser console in production, which could impact performance and expose internal implementation details to users. These appear to be leftover debugging code from development that was accidentally included in the bundled index.js file.


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

Additional Locations (2)

Fix in Cursor Fix in Web

}
.buttonStyle(PlainButtonStyle())
.padding(.leading, -6)
.padding(.trailing, 2)
Copy link

Choose a reason for hiding this comment

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

Bug: Button style modifier incorrectly applied to VStack

In the featureDiscovery view, the .buttonStyle(PlainButtonStyle()) modifier is applied to the VStack container instead of the Button inside it. This is inconsistent with the other close button implementations in the same file (e.g., messageWithTitleBody at line 192 correctly applies buttonStyle directly to the Button). The close button in the feature discovery popover may not have the expected plain button appearance.


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

Fix in Cursor Fix in Web

if let newTabPageViewModel = self.windowControllersManager.mainWindowController?.mainViewController.browserTabViewController.newTabPageWebViewModel {
NSApp.delegateTyped.newTabPageProtectionsReportModel.scroller.scroll(for: newTabPageViewModel.webView)
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Strong self capture in asyncAfter closure

The DispatchQueue.main.asyncAfter closure in openNewTabWithSpecialAction captures self strongly without using [weak self]. While the AutoconsentStatsPopoverCoordinator is stored on AppDelegate and has a long lifetime, this creates an implicit strong reference that could keep the coordinator alive if it were to be deallocated before the 1.5-second delay completes, potentially causing unexpected behavior.


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

Fix in Cursor Fix in Web

} else {
try container.encodeNil(forKey: .totalCookiePopUpsBlocked)
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Explicit null encoding breaks component selection logic

The custom encode method explicitly encodes nil as JSON null for totalCookiePopUpsBlocked. However, the JavaScript code at line 10194 checks totalCookiePopUpsBlocked === void 0 to determine whether to use the legacy component. When Swift sends null instead of omitting the key entirely, JavaScript receives null (not undefined), causing the condition to be false when it should be true. This means when CPM is disabled, the new component is incorrectly rendered instead of the legacy component. The encodeNil call should be removed to preserve the original behavior where the key is omitted when the value is nil.


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

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants