Repository navigation
feat: Instanteditor progress adoption - #22736
Conversation
mikehardy
left a comment
There was a problem hiding this comment.
Assisted-by: grok-4.7
Thank you — the follow-up commits address what the earlier reviews asked for, and the shared test helper lands in the right place.
Prep rebased seven commits cleanly onto current main without pushing (push: no).
Local validation: lintAll, ktlintCheck, and lint-rules:test; unit via jacocoUnitTestReport; emulator with TEST_RELEASE_BUILD=true on assigned emulator-5556 / API35_GAPI.
Reviewed at ff8e1816: InstantEditorViewModel reports InstantEditorProgress.SAVING_NOTE through ProgressManager, and Save paths ignore taps while progress is active, while finishing, or when the no-cloze confirmation would re-read fields. checkAndSave extracts once; the warning’s Save calls saveNoteWithProgress(skipClozeCheck = true) so editorNote stays the validated snapshot. Activity tests cover double-save during active progress, double-tap on the warning, ignored saves during queued insertion, finish guard, and back during save; the no-cloze snapshot test asserts confirmation saves the fields that triggered the warning.
some acceptable findings, no action required, just leaving for posterity: Approach says “commits” while messages already describe each step; Accessibility Scanner unchecked though screenshot shows saving state; back-during-save test uses original share text so discard dialog timing matches the old window; Assisted-by trailers do not spell out which parts were tool-written.
|
I will squash the commits, then lets get this in |
Saving a note now reports progress from InstantEditorViewModel, so back is ignored until the save finishes instead of closing the editor halfway through. Assisted-by: Claude Opus 5.5
The editor is a dialog, so Save could still be tapped while a note was saving. The second tap added the same note again, which failed in the backend and broke the collection until the app restarted. Save is now ignored while a note is saving or the editor is closing, both in the editor and in the no-cloze warning. The check runs before the fields are read, so an ignored Save can't change the note being saved, and confirming the warning saves the fields that were checked. Assisted-by: Claude Opus 5.5
ff8e181 to
dcfd067
Compare
Note
Assisted-by: Claude Opus 5.5
Purpose / Description
Adopt the ViewModel progress for the Instant Note Editor.
It also fixes a bug on main: Save could be tapped again while a note was saving, which added the same note twice and broke the collection until the app restarted.
Fixes
withProgressin ViewModels #19460Approach
commits
How Has This Been Tested?
most of the users wont see this but nice to have?

Learning (optional, can help others)
NA
Checklist
Please, go through these checks before submitting the PR.