Skip to content

Conversation

@0ubbe
Copy link
Contributor

@0ubbe 0ubbe commented Jan 21, 2026

Changes πŸ—οΈ

On the Old Builder, when running an agent...

Before

Screenshot 2026-01-21 at 21 27 05

Credentials are there, but it is not recognising them, you need to click on them to be selected

After

Screenshot 2026-01-21 at 21 26 47

It uses the new credentials UI and correctly auto-selects existing ones.

Other

Fixed a small timezone display glitch on the new library view.

Checklist πŸ“‹

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • Run agent in old builder
    • Credentials are auto-selected and using the new collapsed system credentials UI

@0ubbe 0ubbe requested review from Abhi1992002 and kcze January 21, 2026 14:31
@0ubbe 0ubbe requested a review from a team as a code owner January 21, 2026 14:31
@0ubbe 0ubbe requested review from Pwuts and removed request for a team January 21, 2026 14:31
@github-project-automation github-project-automation bot moved this to πŸ†• Needs initial review in AutoGPT development kanban Jan 21, 2026
@github-actions github-actions bot added the platform/frontend AutoGPT Platform - Front end label Jan 21, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

Warning

Rate limit exceeded

@0ubbe has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 40 seconds before requesting another review.

βŒ› How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2739de4 and c3099b7.

πŸ“’ Files selected for processing (3)
  • autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/OldAgentLibraryView/components/agent-run-draft-view.tsx
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/components/CredentialsGroupedView/helpers.ts
  • autogpt_platform/frontend/src/components/contextual/CredentialsInput/useCredentialsInput.ts

Walkthrough

This PR refactors credential handling in the agent run draft view by introducing a CredentialsGroupedView component, adding new credential discovery helpers, and improving auto-selection logic. Changes include context-based provider access, automatic default credential initialization, enhanced state tracking, and simplified OAuth error messaging.

Changes

Cohort / File(s) Summary
Credential UI Refactoring
...OldAgentLibraryView/components/agent-run-draft-view.tsx, ...CredentialsGroupedView/CredentialsGroupedView.tsx
Replaced per-credential inline UI with CredentialsGroupedView component; added CredentialsProvidersContext consumption for available provider access; implemented automatic default credential population on mount via helper functions; enhanced credential state handling with change tracking and improved initialization flow.
Credential Helpers & Hooks
...CredentialsGroupedView/helpers.ts, useCredentialsInput.ts
Added findSavedUserCredentialByProviderAndType helper for filtered credential lookup with type and scope validation; refactored auto-select logic into named function with improved guards; simplified OAuth insufficient scopes error message to single line.
Utilities
timezone-utils.ts
Enhanced getTimezoneDisplayName to prefer city-based display format when abbreviations are unavailable; improved error handling with consistent underscore-to-space replacement across both success and error paths.

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • kcze

Poem

🐰 Credentials grouped and sorted with care,
Auto-selection finds the perfect pair,
Helpers and hooks now dance in refrain,
Context-aware logic without the strain,
Timezone displays, cleaner than before!

πŸš₯ Pre-merge checks | βœ… 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (2 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly describes the main fix: auto-selecting credentials correctly in the old builder. It directly relates to the changeset's primary objective.
Description check βœ… Passed The description is well-detailed and directly related to the changeset, including before/after context, specific changes, and a completed test plan.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ntindle
Copy link
Member

ntindle commented Jan 21, 2026

Does this still allow optional credentials for the new builder + library?

@0ubbe
Copy link
Contributor Author

0ubbe commented Jan 21, 2026

@ntindle I think so, we added only auto‑select required credentials (we iterate requiredCredentials), so optional fields remain unset and can be skipped.

@github-project-automation github-project-automation bot moved this from πŸ†• Needs initial review to πŸ‘πŸΌ Mergeable in AutoGPT development kanban Jan 21, 2026
@Abhi1992002 Abhi1992002 enabled auto-merge January 21, 2026 14:51
@Abhi1992002 Abhi1992002 added this pull request to the merge queue Jan 21, 2026
Merged via the queue into dev with commit 40ef2d5 Jan 21, 2026
26 checks passed
@Abhi1992002 Abhi1992002 deleted the fix/credentials-old-builder-autoselect branch January 21, 2026 15:17
@github-project-automation github-project-automation bot moved this to Done in Frontend Jan 21, 2026
@github-project-automation github-project-automation bot moved this from πŸ‘πŸΌ Mergeable to βœ… Done in AutoGPT development kanban Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/frontend AutoGPT Platform - Front end size/l

Projects

Status: βœ… Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants