Fix temporary chat selector#315
Conversation
catsimple
commented
Apr 14, 2026
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Refactor enable_temporary_chat_mode to improve button visibility handling and streamline the process of enabling temporary chat mode.
|
google在灰度这个temporary chat按钮,放到折叠菜单里了,改了查找按钮逻辑mock过不去,看看是不是要改ci还是啥 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f6ba4c1b5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if await menu_trigger.get_attribute("aria-expanded") == "true": | ||
| logger.debug("[UI] Closing menu to restore UI state") |
There was a problem hiding this comment.
Guard menu state lookup before reading
aria-expanded
enable_temporary_chat_mode unconditionally calls menu_trigger.get_attribute("aria-expanded") even when the View more actions button is not present in that UI variant. In Playwright, querying a missing locator can time out/throw, so this turns a best-effort helper into an exception path during startup or model-switch recovery (the catch block repeats the same call, which can re-raise). This should check that the menu trigger exists/is visible (or wrap the lookup) before reading attributes.
Useful? React with 👍 / 👎.
|
这个项目年久失修了 我也很久没有调试和系统性重构 如果你修复后的这个问题能正常使用的话跟我说一声 我直接合并了 |
|
@CJackHwang 可以正常使用 |