feat(synchronize): upload only updated interrogations#417
Merged
QRuhier merged 7 commits intoApr 27, 2026
Conversation
QRuhier
force-pushed
the
feat/filter-interrogations-sent
branch
from
April 15, 2026 13:07
54ec2bc to
189e9da
Compare
laurentC35
reviewed
Apr 17, 2026
laurentC35
reviewed
Apr 17, 2026
Contributor
There was a problem hiding this comment.
Bien vu d'y avoir pensé !
laurentC35
reviewed
Apr 17, 2026
| // Set locally the interrogation as not updated after successful upload. | ||
| return dataStore.updateInterrogation({ | ||
| ...localInterrogation, | ||
| hasBeenUpdated: false, |
laurentC35
requested changes
Apr 17, 2026
laurentC35
left a comment
Contributor
There was a problem hiding this comment.
Une méthode plus efficace pour la migration dexie 😉
Et tes tests passeront toujours
Contributor
|
Je me dit que c'est l'occasion sans doute de passer à dexie 4:
En blindant les tests bien sûr |
SimonDmz
requested changes
Apr 20, 2026
SimonDmz
left a comment
Contributor
There was a problem hiding this comment.
the dexie migration may be unnecessary if we use a default value for hasBeenUpdated
| /** Interrogation stored in local storage only */ | ||
| export type LocalInterrogation = Interrogation & { | ||
| /** Whether the interrogation has been updated locally since it was last sent to the server. */ | ||
| hasBeenUpdated?: boolean |
Contributor
There was a problem hiding this comment.
could we define a default value too? this could replace the need of updating the whole IDB, and even remove the need of new Dexie version too 👼
…idb migration Co-Authored-By: Simon Demazière <simon.demaziere@insee.fr>
QRuhier
commented
Apr 20, 2026
|
QRuhier
added a commit
that referenced
this pull request
Jul 8, 2026
* feat(synchronize): use localStorage for getting interrogation ids (#412) * feat(synchronize): use localStorage for getting interrogation ids * chore: rename local storage key * fix: clear local storage after synchro * docs: update changelog * bump: 3.3.1-rc-synchronization-optimization.0 * docs: fix changelog content * build: don't cache service worker file and env variable (#420) * bump: 3.3.1-rc-synchronization-optimization.1 * feat(synchronize): upload only updated interrogations (#417) * feat(synchronize): upload only updated interrogations * docs: changelog * test: increase timeout for stress test * test: improve types * refactor: improve dexie migration * feat: treat as true if hasBeenUpdated is missing & delete unecessary idb migration Co-Authored-By: Simon Demazière <simon.demaziere@insee.fr> * fix: set interrogation as not updated when getting it from api --------- Co-authored-by: Laurent Caouissin <laurent.caouissin@insee.fr> Co-authored-by: Simon Demazière <simon.demaziere@insee.fr> * feat: efficient delete interro (#423) Co-authored-by: Quentin Ruhier <quentin.ruhier@insee.fr> * bump: 3.3.1-rc-synchronization-optimization.2 * feat: download only new interrogations (#426) * feat: download only new interrogations * docs: changelog * bump: 3.3.1-rc-synchronization-optimization.3 * fix: do not cache main entry file (#429) * bump: 3.3.1-rc-synchronization-optimization.4 * feat(synchronize): update interrogation questionnaire link (#427) * feat: update questionnaire link for existing interrogations during synchro * fix: promise not well handled * bump: 3.3.1-rc-interrogations-questionnaire-link.0 --------- Co-authored-by: Laurent Caouissin <38245508+laurentC35@users.noreply.github.com> * bump: 3.3.1-rc-synchronization-optimization.5 --------- Co-authored-by: Laurent Caouissin <38245508+laurentC35@users.noreply.github.com> Co-authored-by: Laurent Caouissin <laurent.caouissin@insee.fr> Co-authored-by: Simon Demazière <simon.demaziere@insee.fr>
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.



During synchronization, upload only interrogations updated locally since it was last sent to the server.
Handled in local storage by adding
hasBeenUpdatedboolean