Skip to content

[Bug]: Desktop radius selection scans features on the UI thread without Cancel #3241

Backlog

Description

@Mavrick-F

Before you start

What happened?

Desktop radius selection runs its feature scan synchronously on the UI thread and has no Cancel path. Both the existing drag gesture and the typed centre click in #3239 reach RustGisApp::run("select.byRadius", ...) directly. In cmd::select::by_radius, every selectable layer builds its drawn-row list and calls network::within_report, which traverses rows and their geometry. This command has no desktop read-ahead/background dispatch, and that traversal does not check cancellation.

This is confirmed by tracing the dispatch and search loops at 9f2c66106530a567d3e40a28d53bee93bc966e68; no timed freeze threshold has been measured. The work grows with selectable data and holds the calling frame for its duration.

Raised in the review of #3239. This needs a cancellation-aware search and safe landing of selection results; #3239 adds distance entry and preserves the existing selection engine.

Steps to reproduce

  1. In the desktop app, load a large selectable vector layer.
  2. Choose Home › Select options › Select by Radius.
  3. Drag a radius, or enter a radius and click its centre with feat(ui): enter a distance for Select by Radius #3239.
  4. The feature scan runs on the frame thread, without a progress/Cancel job.

Expected behavior

  • Run the search through an existing desktop background path with progress or a busy indicator and Cancel.
  • Check cancellation while traversing rows and long geometry operations.
  • Apply results only to the project, map and layer generations that requested them; discard stale results with a notice.
  • Preserve the command's distance model, drawn/selectable filtering, modifiers and notices, without another full copy of layer data.
  • Cover real desktop gesture dispatch, cancellation, unchanged selection after cancellation, and stale-result refusal. Keep the browser's current single-thread behavior explicit.

How are you running RustGIS?

Desktop app (built from source).

Version

9f2c66106530a567d3e40a28d53bee93bc966e68 (#3239); the drag dispatch predates that PR.

Operating system, browser and graphics

Platform-independent desktop dispatch path; inspected on Debian 13.

Activity

  1. added
    unconfirmed possible issue
    on Nov 28, 2026
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

    unconfirmed possible issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions