Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend user session during widget changed event #2884

Open
wants to merge 8 commits into
base: commcare_2.54
Choose a base branch
from

Conversation

avazirna
Copy link
Contributor

@avazirna avazirna commented Oct 23, 2024

Summary

This PR implements a mechanism for CommCare to extend the user session when the current widget data can't be recovered in case of session expiration. This extension is basically to prevent the user session from expiring which automatically logs the user out. This implementation entails:

  1. Introduces the concept of non recoverable Widget - to indicate that in case the session expires while the widget is in use, any data captured will be lost
  2. Extends the scope of the widgetEntryChanged event to extend the user session if needed
  3. Makes the CommCareAudioWidget to fire widgetEntryChanged events during recording start;

The above mentioned widget is the main motivation behind this change. Recently, a project that makes use of the CommCareAudioWidget to capture long audio recordings reported that users were being unexpectedly logged out in the middle of the recordings and losing data, this was later associated to the session expiring in the middle of an active recording. More information on this ticket.

Safety Assurance

  • I have confidence that this PR will not introduce a regression for the reasons below
  • Do we need to enhance manual QA test coverage ? If yes, "QA Note" label is set correctly

Safety story

This only adds more time to the current session. Local tests were successfully.

@avazirna avazirna changed the base branch from master to commcare_2.54 October 23, 2024 14:34
@avazirna avazirna mentioned this pull request Oct 23, 2024
2 tasks
@avazirna
Copy link
Contributor Author

@damagatchi retest this please

@avazirna avazirna force-pushed the extend-user-session-from-widget-changed branch from 850e21f to 3fda87f Compare October 23, 2024 15:47
@avazirna avazirna added this to the 2.54.1 milestone Oct 23, 2024
@avazirna avazirna force-pushed the extend-user-session-from-widget-changed branch from 3f9db9a to 03c2249 Compare October 24, 2024 10:31
@avazirna avazirna marked this pull request as ready for review October 24, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant