Skip to content

fix(client): reject incomplete GitHub owner paths before lookup - #15969

Open
naveed949 wants to merge 1 commit into
pingdotgg:mainfrom
naveed949:t3code/fix-incomplete-github-owner-lookup
Open

naveed949 wants to merge 1 commit into
pingdotgg:mainfrom
naveed949:t3code/fix-incomplete-github-owner-lookup

Conversation

@naveed949

Copy link
Copy Markdown
Contributor

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 #10214 (comment). Repository discovery stays out of this PR. It is a small correction of an existing failure: incomplete input should not be sent to lookup.

Verification

  • vp test run packages/client-runtime/src/operations/projects.test.ts — 18 passed, including owner/, owner//, complete names, URLs, and non-GitHub sources.
  • vp lint on the four touched files — no new warnings.
  • vp run --filter @t3tools/client-runtime typecheck, @t3tools/web, and @t3tools/mobile — passed.

I did not capture a live before/after screenshot. The web message uses the same toast as the current lookup failure, and the mobile message uses the existing error banner.

Implemented with Grok 4.7 via the Cursor harness.

Made with Cursor

Submitting owner/ in Add Project sent that string to repository lookup and showed a generic failure. Ask for the full owner/repository name instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 5, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Review in Change Stack →

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 cf3e714 and b8d5562.

📒 Files selected for processing (4)
  • apps/mobile/src/features/projects/AddProjectScreen.tsx
  • apps/web/src/components/CommandPalette.tsx
  • packages/client-runtime/src/operations/projects.test.ts
  • packages/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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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