Skip to content

Fix gateway auth and Telegram pairing flow handling - #2594

Merged
henrypark133 merged 1 commit into
stagingfrom
v2-engine-CI-failures
Apr 17, 2026
Merged

henrypark133 merged 1 commit into
stagingfrom
v2-engine-CI-failures

Conversation

@henrypark133

Copy link
Copy Markdown
Collaborator

Summary:

  • rely on authoritative onboarding SSE for gate-backed Telegram pairing so the pairing card keeps the rotated request id
  • keep settings-initiated OAuth on the unified auth UI path without blocking unrelated chat input
  • realign E2E coverage around current thread scoping, pairing request/thread payloads, and the pairing SSE overwrite regression

Testing:

  • reviewer pass: no discrete correctness or security regressions found in the final diff
  • full local Playwright run failed due pre-existing shared selector breakage; representative failure is test_connection.py::test_page_loads_and_connects because the jobs tab selector now matches two elements

Copilot AI review requested due to automatic review settings April 17, 2026 22:01
@github-actions github-actions Bot added size: S 10-49 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Apr 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the extension authentication and onboarding flow to improve state management and user experience. Key changes include the introduction of a block_chat flag in handleAuthRequired to conditionally disable the chat interface, and the migration of several components to use handleAuthRequired instead of calling showAuthCard directly. Additionally, the onboarding logic now ensures the settings tab is refreshed upon state changes, and the end-to-end tests have been updated to use dynamic thread IDs and cover new scenarios, such as authentication requests for foreign threads and race conditions between setup responses and SSE events. I have no feedback to provide as there were no review comments to assess.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the gateway UI and E2E coverage to align unified auth + Telegram pairing with the authoritative onboarding SSE stream, preserving pairing request/thread identifiers and avoiding unnecessary chat input blocking during settings-initiated OAuth.

Changes:

  • Make handleAuthRequired optionally not disable chat input (via block_chat: false) for settings-driven OAuth flows.
  • Treat onboarding SSE as the source of truth for pairing-required transitions (including request/thread IDs), and refresh settings when pairing state arrives while on the settings tab.
  • Realign Playwright E2E tests around current thread scoping, pairing payloads (thread_id, request_id), and the “SSE wins over setup response” regression.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/e2e/scenarios/test_telegram_hot_activation.py Adds thread-aware onboarding simulations and a new regression test ensuring SSE request IDs override setup responses for pairing.
tests/e2e/scenarios/test_extensions.py Updates auth/pairing E2E expectations to include thread scoping and verifies chat input remains enabled for settings-initiated OAuth.
crates/ironclaw_gateway/static/app.js Introduces block_chat gating for auth prompts, refreshes settings on pairing-required SSE in settings, and routes settings OAuth through handleAuthRequired (without blocking chat).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@henrypark133
henrypark133 merged commit 2536835 into staging Apr 17, 2026
20 checks passed
@henrypark133
henrypark133 deleted the v2-engine-CI-failures branch April 17, 2026 22:12
@henrypark133 henrypark133 mentioned this pull request Apr 21, 2026
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants