Repository navigation
Description
Before you start
- I searched the existing issues and the roadmap and did not find a duplicate request.
What problem does this solve?
When another program changes a linked dataset, RustGIS should let users reread it without rebuilding the layer's presentation. This implements the roadmap item “Reloading files changed on disk”.
Proposed solution
- Add Reload Data through
layer.reloadDataandmap.reloadTilesfor linked vectors, rasters, editable GeoPackages and local PMTiles/MBTiles archives. - On desktop, check file metadata every five seconds and on focus regain, including Shapefile components and SQLite WAL/journal files. Notify after stable observations; never reload automatically.
- Show Changed on disk, with Reload Data and Not Now. Add manual actions beside source repair in context menus, under Data › Data Source and in Command Search.
- Preserve identity, styling, labels, order and camera. Validate before replacement; failures must not discard retained data or pending edits. Confirm before discarding GeoPackage edits. Refresh affected caches and prevent stale archive reads from restoring old tiles. Explain that undo cannot restore overwritten files.
- Folder-backed Zarr/File Geodatabase sources support manual reload only. Detached snapshots and remote/server sources are excluded; local-file actions are unavailable on wasm.
Touches engine, map, UI and, where needed, tiles/data. No new crate, dependency or project-format field. Coordinate with #1440 and #1339.
Verify external edits, preserved presentation, incompatible/missing-source failures, dirty GeoPackage confirmation/undo, archive cache invalidation, companion-file detection, self-saves and stale cross-map results. Run relevant tests and the wasm build, and include screenshots of the actual changed UI.
Estimated scope
Medium: a broader feature that is feasible in a reasonable timeframe
- PR 1: manual layer reload.
- PR 2: manual archive reload.
- PR 3: change detection and notifications.
PRs 1–2 are independent; PR 3 follows both. Keep the roadmap item open until all three land.
Alternatives considered
Removing and re-adding layers loses their presentation. Repair Data Source changes the path rather than rereading it. Automatic reload is not proposed.
Activity
docs(roadmap): review fixes; parity labels follow the new themes
deniial00 commentedon Nov 10, 2026
Starting on PR 3: change detection and notifications. #1505 (
layer.reloadData) and #1504 (map.reloadTiles) are merged, so every reload goes through those two commands. This PR adds no new command, crate, dependency or.rgisfield.Plan:
repair.rs(FileRevision/ArchiveObservation) moves into a native-onlyrustgis_engine::observemodule. The monitor uses the same one. It records size, modification time and file identity (unix dev/ino/ctime; Windows creation time). SQLite files add-waland-journal: an empty-walcounts as absent, and-shmis never watched. Shapefiles add exactly the companions the reader opens: lowercase.dbf,.shxand.prj, and all ASCII-case spellings of.cpg. This narrows the plan's "case variants" line. Nothing reads dataset contents.rustgis-ui-eguiand is desktop only. Scans run every 5 s and when the window regains focus, off the UI thread, one at a time. A change is offered only after two consecutive scans agree. Missing and unreadable files are visible states that clear on a good check. Results are dropped when the project, map, layer instance, archive or path changed.gpkg.saveEdits, export into an existing GeoPackage) are acknowledged once the post-write observation is stable. A change that was already pending stays pending.SourceLayer/RasterLayer/GpkgEdit/archive open paths. The other takes the baseline at the first scan, which runs immediately when a target appears. That leaves the open paths alone but can miss a write between open and that first scan. I'll settle this before touching any open path.Mavrick-F commentedon Nov 10, 2026
@deniial00 a small request on the
observemodule, from #1385 (publishing a layer's edits back to its source file).Publish refuses when the source changed since the last sync, so it needs the same file signature you're moving into
observe. It needs it for the layers your monitor leaves out on purpose: layers held in memory, whosedataset.sourceis only history. #1385 would take the signature when such a layer is read, reloaded or published, and save it with the project.Two things would let it reuse yours instead of writing a second one:
Neither changes your plan. I'll start #1385's first PR after PR 3 lands, so we don't touch the same code at once. On the limit you note, rewrites that keep the metadata: publish can also compare a content hash before it writes, so the monitor can stay metadata-only.
Mavrick-F commentedon Nov 10, 2026
@deniial00 never mind my request above. #1385 needs a record that stays valid across machines and remounts, so it'll store its own content hashes and won't need anything from
observe. Your plan can go ahead unchanged.docs(roadmap): only what is ahead, in foundations and the everyday wo…
feat(ui): report linked files changed on disk and offer Reload Data (o…
feat(ui): report linked files changed on disk and offer Reload Data (#…