Skip to content

🔌 feat: Add a Connected Account Setting for Pull Requests - #16990

Merged
berry-13 merged 30 commits into
devfrom
berry-13/pr-connect-ui
Oct 12, 2026
Merged

berry-13 merged 30 commits into
devfrom
berry-13/pr-connect-ui

Conversation

@berry-13

@berry-13 berry-13 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

The previous PR lets users connect their own account, but nothing in the app offered it. This adds a "Connected accounts" section to Settings, Account, shown only when the deployment configured an app (pullRequestsConnect in the startup config) and the server confirms it. The row shows the provider, the connection status and Connect or Disconnect. Connect opens a window inside the click so pop-up blockers allow it, then sends it to the provider. One sign-in per tab is watched until its flow expires: the OAuth landing pages announce success or failure for their own flow on a BroadcastChannel, with a backoff poll and focus as fallback, and the watch survives closing Settings and ends with the session. Disconnect asks for confirmation with the same dialog as removing a passkey; a grant left from an app that was turned off shows as not in use and can still be disconnected. Pull request queries are refetched on a session's first status and whenever the credential lookups use changes.

Part of a stack on #16982, merge from the bottom up: host (1), GitLab (2), Bitbucket (3), shared cache (4), user OAuth backend (5), connected account setting (6). Each PR is based on the one below it, so its diff is only its own link.

Type of change

  • Feature

Testing

Tested environments/configuration:

  • Local frontend and backend with a test OAuth app in a local YAML copy, Chromium, light and dark mode: the row renders in the Account tab between Security and the danger zone, and Connect is reachable by name ("Connect GitHub").
  • Mocked status states (not connected, connected, a grant from a turned-off app, the disconnect confirmation) checked at 1280px and 375px in light and dark mode, including the keyboard focus ring.

Automated tests:

  • client: ConnectedAccounts.spec.tsx (hidden when not offered or when the server reports no app, loading, connect through a pre-opened window, connect failure, blocked pop-up, disconnect with confirmation and focus kept, disconnect failure, status error with retry) and connection.test.tsx pass, with the existing Settings and PullRequest suites.
  • Typechecks for client and packages/data-provider pass.

Screenshots / recordings

New surface, so there is no before.

Light Dark
Light Dark

Risk / compatibility

Hidden unless the operator configures pullRequests.oauth.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors
  • User-facing or complex behavior is documented where necessary
  • Required dependency changes have been merged/published
  • Required documentation PR: N/A until the stack is approved; the new pullRequests fields are documented in librechat.example.yaml

@berry-13
berry-13 added this pull request to stack #16991 October 11, 2026 17:22
Copilot AI balanced review requested due to automatic review settings October 11, 2026 17:35
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from d988866 to 1121d8c Compare October 11, 2026 17:35

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@berry-13
berry-13 marked this pull request as ready for review October 11, 2026 17:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T17:47:44.220497Z e223d57 New commits
🔒 Security Review ✅ Completed 2026-10-11T17:48:09.877465Z 1121d8c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 1121d8c70c

ℹ️ 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 client/src/data-provider/PullRequest/connection.ts Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch 3 times, most recently from ea6ef52 to 51bf79f Compare October 11, 2026 21:14

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

Copy link
Copy Markdown

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: 51bf79fa74

ℹ️ 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 client/src/components/Nav/Settings/ConnectedAccounts.tsx
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from 51bf79f to 7217fb9 Compare October 11, 2026 22:08

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

Copy link
Copy Markdown

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: 7217fb9628

ℹ️ 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 client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from 7217fb9 to 5f0caa6 Compare October 11, 2026 22:34

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

Copy link
Copy Markdown

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: 5f0caa6395

ℹ️ 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 client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from 5f0caa6 to c084809 Compare October 11, 2026 23:07

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

Copy link
Copy Markdown

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: c0848099c9

ℹ️ 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 client/src/data-provider/PullRequest/connection.ts Outdated
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch 2 times, most recently from 30aa1c4 to c8baa70 Compare October 11, 2026 23:47

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

Copy link
Copy Markdown

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: c8baa70fed

