“Search open tabs” feature doesn’t find ERROR pages
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: green-coder, Assigned: mak)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sng])
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Steps to reproduce:
Let’s consider these three of my 600+ open tabs:
- https://exercism.org/tracks/python/exercises (titled “Python exercises on Exercism”)
- https://exercism.org/tracks/python/exercises/zebra-puzzle/mentor_request (titled “Exercism”)
- https://en.wikipedia.org/wiki/Exercism:_Get_mentoring_on_Zebra_Puzzle (titled “Exercism: Get mentoring on Zebra Puzzle - Wikipedia”)
(The third tab is newly-created for testing purposes.)
Open the address bar and start searching in open tabs by typing the percent sign (%) followed by word(s). Search for the words “exercism”, “zebra”, and “mentor”.
Actual results:
If I type “exercism” into the address bar, only the first tab is found.
If I type either “zebra” or “mentor”, no tabs at all are found!
It is IMPOSSIBLE to find tabs 2 and 3 via the “Search open tabs” feature!
My suspicion is that the bug is caused by a specific combination of letters or words in the URLs or titles of tabs 2 and 3.
Expected results:
Searching for “exercism” should show all three tabs.
Searching for either “zebra” or “mentor” should find the second and third tabs.
Tabs 2 and 3 should be findable, just like the hundreds of other tabs I have!
Reporter | ||
Updated•2 months ago
|
Reporter | ||
Updated•2 months ago
|
Updated•2 months ago
|
Comment 1•2 months ago
|
||
Thanks for filing this bug.
Marco, a question about switch to tab, maybe you know. I can reproduce comment 0 except I can't load the second URL since I don't have an account at that site. I can reproduce the problem with the Wikipedia URL. I debugged it, and the Wikipedia problem is due to a combination of these two factors:
- The STT query excludes pages that are in
moz_places
- The default Places query excludes pages with zero frecency
Once you load the Wikipedia URL in comment 0, it's in moz_places
but its frecency is zero, so we never show it as a STT. (I didn't look into why the frecency is zero since that's expected to happen for some URLs.) I presume the same problem applies to the second URL in comment 0, I don't know.
The second factor makes sense and it's what we've always done, and it's expected that some URLs will end up with zero frecency. But to me, the first factor doesn't make sense, but I don't remember the reason for it, or maybe I never knew it to begin with. Maybe it's left over from UnifiedComplete
? Or it's due to a limitation later in the code path with de-duping results?
In any case, this seems like a clear-cut bug that shouldn't happen.
Reporter | ||
Comment 2•2 months ago
|
||
(In reply to Drew Willcoxon :adw from comment #1)
Thanks for filing this bug.
Marco, a question about switch to tab, maybe you know. I can reproduce comment 0 except I can't load the second URL since I don't have an account at that site. I can reproduce the problem with the Wikipedia URL. I debugged it, and the Wikipedia problem is due to a combination of these two factors:
- The STT query excludes pages that are in
moz_places
- The default Places query excludes pages with zero frecency
Once you load the Wikipedia URL in comment 0, it's in
moz_places
but its frecency is zero, so we never show it as a STT. (I didn't look into why the frecency is zero since that's expected to happen for some URLs.) I presume the same problem applies to the second URL in comment 0, I don't know.The second factor makes sense and it's what we've always done, and it's expected that some URLs will end up with zero frecency. But to me, the first factor doesn't make sense, but I don't remember the reason for it, or maybe I never knew it to begin with. Maybe it's left over from
UnifiedComplete
? Or it's due to a limitation later in the code path with de-duping results?In any case, this seems like a clear-cut bug that shouldn't happen.
Observations from my browser history:
- The Exercism mentoring tab actually has a frecency (in German: Meistbesucht) of 0, as you suggested.
- However, the Wikipedia testing tab has a frecency of 1 and still doesn’t show up when searching open tabs!
Reporter | ||
Comment 3•2 months ago
|
||
Reporter | ||
Comment 4•2 months ago
|
||
Assignee | ||
Comment 5•2 months ago
|
||
(In reply to Drew Willcoxon :adw from comment #1)
- The STT query excludes pages that are in
moz_places
- The default Places query excludes pages with zero frecency
Certain URLs cannot be stored in places (History.canAdd returns false), or the user may be in permanent pb mode, then the first query will still match open pages, as it should. If the url is in history then it is supposedly returned by the Places provider using frecency order (things that are not in history don't have a frecency).
I suspect the first query could be avoided and the UrlbarOpenTabs provider could just fetch all matching tabs in pb mode or for which History.canAdd returns zero... that would not help with this bug though.
We could also evaluate to just make open tabs their own group and not merge them based on frecency. Though it's a more complicate outcome to evaluate.
Once you load the Wikipedia URL in comment 0, it's in
moz_places
but its frecency is zero, so we never show it as a STT. (I didn't look into why the frecency is zero since that's expected to happen for some URLs.) I presume the same problem applies to the second URL in comment 0, I don't know.
I can reproduce this, frecency is zero and recalc fields are also set to 0. I see one visit to this URL with visit_type 1. Something's wrong here.
the DEFAULT for the frecency field is -1, thus 0 has been inserted.
I must check with the debugger to see why we end up there.
Assignee | ||
Comment 6•2 months ago
|
||
Debugging I could confirm that https://en.wikipedia.org/wiki/Exercism:_Get_mentoring_on_Zebra_Puzzle is actually causing an error 404, then wikipedia has this nice not found handling, where it will provide possible better matches in a normally looking page.
Being a NOT FOUND 404 resolution, we give it frecency = 0, because we don't want to rank it up.
The https://exercism.org/tracks/python/exercises/zebra-puzzle/mentor_request link is also a 500 ERROR for me, I logged it. I think it falls under the same assumption as the 404 error, it would also generate a zero frecency.
I have no idea how the wikipedia page would generate a frecency of 1 but it should show up then, thus I can't explain the facts in comment 2. Though the screenshot seems to show the visit_count in the Library window? That's not the same thing as frecency
that is only visible opening the database with an external tool.
Having zero frecency normally (for most providers I can find) just means we won't use the history title, and unless we get a valid (not error) visit it will stay at frecency = 0.
The Places provider though decided to excluded urls with zero frecency.
I think originally the frecency filter was to avoid returning internal urls like place:
ones, then we started using it for pages with no history and no bookmarks (kind of orphans), and pages with only error visits. I think it makes sense we don't show users invalid results.
We could and should likely ignore the frecency = 0 filter when openCount is > 0.
That should also be easily testable.
Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Reporter | ||
Comment 7•2 months ago
|
||
Debugging I could confirm that https://en.wikipedia.org/wiki/Exercism:_Get_mentoring_on_Zebra_Puzzle is actually causing an error 404, then wikipedia has this nice not found handling, where it will provide possible better matches in a normally looking page.
Being a NOT FOUND 404 resolution, we give it frecency = 0, because we don't want to rank it up.
I did this trying to have a tab with a webpage that has a user-defined tab title. Do you have any suggestions to accomplish this? I’m thinking of a URL like https://mycustomtabtitle.io/?title=Exercism:%20Get%20mentoring%20on%20Zebra%20Puzzle) having ?title
parameter as HTML <title>
element. Oh wait a moment, search engines do this! However, I’m still curious whether there is a service that is just for that single thing.
The https://exercism.org/tracks/python/exercises/zebra-puzzle/mentor_request link is also a 500 ERROR for me, I logged it. I think it falls under the same assumption as the 404 error, it would also generate a zero frecency.
Likely an error on Exercism’s part: HTTP 500 doesn’t make sense for this URL, only HTTP 200 if logged in and HTTP 401 otherwise. I might soon file an issue for the Exercism website repository …
I have no idea how the wikipedia page would generate a frecency of 1 but it should show up then, thus I can't explain the facts in comment 2. Though the screenshot seems to show the visit_count in the Library window? That's not the same thing as frecency that is only visible opening the database with an external tool.
I learned something new today! Yes, the screenshots show visit_count
, not frecency.
I think originally the frecency filter was to avoid returning internal urls like place: ones, then we started using it for pages with no history and no bookmarks (kind of orphans), and pages with only error visits. I think it makes sense we don't show users invalid results.
Suggestions:
- Add support for a double percent sign notation
%%
which also searches in zero-frecency tabs. - Or add a setting (maybe a hidden about:config one) to include zero-frecency results in address bar searches.
We could and should likely ignore the frecency = 0 filter when openCount is > 0.
Or do that.
Reporter | ||
Updated•2 months ago
|
Reporter | ||
Updated•2 months ago
|
Assignee | ||
Comment 8•2 months ago
•
|
||
(In reply to green-coder from comment #7)
Debugging I could confirm that https://en.wikipedia.org/wiki/Exercism:_Get_mentoring_on_Zebra_Puzzle is actually causing an error 404, then wikipedia has this nice not found handling, where it will provide possible better matches in a normally looking page.
Being a NOT FOUND 404 resolution, we give it frecency = 0, because we don't want to rank it up.I did this trying to have a tab with a webpage that has a user-defined tab title. Do you have any suggestions to accomplish this?
I'm sorry, but I'm not sure I understand what you're trying to achieve. it's totally possible to handle error pages like wikipedia, using options in .htaccess or equivalent configuration file. You can also open an about:blank page and then inject html (including a <title>) into it, and have it open as a popup as well as a new tab. Though again I'm not sure what's your goal. It may be a bit off-topic, anyway.
Suggestions:
- Add support for a double percent sign notation
%%
which also searches in zero-frecency tabs.- Or add a setting (maybe a hidden about:config one) to include zero-frecency results in address bar searches.
we should be showing open tabs even if they are not found, our intent was to hide normal history results, not tabs.
Assignee | ||
Comment 9•2 months ago
|
||
Updated•2 months ago
|
Reporter | ||
Comment 10•2 months ago
|
||
(In reply to Marco Bonardo [:mak] from comment #8)
(In reply to green-coder from comment #7)
Debugging I could confirm that https://en.wikipedia.org/wiki/Exercism:_Get_mentoring_on_Zebra_Puzzle is actually causing an error 404, then wikipedia has this nice not found handling, where it will provide possible better matches in a normally looking page.
Being a NOT FOUND 404 resolution, we give it frecency = 0, because we don't want to rank it up.I did this trying to have a tab with a webpage that has a user-defined tab title. Do you have any suggestions to accomplish this?
I'm sorry, but I'm not sure I understand what you're trying to achieve. it's totally possible to handle error pages like wikipedia, using options in .htaccess or equivalent configuration file. You can also open an about:blank page and then inject html (including a <title>) into it, and have it open as a popup as well as a new tab. Though again I'm not sure what's your goal. It may be a bit off-topic, anyway.
My goal is switching to the tab with the custom title which is located next to a tab that is not found by the “search open tabs” feature. This allows me to find the not-found tab by first switching to a tab with a custom title and barely any content in it, to then click on the actually relevant tab next to it.
Fixing this bug removes my need for the aforementioned process.
Assignee | ||
Comment 11•2 months ago
|
||
I see, we're aiming at fixing the bug in Firefox 136.
Comment 12•2 months ago
|
||
Comment 13•2 months ago
|
||
bugherder |
Description
•