Closed Bug 2064855 Opened 1 month ago Closed 1 month ago

urlbar.zeroprefix.* counts the new search bar and the smartbar too

Categories

(Firefox :: Address Bar, defect, P2)

defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox156 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sng][mcab-hnt])

Attachments

(1 file)

The three urlbar.zeroprefix.* counters live in UrlbarView: close() derives isShowingZeroPrefix from the query context alone (this.#queryContext && !this.#queryContext.searchString), and onQueryFinished() records the exposure on !queryContext.searchString. Neither looks at which input owns the view, and UrlbarInputBase gives every <moz-urlbar> its own UrlbarView — so #searchbar-new counts into these, and so does the smartbar, which constructs its own view.

This looks like drift rather than a decision. The counters came in with bug 1806765 (January 2023), when the address bar was the only consumer of the view. #searchbar-new arrived in bug 1975009 (August 2025) and reused the element without revisiting them.

The documented meaning is still address-bar-only. browser/components/urlbar/docs/telemetry.md describes the zero-prefix view as "the view that's shown when the user clicks in the urlbar before typing a search string", often called the "top sites" view. All three are expires: never with legacy mirrors URLBAR_ZEROPREFIX_{ABANDONMENT,ENGAGEMENT,EXPOSURE}, so this is what long-running dashboards read.

Nothing catches the blending: browser/components/urlbar/tests/browser-telemetry/browser_zeroPrefix.js drives only the address bar.

Suggested fix: gate the three sites on the address bar, the way the switcher's urlbar.unifiedsearchbutton.* counters already are (sapName == "urlbar"), and add search bar coverage to the test. If blending is wanted instead, these probes need a surface dimension and the docs need to say so.

Bug 2062209 puts <moz-urlbar> on about:newtab, which would add a third contributor to the same numbers.

#searchbar-new and the smartbar have counted into these since they started sharing the view, which nobody revisited when the address bar stopped being its only consumer.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Severity: -- → S4
Priority: -- → P2
Whiteboard: [sng][mcab-hnt]
Blocks: 2066165
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
QA Whiteboard: [search][qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: