[Backport M76] fix(chat): Fix React warnings caused by relocating the model selector #7366
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.
Description
WHAT
popoverContentProps
prop on a DOM elementcmd+N
keyboard shortcut as it is not compatible for other non vscode IDEsWHY
Good practice to avoid React warnings. This prevents us from having bigger problems in the future
CONTEXT
Slack: https://sourcegraph.slack.com/archives/C05AGQYD528/p1741247210218679
Model Selector PR: #7322
Test plan
1. New e2e test
keyboard shortcuts cmd+M opens model selector
pnpm -C vscode test:e2e chat-keyboard-shortcuts.test.ts
and make sure the test passes2. Fix React warnings caused by the model selector
pnpm run test:unit --run -v
and scroll through the output and check for warnings.Warning: flushSync
was called from inside a lifecycle method., which is a pre-existing warning.popoverContentProps
and nested buttons warnings should not exist when you search for them.3. Remove
cmd+N
keyboard shortcut as it is not compatible for other non vscode IDEspnpm install && pnpm build && pnpm -C vscode build && pnpm -C vscode run dev
cmd+N
. This should create a new file.cmd+M
opens the model options, escape key closes the model optionsSee video before for my local testing
https://www.loom.com/share/0018805561774723a286350b57e3c9d1
Backport c36d1e0 from fix(chat): Fix React warnings caused by relocating the model selector #7351