Skip to content

Create an autofill for URI and branch if an Oauth connection exists - #1164

Open
petertwise wants to merge 1 commit into
afragen:developfrom
petertwise:feature/oauth-autofill
Open

Create an autofill for URI and branch if an Oauth connection exists#1164
petertwise wants to merge 1 commit into
afragen:developfrom
petertwise:feature/oauth-autofill

Conversation

@petertwise

Copy link
Copy Markdown

This is totally just an initial proof of concept... but I thought once we have oAuth connection to an account, we can relieve some of the tediousness of having to locate and copy and paste the exact github.com repo URL, remember the exact branch name and if it's master or main for the primary, etc.

This code is fully Claude generated and should be human reviewed and tested in more detail before merging.

I think this would be a great enhancement and make installing private plugins and themes way faster and more enjoyable!

2026-07-13 13 57 34

@petertwise

Copy link
Copy Markdown
Author

The main features added are:

  • add GitHub OAuth-powered autocomplete to the Install Plugin/Theme screen — repo URI field shows a live-filtered dropdown of all repositories (personal + organization) accessible via the connected OAuth account, with debounce, spinner, keyboard navigation (↑ ↓ Enter Esc), and ARIA attributes
  • add branch autocomplete to the Repository Branch field — once a connected-account repo URI is entered, typing in the branch field filters available branches fetched from the GitHub API
  • add branch autofill — when a connected-account repo is selected and its default branch is not master, the Repository Branch field is populated automatically
  • add field-hiding — when the entered URI belongs to the connected GitHub account (personal or org), the Remote Repository Host selector and GitHub Access Token field are hidden as they are not needed for OAuth-authenticated installs

@petertwise

Copy link
Copy Markdown
Author

Note that the main field is still kept as a text field in both cases, so if autofill doesn't meet your current need at any time for any reason you can still manually enter the value you need. It's not replacing the text field with a where custom values are no longer able to be input.

@afragen

afragen commented Jul 13, 2026

Copy link
Copy Markdown
Owner

This is intriguing. What happened to the Remote Repository Host and does this also work with the API Add-On plugins?

@petertwise

Copy link
Copy Markdown
Author

What happened to the Remote Repository Host

I hid Remote Repository Host and GitHub Access Token on purpose, on the assumption that if you're using an oAuth connected github repo that's all taken care of already. But I'm not super familiar with any edge case uses for these, so that's easy to back out if you think it's better to keep showing them.

does this also work with the API Add-On plugins?

I don't think it would work as-is, but would be pretty easy to do something similar for each.
I've only tested it with Github so far as that's what we use.

@afragen

afragen commented Jul 14, 2026

Copy link
Copy Markdown
Owner

You probably should show both. The Repository Host selector ensures the proper API is used and the token allows for private repositories from other developers.

@petertwise

Copy link
Copy Markdown
Author

Yes, they show back up if you use a value that's not one of your own oAuth connected repos, so the support for other developers private repos should still be there...

But sounds like it's easier to just ditch the show/hide completely. I'll make that change and repost here!

@afragen

afragen commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Consider it a request to make it more universal for any API Add On if installed. I'd rather not have to replicate everything for each Add On. Especially as I don't want multiple JS scripts fighting with each other.

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.

2 participants