Skip to content

LG-10402: Start renaming skip_upload_step#8894

Merged
matthinz merged 5 commits intomainfrom
matthinz/10402-start-renaming-skip-upload-step
Jul 28, 2023
Merged

LG-10402: Start renaming skip_upload_step#8894
matthinz merged 5 commits intomainfrom
matthinz/10402-start-renaming-skip-upload-step

Conversation

@matthinz
Copy link
Contributor

@matthinz matthinz commented Jul 28, 2023

🎫 Ticket

LG-10402

🛠 Summary of changes

TLDR: Start writing idv_session.skip_hybrid_handoff when we skip the user past the hybrid handoff step because they're on a mobile device with a camera.

Background

When we detect the user is on a mobile device with a built-in camera, we skip the "hybrid handoff" step of IdV. We have to record that the user has skipped hybrid handoff in case they redo document capture (which they can do from the "Verify info" step when their document had a barcode read error).

If the user tries to redo document capture, we want them to skip hybrid handoff again only if they did previously--a desktop user may want to try a different path through document capture.

Up to now, we've recorded that the user skipped hybrid handoff in flow_session[:skip_upload_step]. There are two problems with this:

  1. We don't call it the "upload step" any more. We call it "hybrid handoff"
  2. flow_session is an artifact of the flow state machine, which is now in the past. We have another "session", IdvSession that we use to store data about the user's in-progress IdV attempt.

So this PR adds a new key to IdvSession, skip_hybrid_handoff, and starts writing it alongside flow_session[:skip_upload_step]. A future PR will remove references to :skip_upload_step after this change has been deployed.

matthinz added 2 commits July 28, 2023 09:30
We no longer trigger this event if hybrid handoff is skipped, so it is redundant.
This will take the place of flow_session[:skip_upload_step].

[skip changelog]
@matthinz matthinz requested a review from a team July 28, 2023 18:14
@matthinz matthinz marked this pull request as draft July 28, 2023 18:19
@matthinz matthinz removed the request for review from a team July 28, 2023 18:19
matthinz added 3 commits July 28, 2023 11:26
params[:type] is set, we can just read that.
The hybrid flow controller should be able to skip the user past if it has been disabled--don't disable it for the entire session right at the beginning.
The HybridHandoffController can detect when hybrid flow is unavailable and redirect accordingly.
end

def update
flow_session[:skip_upload_step] = true unless FeatureManagement.idv_allow_hybrid_flow?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic has moved to HybridHandoffController, which will redirect straight to document capture if the hybrid flow is unavailable.

def redirect_for_gpo_only
return redirect_to vendor_outage_url unless FeatureManagement.gpo_verification_enabled?

# During a phone outage, skip the hybrid handoff
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic has moved to HybridHandoffController, which will redirect straight to document capture if the hybrid flow is unavailable.

end

def update
flow_session[:skip_upload_step] = true unless FeatureManagement.idv_allow_hybrid_flow?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic has moved to HybridHandoffController, which will redirect straight to document capture if the hybrid flow is unavailable.

@matthinz matthinz marked this pull request as ready for review July 28, 2023 18:47
@matthinz matthinz requested a review from a team July 28, 2023 18:57
Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I had to study the changes to confirm_hybrid_handoff_needed for a while, but the specs agree that it works.

Comment on lines +209 to +210
# But don't store that we skipped it in idv_session, in case it is back to
# available when the user tries to redo document capture.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

@matthinz matthinz merged commit 4aaf209 into main Jul 28, 2023
@matthinz matthinz deleted the matthinz/10402-start-renaming-skip-upload-step branch July 28, 2023 21:49
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.

2 participants