Skip to content

fix: ensure note_login uses headful mode for manual login#249

Merged
drillan merged 2 commits into
mainfrom
fix/login-headful-mode
Jan 31, 2026
Merged

fix: ensure note_login uses headful mode for manual login#249
drillan merged 2 commits into
mainfrom
fix/login-headful-mode

Conversation

@drillan

@drillan drillan commented Jan 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • note_login が headless モードで起動し、ブラウザウィンドウが表示されない問題を修正
  • BrowserManager.get_page()headless パラメータを追加
  • login_with_browser()headless=False を指定してブラウザを表示

Test plan

  • note_logout を実行してセッションをクリア
  • note_login を実行してブラウザウィンドウが表示されることを確認
  • 手動でログインしてセッションが保存されることを確認
  • uv run pytest tests/unit/test_browser_manager.py tests/integration/test_auth_flow.py -v でテストがパスすることを確認

🤖 Generated with Claude Code

drillan and others added 2 commits January 31, 2026 18:25
The login_with_browser function was using the default headless mode
from the NOTE_MCP_TEST_HEADLESS environment variable, which defaults
to True (headless). This caused the browser window to never appear,
making manual login impossible and causing timeouts.

Changes:
- Add headless parameter to BrowserManager.get_page() and _ensure_browser()
- Call get_page(headless=False) in login_with_browser to ensure browser is visible
- Add tests for headless parameter support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add debug logging to browser cleanup methods instead of silent pass
- Limit RuntimeError catch to specific "no event loop" messages
- Improve get_page() docstring with IMPORTANT warning about existing browser
- Raise profile navigation error log level from debug to warning
- Add test for headless parameter ignored when browser exists
- Add test verifying close() is called before get_page() in login flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@drillan drillan merged commit 306aafd into main Jan 31, 2026
2 checks passed
@drillan drillan deleted the fix/login-headful-mode branch January 31, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant