fix(client): reject incomplete GitHub owner paths before lookup#15969
Problem
In Add Project, submitting a GitHub path that is only owner/ (or owner//) calls repository lookup. GitHub cannot resolve that input, and the UI shows a generic lookup failure.
Change
Before lookup, GitHub input that is only an owner plus a trailing slash now stops. Web shows a toast titled "Repository name incomplete" with "Enter the full owner/repository name." Mobile shows that same sentence in the existing error banner.
Complete owner/repository names, bare repository names, GitHub URLs, and SSH URLs still go to lookup. Other providers are unchanged. This does not list an owner's repositories.
Web and mobile both use the same check because both submit Add Project lookups.
Scope and approval
This is the focused input-validation fix split out of closed #10214, as requested in https://github.com/pingdotgg/t3code/pull/10214#issuecomment-5922709103. Repository discovery stays out of this PR. It is a small correction of an existing failure: incomplete input should not be sent to lookup.
The branch was rebased onto current main after the close, because those helpers were renamed. Head is 56f20aec3.
Verification
vp test run packages/client-runtime/src/operations/projects.test.tsβ passed, includingowner/,owner//, complete names, URLs, and non-GitHub sources.vp linton the four touched files β no new warnings.vp run --filter @t3tools/client-runtime typecheck,@t3tools/web, and@t3tools/mobileβ passed.
Screenshots
Input on every shot is naveed949/.
Web before
Observed: "Repository lookup failed" / lookupRepository failed for github: The source control operation could not be completed.
Web after
Observed: toast "Repository name incomplete" / "Enter the full owner/repository name." Lookup was not sent.
Mobile before
Mobile before: generic lookup failure for naveed949/Environment: macOS 27.0.1 (26A434), iPhone Duo simulator, iOS 27.1, T3 Code Dev (com.t3tools.t3code.dev). Observed banner: "Source control repository operation lookupRepository failed for github: The source control operation could not be completed."
Mobile after
Mobile after: incomplete owner path bannerSame device and app, commit 56f20aec3. Observed banner: "Enter the full owner/repository name." Lookup was not sent.
Implemented with Grok 4.7 via the Cursor harness.
Made with Cursor
Checks
Added 1 commit
- fix(client): reject incomplete GitHub owner paths before lookupb8d5562
Approvability
Verdict: Approved at b8d5562
Macroscope's review found this PR approvable β This is a narrow input-validation fix that replaces a generic lookup failure for incomplete GitHub owner paths with a clear web/mobile error, while leaving valid inputs and other providers unchanged. The shared helper is unit-tested, and the PR does not alter defaults, schemas, security-sensitive code, or static-analysis settings.
You can add or adjust custom eligibility rules. Learn more.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. π
βΉοΈ Recent review info
βοΈ Run configuration
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3dfe498e-8177-4666-b3db-d6ed1817aa85
π₯ Commits
Reviewing files that changed from the base of the PR and between cf3e714b0f58e29c8fa8660db50d2187e3263b65 and b8d5562340d5ad914b27dffce7ebc3ff514ff7c6.
π Files selected for processing (4)
apps/mobile/src/features/projects/AddProjectScreen.tsxapps/web/src/components/CommandPalette.tsxpackages/client-runtime/src/operations/projects.test.tspackages/client-runtime/src/operations/projects.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
π Walkthrough
Walkthrough
Adds a shared validation helper for incomplete GitHub owner paths. The mobile add-project screen and web command palette use it to stop repository lookup when the input lacks a repository name.
Changes
GitHub repository input validation
| Layer / File(s) | Summary |
|---|---|
Define and test the input guard packages/client-runtime/src/operations/projects.ts, packages/client-runtime/src/operations/projects.test.ts | The helper returns a message for GitHub inputs with an owner followed by slashes but no repository name. Tests cover incomplete paths, valid GitHub inputs, and other providers. |
Apply the guard in repository flows apps/mobile/src/features/projects/AddProjectScreen.tsx, apps/web/src/components/CommandPalette.tsx | The mobile screen displays the validation message, and the web palette shows an error toast. Both stop before proceeding to lookup or navigation. |
Priority: β¬οΈ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix Β· Severity of issue fixed: Low
Suggested reviewers: juliusmarminge
Merge Risk: βͺ Minimal Β· up to b8d55
The incomplete-path guard has no identified issue that needs to be resolved before merge.
π₯ Pre-merge checks | β 4 | β 1
β Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | β οΈ Warning | Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
β Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | β Passed | The title clearly and concisely describes the main change: rejecting incomplete GitHub owner paths before lookup. |
| Description check | β Passed | The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the behavior, scope, linked discussion, and specific test results. It also states thatβ¦ |
| Linked Issues check | β Passed | The only directly linked issue, #10214, is closed and provides historical context only. No active linked-issue coding requirements apply. The reported validation change addresses the incomplete-input β¦ |
| Out of Scope Changes check | β Passed | The reported changes add a shared GitHub incomplete-owner check, use it in the web and mobile Add Project flows, and test accepted and rejected inputs. These changes support the focused validation fixβ¦ |
- Fix all pre-merge checks with AI
β¨ Finishing Touches
π§ͺ Generate unit tests (beta)
- Create a new PR
- Autopilot Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Note
This comment is posted by Julius' dot
This keeps the focused input-validation scope requested in #10214, but changes the visible Add Project error on both web and mobile while explicitly omitting live before/after screenshots. Shared helper tests do not show those client paths. Under the verification requirement, please attach before/after screenshots of submitting an incomplete owner path on both clients, with the environment and observed results. Closing for the missing UI evidence; request reconsideration once it is attached.
Note
This comment is posted by Julius' dot This keeps the focused input-validation scope requested in #10214, but changes the visible Add Project error on both web and mobile while explicitly omitting live before/after screenshots. Shared helper tests do not show those client paths. Under the verification requirement, please attach before/after screenshots of submitting an incomplete owner path on both clients, with the environment and observed results. Closing for the missing UI evidence; request reconsideration once it is attached.
@juliusmarminge before/after screenshots attached. please review
Reopened with the missing mobile evidence.
Before and after shots of submitting naveed949/ are in the description, for web and mobile.
Mobile environment: macOS 27.0.1 (26A434), iPhone Duo simulator, iOS 27.1, T3 Code Dev (com.t3tools.t3code.dev).
- Before: banner "Source control repository operation lookupRepository failed for github: The source control operation could not be completed."
- After, commit
56f20aec3: banner "Enter the full owner/repository name." Lookup was not sent.
The branch was rebased onto current main after the close, because the add-project helpers were renamed. Head is 56f20aec3.
GitHub will not reopen this pull request: the branch was force-pushed while it was closed, and restoring the old head still returns "Could not open the pull request."
The rebased fix, plus web and mobile before/after shots of submitting naveed949/, is in https://github.com/pingdotgg/t3code/pull/23024. Head is 56f20aec3.
Mobile environment: macOS 27.0.1 (26A434), iPhone Duo simulator, iOS 27.1, T3 Code Dev (com.t3tools.t3code.dev).
- Before: "Source control repository operation lookupRepository failed for github: The source control operation could not be completed."
- After: "Enter the full owner/repository name." Lookup was not sent.