ℹ️ 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 client/src/data-provider/PullRequest/connection.ts Outdated
Comment thread client/src/data-provider/PullRequest/signIn.ts Outdated
Comment thread client/src/data-provider/PullRequest/signIn.ts Outdated
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from c8baa70 to b9d279a Compare October 12, 2026 00:09
@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse CI failed. The last 80 log lines contain the measured budgets and assertion failures.


[WebServer] 2026-10-12 00:11:08 info: [GenerationJobManager] Configured with in-memory stores

[WebServer] 2026-10-12 00:11:08 info: HTTP server timeout configuration

[WebServer] 2026-10-12 00:11:08 info: Server listening at http://localhost:3080

[WebServer] 2026-10-12 00:11:08 info: [MCPServersRegistry] Creating new instance

[WebServer] 2026-10-12 00:11:08 info: OAuth reconnect manager initialized successfully.

[WebServer] 2026-10-12 00:11:08 info: Created collection: projects

🤖: global setup has been started
🤖: using baseURL http://localhost:3080
🤖: using E2E user: testuser@example.com
🤖: 🗝  authenticating user: testuser@example.com
🤖: ✔️  localStorage: set Nav as Visible /home/runner/work/LibreChat/LibreChat/e2e/storageState.json
[WebServer] 2026-10-12 00:11:11 info: [agent-triggers] durable delivery engine started

[WebServer] 2026-10-12 00:11:11 info: [schedules] engine started

[WebServer] 2026-10-12 00:11:11 info: Server readiness checks passing.

🤖: ✔️  user successfully registered
[WebServer] 2026-10-12 00:11:16 info: [Login] [Login successful] [Username: testuser@example.com] [Request-IP: ::1] {"requestId":"2e369b7c-807d-4bcd-b1cb-5fcf8112763c","request_id":"2e369b7c-807d-4bcd-b1cb-5fcf8112763c","request_method":"POST","request_path":"/api/auth"}

🤖: ✔️  user successfully authenticated
🤖: ✔️  authentication state successfully saved in /home/runner/work/LibreChat/LibreChat/e2e/storageState.json
🤖: global setup has been finished

Running 1 test using 1 worker

