Skip to content

fix(chat): enable git PR/push/pull on local without provider_tokens_set#722

Open
nehaprasad-dev wants to merge 1 commit into
OpenHands:mainfrom
nehaprasad-dev:fix/pr-button-local-remote
Open

fix(chat): enable git PR/push/pull on local without provider_tokens_set#722
nehaprasad-dev wants to merge 1 commit into
OpenHands:mainfrom
nehaprasad-dev:fix/pr-button-local-remote

Conversation

@nehaprasad-dev
Copy link
Copy Markdown
Contributor

Why

  • Local workspaces can detect a GitHub remote, but PR/push/pull stayed off because buttons required cloud provider_tokens_set and pull ignored inferred repo.

Summary

  • Enable git actions on local without provider_tokens_set.
  • Share hasRepository / providerTokensReady from the control bar.
  • Fix pull to use inferred local repo, not only selected_repository.

Issue Number

fix #718

How to Test

  • Local backend + conversation in a repo with origin.
  • Confirm PR / push / pull enable when repo shows in the bar.
  • Cloud: still disabled without provider token + repo.

Video/Screenshots

N/A

Type

[x] Bug fix

Notes

Does not save inferred repo on the conversation.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

@nehaprasad-dev is attempting to deploy a commit to the openhands Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟢 Good taste - Clean refactoring that centralizes providerTokensReady logic. Fixes local backend git buttons correctly.

[IMPROVEMENT OPPORTUNITIES]

  • Consider adding test coverage for the new local backend behavior (buttons enabled when repo detected)

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW
    Simple UI logic change that fixes button enable/disable behavior on local backends. No impact on agent behavior, prompts, or evaluation performance. Cloud backend behavior unchanged.

VERDICT:
Worth merging: Logic is sound, good refactoring, no breaking changes

KEY INSIGHT:
Properly decouples local vs cloud authentication models - local backends use git credentials, not provider API tokens.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/agent-canvas/actions/runs/26248114933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Pull request" button is disabled on local, even if we've detected a GitHub remote

2 participants