fix: improve page stability and parameter setting reliability#11
Closed
maebahesioru wants to merge 19 commits intoMag1cFall:mainfrom
Closed
fix: improve page stability and parameter setting reliability#11maebahesioru wants to merge 19 commits intoMag1cFall:mainfrom
maebahesioru wants to merge 19 commits intoMag1cFall:mainfrom
Conversation
Contributor
maebahesioru
commented
Mar 18, 2026
- Clear chat verification: fallback to textarea when zero_state not visible
- Tools panel / Google Search: skip if button not found (new UI layout)
- Parameter setting: add blur + Tab, use triple_click for reliable fill
- Submit Button wait timeout: 2s -> 10s
- Textarea locator timeout: 5s -> 15s
- Fuzzy model ID matching when model not in parsed_model_list
- Downgrade noisy button check warnings to DEBUG
added 19 commits
March 18, 2026 19:59
- _verify_chat_cleared: if zero_state not visible, fallback to waiting for textarea (more reliable page-ready indicator) - queue_worker: downgrade button check failure from WARNING to DEBUG - page_controller: downgrade shortcut submission verification failure from WARNING to DEBUG
- click_element for Submit Button: internal_timeout 2000ms -> 10000ms - request_processor: if model id not in parsed_model_list, try fuzzy match (e.g. gemini-2.5-flash -> gemini-2.5-flash-preview-04-17)
- _verify_chat_cleared: fallback to textarea visibility when zero_state not visible, ensuring page is ready before proceeding - _ensure_tools_panel_expanded: skip if button not found (new UI layout) - _adjust_google_search: skip if toggle not found - _set_parameter_with_retry: add blur event + Tab key, use triple_click for reliable field clearing before fill - submit_prompt: increase textarea locator timeout 5s -> 15s - click_element for Submit Button: timeout 2s -> 10s
- STREAM proxy port wait: 10s -> 30s (Windows multiprocessing startup is slow) - initialization: textarea visibility wait: 10s -> 30s
…ggle wait - triple_click not available in this Playwright version, use select_text instead - Google Search toggle: wait 0.5s -> 1.0s after click for state to update
- stop sequence press timeout: 3s -> 5s - Google Search toggle: use force click to bypass overlay issues
…cation - initialization: catch TargetClosedError during page init, skip gracefully - initialization/model_management: downgrade noisy warnings to DEBUG - _set_parameter_with_retry: is_equal extracts float from strings like 'user:1.0' - _set_parameter_with_retry: input_value timeout 2s -> 5s
- initialization: outer exception handler skips CRITICAL for browser-closed errors - app.py: Application startup failed logs WARNING instead of CRITICAL for browser-closed - model_management: UI state errors log DEBUG instead of ERROR for browser-closed
- shortcut submission: textarea focus timeout 5s -> 15s - timeouts: SLEEP_LONG 0.5s -> 1.0s for more reliable parameter setting
- _set_parameter_with_retry: use Ctrl+A instead of select_text for reliable full selection in Angular spinbuttons - submit_prompt: if shortcuts fail but response already started, treat as success instead of attempting button click (avoids 500 errors)
…n port failure - model_management: TargetClosedError in set_model_from_display -> debug - app.py: retry stream proxy up to 3 times with port increment on failure - server.py: add STREAM_PORT_ACTUAL global
If Camoufox fails to output WebSocket endpoint within timeout, kill the process and retry up to 3 times with 3s delay between attempts.
Previous retry attempts all failed because the killed process hadn't released port 9231 yet. Each retry now uses port+attempt to avoid conflict.
- _adjust_google_search: try JS label click as fallback when force click fails - _adjust_stop_sequences: click input before fill/press to ensure focus
… for Camoufox - Google Search toggle: scroll_into_view_if_needed before click - Stop sequence input: scroll_into_view_if_needed before click - Camoufox: find free port on every attempt (not just retries)
- Break immediately on EADDRINUSE instead of waiting full 90s timeout - Use 127.0.0.1 bind and SO_REUSEADDR=0 for more accurate port availability check - Increase max_tries to 20 to skip wider reserved port ranges
type() simulates keystrokes which causes decimal point to be ignored in number inputs (e.g. '1.0' -> '10' -> clamped to max '2'). fill() sets value directly, avoiding this issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.