[1/1] [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets
[chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets
Lighthouse run 1/3 wrote /home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-1.report.json

Lighthouse run 2/3 wrote /home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-2.report.json

Lighthouse run 3/3 attempt 1 did not complete, retrying: Command failed: /opt/hostedtoolcache/node/24.16.0/x64/bin/node /home/runner/work/LibreChat/LibreChat/node_modules/lighthouse/cli/index.js http://localhost:3080/c/16390000-0000-4000-8000-000000000001 --quiet --preset=desktop --throttling-method=provided --only-categories=performance --chrome-flags=--headless=new --extra-headers={"Cookie":"token_provider=librechat; refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhY2MyNWEwMGU0ZmY0ODBiYTMyOTg5ZCIsInNlc3Npb25JZCI6IjZhY2MyNWE4MGU0ZmY0ODBiYTMyOThjMiIsImlzc3VlZEF0TXMiOjE3OTE3NjM4ODAyMTMsImlhdCI6MTc5MTc2Mzg4MCwiZXhwIjoxNzkxNzY3NDgwfQ.1t_e1JLiWLGDbwr5rmh7Hgr8gfqhyy-tU009WRdeocQ"} --output=json --output=html --output-path=/home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-3

  1) [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets 

    Error: Command failed: /opt/hostedtoolcache/node/24.16.0/x64/bin/node /home/runner/work/LibreChat/LibreChat/node_modules/lighthouse/cli/index.js http://localhost:3080/c/16390000-0000-4000-8000-000000000001 --quiet --preset=desktop --throttling-method=provided --only-categories=performance --chrome-flags=--headless=new --extra-headers={"Cookie":"token_provider=librechat; refreshToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhY2MyNWEwMGU0ZmY0ODBiYTMyOTg5ZCIsInNlc3Npb25JZCI6IjZhY2MyNWE4MGU0ZmY0ODBiYTMyOThjMiIsImlzc3VlZEF0TXMiOjE3OTE3NjM4ODAyMTMsImlhdCI6MTc5MTc2Mzg4MCwiZXhwIjoxNzkxNzY3NDgwfQ.1t_e1JLiWLGDbwr5rmh7Hgr8gfqhyy-tU009WRdeocQ"} --output=json --output=html --output-path=/home/runner/work/LibreChat/LibreChat/.lighthouse/lhr-3
    Runtime error encountered: Something went wrong with recording the trace over your page load. Please run Lighthouse again. (NO_NAVSTART)


    attachment #1: screenshot (image/png) ──────────────────────────────────────────────────────────
    e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/test-failed-1.png
    ────────────────────────────────────────────────────────────────────────────────────────────────

    Error Context: e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/error-context.md

    attachment #3: trace (application/zip) ─────────────────────────────────────────────────────────
    e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/trace.zip
    Usage:

        npx playwright show-trace e2e/lighthouse/.test-results/load-serial-database-latency-stays-within-web-vitals-budgets-chrome/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────


🤖: global teardown has been started
2026-10-12 00:13:37 �[32minfo�[39m: �[32mMongo Connection options�[39m
2026-10-12 00:13:37 �[32minfo�[39m: �[32m{�[39m
�[32m  "bufferCommands": false�[39m
�[32m}�[39m
🤖:  ✅  Connected to Database
🤖:  ✅  Found user in Database
🤖:  ✅  Deleted 1 convos & 2 messages
🤖:  ✅  Deleted user from Database
🤖: global teardown has been started
2026-10-12 00:13:38 �[32minfo�[39m: �[32mMongo Connection options�[39m
2026-10-12 00:13:38 �[32minfo�[39m: �[32m{�[39m
�[32m  "bufferCommands": false�[39m
�[32m}�[39m
🤖:  ✅  Connected to Database
🤖:  ⚠️  User not found in Database
  1 failed
    [chrome] › e2e/lighthouse/load.spec.ts:10:5 › serial database latency stays within web-vitals budgets 

Open the full run

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

Copy link
Copy Markdown

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: b9d279ac67

ℹ️ 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 client/src/components/Nav/Settings/ConnectedAccounts.tsx Outdated
Comment thread client/src/data-provider/PullRequest/signIn.ts Outdated
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from b9d279a to f0430d7 Compare October 12, 2026 00:44

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

Copy link
Copy Markdown

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: f0430d7103

ℹ️ 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 client/src/data-provider/PullRequest/connection.ts Outdated
Comment thread client/src/data-provider/PullRequest/signIn.ts
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from f0430d7 to ce6b09e Compare October 12, 2026 01:08
@berry-13
berry-13 force-pushed the berry-13/pr-connect-ui branch from 2d724ff to 50298e1 Compare October 12, 2026 14:54

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

Copy link
Copy Markdown

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: 50298e1243

ℹ️ 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 client/src/data-provider/PullRequest/signIn.ts Outdated
Comment thread client/src/data-provider/PullRequest/connection.ts Outdated

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

Copy link
Copy Markdown

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: 44b9b55dc0

ℹ️ 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 client/src/components/Nav/Settings/ConnectedAccounts.tsx
Comment thread client/src/data-provider/PullRequest/signIn.ts Outdated
Comment thread client/src/data-provider/PullRequest/queries.ts

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

Copy link
Copy Markdown

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: d298038780

ℹ️ 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 client/src/data-provider/PullRequest/connection.ts Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx

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

Copy link
Copy Markdown

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: 63967db2b6

ℹ️ 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 client/src/data-provider/PullRequest/signIn.ts Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx

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

Copy link
Copy Markdown

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: 4e81e14aa2

ℹ️ 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 client/src/data-provider/PullRequest/signIn.ts Outdated
Comment thread client/src/components/Nav/Settings/ConnectedAccounts.tsx
@berry-13
berry-13 merged commit 6a1a97a into dev Oct 12, 2026
46 checks passed
@berry-13
berry-13 deleted the berry-13/pr-connect-ui branch October 12, 2026 20:25
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