fix(debug): Set fixed window size to prevent UI clipping#240
fix(debug): Set fixed window size to prevent UI clipping#240CJackHwang merged 3 commits intoCJackHwang:mainfrom
Conversation
df9bcb4 to
8e17aaf
Compare
|
An initial fix to solve the window size issue (by setting a fixed resolution) exposed a fragility in the chat clearing logic. The original Solution: Robust Chat Clearing via Navigation:The fragile, UI-based clearing logic in |
|
During debug mode, the Camoufox window often launched oversized, causing UI clipping on smaller screens (e.g., laptops). This made elements inaccessible and broke chat clearing logic, leading to stateful behavior where requests appended to ongoing sessions instead of starting fresh. Initial fix: Set fixed size to 1280x800 to fit most displays, but this exposed fragility in clear_chat_history()—UI buttons (e.g., "New chat") weren't always visible/clickable due to scrolling needs or layout shifts, sometimes misclicking "Run" and interrupting generation. Attempts:
Resolution: 1920x1080 didnt work. Settled on 1440x900 (16:10 ratio) which provides enough vertical space to avoid clipping/scrolling failures while fitting standard displays. No ratio-specific issues; problem was height constraining UI visibility. |
When running the --debug flag, the Camoufox window often launches with dimensions larger than the physical screen, especially on laptops. This causes UI elements, like login boxes or page content, to be clipped and inaccessible.
Standard window resizing or maximizing does not resolve the issue due to Camoufox's anti-fingerprinting measures that lock the window dimensions which pisses me off.
This commit addresses the issue by leveraging a fixed, sensible default window size of (1280, 800).
This ensures the entire browser window is visible during debugging sessions on most standard displays, significantly improving the developer and testing experience without affecting headless runs.