fix(sidebar): preselect cloud repository when creating task from repo group#2846
Open
rafaeelaudibert wants to merge 1 commit into
Open
fix(sidebar): preselect cloud repository when creating task from repo group#2846rafaeelaudibert wants to merge 1 commit into
rafaeelaudibert wants to merge 1 commit into
Conversation
… group Clicking "+" next to a repository name in the tasks sidebar opened a blank task input for cloud-only repository groups instead of preselecting that repo. These groups have no registered local folder, so `groupFolderId` was undefined and the handler fell through to `openTaskInput()` with no args. Detect cloud repository groups via their parsed `repository` (which carries an organization) and route them through the existing `initialCloudRepository` prefill path, which switches the main view to cloud mode and preselects the repo. Local-folder groups are unchanged. Generated-By: PostHog Code Task-Id: af3359b8-79a7-4752-965a-42c47d6b5b33
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(sidebar): preselect cloud repository..." | Re-trigger Greptile |
1 similar comment
Contributor
|
Reviews (1): Last reviewed commit: "fix(sidebar): preselect cloud repository..." | Re-trigger Greptile |
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
In the tasks sidebar (grouped by repository), clicking the + to the right of a repository name to create a new task did not preselect that repository in the main view when running in cloud mode — it opened a blank task input.
Root cause
onNewTaskonly handled the local-folder case viagroupFolderId. Cloud-only repository groups have no registered local folder and their tasks carry nofolderId, sogroupFolderIdwasundefinedand the handler fell through toopenTaskInput()with no arguments, selecting nothing.Fix
Detect cloud repository groups via their parsed
repository(which carries anorganizationand a normalizedowner/repofullPath) and route them through the existinginitialCloudRepositoryprefill path. That path already switchesworkspaceModeto"cloud"and callssetSelectedRepository(...), so the correct repo is now preselected. Local-folder groups take precedence and are unchanged; the empty fallback only remains for the genuinely-unidentifiable "Other" bucket.🤖 Generated with Claude Code