Skip to content

fix(native): complete scoped selection cleanup across removal and reveal #335

Closed

Description

@rynfar

Problem

Scoped selection cleanup is incomplete across successful placement, deletion and automatic route widening. These paths remove selected keys but can retain a stale range anchor. Failed actions and anchors that were already toggled out of the selection must keep their current state, matching the web selection store.

Coherent scope

  • Keep selection keys and anchor consistent when the existing scoped placement consumer removes a selected key after success.
  • Apply the same successful-removal rule to partial scoped deletion. Preserve failed owners and same-raw-ID isolation.
  • Clear both keys and anchor when real watched navigation widens the current project scope to reveal its destination.
  • Preserve current owner/grant checks, captured route, existing Undo behavior and no-RPC controls.

Tests first in the existing safe placement/Undo and scoped deletion actor cases. Use real modifier selection, dispatch/reply and terminal UI milestones; real fixture installation, activation and scoped navigation for reveal. Earliest placement/deletion failures can mask later controls until fixed; do not claim unobserved REDs.

The frozen test-only proposal has independent source approval but no runtime or production credit. Apply only after #331 / PR #334 is accepted, rebased onto that exact source. Obtain intended actual RED and current artifact custody before production changes. Required native gates, independent exact-head review, matched merge and fresh merged proof remain required.

Not included: bulk-action eligible-subset/full-clear policy, hidden-membership resets, local selection behavior, new UI variants, permissions changes, physical windows/input or provider work. No constants changes. SB-SELECT remains partial; sidebar remains 9/16. Parent #242.

Activity

  1. added
    native:bug
    on Nov 7, 2026
  2. rynfar commented on Nov 7, 2026

    @rynfar
    OwnerAuthor

    #333 / PR #336 is accepted and closed after independent fresh merged final review. #335's worktree was cleanly fast-forwarded to the accepted merge 4412b37c9264243d32f4482ea9f7123d8af06299.

    The independently reviewed tests-only replacements are applied: controller 26426198… preserves #333's pub(crate) effective-scope key, and thread-menu tests f17d05d2… preserve the full accepted #334 case. No production changes. A compiler-JSON test build is running. The placement and deletion selectors will run once in distinct initially empty owned homes, then any observed failure must be independently classified before a production fix.

    Whole SELECT stays partial; sidebar stays 9/16. No constants changed. check:changed bootstrap remains NOT GREEN.

  3. rynfar commented on Nov 7, 2026

    @rynfar
    OwnerAuthor

    The tests-only build passed. Two actual tests now expose the intended stale-anchor failures:

    • Placement: after real SidebarSelection completion, selected background/menu-thread was removed but its anchor remained (thread_menu_tests.rs:1026).
    • Partial deletion: after terminal Thread deletion incomplete Notice, successful selected second-fixture/menu-thread was removed but its anchor remained (controller.rs:2412).

    Both ran one test and failed once, with 125 filtered tests. The first deletion invocation used the wrong module (tests rather than deletion_tests) and selected zero tests. That receipt is retained as NOT GREEN. The compiled test list supplied the corrected selector, which ran the deletion case for the first time in a new initially empty home.

    Independent failure classification and current native-artifact custody are pending. No production changes yet. Later placement modes, automatic route reveal, and later deletion modes remain masked and unproved. Whole SELECT stays partial; sidebar 9/16. No constants changed.

  4. rynfar commented on Nov 7, 2026

    @rynfar
    OwnerAuthor

    The first production fix compiled. The unchanged deletion test now passes its selected-anchor, failed-anchor and toggled-off-anchor modes (one PASS, 125 filtered).

    The unchanged placement test passed all four placement modes and reached its previously masked automatic route-reveal continuation. It failed at thread_menu_tests.rs:1396: actual scope widening cleared the chosen scope and selection but retained the previous scoped anchor. This is now an observed failure, not just a source prediction. The later row assertion, writer barrier and teardown remain unreached by this run.

    Independent review and current-artifact custody are pending before a reveal fix. No test assertions or constants changed. Whole SELECT remains partial; sidebar 9/16.

  5. rynfar commented on Nov 7, 2026

    @rynfar
    OwnerAuthor

    The unchanged placement/reveal test and the unchanged three-mode deletion test both passed in fresh distinct initially empty homes (one PASS each; 125 filtered).

    The placement run now reaches all four placement modes, the original project actor/menu controls, real install and activation, scoped route widening, cleared selection and anchor, destination row, prior-writer FIFO receipt, ready-GPUI drain and explicit teardown. Deletion reaches all three modes and teardown. No test assertions or constants changed.

    Independent whole-test review and current native-artifact custody are pending before ledger/candidate work. Required candidate gates, exact-head review, matched-head merge and fresh merged proof remain outstanding. Whole SELECT stays partial; sidebar remains 9/16. A visit reply is not a callback join; the FIFO barrier does not establish global future quiescence.

  6. added
    status:review
    on Nov 7, 2026
  7. rynfar commented on Nov 7, 2026

    @rynfar
    OwnerAuthor

    Finite #335 implementation merged in PR #337 as 122fc61aae2b3a5585c70ba1900fb7b3e39d4320 (matched candidate 6b3446d3c549b7354c95cad681a83e820b0fce47, tree 5e09e2cde94564f7926b2d0d0cfe74823d3cc3d1, parent 4412b37c9264243d32f4482ea9f7123d8af06299).

    • Successful removal of an actually selected scoped key clears its matching anchor. Failed, unselected and untouched anchors remain. Placement and partial deletion exercise owner-local same-raw-ID behavior.
    • Real watched navigation that widens project scope clears both the scoped selection and anchor.
    • Tests failed before each production fix. The existing grant-observation failure in the first candidate remains archived NOT GREEN. Its independent diagnosis led to a 16-line test-only denial/restoration milestone repair; all assertions stayed unchanged.

    Candidate required gates passed: 1,356 core/client tests, strict workspace/all-target Clippy, normal/snapshot builds, theme/intake/conformance, core7 and native10. Independent exact-head SOURCE c841db90… and candidate FINAL 6eb803ae… approved. Fresh merged proof passed after cleaning only the three owned native packages: snapshot build, proper merged compiler JSON (fresh=false), core7 and native10 in distinct initially empty homes. Fresh merged FINAL: 1bb80f32526580bdb5b8371eadbc556241ec17682f808fb1fd6321ce5ca3aca0 independently approved, with current main/core/native bytes verified twice initially and twice at final freeze. Finite #335 is accepted.

    check:changed is NOT GREEN: unrelated desktop UserTaskDefinition bootstrap fails before checks. Approved formatting exception retained. Constants changed: none. SB-SELECT remains partial and sidebar remains 9/16; action eligibility/clear policy and integrated interaction work are not included.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    native:bugstatus:review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions