You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Project save feedback — analysis and design proposal
Context: Saving the project (floppy disk icon, top-left of the main window) succeeds but gives
the user no confirmation. Question: is anything wired but not shown, or is nothing included at all?
Currently: nothing is wired. Failures are silent
The whole chain from the floppy button down is fire-and-forget:
Gui/ApplicationWindow.qml:37 → projectSave() → Gui/Globals/BackendWrapper.qml:79 → the save() slot in Backends/Py/project.py (Project.save) → ProjectLogic.save() → the lib's save_as_json(overwrite=True). No signal is emitted anywhere, nothing returns a result, and no
QML element listens.
It is actually worse than "no confirmation": the lib's save_as_json
(reflectometry-lib, project.py) wraps the write in except Exception as exception: print(exception) — a failed save (locked file,
permissions, and notably the documented ValueError that as_dict() raises when a constraint
depends on a parameter not reachable from the models) prints to a console the GUI user never
sees. Today "saved silently" and "failed silently" look identical.
There is no dirty/unsaved-changes tracking anywhere (lib or app), so the app also cannot tell
whether saving was even needed, and the reset/close paths can discard unsaved work without
warning.
One reusable asset exists: Gui/Pages/Summary/Sidebar/Basic/Groups/SaveConfirmationDialog.qml — the modal success/failure
dialog the Summary export already uses. EasyApp has no toast/snackbar component.
Proposed design
Phase 1 — honest feedback (small, recommended)
Lib: stop swallowing exceptions in save_as_json (let them propagate, or return success).
Without this, any confirmation the GUI shows would be a guess.
Backend:Project.save() catches, then emits a new projectSaved(success, path, message)
signal, plus a lastSaved timestamp property (notify-backed).
UI, asymmetric by severity:
Failure → modal dialog (reuse the SaveConfirmationDialog pattern with the error message).
A failed save must not be missable.
Success → no modal. A dialog on every routine save is friction; instead:
flash the floppy icon to a check mark for ~2 s (in-place, exactly where the user just
clicked), and
a status-bar item "Saved · 14:32" showing the last save time persistently. The status bar
already shows project/models/experiments, so it fits naturally and stays inspectable after
the flash is gone.
Phase 2 — dirty tracking (bigger, best long-term)
A hasUnsavedChanges flag set from the existing change funnels in py_backend
(externalSampleChanged, parametersChanged, constraints/experiment signals all pass through one
place), cleared on save/load/create. That buys:
an asterisk on the window title or a dot badge on the save button,
save button disabled when clean (making "it saved" implicit),
an "unsaved changes" prompt on Reset and on window close: the reset dialog currently says
"cannot be undone" without knowing whether anything would be lost.
Activity
rozyczko commentedon Sep 1, 2026
Project save feedback — analysis and design proposal
Context: Saving the project (floppy disk icon, top-left of the main window) succeeds but gives
the user no confirmation. Question: is anything wired but not shown, or is nothing included at all?
Currently: nothing is wired. Failures are silent
The whole chain from the floppy button down is fire-and-forget:
Gui/ApplicationWindow.qml:37→projectSave()→Gui/Globals/BackendWrapper.qml:79→ thesave()slot inBackends/Py/project.py(Project.save) →ProjectLogic.save()→ the lib'ssave_as_json(overwrite=True). No signal is emitted anywhere, nothing returns a result, and noQML element listens.
It is actually worse than "no confirmation": the lib's
save_as_json(reflectometry-lib,
project.py) wraps the write inexcept Exception as exception: print(exception)— a failed save (locked file,permissions, and notably the documented
ValueErrorthatas_dict()raises when a constraintdepends on a parameter not reachable from the models) prints to a console the GUI user never
sees. Today "saved silently" and "failed silently" look identical.
There is no dirty/unsaved-changes tracking anywhere (lib or app), so the app also cannot tell
whether saving was even needed, and the reset/close paths can discard unsaved work without
warning.
One reusable asset exists:
Gui/Pages/Summary/Sidebar/Basic/Groups/SaveConfirmationDialog.qml— the modal success/failuredialog the Summary export already uses. EasyApp has no toast/snackbar component.
Proposed design
Phase 1 — honest feedback (small, recommended)
save_as_json(let them propagate, or return success).Without this, any confirmation the GUI shows would be a guess.
Project.save()catches, then emits a newprojectSaved(success, path, message)signal, plus a
lastSavedtimestamp property (notify-backed).SaveConfirmationDialogpattern with the error message).A failed save must not be missable.
clicked), and
already shows project/models/experiments, so it fits naturally and stays inspectable after
the flash is gone.
Phase 2 — dirty tracking (bigger, best long-term)
A
hasUnsavedChangesflag set from the existing change funnels inpy_backend(
externalSampleChanged,parametersChanged, constraints/experiment signals all pass through oneplace), cleared on save/load/create. That buys:
"cannot be undone" without knowing whether anything would be lost.
Improvements to the state tracking #401 (#405)
Preparation for the new release (#416)
🎉 Release: merge develop into master (#442)
Release 2.0.0 (#454)