Skip to content

fix(mobile): align non-git new thread behavior - #5907

Closed
sevnx wants to merge 1 commit into
pingdotgg:mainfrom
sevnx:t3code/fix-mobile-non-git-new-thread
Closed

sevnx wants to merge 1 commit into
pingdotgg:mainfrom
sevnx:t3code/fix-mobile-non-git-new-thread

Conversation

@sevnx

@sevnx sevnx commented Aug 9, 2026 •

Copy link
Copy Markdown

What Changed

  • Hide the New Thread workspace control on mobile when the selected project is not a Git repository.
  • Skip branch loading for non-git projects.
  • Force non-git thread creation to use the local checkout without branch or worktree metadata.
  • Apply the same normalization to immediate sends and queued tasks.

Why

Mobile did not match web and desktop for non-git projects: it still displayed Git-specific workspace controls and did not explicitly force local checkout when sending.

This change makes the behavior consistent across clients. Git projects preserve their workspace selection, while non-git projects always create threads using the local checkout.

UI Changes

Before After
The Workspace control was shown for non-git projects. The Workspace control is hidden for non-git projects.
Workspace control shown for a non-git project Workspace control hidden for a non-git project

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Fix new thread behavior for non-git projects in mobile

  • Adds resolveProjectThreadWorkspaceSelection in projectThreadCreationValidation.ts to force local workspace mode with null branch/worktree when a project is not a git repo, preserving inputs otherwise.
  • NewTaskFlowProvider queries git status for the selected project and exposes isGitRepo via context, skipping branch listing queries for non-git projects.
  • NewTaskDraftScreen hides branch/worktree controls and uses the resolved workspace selection when isGitRepo is false.
  • Behavioral Change: non-git projects now always submit tasks with local workspace mode and no branch/worktree, regardless of any draft state.

Macroscope summarized b42e30c.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f6e09389-81cb-4b14-9652-f3f8cefcbb63

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 9, 2026
Comment thread apps/mobile/src/features/threads/new-task-flow-provider.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR has an unresolved review comment identifying a potential bug where pending git status could block the offline task queue on cold/disconnected launches. Combined with the author being a new contributor to these files, human review is recommended to evaluate the offline behavior concern.

You can customize Macroscope's approvability policy. Learn more.

@sevnx
sevnx force-pushed the t3code/fix-mobile-non-git-new-thread branch from 7e18e5f to 0bd123a Compare August 14, 2026 21:29
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 14, 2026
Comment thread apps/mobile/src/features/threads/NewTaskDraftScreen.tsx Outdated
@sevnx
sevnx force-pushed the t3code/fix-mobile-non-git-new-thread branch from 0bd123a to b42e30c Compare August 14, 2026 22:50

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b42e30c. Configure here.

);
// Match web/desktop: assume git only while status is unresolved so the
// composer controls do not flicker away during the initial query.
const isGitRepo = gitStatus.data?.isRepo ?? true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Submit ignores unresolved git status

Medium Severity

isGitRepo falls back to true whenever gitStatus.data is missing, and that same flag drives resolveProjectThreadWorkspaceSelection on Start and Queue. canStart also does not wait for VCS status. A non-git project can still create or enqueue a thread with worktree or branch metadata while status is pending, failed, or unavailable offline.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b42e30c. Configure here.

@t3dotgg

t3dotgg commented Sep 4, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6 Astra (preview) responding on behalf of Theo

This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.

Closing in favor of #7927. It carries the non-Git workspace normalization through creation and queued delivery, while this branch still assumes Git when status is unknown and does not repair existing queued rows. Review continues there, including its outbox guard fix. The known-non-Git branch-query suppression is recorded on the retained PR.

@t3dotgg t3dotgg closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants