Closed Bug 1743008 Opened 4 years ago Closed 4 years ago

There are 11 results displayed in the Address Bar drop-down when certain sponsored or non sponsored results are triggered

Categories

(Firefox :: Address Bar, defect, P3)

Desktop
All
defect
Points:
3

Tracking

()

VERIFIED FIXED
96 Branch
Iteration:
96.3 - Nov 29 - Dec 6
Tracking Status
firefox94 --- wontfix
firefox95 --- wontfix
firefox96 --- verified

People

(Reporter: cfat, Assigned: adw)

References

Details

Attachments

(2 files)

Attached image number results.gif

[Affected Versions]:

  • Firefox Nightly 96.0a1 (Build ID: 20211124155224)
  • Firefox Beta 95.0b11 (Build ID: 20211123190150)
  • Firefox Release 94.0.2 (Build ID: 20211117154346)

[Affected Platforms]:

  • Windows 10 x64
  • macOS 10.15.7
  • Ubuntu 20.04 x64

[Prerequisites]:

  • Have the sponsored and non sponsored suggestions enabled.
  • Have the "browser.search.region" set to "US".

[Steps to reproduce]:

  1. Open the latest Nightly/Beta build with the profile from prerequisites.
  2. Open a New Tab page and type "puma".
  3. Observe the number of results displayed in the Address Bar drop down.

[Expected results]:

  • There are 10 results displayed.

[Actual results]:

  • There are 11 results displayed.

[Notes]:

  • This issue is reproducible with both Remote Settings and Merino.
  • This issue is reproducible with other keywords: “wikipedia”, “apple”, “rolex” etc.
  • This issue is not reproducible with other keywords: “ebay”, “amazon”.
  • Attached is a screen recording of the issue.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 96.3 - Nov 29 - Dec 6
Points: --- → 3
Priority: -- → P3
Blocks: 1710518

The problem is that the muxer doesn't update usedLimits when it adds
group-relative suggested-index results to a group. IOW it doesn't properly
account for the space taken up by group-relative suggested-index results. So in
the case described in the bug, the GENERAL_PARENT group is recorded as not
having any results at all since it doesn't have any normal results, even though
it does have the one quick suggest result. That leaves 9 spots for remote
suggestions, and we end up with 1 heuristic + 9 suggestions + 1 quick suggest =
11 results total.

Fixing that problem revealed another small problem where _fillGroup modifies
the passed-in limits object when it leaves room for the suggested-index result
at the beginning, which messes up the state in the caller and affects cases
where there's recursion due to flexed children not filling up.

In addition to these two fixes, I factored out the section where _fillGroup
fills child groups into its own _fillGroupChildren method. That way
_fillGroup can add group-relative suggested-index results in only one place,
at the end. Currently it does it in two places depending on whether the group
has any children. That also lets us do a slight optimization when recursing to
fill up flexed children. We don't need to worry about group-relative
suggested-index results in the group at that point, so we can call the new
_fillGroupChildren instead of _fillGroup.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dfcbacf54bdb Fix the urlbar muxer to properly take into account the space taken up by group-relative suggested-index results. r=mak
Flags: qe-verify+
Flags: in-testsuite+
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
  • I have verified that this issue is no longer reproducible using the latest Nightly 96.0a1 (Build ID: 20211206092340), on Windows 10 x64, macOS 11.6, and Linux Ubuntu 20.04 x64.
  • A maximum number of 10 results are displayed now when triggering sponsored or non sponsored results in the Address Bar drop down.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: