Add GitLab as a first-class forge alongside GitHub#366
Open
tftio wants to merge 2 commits into
Open
Conversation
Introduce a forge abstraction so worktree pull/merge-request status is no longer GitHub-only. A `Forge` enum is detected from the remote host, and `GitClient` parsing now returns a forge-tagged `ForgeRemoteInfo` (with GitLab subgroup support). Per-row state carries a `ForgePullRequest` sum type (`.github` / `.gitlab`) with a shared projection, so most views read common fields and only branch on the forge where the data genuinely differs (GitLab pipelines vs. GitHub status checks). A parallel `GitLabCLIClient` shells out to `glab` (mirroring the existing `gh` client) for availability, auth status, remote resolution, and a batched merge-request GraphQL query. The repositories reducer dispatches the PR refresh per forge. Settings unify both forges into a single "Forges" pane (replacing the separate GitHub pane): a per-forge integration row shows the enable toggle, CLI availability, and auth status, and a single shared "Pull Request" section holds the merge strategy and merged-worktree action. v1 is read-only: GitLab MRs surface their number, state, draft flag, and pipeline status in the sidebar, toolbar, and detail view. Mutations (merge/close/mark-ready), pipeline rerun, and failing-job log copy remain GitHub-only and are gated behind the `.github` case; the command palette and reducer skip those actions for GitLab MRs.
macOS 26.4+ SDKs dropped the plain arm64-macos slice from libSystem.tbd, leaving only arm64e-macos. zig 0.15.2's Mach-O linker (pinned by Ghostty) won't match the two, so it fails to link its own build runner with every libSystem symbol undefined (ziglang/zig#31658, fixed in zig 0.16). Xcode 26.5's Swift 6.3 separately fails to compile the pinned swift-composable-architecture. Xcode 26.3 satisfies both. Resolve a developer dir from SUPACODE_DEVELOPER_DIR (default Xcode 26.3) and export it for every recipe, so `tuist generate` (Ghostty) and `xcodebuild` (zmx + the app) all use it. The export is overridable and auto-disables when that Xcode is absent, so CI and machines on an older OS are unaffected. The Ghostty and zmx build scripts defer to an already-set DEVELOPER_DIR and only fall back to 26.3 for standalone runs. Also make xcbeautify optional: pretty-print xcodebuild output when it is available via mise or PATH, otherwise pass the raw log through `cat` so a missing formatter no longer fails the build under pipefail.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds GitLab support as a first-class forge, so worktree pull/merge-request status is no longer GitHub-only. Read-only for this first cut. Per the direction in #365 (this comment), the GitHub and GitLab settings are unified into a single Forges pane with a shared "Pull Request" section, modeled on the per-agent integration rows under Developer.
Refs #365
What's included
Forgeenum detected from the remote host;GitClientparsing returns a forge-taggedForgeRemoteInfo(with GitLab subgroup support). Per-row state carries aForgePullRequestsum type (.github/.gitlab) with a shared projection — views read common fields and only branch where the data genuinely differs (GitLab pipelines vs. GitHub status checks).GitLabCLIClientshelling out toglab, mirroring the existingghclient (availability, auth status, remote resolution, batched merge-request GraphQL query).Scope — read-only v1 (being explicit)
GitLab MRs surface their number, state, draft flag, and pipeline status in the sidebar, toolbar, and detail view. Mutations are not implemented yet: merge / close / mark-ready, pipeline rerun, and failing-job log copy remain GitHub-only and are gated behind the
.githubcase (the command palette and reducer skip them for GitLab MRs). Closing the gap toward full parity is the intended follow-up.Build note (please read — not a blocker)
The second commit pins the build to Xcode 26.3 via a scoped, overridable
SUPACODE_DEVELOPER_DIR. Two unrelated toolchain breakages on macOS 26.5 forced this:arm64-macosslice fromlibSystem.tbd; zig 0.15.2 (pinned by Ghostty) can't link against the arm64e-only stubs and fails to link its own build runner (ziglang/zig#31658, fixed in zig 0.16).swift-composable-architecture(1.23.1).Xcode 26.3 satisfies both. The export is guarded and auto-disables when that Xcode is absent (CI / other OS versions are unaffected), and the build scripts defer to any
DEVELOPER_DIRthe caller already set. It's isolated in its own commit so you can adjust or drop it — flagging it explicitly since the default path is environment-specific. The same commit also makesxcbeautifyoptional so a missing formatter no longer fails the build.Testing
glab auth statusparsing, pipeline-status mapping, plus a GitLab refresh-dispatch integration test inRepositoriesFeatureTests.gitlab.comremote — the MR badge/notification, pipeline status, and the unified Forges settings pane all render and behave as expected.