Skip to content

Never hold the window: UI-thread reads and cancellation test fidelity (2026-11 sweep) #2641

Open

Description

@giswqs

These came out of the 2026-11 release quality sweep, which went through review points deferred to the release quality pass (style, design or follow-up comments on merged pull requests). Points that were real but needed a design decision, a measurement or more than a small fix were grouped here instead of being fixed in place. Each section states the problem, where it lives on main, and the review comments it came from; tick the boxes as parts land, and split a section into its own issue when someone picks it up.

Related open issues: #1562 (long-running commands off the UI thread).

Delimited Text dialog reads on the UI thread and loses explicit column picks

On the desktop, the Delimited Text dialog's Add still runs layer.addData on the UI thread for a file path, while the DXF dialog already goes through readjob, so a large CSV or spreadsheet freezes the window. It was kept synchronous so a failed add keeps the file and picked columns for another try, which needs a design for a background read that can fail after the dialog closes. In the same dialog, a failed column read (an invalid or partial CRS) or a separator change clears the explicit X/Y/WKT picks and resets csv_picked, so Add can quietly fall back to automatic columns, and Enter in the coordinate-system box runs Add straight away.

Main paths: crates/ui-egui/src/dialogs.rs (~1267, readjob use at ~1081)

  • Run Add through readjob and keep the inputs on failure
  • Keep explicit X/Y/WKT picks across a failed column read or separator change
  • Enter in the coordinate-system box should not run Add

From: #1479, #2136, #2136, #2136, #2136, #2136

layer.addPhotos runs on the UI thread

layer.addPhotos runs on the UI thread even though its work grows with the folder of photos, and with the Session log on it also SHA-256 hashes up to 8 MiB per photo. It has no background path, no progress and no Cancel.

Main paths: crates/engine/src/cmd/layer.rs (layer.addPhotos, ~1551)

  • Background path with progress and Cancel
  • Add it to long_commands

From: #2253

Cancellation sweep fidelity and coverage

long_commands still leaves out most reads::prepare commands (layer.loadAll, labels.convert, topology.validate, map.repairTiles, ...), which AGENTS.md says to add by hand, each with a fixture. In exercise, the late-Cancel branch accepts Ok for every kind, not only exports; the Undo/Redo round trip runs even when the command added no step; next_table_id is overwritten before the comparison; and history() compares only 5 of the 8 Step fields.

Main paths: crates/engine/src/tests/cancellation.rs

  • Add the missing reads::prepare commands to long_commands with fixtures
  • Accept a late Ok only for exports
  • Skip the Undo/Redo round trip when no step was added
  • Compare next_table_id before overwriting it
  • Compare all Step fields in history()

From: #2261, #2261, #2261, #2261, #2261, #2261, #2261, #2261

Activity

  1. added
    enhancement
    on Nov 22, 2026
  2. Mavrick-F commented on Nov 23, 2026

    @Mavrick-F
    Member

    One more for this list, found while reviewing #2741: on the desktop, service.add still downloads a discovered feature layer on the UI thread when its result lands. add_discovered calls layer::add_url directly (crates/engine/src/cmd/service.rs, around line 1460), for adds with supplied text and URL-only adds alike, while Add Data › From URL downloads off the frame. #2741 moved only the discovery reads. This is from reading the code, not from a run.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions