feat(code): scope initial task suggestions by repo#2258
Closed
posthog[bot] wants to merge 2 commits into
Closed
Conversation
added 2 commits
May 20, 2026 15:40
Stamp each enricher- and discovery-agent-produced suggestion with the repo it was generated for, and filter `SuggestedTasksPanel` on the new task page so only suggestions matching the currently selected repo are shown. Suggestions persisted before this change have no `repoPath` and remain visible for backward compatibility until the next discovery run. Generated-By: PostHog Code Task-Id: a1a33388-f634-43c0-b2df-a732145fb162
Generated-By: PostHog Code Task-Id: a1a33388-f634-43c0-b2df-a732145fb162
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 produced by the enricher run and the discovery agent run are stored globally and shown on every new task view regardless of which repo is currently selected. When users switch repos in the workspace selector, they still see suggestions generated for a different codebase, which are not actionable in the current context.
Changes
repoPathfield toDiscoveredTaskthat records the repo a suggestion was generated for (local filesystem path for local workspaces,org/repofor cloud).repoPath = directoryon every suggestion as it enters the store fromSetupRunService:completeDiscoverytime.SuggestedTasksPanelnow accepts arepoPathprop. It filtersdiscoveredTasksand only renders entries whoserepoPathmatches the current selection. Entries withoutrepoPath(persisted before this change) keep showing for one upgrade cycle so existing users do not lose their pending suggestions.TaskInputpasses the existingeffectiveRepoPath(cloud repo string or local path) into the panel so filtering tracks the repo selector on the page.How did you test this?
directory.SuggestedTasksPanelcorrectly drops mismatched suggestions and gracefully passes through older entries withoutrepoPath.pnpm exec biome check --writeover the touched files — formatted clean.Publish to changelog?
no
Created with PostHog Code