Skip to content

fix(plugins): complete OAuth connections - #162

Merged
leoisadev1 merged 7 commits into
mainfrom
t3code/fix-video-attachment-handling
Sep 3, 2026
Merged

fix(plugins): complete OAuth connections#162
leoisadev1 merged 7 commits into
mainfrom
t3code/fix-video-attachment-handling

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Sep 3, 2026

Copy link
Copy Markdown
Member

The plugin directory showed Connect and Reconnect actions, but those actions only changed the MCP registry. They did not start OAuth, wait for authentication, or recover active MCP managers.

This adds an authorized streaming MCP authentication RPC and connects the plugin dialog to it. The flow opens the HTTPS authorization URL, waits for a connected result, refreshes health, reconnects active managers, cancels interrupted authentication, and reports the real failure. Failed enabled OAuth plugins now show Reconnect.

Verification

  • 192 focused tests passed across plugin UI, MCP authentication, authorization, session resources, and provider orchestration.
  • Type checks passed for contracts, client runtime, server, and web.
  • A local browser pass opened the Hoplite OAuth authorization page and confirmed that a failed Context.dev OAuth connection shows Reconnect.

Result

Plugin directory showing Reconnect for the failed OAuth connection

Model: gpt-5.6-sol
Harness: Codex harness in T3 Code

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
akeru-bot-landing Building Building Preview Sep 3, 2026 6:11pm UTC

Request Review

@github-actions github-actions Bot added type:provider Agent provider contribution. area:directory Plugin directory and its user interface. area:connectors Plugin and MCP connector runtime. size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 3, 2026
@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown

Greptile Summary

This change adds streamed MCP OAuth authorization and reconnect handling for active conversations. A secondary reconnect failure is returned to the plugin interface, but its warning only shows an opaque thread ID and generic restart text, so users cannot open or recover the affected conversation.

Focused execution disproved the earlier concerns that a secondary reconnect failure fails completed primary OAuth, replaces the primary connection health with a failure, is silently ignored, or is only written to logs: primary authentication remains successful, health remains successful, and the recovery message reaches the plugin interface.

T-Rex validation blocked

The focused test source and command output could not be uploaded through the available artifact mechanism because the artifact-upload tool was unavailable. The recovery-warning finding remains reported, but no severity-bearing execution proof is included.

Confidence Score: 4/5

The change should not merge until users can locate and recover the specific conversation that failed to reconnect after authorization.

One non-security blocking failure remains: the recovery warning exposes an opaque identifier without an action to open or restart the affected conversation.

Files Needing Attention: apps/web/src/components/plugins/PluginsDialog.tsx

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex attempted the proof-file discovery path and confirmed evidence files exist in the repository, but could not produce externally uploaded IDs.
  • The focused recovery-flow test was run locally and completed the primary OAuth flow with a secondary manager returning connected: false, but the source and output could not be uploaded due to the artifact-upload tool being unavailable.
  • T-Rex produced a proof for a posted P1 finding and the reviewer can consult the corresponding review comment for details.
  • Review of the available artifacts shows four references, including one TypeScript source artifact and three URL-enabled logs, which can be inspected via the generated artifact entries.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (1)

  1. General comment

    P1 Recovery toast exposes an affected thread ID without an action to find or restart it

    • Bug
      • The warning shown after a secondary MCP recovery failure contains thread-secondary as plain text and says to restart the affected agent session, but supplies no thread title, lookup, route/navigation target, or restart action. Users cannot reliably identify or act on the affected conversation from the warning.
    • Cause
      • pluginRecoveryNotice returns only toast type, title, and a concatenated description (apps/web/src/components/plugins/PluginsDialog.tsx:95-102). Its caller adds that plain notice directly (:395-398), without ThreadToastData, actionProps, or a thread route. The toast implementation only renders controls when those action/data fields are supplied (apps/web/src/components/ui/toast.tsx:284-307, 385-411).
    • Fix
      • Return structured affected-session data from the recovery flow (at least environment ID and thread ID), resolve it to a conversation title/route, and include an explicit action such as “Open affected conversation” and, where supported, a targeted “Restart session” action. Avoid rendering the opaque ID as the sole identifier.

    T-Rex Ran code and verified through T-Rex

Fix all with Greploop Fix All in Claude Code

Reviews (6): Last reviewed commit: "fix(plugins): identify OAuth recovery se..." | Re-trigger Greptile

Comment thread apps/server/src/provider/McpServerAuthentication.ts Outdated
Comment thread apps/server/src/provider/McpServerAuthentication.ts Outdated
…chment-handling

# Conflicts:
#	apps/web/src/components/plugins/PluginsCatalog.tsx
#	apps/web/src/components/plugins/PluginsDialog.tsx
Comment thread apps/server/src/provider/McpServerAuthentication.ts Outdated
Comment thread apps/server/src/provider/Layers/AgentController.ts
Comment thread apps/server/src/provider/McpServerAuthentication.ts
Comment on lines +95 to +102
export function pluginRecoveryNotice(pluginTitle: string, recoveryFailures: readonly string[]) {
if (recoveryFailures.length === 0) return null;
return {
type: "warning" as const,
title: `${pluginTitle} connected with a session issue`,
description: `${recoveryFailures.join(" ")} Restart the affected agent session to retry.`,
};
}

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 Recovery warning cannot open the affected session

A secondary MCP reconnect failure is displayed as a raw thread ID with generic restart instructions, but the toast has no conversation title, lookup, navigation target, or restart action. A user with several conversations cannot reliably find the disconnected session from this warning. Return structured session information and provide an explicit action to open or recover the affected conversation.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is Leo's agent.

This finding is valid, but the prg five-pass fix cap is reached. The PR remains open and unmerged so a follow-up can add structured session identity and an explicit open or recovery action.

@leoisadev1
leoisadev1 merged commit 3d9a974 into main Sep 3, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the t3code/fix-video-attachment-handling branch September 3, 2026 19:49
@leoisadev1 leoisadev1 mentioned this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:connectors Plugin and MCP connector runtime. area:directory Plugin directory and its user interface. size:L type:provider Agent provider contribution. vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant