Closed Bug 1618769 Opened 4 years ago Closed 4 years ago

Increase max chars for search suggestions (Adding numbers in the URL bar gives incorrect answer as a suggestion)

Categories

(Firefox :: Address Bar, task, P1)

73 Branch
task
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 77
Iteration:
77.1 - Apr 6 - Apr 19
Tracking Status
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- verified
firefox78 --- verified

People

(Reporter: snehal.dev, Assigned: adw)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

  1. Opened a new tab in Firefox.
  2. Compute the sum of several integers by copying a string of integers separated by '+' into the URL bar.
    For example: 899+186+133+95+379+75 is copied and pasted into the URL bar of the new tab.

Actual results:

The wrong sum returned as a result. For the example above, the result returned as the sum is 1699.

Expected results:

Expected the correct sum of integers to be listed as the answer. For the example above, the correct sum is 1767.

Not sure if this belongs more to ::Search or ::Address Bar.

The second line is not provided by Firefox, it should be a search suggestion from Google.

The problem is that, If I try manually
https://www.google.com/complete/search?client=firefox&q=899%2B186%2B133%2B95%2B379%2B75

I get

["899+186+133+95+379+75",["\u003d 1767"]]

= 1767, which is correct.

Status: UNCONFIRMED → NEW
Component: Untriaged → Search
Ever confirmed: true
Summary: Adding numbers in the URL bar gives incorrect answer → Adding numbers in the URL bar gives incorrect answer as a suggestion

I guess we truncate the search terms, and actually send 899+186+133+95+379+7, but can't spot where in the code we would be doing that.

yes, we are discussing about increasing the limit of chars we send, so we'll likely do that.

I think we should also detect suggestions that start with = and show them with a different icon, Chrome does that and i's nicer to the user.
ni? Verdi for that.

Component: Search → Address Bar
Flags: needinfo?(mverdi)
Priority: -- → P2
Points: --- → 2
Summary: Adding numbers in the URL bar gives incorrect answer as a suggestion → Increase max chars for search suggestions (Adding numbers in the URL bar gives incorrect answer as a suggestion)
Blocks: 1623848
No longer blocks: qb-results-papercuts
Type: defect → task

Here is a proposal:
let's remove maxCharForSearchSuggestions as it is now, and instead introduce protection for Paste.
That means if the input was typed we put no limit on the sent search string, if the input was pasted we don't query for suggestions when the string is longer than 100 chars.
This is in addition to the _lastLowResultsSearchSuggestion protection that we have, we should keep doing that. It currently works by stopping suggestions queries when the user types more but the last suggestions request returned less than 2 suggestions.

We should also evaluate visual design changes elsewhere (separate bug).

Flags: needinfo?(mverdi)
Priority: P2 → P1

Updating Fx75 tracking flags to reflect QA triage decision taken with :mdeboer in QA-Search weekly sync meeting.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 77.1 - Apr 6 - Apr 19
  • Add a new maxCharsForSearchSuggestions property to query context.
  • UrlbarInput sets this property depending on whether the event that started a query is a paste event. If it is, then limit chars. Otherwise don't. Note that means if you paste and then start typing, we don't limit, due to typing after the paste.
  • UnifiedComplete uses this new property instead of the pref.
  • Keep the browser.urlbar.maxCharsForSearchSuggestions pref but use it only for pastes, and increase it from 20 to 100. I considered making a new pref but this way if a user changed it, then it still applies to pastes at least. I'm not sure it's important though.

(In reply to Drew Willcoxon :adw from comment #10)

  • UnifiedComplete uses this new property instead of the pref.

May have to unbitrot against Harry's work that split out a provider for search suggestions.

Attachment #9140626 - Attachment description: Bug 1618769 - Increase max chars for search suggestions. → Bug 1618769 - Increase max chars for search suggestions, and don't fetch suggestions at all when max is reached.
Attachment #9140626 - Attachment description: Bug 1618769 - Increase max chars for search suggestions, and don't fetch suggestions at all when max is reached. → Bug 1618769 - Increase max chars for search suggestions, and don't fetch suggestions at all when max is reached due to paste.
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/582b2fb3094f
Increase max chars for search suggestions, and don't fetch suggestions at all when max is reached due to paste. r=mak

I didn't remove the allowSearchSuggestions assignment even though it's not necessary due to the defaultValue addition. And I already queued the main patch for landing.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

this can ride the train

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2fd9e286ac26
Follow up: Remove unnecessary assignment to allowSearchSuggestions. r=mak
Flags: qe-verify+

Verified on Windows 10 64bit, MacOS 10.14, and Ubuntu 18.04 64bit
Using Firefox Release 76.0.1 (issue still visible on this one) , Firefox Nightly 78.0a1 (fixed), and Firefox Beta 77.0b4 (fixed)

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: