Skip to content

feat: add Origin (Cursor) as a git provider across the console - #3174

Draft
Meldiron wants to merge 7 commits into
mainfrom
feat-origin-git-provider
Draft

feat: add Origin (Cursor) as a git provider across the console#3174
Meldiron wants to merge 7 commits into
mainfrom
feat-origin-git-provider

Conversation

@Meldiron

@Meldiron Meldiron commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds Origin (Cursor) as a connectable git provider and makes the console honor the server's per-provider VCS capabilities.

  • SDK bump — pins @appwrite.io/console to 56957ff, which adds the two new Models.ConsoleVariables fields this feature reads: _APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION and _APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES. No breaking changes against the previous ed09983 pin, so it's a lockfile-only commit.
  • Origin provider support — provider metadata, icon, authorize redirect, and Origin-specific links (cursor.com Codebase for organizations/repositories, app settings for installation access).
  • Provider choice across the console — connect buttons, installation selects, and repository pickers now offer every provider enabled via _APP_VCS_PROVIDERS (GitHub always, Gitea self-hosted only) instead of being hardcoded to GitHub.
  • Respect the new console variables — the new-repository form only offers organizations whose provider is listed in _APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION, and hides the public/private toggle (forcing private) when the provider is not in _APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES. The connect-repository modal and the function/site template wizards hide the "Create new repository" choice entirely when no installation supports creation, replacing the previous hardcoded Origin special case. Servers that predate the new variables keep the historical behavior.
  • UI fix — the provider connect buttons in the git empty states are now centered.

Reviewing commit-by-commit is easiest: the first commit is the SDK pin, the rest are the feature.

Test plan

  • bun run check — 0 errors
  • bun run lint — 0 errors
  • bun run test:unit — all passing
  • bun run build — passes

Related PRs and issues

🤖 Generated with Claude Code

Meldiron and others added 5 commits August 19, 2026 17:58
Brings in the console variables that report per-provider VCS
capabilities (_APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION and
_APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES). No breaking changes
against the previous ed09983 pin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds Origin, Cursor's git hosting, alongside GitHub and Gitea:

- IconOrigin.svelte with the Cursor cube mark, currentcolor like the
  other provider icons
- connectOrigin() plus provider URL helpers in the git store, and a
  Connect to Origin button (second, after GitHub) in the shared connect
  empty state, gated on _APP_VCS_PROVIDERS containing 'origin'
- Provider-aware settings page: Origin icon and cursor.com/codebase
  links for installations, per-row Configure follows the row's provider
  instead of always GitHub, unknown providers fall back to a git icon
- Repository cards, git-deployment modals and the deployment source
  popover no longer assume GitHub for icons and repository links

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Builds on the Origin groundwork with a central provider registry in the
git store (icons, labels, provider URLs, installation-settings URLs and
enablement gates), the same shape the new console uses. Everything that
assumed GitHub now reads from it:

- Connect empty states (shared connectGit, settings, both template
  wizards) render one button per enabled provider
- Settings' Add installation becomes a provider chooser when more than
  one provider is enabled, and each row's Configure follows the row's
  provider
- The repository picker labels installations with their provider icon
  and offers per-provider 'Add installation' entries
- 'Missing a repository?' permission links follow the installation's
  provider (GitHub installation settings vs Cursor's app settings)
- Wizard asides and repository cards show the connected provider's icon
- The create-repository modal explains that Origin apps cannot create
  repositories and points at cursor.com instead

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The button row in the git empty states spans the full footer width, so it
needs its own centering like the MCP card below it. Also drops the now
redundant _APP_VCS_PROVIDERS casts in the touched files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…bility

Console variables now report which VCS providers support repository
creation (_APP_VCS_PROVIDERS_WITH_REPOSITORY_CREATION) and which can host
public repositories (_APP_VCS_PROVIDERS_WITH_PUBLIC_REPOSITORIES).

- The new-repository form only offers organizations whose provider can
  create repositories, and hides the public/private toggle (forcing
  private) when the provider cannot host public repositories.
- The connect-repository modal and the function/site template wizards hide
  the "Create new repository" choice entirely when no installation
  supports creation, replacing the hardcoded Origin special case.
- Servers that predate the new variables keep the historical behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@appwrite

appwrite Bot commented Aug 19, 2026

Copy link
Copy Markdown

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Function scopes give you fine-grained control over API permissions

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds Origin as a Git provider and centralizes provider metadata, authorization links, capability gating, and provider-aware presentation.

  • Adds Origin branding and connection actions throughout Function, Site, and project-settings flows.
  • Uses server-provided capability lists to control repository creation and public-repository options.
  • Updates Gitea handling so unavailable provider destinations render as plain text rather than broken links.
  • Pins the console SDK revision containing the new capability variables.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/lib/stores/git.ts Centralizes provider metadata, enablement and capability checks, authorization redirects, and safe provider URL construction.
src/lib/components/git/newRepository.svelte Filters installations by repository-creation support and enforces private repositories when public repositories are unsupported.
src/lib/components/git/connectRepoModal.svelte Gates new-repository selection by installation capabilities and renders provider-specific permission actions.
src/routes/(console)/project-[region]-[project]/settings/updateInstallations.svelte Adds provider-aware installation actions, icons, authorization routes, and safe handling for unavailable organization URLs.
src/lib/components/git/deploymentSource.svelte Adds Origin-aware branding and installation-settings destinations to deployment source details.
package.json Pins the console SDK revision that defines the new VCS capability variables.

Reviews (3): Last reviewed commit: "fix(git): don't render provider links wh..." | Re-trigger Greptile

Comment thread src/lib/stores/git.ts Outdated
Comment thread src/lib/stores/git.ts
@Meldiron
Meldiron changed the base branch from chore-bump-console-sdk-56957ff to main August 20, 2026 07:42
…gistry

The Git deployment modals picked their icon with a hardcoded
`provider === 'origin' ? IconOrigin : IconGithub` ternary, which showed
the GitHub icon for Gitea installations and coupled the routes to the
icon component filenames. Use getVcsProvider().icon, the same registry
the adjacent getProviderRepositoryUrl() call already goes through.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gitea's host is per-deployment server configuration that the API does not
expose, so its organizationUrl is ''. Building a repository URL on top of
that produced the relative path "/repository-name", and the installation
and organization links rendered href="" -- all of which resolve against
the console's own origin and navigate away from the intended repository.

getProviderRepositoryUrl now returns '' instead of a relative path, and
the four consumers render the organization/repository as plain text when
no browsable URL exists. The functions create page also gains the same
installationSettingsUrl guard the sites page already had, since Gitea has
no settings page and the link had no href.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@Meldiron Meldiron left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lgtm

@Meldiron
Meldiron marked this pull request as draft August 20, 2026 08:05
@Meldiron

Copy link
Copy Markdown
Contributor Author

Draft on purpose; Should not be merged until our Origin apps are public

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.

1 participant