leggett / simplify

Issue tracker for Simplify Gmail, a browser extension to simplify Gmail's interface
https://simpl.fyi
1.64k stars 103 forks source link

Search bar often becomes unusable when opened via #search/my+search+terms #830

Closed lennartkats-db closed 1 month ago

lennartkats-db commented 1 month ago

The search bar often becomes unusable when opened via a URL such as https://mail.google.com/mail/u/0/#search/my+search+terms:

image

this comes up a lot when I use the "search engine" feature from Google to quickly find an email:

image

This problem doesn't always occur, but I think it might happen with longer search terms and/or search terms with spaces.

leggett commented 1 month ago

I'm having a hard time recreating this problem.

Can you send a system report? You can get it here: https://mail.google.com/mail/?simplify=debug&do=copySystemReport

lennartkats-db commented 1 month ago

@leggett I can't always reliably reproduce either, but do see this many times a week. I shared the system report and error log below:

Simplify v.3.1.22 u.0 configuration: aAX avatarsInList avatarsZoom bundleInbox caA caI caL cfC cfF cfO cfR cfU composeActions composeFab dateGroup defaultTheme fontList fontMsg fontNav gaArchive gaRemove geminiMin genSumMin groupHideFirst groupInbox groupOtherLists hideAds hideEmptySections hideExtWarn hideFileIcons hideInboxHideAllLink hideLabelChips hideListCount hideMsgCount hideMsgReplies hideTabIcons importantBadge inList inSearch invertCompose izBg23 lightTheme listWidthLg lowDensity matYou msgWidthSm newNav newUI reminders rightImportance rightLabels rightStar sendLater simplify simplifyPrefsOpen vPane- 

System: Mozilla/5.0 (Macintosh Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 - gmail.pinto-server_20241020.06_p1 - Window: 1063 x 808 (100pct zoom) - Language: en

I'm not sure this is reflected above but I have the Inbox type set to "Starred first" which might be relevant.

Errors v3.1.3:

Errors v3.1.4:
0:0: Trying to add avatar to css but can't find avatars.sheet. Does the style tag exist? false

Errors v3.1.5:
0:0: Trying to add avatar to css but can't find avatars.sheet. Does the style tag exist? false
8202:47: Couldn't find right side bar
8484:45: Couldn't find add-ons pane
9221:92: Couldn't find profile button to build App Menu. Was loading = true

Errors v3.1.6:
0:0: Trying to add avatar to css but can't find avatars.sheet. Does the style tag exist? false

Errors v3.1.9:
0:0: Trying to add avatar to css but can't find avatars.sheet. Does the style tag exist? false
1918:71: get(div[selector="scheduledSend"]) called with undefined parent, null

Errors v3.1.11:

Errors v3.1.12:
8571:79: Couldn't find loading screen, initializing Simplify in 5 sec
9733:92: Couldn't find profile button to build App Menu. Was loading = false
4734:61: Could not find Simplify pref toggle: autoAdvance
13583:67: Couldn't test theme - app switcher not loaded yet.
9818:73: Simplify > nav.init() > Couldn't find menu button or nav
14039:75: Simplify > readingPane.init() > Couldn't find div[gh='tl']
12920:52: Couldn't find search form or input.
8790:56: Couldn't find action bar in list view
8659:53: Couldn't find theme css style tag.
8702:47: Couldn't find right side bar
8984:45: Couldn't find add-ons pane

Errors v3.1.13:
9363:92: Couldn't find profile button to build App Menu. Was loading = true
13859:57: Couldn't find list view for reading pane
0:0: Trying to add avatar to css but can't find avatars.sheet. Does the style tag exist? false
8420:56: Couldn't find action bar in list view
2736:14: SGP.CH failed
8201:79: Couldn't find loading screen, initializing Simplify in 5 sec
13213:67: Couldn't test theme - app switcher not loaded yet.
9448:73: Simplify > nav.init() > Couldn't find menu button or nav
12550:52: Couldn't find search form or input.
8289:53: Couldn't find theme css style tag.
8332:47: Couldn't find right side bar
8614:45: Couldn't find add-ons pane
13669:75: Simplify > readingPane.init() > Couldn't find div[gh='tl']

Errors v3.1.16:

Errors v3.1.17:

Errors v3.1.18:
0:3570: ResizeObserver loop completed with undelivered notifications.
2421:76: doWhenReady([role='main'] .bHJ) timed out after 120 attempts
2939:14: SGP.CH failed
9931:92: Couldn't find profile button to build App Menu. Was loading = true

Errors v3.1.20:
3071:14: SGP.CH failed

Errors v3.1.21:
3071:14: SGP.CH failed
2553:76: doWhenReady([role='main'] .bHJ) timed out after 120 attempts

Errors v3.1.22:
leggett commented 1 month ago

Thanks for the details. Unfortunately, nothing jumps out as something that could be causing this kind of problem.

I've tried to recreate this problem with your setup and can't seem to get it to trigger (see below video). If you can get it to consistently reproduce, I'd be happy to have a short video call so I can see it first hand and try to figure out what is going wrong.

https://github.com/user-attachments/assets/9e0b155d-9df6-42e7-8cbd-dfcbcd1af5a0

lennartkats-db commented 1 month ago

@leggett Please note that this can only be reproduced when using search terms with spaces, as shown in the video below. At the end of the video, it shows spaces first showing up as %20 and then turning into +, which might somehow trigger this behavior.

Kapture 2024-10-28 at 09 11 30

Let me know if this helps you reproduce the behavior. If not, I'd be happy to have a short video call on this topic.

lennartkats-db commented 1 month ago

Playing more with this, a workaround may be to type hello+there in the search prompt instead of hello there!

(Btw note that without Simplify GMail enabled, search never leads to the garbled input box.)

leggett commented 1 month ago

I believe the problem is with how Chrome has set up the saved search. You can see a flicker of a strange URL with maybe your user name in it (I can't tell because it is cut off) and then it forwards to a proper Gmail search. If you right click on the URL bar in Chrome and select "Manage Search Engines and Site Search" and find the saved search(es) for Gmail and set the URL to: https://mail.google.com/mail/u/0/#search/%s

The /u/0 is optional (that is the user number, if you use multiple accounts, you could set up in2 to search /u/1)

image
leggett commented 1 month ago

And if you want to email me the current URL in Chrome's settings, I can try to recreate and figure out what's going wrong.

Doing two word searches or searches that start with a space or a plus all work fine for me.

lennartkats-db commented 1 month ago

I'm currently using https://mail.google.com/mail/u/<email address>/#search/%s but I experience the same problem when I use your https://mail.google.com/mail/u/0/#search/%s. The problem seems to be in the redirect from https://mail.google.com/mail/u/0/#search/foo%20bar to https://mail.google.com/mail/u/0/#search/foo+bar 🤷

leggett commented 1 month ago

Bummed that wasn't the problem but I really appreciate your persistence... I'll keep trying to reproduce the problem. It is odd that your browser starts with foo%20bar (mine seems to go straight to foo+bar). Or maybe it happens too fast for me to catch. I'll keep trying and report back.

leggett commented 1 month ago

EUREKA! I was finally able to reproduce the problem and troubleshoot the issue. I will push a fix with my next update. Thanks again for the report and hanging in there with me.