refactor(copy): drop redundant picked selector - #212
Draft
Ariestar wants to merge 2 commits into
Draft
Conversation
`merge_and_apply` merged only the records and rebuilt the set with `WorkSet::new`, which re-derives whole-record anchors. A source that resolved part anchors — a `work parts` result, a per-line search hit — lost them the moment the query spanned more than one source, so `all:`, `team:`, and any registry fan-out silently coarsened to record granularity. Anchors now merge alongside the records and are deduped once, so each source contributes what it resolved: part anchors stay parts, and a source that carried none still contributes its records' whole refs. `ensure_anchors` was the same derive written a second time; it now reuses `anchors()`, the reader every other caller goes through.
`WorkspacePickedContent` carried a `CommandSelection` that every producer built as the identity over its own units — `RecentExplicit(1..=len)` or `RecentExplicit([1])` — so `export_picked` resolved a selector just to get back the list it already had. The field, the resolve, and the `RecentExplicit` variant behind it are gone. Both copy surfaces now end on one `finish_units`: keep the units that carry text, warn with the source label when none do, join and sink. The CLI plan hand-rolled that shape inline; the TUI pick reached it through a selector it never used. The success line is now the CLI's count form for both.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying sivtr with
|
| Latest commit: |
4a85624
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://795432aa.sivtr.pages.dev |
| Branch Preview URL: | https://fix-workset-anchor-leaks.sivtr.pages.dev |
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