Clarin9/Enable periodic autosave during submission - #1488
Closed
Kasinhou wants to merge 0 commit into
Closed
Conversation
Kasinhou
force-pushed
the
clarin9/enable-submission-autosave
branch
from
August 26, 2026 12:24
ec117ec to
f78da0e
Compare
Author
|
Closed because the timer approach was wrong (per feedback). After deeper analysis + live testing on dev-6: the v7 'save when moving to another section/step' behaviour is already present and working in v9. The relevant code ( Happy to open a fresh, targeted PR if there's a concrete gap (e.g. saving on every field blur, not only on section change). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
In v7 the submission form gave the impression of saving automatically "once in a while" while you worked through the steps. In v9 this seemed lost — you had to press Save (or happen to click from one section into another) for work to be persisted.
Analysis (on the dev instances)
The submission autosave code is identical in v7 and v9. It has two config-driven triggers, both switched off by default:
submission.autosave.timer0→ disabledsubmission.autosave.metadata[]→ disabledVerified on the live dev backends: both v7 (dev-5) and v9 (dev-6) serve
submission.autosave.timer: 0. So neither deployment ran the periodic autosave.What does work in v9 is save-on-section-change (
sections.directive.tsdispatches a save when the active section changes). Confirmed live on dev-6: creating a workspace item, editing the title, then clicking into a different section fires aPATCH .../workspaceitems/{id}(HTTP 200). But if you edit fields within a single (long) section, or tab through without clicking between sections, nothing is saved until you press Save — hence the "it only saves once in a while / not like v7" impression.Fix
Enable the built-in periodic autosave by defaulting
submission.autosave.timerto 60 000 ms (1 minute). The form then saves automatically about once a minute, on top of the existing save-on-section-change. This is exactly the mechanism the timer was designed for; the periodic save dispatches the sameSaveSubmissionFormActionas the section-change save that is already verified working.src/config/default-app-config.ts—timer: 0→timer: 60 * 1000config/config.example.yml— documented and set to60000, with a note that0disables itTuning
The interval is fully configurable per deployment via
submission.autosave.timer:300000(5 min, upstream's documented example)0Happy to change the default interval if you'd prefer something other than 1 minute.
Testing
submission.service.spec.ts) set their own timer values and are unaffected.config.util.spec.tsonly asserts themetadatadefault (unchanged).🤖 Generated with Claude Code