Closed Bug 2010269 (mcab-hnt) Opened 8 months ago Closed 14 days ago

[meta] Multi-Context Address Bar - New Tab Search Bar

Categories

(Firefox :: Address Bar, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
157 Branch

People

(Reporter: dao, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: meta, Whiteboard: [sng])

This effort puts Firefox's real address bar component, <moz-urlbar>, on the New Tab page in place of the handoff search bar that sits there today. The effort's codename is MCAB HNT, for Multi-Context Address Bar on Home / New Tab.

The work builds on the cross-process address bar infrastructure tracked under IPC Urlbar: make <moz-urlbar> capable of running in a privileged content process. New Tab is the first product surface to drive it end to end.

New Tab's search field is a stand-in. It takes the first keystroke and hands the user up to the toolbar, so the search finishes somewhere the user was not looking, and the page itself gets none of the address bar's capability: no results in place, no search modes, no jumping to a tab that is already open.

Embedding the real component removes that jump and collapses two implementations into one: New Tab stops maintaining a search-shaped stub, every address bar feature reaches the page as it ships, and future search work lands in one place instead of two. It is also the first product surface to run the address bar outside a browser window, which the rest of the multi-context address bar work depends on.

Scope

In scope: mounting the component on the New Tab and Home pages; reporting New Tab as its own search access point in telemetry; loading a picked result in the right tab; an end-to-end test suite that drives the search bar in the page; theming it correctly on a content page; turning it on for Nightly; the Nimbus variable that enrolls release users; and clearing release blockers.

Out of scope: the cross-process address bar infrastructure itself, tracked separately, and non-blocking defects and follow-ups tracked under the post-MVP meta bug.

Guardrails

  • One switch, off wherever it is not wanted. A single feature switch gates the integration. It is on in Nightly and off in beta and release, so work in flight merges through to release without exposing anything.
  • The swap is two-sided and atomic. EXPO, New Tab's external component registry, admits one search component at a time, so the new bar and the handoff bar read the same switch. One stands down exactly as the other takes over, with no restart and no moment where the page has no search bar. Switched off, the handoff bar behaves as it does today.
  • The component never runs in a web page's process. It is confined to the privileged process Firefox reserves for its own pages, and the platform refuses to load its cross-process connection anywhere else.
  • The cross-process path runs in CI. A dedicated test configuration drives the existing toolbar Address and Search bars across the same process boundary, so shipping code exercises the plumbing continuously. A gap that left part of the path unexercised there is closed.
  • Rollout is staged and reversible. Nightly gets it first through a build-time default, and release users get it later through Nimbus, which can switch it off remotely.
  • New Tab is not rewritten. The integration rides New Tab's registry, the same mechanism the handoff bar already uses. New Tab's own code changes only where the page's styling meets the New Tab search bar.

Progress at a glance

Phase Goal Bug Status
1 Mount the address bar component on New Tab bug 2062209 DONE
2 Report New Tab as its own search access point bug 2062210 DONE
3 Load a picked result in the right tab bug 2062213 DONE
4 End-to-end test suite bug 2062211 DONE
5 Theme it correctly on a content page bug 2062215 DONE
6 Turn it on for Nightly & add Nimbus variable bug 2062212 DONE
Bug fixing Address important defects before release mcab-hnt DONE

Nimbus experiment / rollout

Nightly gets the feature from a build-time default. Everywhere else it is off, and the browser.urlbar.newtab.featureGate preference is the switch. Flip it to turn the New Tab search bar on where the default leaves it off.

Release users get the feature through the boolean newtabFeatureGate variable on the urlbar Nimbus feature, which takes that preference as its fallback. The current target is a release experiment in Firefox 157.

Targeting should exclude any profile that set the preference by hand (!('browser.urlbar.newtab.featureGate'|preferenceIsUserSet)). The variable takes the preference only as a fallback and writes none of its own, so an enrollment would otherwise override the user's choice. There is no locale or region restriction.

Automated testing

The end-to-end tests live in a dedicated browser-chrome suite, and its manifest is the only one that turns the feature switch on:

./mach mochitest --headless browser/components/urlbar/tests/browser-newtab/

In CI, the uipc test variant covers the cross-process path. It runs the existing toolbar Address Bar test suite over the same message channel the New Tab search bar uses:

./mach try fuzzy --artifact \
  -q "'windows11-64-25h2/opt-mochitest-browser-chrome-uipc" \
  -q "'macosx1500-aarch64/opt-mochitest-browser-chrome-uipc" \
  -q "'linux2404-64/opt-mochitest-browser-chrome-swr-uipc"

Pass no test paths on that push. Any try-level path or tag scoping collapses the job to a single chunk, and the variant carries its own tag. Coverage is opt-only.

Architecture

+------------------------------------------------------------------------+
| Parent process / browser window                                        |
|                                                                        |
| UrlbarParentController -- one per search access point                  |
|   result providers, search service, Places, Glean, navigation          |
+------------------------------------------------------------------------+
                                    ^
                                    |   Urlbar actor (JSWindowActor)
                                    |   query / results / pick / telemetry
                                    v
+------------------------------------------------------------------------+
| Privileged about: process -- never a web content process               |
|                                                                        |
| about:newtab -- EXPO registry mounts <moz-urlbar> behind the gate,     |
| superseding the handoff search bar                                     |
|                                                                        |
|   input + results view, painted in the top layer (Popover API)         |
|   styled by chrome: stylesheets linked into the page                   |
+------------------------------------------------------------------------+

References

Depends on: 2010270
Blocks: 2011433
Type: task → enhancement
Depends on: urlbar-modules
Depends on: 2012999
Depends on: 2013002
Depends on: 1998985
Blocks: 2026753
No longer blocks: 2026753
Depends on: 2026753
Depends on: 2025906
Depends on: 2030983
Depends on: 2032017
Depends on: 2032048
Depends on: 2032373
Depends on: 2032381
Depends on: 2032196
Depends on: 2033862
Depends on: 2033231
Depends on: 2034725
Depends on: 2035009
Depends on: 2044950
Depends on: 2046625
Depends on: 2049086
Depends on: 2049087
Depends on: ipc-urlbar
No longer depends on: 2044950
No longer depends on: 2049087
No longer depends on: 2046625
No longer depends on: 2049086
Depends on: 2050846
Summary: [meta] Multi-Context Address Bar - New Tab Search Box → [meta] Multi-Context Address Bar - New Tab Search Bar
Depends on: 2057882
Depends on: 2059029
No longer depends on: 2057882
Depends on: 2062209
Depends on: 2062210
Depends on: 2062211
Depends on: 2062212
Depends on: 2062213
Depends on: 2062215
Blocks: 2058506
Depends on: 2064377
Depends on: 2064505
Depends on: 2064583
Depends on: 2064651
Depends on: 2064855
Depends on: 2065217
Depends on: 2065724
Depends on: 2062896
Depends on: 2064369
Depends on: 2065901
Depends on: 2066165
Depends on: 2066399
Depends on: 2066401
Depends on: 2066402
Depends on: 2066403
Depends on: 2066404
Depends on: 2066405
Depends on: 2066406
Alias: mcab-hnt
Depends on: 2067043
Depends on: 2067082
Depends on: 2067305
Depends on: 2067307
No longer depends on: 2067307
Depends on: 2067637
See Also: → 2067642
No longer depends on: 2065901
No longer depends on: 2064505
No longer depends on: 2064583
No longer depends on: 2064377
No longer depends on: 2066399
No longer depends on: 2059029
Depends on: 2067802
Depends on: 2067989
Depends on: 2068055
Depends on: 2068072
Depends on: 2068104
Depends on: 2068166
Depends on: 2068470
No longer depends on: ipc-urlbar
See Also: → ipc-urlbar
Depends on: 2068488
Depends on: 2068615
Depends on: 2068633
Depends on: 2068663
Depends on: 2069709
Depends on: 2070194
Depends on: 2070206
Depends on: 2070277
No longer depends on: 2070196
Depends on: 2070984
No longer depends on: 2070984
No longer depends on: 2070277
No longer depends on: 2070087
No longer depends on: 2069709
Target Milestone: --- → 157 Branch
Status: NEW → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Blocks: 2072669
Blocks: 2072670
Depends on: 2073612
No longer depends on: 2073612
You need to log in before you can comment on or make changes to this bug.