Skip to content

refactor(client-runtime): add project clone sources come from host definitions - #17756

Merged
juliusmarminge merged 1 commit into
t3/sc-client-definitionsfrom
t3/sc-runtime-mobile-clients
Oct 10, 2026
Merged

juliusmarminge merged 1 commit into
t3/sc-client-definitionsfrom
t3/sc-runtime-mobile-clients

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

The Add Project helpers in client-runtime listed the hosts by hand: the AddProjectRemoteProviderKind union, two source arrays, the label and path-hint switches, getDefaultCloneUrl's github || forgejo check, and a readiness Record keyed by host. Mobile then repeated the host list twice more, as source === "github" || … route-param guards in AddProjectScreen and AddProjectRepositoryRoute.

Fix

  • operations/projects.ts reads hosts, labels (pickerLabel), path hints and the clone transport from sourceControlClients. AddProjectRemoteSource is SourceControlProviderKind | "url".
  • Readiness is now a lookup function ((source) => { ready, hint }) instead of a record with one key per host, so it covers whatever hosts the definitions list.
  • New parseAddProjectRemoteSource replaces mobile's two route-param guards. A host this build doesn't ship falls back to url, as before.
  • On mobile, SourceControlIcon takes the definition's icon key and draws nothing for keys it has no art for. thread-pr-presentation reads the change request noun from the definition.

No behavior change. Labels, hints, ordering (ready first, then by label), hint copy and clone transports are identical.

I deliberately left mobile's "new project → private GitHub repository" alone. It publishes through gh and reads getNewProjectGitHubTarget, so it is a GitHub feature, not a host switch.

Verification

  • npx tsc --noEmit -p . is clean in client-runtime and mobile.
  • vp test run packages/client-runtime/src/operations/projects.test.ts apps/mobile/src/state/use-thread-pr.test.ts packages/client-runtime/src/sourceControlClients.test.ts passes. The existing readiness test now calls the resolver form.
  • vp lint on the touched files and knip are clean.
  • Effect-shortcut grep over the added lines finds nothing.

