Code monitors: patterntype is not correctly set in linked URL
Created by: camdencheek
In code monitor notifications, pattern type is included as part of the query instead of as a URL parameter. This seems to be ignored in the URL if it is part of the search pattern rather than a URL parameter.
Example broken URL: https://sourcegraph.com/search?q=context%3Aglobal+r%3A%5Egithub%5C.com%2Fsourcegraph%2Fsourcegraph%24+type%3Acommit+%5Cbrob%5Cb+patterntype%3Aregexp+after%3A%222022-01-18T21%3A34%3A11Z%22
. This URL has a patterntype in the search query, but the regexp patterntype UI element is not toggled on when this link is followed.
Example fixed URL: https://sourcegraph.com/search?q=context:global+r:%5Egithub%5C.com/sourcegraph/sourcegraph%24+type:commit+%5Cbrob%5Cb++after:%222022-01-18T21:34:11Z%22&patternType=regexp
. Moving the patterntype to a URL query param causes the patterntype to be set correctly.
It's not clear to me whether this is a regression in how URLs are used to set the patterntype UI elements, or whether this has always been the case.