Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auth: UI conditional rendering logic (#6047)
CLOSE https://linear.app/sourcegraph/issue/CODY-4219 This change improves the conditional rendering logic in the `AuthPage` component. It removes the `isNonVSCodeIDE` and `isCodyWebUI` variables and simplifies the rendering logic based on the `codyIDE` value. This change is to fix a regression caused by the logic we use for setting "isCodyWebUI" that is affecting all the non-VS Code clients as `isCodyWebUI` is now returning true for all clients. We set the uiKindIsWeb here: https://sourcegraph.com/github.com/sourcegraph/cody/-/blob/vscode/src/chat/chat-view/ChatController.ts?L511 But Agent sets uiKind to Web for ALL clients: https://sourcegraph.com/github.com/sourcegraph/cody/-/blob/agent/src/vscode-shim.ts?L1069 The key changes are: - update uiKind to Desktop by default - Removed the `isNonVSCodeIDE` and `isCodyWebUI` variables - Simplified the conditional rendering to only check for `codyIDE === CodyIDE.VSCode` - Moved the comment about non-VSCode clients using the sign-in form to the appropriate else block ## Test plan <!-- Required. See https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles. --> Run it in VS Code to make sure it doesn't change anything for VS Code. Run it in Eclipse to confirm the Sing In Form is showing up correctly: Run it in Visual Studio to confirm the Sing In Form is showing up correctly: ![image](https://github.com/user-attachments/assets/b1aa52b5-5d4d-4d6c-995a-086cbe394ef0) Before ![image](https://github.com/user-attachments/assets/ada7339e-b8e6-4936-8b65-c11bc8cdb6fa) ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c -->
- Loading branch information