Skip to content

fix(selection): preserve marquee and tap-drag intent - #2096

Merged
l0gicgate merged 3 commits into
lgse:mainfrom
JoeJoeflyn:fix/2095-chooser-drag-selection
Nov 8, 2026
Merged

l0gicgate merged 3 commits into
lgse:mainfrom
JoeJoeflyn:fix/2095-chooser-drag-selection

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Share the browser's confined sidebar splitter with the chooser, including compact rail mode. Reuse the existing grouped row gestures and movement-aware release handlers so a held second tap can start a file/folder drag instead of activating on press. Keep ordinary double-click and keyboard activation, and the chooser's existing operation restrictions. Refresh one stale context-menu visual baseline after confirming the unchanged base produces the same image.

Visual evidence

drag-selection-fix.mp4

How to test

  1. Open a multiple-file chooser. Drag from blank space immediately beside the sidebar divider across files, with both the full sidebar and compact rail.
  2. In the manager, with double-click activation, tap a file or folder once, then hold the second tap and drag it into another folder. Undo, then try an ordinary double-click and Enter.
  3. In a chooser, tap a file once, hold and move the second tap, then release. Follow with an ordinary stationary double-click.

Expected result: Blank space starts marquee selection; only the divider resizes. Tap-drags transfer in the manager without opening items, and do not accept the chooser. Ordinary double-clicks activate on release and keyboard activation still works.

Actual touchpad/libinput and Wayland behavior remain unverified; the isolated recording and reproductions use the mouse-equivalent X11 event sequence. The owner explicitly authorized pushing without CodeScene because its token is unavailable; local code-health scores remain unverified.

Related issue

Closes #2095

Share the confined sidebar splitter between browser and chooser, keeping its hit area confined in rail mode. Own the second pointer press in the existing row gesture group so drag sources remain eligible and activation waits for release.

Add real file/folder tap-drag and chooser regressions, expose the existing localized sidebar action as an accessible description, and refresh a stale context-menu baseline confirmed byte-identical on the unchanged base.

Fixes lgse#2095
@github-actions github-actions Bot added the fix label Nov 8, 2026
…aims

Move PointerSequence::claim_double_press into its own submodule and reuse
the columns row picks_editable helper instead of duplicating it, so
collection_interaction.rs stays at main's CodeScene score (8.73) instead
of dropping to 8.21.
@l0gicgate

l0gicgate commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Review and cleanup

Merged main at 4f4dc17c1 (0fd466e9b). No conflicts.

Review against the description and #2095. I checked each claim against the code and confirmed it:

  • Confined divider in choosers, including compact rail. sidebar_split() now builds the browser and chooser splits, and rail mode no longer narrows the handle.
  • Held second tap stays draggable. PointerSequence::claim_double_press claims the second press inside each row's gesture group, which also holds that row's drag source. List and Icons group PreviewClick with the selection click and activate on a stationary release.
    • In Columns, arm_double_activation handles that release, and the strip guard claims only after a single-click folder open.
    • Inline search results already activated on release. They now claim the second press as well.
  • Activation stays the same. The release path calls the same activate_in_place / activate_column_entry targets as GTK's native activate. The press handlers still cancel slow-click rename. Modified double-clicks and Enter still go through native activation. Chooser rows still have no outgoing file drag source.
  • context-menu.png refresh. The only difference is the popover's vertical placement. Nothing in this PR touches context menus, and context-menu-baseline passes against the new image.

The PR had no earlier review comments or threads.

Fixes pushed

  • 6ed9657d1 refactor(selection): share the editable pick test for double-press claims.
    • claim_double_press duplicated the columns picks_editable helper, and adding it to collection_interaction.rs dropped that file's CodeScene score from 8.73 to 8.21.
    • The claim and the shared helper now live in collection_interaction/double_press.rs. Every touched file now scores the same as on main.

Tests removed: none. The three new QA scenarios each cover a distinct route. I broke the fix on purpose to check them: with the double-press claim disabled and the chooser split reverted to a narrow handle, all 18 runs fail with their intended messages (early launch or accept, sidebar resize instead of marquee, folder not dragged).

Validation

  • ./scripts/test-headless.py -- ui::browser:: ui::browser_modes:: ui::chooser:: ui::inline_search:: ui::collection_interaction ui::sidebar_toggle ui::window::tests::sidebar ui::window::tests::rail ui::marquee ui::pointer::: 634 passed, 0 failed.
  • ./scripts/qa.sh --test-threads 6: 78 passed, 0 failed. That covers the three new scenarios, context-menu-baseline, the pointer-driven click_modes scenarios (8 of 12; not run: keyboard-open-selects-first-child, keyboard-selection-in-single-click-mode, single-click-clipped-parent-column, single-click-opens-directory-group), the chooser selection scenarios, the drag/pointer_intent scenarios, archive and recursive double-click, preview-boundary-resizes-grabbed-side and long-rename-keeps-caret.
  • cargo fmt --all --check and cargo clippy --all-targets --all-features -- -D warnings are clean.
  • scripts/code-health.sh on every touched file: no regressions against main.
  • Not run: the full Rust and QA suites, because the change is limited to pointer routing and the sidebar split. CI runs the full Rust suite.
  • Still unverified (also noted by the author): real touchpad/libinput and Wayland behaviour.

CI: every check is green on 6ed9657d1 (Format, lint, and test; Quality build and lint; Rust tests shards 0–3; Release workflow scripts; Dependency and spelling policy; Metadata policy; Type label). QA scenarios is skipped on PRs because it only runs on manual dispatch; the local QA run above covers it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(selection): preserve marquee and tap-drag intent

2 participants