-
Notifications
You must be signed in to change notification settings - Fork 625
fix: enable search engine testing for all engines to resolve CAPTCHA timeout issue #771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…timeout issue - Remove v-if condition limiting test button to custom engines only - Allow testing of built-in engines (Google, Baidu, Bing, etc.) in browser window - Users can now complete CAPTCHA verification with unlimited time - Add UI documentation guidelines for ASCII layout diagrams in CLAUDE.md Fixes search failures caused by CAPTCHA verification timeouts by providing persistent browser windows for manual interaction.
WalkthroughDocumentation updated in CLAUDE.md by inserting a duplicated “UI Changes and Layout Documentation” block. In the settings UI (CommonSettings.vue), the Test Search Engine button now always renders by removing its v-if condition; Delete Custom remains gated. No script/API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant S as Settings UI
participant H as Test Engine Handler
participant E as Search Engine
U->>S: Open Settings
Note over S: Test button now always visible
U->>S: Click "Test Search Engine"
S->>H: invoke testEngine()
H->>E: run test query
E-->>H: response / error
H-->>S: display result
S-->>U: Show success/error modal
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
CLAUDE.md (3)
238-249: Fix markdownlint MD040: add a language to the fenced code blockmarkdownlint flagged MD040. Add a language hint (use text) to the ASCII diagram code fence for better tooling support.
Apply this diff:
-``` +```text BEFORE: ┌─────────────────────────────────────────────┐ │ [Icon] Component Name [Button] [Hidden] │ └─────────────────────────────────────────────┘ AFTER: ┌─────────────────────────────────────────────┐ │ [Icon] Component Name [Button] [Visible] │ └─────────────────────────────────────────────┘ -``` +```
235-235: Clarify approval scope to avoid blocking minor tweaksSpecify that approval is required for significant user-facing layout changes, not trivial spacing/copy edits. This reduces unnecessary friction.
-4. **Seek Approval**: Present ASCII mockups to user before implementing changes +4. **Seek Approval (for significant UI changes)**: Present ASCII mockups to a maintainer/reviewer and product owner before implementing changes
228-251: Add a concise checklist to standardize submissionsA short checklist under this section will make PRs more uniform and tie back to our existing guidelines (Tailwind, i18n).
This ensures UI changes are clearly communicated and approved before implementation. +Checklist: +- Identify affected components/routes (e.g., src/renderer/src/components/settings/CommonSettings.vue). +- Provide BEFORE/AFTER ASCII (≤ 80 columns) and, when feasible, screenshots for Win/macOS/Linux. +- Note responsive behavior; follow Tailwind CSS guidance from “Creating New UI Components”. +- Call out i18n string changes and states (loading/disabled/error). +- Include accessibility notes (focus order, keyboard, ARIA) if interactions change.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
CLAUDE.md(1 hunks)src/renderer/src/components/settings/CommonSettings.vue(0 hunks)
💤 Files with no reviewable changes (1)
- src/renderer/src/components/settings/CommonSettings.vue
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-21T01:45:33.790Z
Learnt from: CR
PR: ThinkInAIXYZ/deepchat#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-21T01:45:33.790Z
Learning: Applies to src/renderer/src/**/*.vue : Implement responsive design with Tailwind CSS for new UI components
Applied to files:
CLAUDE.md
🪛 markdownlint-cli2 (0.17.2)
CLAUDE.md
238-238: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-check (x64)
🔇 Additional comments (2)
CLAUDE.md (2)
228-251: Good addition: makes UI change proposals reviewable and consistentThe new “UI Changes and Layout Documentation” section provides a clear, lightweight process for communicating visual changes. This will help reviewers validate intent (like the Test button visibility change in settings) before code lands.
1-327: No duplicate “UI Changes and Layout Documentation” section foundI ran a search for the heading and confirmed there is only one occurrence (line 228) in CLAUDE.md. No duplicates detected—no further action required.
fix #584
Pull Request Description
Is your feature request related to a problem? Please describe.
Yes, this PR addresses a critical issue with search engine CAPTCHA verification. When performing searches (e.g., on Google) through DeepChat, the system requires CAPTCHA verification, but the time window provided to complete the CAPTCHA is too short. The interface exits before the user can input the verification, causing failed searches and blocking core functionality.
Describe the solution you'd like
Enable browser-based testing for all search engines (not just custom ones) by providing a persistent test window where users can manually complete CAPTCHA verification without time constraints. The test window remains open until the user either successfully completes the verification or manually closes it.
UI/UX changes for Desktop Application
This PR introduces a subtle but important UI change in the search engine settings:
BEFORE (only custom engines had test button):
AFTER (all engines now have test button):
The reasoning behind this change:
Platform Compatibility Notes
This change is platform-agnostic and works consistently across all supported platforms:
The solution leverages existing Electron BrowserWindow functionality that's already cross-platform tested. No platform-specific code adjustments were required since the underlying
testSearchmethod was already implemented and tested across platforms.Additional context
SearchManager.testSearch()) was already robust and ready for this changeThis solution transforms a blocking issue into a smooth user experience, allowing users to handle search engine verification requirements naturally through browser interaction.
Pull Request Description (中文)
你的功能请求是否与某个问题有关?请描述一下。
是的,此 PR 解决了搜索引擎验证码验证的关键问题。在 DeepChat 中通过搜索引擎(如 Google)搜索时,若触发验证码(CAPTCHA)验证,系统提供的输入时间过短,用户未完成验证即自动退出,导致搜索失败并阻碍核心功能使用。
请描述你希望的解决方案
为所有搜索引擎(不仅仅是自定义引擎)启用浏览器测试功能,提供一个持久的测试窗口,用户可以在其中手动完成验证码验证,无时间限制。测试窗口保持开放,直到用户成功完成验证或手动关闭。
桌面应用程序的 UI/UX 更改
此 PR 在搜索引擎设置中引入了一个细微但重要的 UI 更改:
之前(仅自定义引擎有测试按钮):
之后(所有引擎都有测试按钮):
此更改背后的原因:
平台兼容性注意事项
此更改与平台无关,在所有支持的平台上都能一致工作:
该解决方案利用了现有的 Electron BrowserWindow 功能,该功能已经过跨平台测试。由于底层的
testSearch方法已经实现并在各平台测试过,因此不需要特定于平台的代码调整。附加背景
SearchManager.testSearch())已经健壮且为此更改做好了准备此解决方案将阻碍性问题转变为流畅的用户体验,允许用户通过浏览器交互自然地处理搜索引擎验证要求。
Technical Details
Files Changed
src/renderer/src/components/settings/CommonSettings.vue: Removedv-if="isCurrentEngineCustom"condition from test buttonCLAUDE.md: Added UI documentation guidelines for ASCII layout diagramsCode Changes
Testing
Impact
Summary by CodeRabbit
New Features
Documentation