Skip to content

Make live IBKR 2FA autofill target focused input#47

Merged
Pigbibi merged 1 commit into
mainfrom
fix/live-2fa-active-window
May 10, 2026
Merged

Make live IBKR 2FA autofill target focused input#47
Pigbibi merged 1 commit into
mainfrom
fix/live-2fa-active-window

Conversation

@Pigbibi
Copy link
Copy Markdown
Collaborator

@Pigbibi Pigbibi commented May 10, 2026

Summary

  • type TOTP into the active focused control instead of sending key events directly to the dialog window id
  • wait for a fresher TOTP period when fewer than 15 seconds remain
  • add assertions for the live 2FA input behavior

Tests

  • python3 -m py_compile 2fa_bot.py
  • bash tests/test_docker_compose_ports.sh

@Pigbibi Pigbibi merged commit 46abbfc into main May 10, 2026
1 check passed
@Pigbibi Pigbibi deleted the fix/live-2fa-active-window branch May 10, 2026 19:47
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be0e5a8010

ℹ️ 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".

Comment thread 2fa_bot.py
)
time.sleep(PRE_ENTER_DELAY)
run_xdotool(["key", "--window", candidate.window_id, "Return"])
type_totp_into_active_window(code)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve window targeting when geometry is unavailable

This change now types the TOTP into the currently focused control, but focus_input_area is a no-op when candidate.width or candidate.height is missing. In that case submit_totp still calls type_totp_into_active_window, so the one-time code and Enter keystroke are sent to whichever window happened to be focused (not necessarily the IBKR auth dialog). Before this commit, the --window flag guaranteed delivery to candidate.window_id even without geometry data.

Useful? React with 👍 / 👎.

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