Skip to content

refactor(copy): drop redundant picked selector - #212

Draft
Ariestar wants to merge 2 commits into
fix/content-block-marksfrom
fix/workset-anchor-leaks
Draft

refactor(copy): drop redundant picked selector#212
Ariestar wants to merge 2 commits into
fix/content-block-marksfrom
fix/workset-anchor-leaks

Conversation

@Ariestar

Copy link
Copy Markdown
Owner

Stack created with GitHub Stacks CLIGive Feedback 💬

`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.
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

@Ariestar Ariestar changed the title fix/workset anchor leaks refactor(copy): drop redundant picked selector Aug 26, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sivtr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4a85624
Status: ✅  Deploy successful!
Preview URL: https://795432aa.sivtr.pages.dev
Branch Preview URL: https://fix-workset-anchor-leaks.sivtr.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant