Skip to content

add grok sub byok support for TUI - #14420

Merged
harryalbert merged 3 commits into
masterfrom
harry/APP-4991-grok-sub
Jul 28, 2026
Merged

add grok sub byok support for TUI#14420
harryalbert merged 3 commits into
masterfrom
harry/APP-4991-grok-sub

Conversation

@harryalbert

@harryalbert harryalbert commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Grok subscription BYOK support to the headless TUI.

  • Routes /add-api-key grok through an in-process xAI OAuth flow, opening the browser and accepting either the loopback callback or a manually pasted authorization code.
  • Adds an input-blocking, themed connection card with sanitized failure states, cancellation, credential persistence, and /clear-provider-api-key grok support.
  • Keeps Grok OAuth separate from pasted provider API keys while adding Grok to shared provider parsing and slash-command suggestions.
  • Cancels the loopback listener when an attempt finishes or closes, and covers the provider, OAuth, rendering, and session-input behavior with unit tests.

Testing

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

https://www.loom.com/share/8108ac54463c437d8ff56a0853b1a0b7

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@harryalbert harryalbert changed the title add grok sub add grok sub byok support for TUI Jul 28, 2026
@harryalbert
harryalbert requested a review from moirahuang July 28, 2026 15:50
@harryalbert
harryalbert marked this pull request as ready for review July 28, 2026 15:50
@oz-for-oss

oz-for-oss Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@harryalbert

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss 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.

Overview

This PR adds Grok subscription OAuth support to the headless TUI, wires Grok into provider parsing and slash-command suggestions, and adds TUI UI/session handling plus tests.

Concerns

  • Clearing stored Grok OAuth credentials is gated by the same BYOK/feature policy used for starting a new connection, which can leave existing tokens in secure storage after access is disabled.

Security

  • Users must be able to remove stored OAuth tokens even when the feature flag, workspace BYOK access, or member-provided credential policy is disabled.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread crates/warp_tui/src/grok_oauth/session.rs Outdated

@moirahuang moirahuang 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.

nice

Comment thread crates/warp_tui/src/grok_oauth/session.rs Outdated
@harryalbert
harryalbert force-pushed the harry/APP-4991-grok-sub branch from 56f9c7e to e38eb7a Compare July 28, 2026 21:55
@harryalbert
harryalbert enabled auto-merge (squash) July 28, 2026 22:12
@harryalbert
harryalbert disabled auto-merge July 28, 2026 22:13
@harryalbert
harryalbert enabled auto-merge (squash) July 28, 2026 22:22
@harryalbert
harryalbert merged commit eef504a into master Jul 28, 2026
42 of 44 checks passed
@harryalbert
harryalbert deleted the harry/APP-4991-grok-sub branch July 28, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants