fix(code): scope task suggestions to the selected repo#2259
Closed
posthog[bot] wants to merge 1 commit into
Closed
fix(code): scope task suggestions to the selected repo#2259posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
…inst Suggestions from the enricher and discovery agent runs were displayed on the new task page regardless of which repo was selected. Tag each suggestion with the repo path it was generated against and filter the new-task-page panel to the currently-selected repo, so users only see suggestions relevant to the repo they're about to create a task in. Generated-By: PostHog Code Task-Id: a56f5f3f-10c6-4552-8d10-d5bfc6e861b3
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.
Problem
Initial task suggestions from the enricher run and the discovery agent run were stored globally and displayed on the new task page regardless of which repo was selected. When a user switched the repo selector on the new-task input, they kept seeing suggestions that were generated against a different codebase — not actionable in the current context.
Changes
repoPath: stringtoDiscoveredTaskso every suggestion records the repo it was generated against.repoPathon each suggestion at creation time inSetupRunService:completeDiscoverytime.discoveryRepoPath/enricherRepoPathinuseSetupStore, and scopestartDiscovery/completeDiscovery/resetDiscoveryso they only touch agent suggestions for the matching repo (other repos' agent suggestions and all enricher suggestions survive).SuggestedTasksPanelaccepts arepoPathprop and filtersdiscoveredTasksto that repo. The "running" indicators only render when the in-flight scan targets the current repo. In cloud workspace moderepoPath={null}, so no suggestions render (suggestions are always generated against a local path).TaskInputpasses the localselectedDirectory(ornullin cloud mode) into the panel.How did you test this?
pnpm --filter code typecheck— clean.pnpm --filter code test— 1345 pass; the 3 failures are pre-existing 5s timeouts inarchive/service.integration.test.tsworktree tests in this sandbox, unrelated to these changes.pnpm lint— clean (biome reformatted one line).Publish to changelog?
no
Created with PostHog Code