After restacking onto GitCafe (#17681): GitCafe joins the clone picker through its definition, with no edit to this layer's code. That matches what main's palette offers. Mobile's SourceControlIcon gains GitCafe's mark, the same inset square as web's GitCafeIcon.

🤖 Generated with Claude Code

@juliusmarminge
juliusmarminge added this pull request to stack #17747 October 10, 2026 07:39
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 10, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 10, 2026
@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Oct 10, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 10, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The mobile clone flow now automatically exposes host definitions such as GitCafe, including new labels, icons, readiness handling, repository lookup, and clone transport behavior. This changes the product's default source choices and enables a new user-facing path, so the broader runtime impact merits human review.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

No code changes detected at efcc177. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 5.0 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.9 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 5.0 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.8 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 21.2 KiB — 29.3 KiB ✅
Claude Live turn messages — 1 — 8 ✅

Baseline: unavailable · PR result: efcc177 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 56760f2c-7512-4574-a2d9-4eb61f83dae3

📥 Commits

Reviewing files that changed from the base of the PR and between f4c6dfb and efcc177.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: e390f8df-47ae-4099-810c-8675f02ed149



📥 Commits

Reviewing files that changed from the base of the PR and between c1581e0 and f4c6dfb.




📒 Files selected for processing (1)
  • packages/client-runtime/src/operations/projects.test.ts



Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.





📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The add-project source model derives provider names, labels, path hints, clone transport, and readiness from registered source-control clients. Mobile routes parse unknown sources as URLs, use configured icons, and query readiness by source. Thread PR accessibility labels use the selected client’s singular change-request name.

Changes

Source-control provider integration

Layer / File(s) Summary
Source definitions, parsing, and readiness
packages/client-runtime/src/operations/projects.ts, packages/client-runtime/src/operations/projects.test.ts
Provider source details and readiness use registered source-control clients. Missing or unknown values parse as url. The readiness test uses the callable API and retains its expected states and GitLab hint.
Add-project source selection
apps/mobile/src/components/SourceControlIcon.tsx, apps/mobile/src/features/projects/AddProjectRepositoryRoute.tsx, apps/mobile/src/features/projects/AddProjectScreen.tsx
Add-project routes use the shared parser and labels. The screen uses client-configured icons and queries readiness by source. SourceControlIcon renders GitCafe and returns null for unsupported values.
Thread change-request labels
apps/mobile/src/state/thread-pr-presentation.ts
Thread PR presentation uses the selected client’s change-request descriptor and singular name in the accessibility label.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Refactor





Merge Risk: ⚪ Minimal · up to f4c6d

The summarized change updates test calls without changing expected readiness behavior. No actionable merge risk remains in the reviewed change.

Pre-merge checks | Passed 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the refactor that makes project clone sources come from host definitions.
Description check Passed The description explains the problem, changes, behavior, and focused verification. It does not include the template’s Scope and approval section or link approval, but the remaining information makes t…



✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR







🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR





  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@juliusmarminge
juliusmarminge force-pushed the t3/sc-runtime-mobile-clients branch from 916ee86 to c1581e0 Compare October 10, 2026 08:01
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 10, 2026 08:01

Dismissing prior approval to re-evaluate c1581e0

@juliusmarminge
juliusmarminge force-pushed the t3/sc-runtime-mobile-clients branch from c1581e0 to f4c6dfb Compare October 10, 2026 17:25
…finitions

The Add Project helpers in client-runtime, and mobile's screens on top of
them, listed the five hosts by hand: the source union, its label and path
hint switches, the default clone transport, a readiness record keyed by
host, and route-param guards in two mobile screens. They now read from
`sourceControlClients`, so a new host's definition puts it in the picker.

Readiness is a lookup function instead of a fixed record. Mobile's PR
accessibility label and its icon read from the definition too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge
juliusmarminge force-pushed the t3/sc-runtime-mobile-clients branch from f4c6dfb to efcc177 Compare October 10, 2026 18:50
@juliusmarminge
juliusmarminge merged commit c8a6033 into main Oct 10, 2026
30 checks passed
@juliusmarminge
juliusmarminge deleted the t3/sc-runtime-mobile-clients branch October 10, 2026 19:07
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Oct 10, 2026
## What's Changed
* feat(server): stop Claude subagents without stopping their owner by @Yash-Singh1 in pingdotgg/t3code#17826
* fix(server): stopped native subagents no longer read as Running by @im-kvijay in pingdotgg/t3code#17223
* perf(server): t3_thread_list reads only the listed project's threads by @only21mil in pingdotgg/t3code#17843
* fix(server): show diffs for projects outside the server cwd by @maria-rcks in pingdotgg/t3code#17724
* fix(server): check the specific scope for scripts, preview input, and full-access MCP grants by @juliusmarminge in pingdotgg/t3code#17772
* fix(source-control): stop Forgejo status refresh from scanning every pull request by @loispostula in pingdotgg/t3code#12223
* refactor(contracts): source control provider kind is an open branded slug by @juliusmarminge in pingdotgg/t3code#17739
* feat(source-control): each host package ships a client definition by @juliusmarminge in pingdotgg/t3code#17746
* refactor(client-runtime): add project clone sources come from host definitions by @juliusmarminge in pingdotgg/t3code#17756
* refactor(web): host presentation and behavior come from client definitions by @juliusmarminge in pingdotgg/t3code#17757
* refactor(source-control): reference parsing and project matching are host resolvers by @juliusmarminge in pingdotgg/t3code#17770
* feat(pull-requests): quick actions follow each host's capabilities, not GitHub by @juliusmarminge in pingdotgg/t3code#17774
* feat(projects): new projects can be published to any ready host by @juliusmarminge in pingdotgg/t3code#17860
* fix(server): send Claude MCP servers over the control channel by @juliusmarminge in pingdotgg/t3code#17898
* fix(web): a finished reply replaced by a steer is no longer labeled partial by @juliusmarminge in pingdotgg/t3code#17761
* fix(client-runtime): queued runs that start after a steer show up in the thread by @juliusmarminge in pingdotgg/t3code#17764
* feat(mobile): choose the microphone order for voice input by @juliusmarminge in pingdotgg/t3code#17896
* feat(source-control): host settings live on each host's definition, with a GitCafe token by @juliusmarminge in pingdotgg/t3code#17901

## New Contributors
* @only21mil made their first contribution in pingdotgg/t3code#17843
* @loispostula made their first contribution in pingdotgg/t3code#12223

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261010.2935...v0.0.46-nightly.20261010.2948

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261010.2948
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 10, 2026
## What's Changed
* feat(server): stop Claude subagents without stopping their owner by @Yash-Singh1 in pingdotgg/t3code#17826
* fix(server): stopped native subagents no longer read as Running by @im-kvijay in pingdotgg/t3code#17223
* perf(server): t3_thread_list reads only the listed project's threads by @only21mil in pingdotgg/t3code#17843
* fix(server): show diffs for projects outside the server cwd by @maria-rcks in pingdotgg/t3code#17724
* fix(server): check the specific scope for scripts, preview input, and full-access MCP grants by @juliusmarminge in pingdotgg/t3code#17772
* fix(source-control): stop Forgejo status refresh from scanning every pull request by @loispostula in pingdotgg/t3code#12223
* refactor(contracts): source control provider kind is an open branded slug by @juliusmarminge in pingdotgg/t3code#17739
* feat(source-control): each host package ships a client definition by @juliusmarminge in pingdotgg/t3code#17746
* refactor(client-runtime): add project clone sources come from host definitions by @juliusmarminge in pingdotgg/t3code#17756
* refactor(web): host presentation and behavior come from client definitions by @juliusmarminge in pingdotgg/t3code#17757
* refactor(source-control): reference parsing and project matching are host resolvers by @juliusmarminge in pingdotgg/t3code#17770
* feat(pull-requests): quick actions follow each host's capabilities, not GitHub by @juliusmarminge in pingdotgg/t3code#17774
* feat(projects): new projects can be published to any ready host by @juliusmarminge in pingdotgg/t3code#17860
* fix(server): send Claude MCP servers over the control channel by @juliusmarminge in pingdotgg/t3code#17898
* fix(web): a finished reply replaced by a steer is no longer labeled partial by @juliusmarminge in pingdotgg/t3code#17761
* fix(client-runtime): queued runs that start after a steer show up in the thread by @juliusmarminge in pingdotgg/t3code#17764
* feat(mobile): choose the microphone order for voice input by @juliusmarminge in pingdotgg/t3code#17896
* feat(source-control): host settings live on each host's definition, with a GitCafe token by @juliusmarminge in pingdotgg/t3code#17901

## New Contributors
* @only21mil made their first contribution in pingdotgg/t3code#17843
* @loispostula made their first contribution in pingdotgg/t3code#12223

**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261010.2935...v0.0.46-nightly.20261010.2948

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261010.2948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant