fix/accounts: Do not prefill the dotcom URL in the Enterprise login field #6418
+7
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When you last logged into dot com, we pre-fill the enterprise login URL with https://sourcegraph.com. This is contrary to our efforts to get Enterprise users to log into the right endpoint.
You can still log in to dot com using the handy enterprise login method/hack. We just won't prefill that URL.
Fixes CODY-4534.
Test plan
--user-data-dir=/tmp/foo --profile-temp
to simulate a fresh install.Note, if you sign out (cmd-shift-p Cody: Sign Out) etc. then the field is not prefilled, we delete the record of that account. It is new installs, or when accounts are left over from expired tokens, that you get the prefilling.
Note: This is not easily e2e testable because Cody Web has fixed the dotcom override URL in the vite config, which is a compile-time static. To make this testable we would need to configure the dotcom override URL as the webview boots up. This is a big job because DOTCOM_URL is a module-level constant, etc.