Skip to content

LG-15440 We couldnt find records matching your address screen#12066

Merged
theabrad merged 13 commits intomainfrom
abrad-lg-15440-address-error
Apr 22, 2025
Merged

LG-15440 We couldnt find records matching your address screen#12066
theabrad merged 13 commits intomainfrom
abrad-lg-15440-address-error

Conversation

@theabrad
Copy link
Copy Markdown
Contributor

🎫 Ticket

Link to the relevant ticket:
LG-15440

🛠 Summary of changes

Whenever a user fails InstantVerify, because address can't be verified we want to show them a screen to try to enter their address again.

We still have to wait until the mock proofer is up to test this on the idp.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Make sure specs pass
  • visit /verify/session/errors/address_warning and confirm changes are made.

👀 Screenshots

Screenshot 2025-04-10 at 11 07 19 AMScreenshot 2025-04-10 at 11 07 29 AM
Screenshot 2025-04-10 at 11 07 37 AM

Screenshot 2025-04-10 at 11 07 44 AM

theabrad added 4 commits April 7, 2025 15:33
changelog: User-Facing Improvements, Doc Auth, add we couldnt find your address screen
Comment on lines +33 to +44
def address_warning
rate_limiter = RateLimiter.new(
user: idv_session_user,
rate_limit_type: :idv_resolution,
)

@step_indicator_steps = step_indicator_steps
@address_path = idv_address_url
@remaining_submit_attempts = rate_limiter.remaining_count
log_event(based_on_limiter: rate_limiter)
end

Copy link
Copy Markdown
Contributor

@amirbey amirbey Apr 10, 2025

Choose a reason for hiding this comment

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

Suggested change
def address_warning
rate_limiter = RateLimiter.new(
user: idv_session_user,
rate_limit_type: :idv_resolution,
)
@step_indicator_steps = step_indicator_steps
@address_path = idv_address_url
@remaining_submit_attempts = rate_limiter.remaining_count
log_event(based_on_limiter: rate_limiter)
end
def address_warning
@step_indicator_steps = step_indicator_steps
@address_path = idv_address_url
@remaining_submit_attempts = resolution_rate_limiter.remaining_count
log_event(based_on_limiter: resolution_rate_limiter)
end
# private
def resolution_rate_limter
@resolution_rate_limter ||= RateLimiter.new(
user: idv_session_user,
rate_limit_type: :idv_resolution,
)
end

seems like a refactor opportunity since this rate limiter is being instantiated in 3 places... and then can update failure and warning actions 🤔

Copy link
Copy Markdown
Contributor

@amirbey amirbey Apr 10, 2025

Choose a reason for hiding this comment

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

thanks for refactoring. While perhaps choosing a different route then the code suggestion, I'm concerned that the path chosen could be more confusing from a readability standpoint because other methods in this controller also using rate_limiter for varying rate_limiter_types. As suggested, I think it would be helpful to rename to distinguish the type of rate limiter being used here ... As opposed to the refactor path chosen, I'd prefer revert to your original implementation when we replicated the same code 3 times ... it's more readable 🙏🏿

Comment on lines +104 to +105
if !residential_resolution_result.success? && (same_address_as_id == 'false' ||
ipp_enrollment_in_progress)
Copy link
Copy Markdown
Contributor

@amirbey amirbey Apr 10, 2025

Choose a reason for hiding this comment

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

what is the intention for this change? it appears that same_address_as_id is defined when updating an address during IPP 🤔

Copy link
Copy Markdown
Contributor

@amirbey amirbey Apr 11, 2025

Choose a reason for hiding this comment

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

btw, I created an issue to refactor our usage of same_address_as_id

Copy link
Copy Markdown
Contributor

@anniehirshman-gsa anniehirshman-gsa left a comment

Choose a reason for hiding this comment

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

Screenshot LGTM!

For code review and testing -- the main logic to test is that this error appears if the only failures are due to address checks. If other name, DOB, or SSN failures occur then a user would see the original error content. Thanks!

Comment on lines +67 to +68
def set_resolution_rate_limiter
@resolution_rate_limiter = RateLimiter.new(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
def set_resolution_rate_limiter
@resolution_rate_limiter = RateLimiter.new(
def resolution_rate_limiter
@resolution_rate_limiter ||= RateLimiter.new(


before_action :confirm_two_factor_authenticated_or_user_id_in_session
before_action :confirm_idv_session_step_needed
before_action :set_resolution_rate_limiter, only: [:warning, :address_warning, :failure]
Copy link
Copy Markdown
Contributor

@amirbey amirbey Apr 21, 2025

Choose a reason for hiding this comment

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

Suggested change
before_action :set_resolution_rate_limiter, only: [:warning, :address_warning, :failure]

i think it's simpler to just call the rate limiter when needed ... is there a benefit to using the filter here?

Comment on lines +15 to +16
attr_reader :resolution_rate_limiter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
attr_reader :resolution_rate_limiter

Comment on lines +134 to +136
elsif has_exception && is_address_exception
idv_failure_log_address_warning
redirect_to address_warning_url
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we know that address is the sole error?

@amirbey amirbey self-requested a review April 22, 2025 16:49
@theabrad theabrad merged commit c49eec6 into main Apr 22, 2025
1 check passed
@theabrad theabrad deleted the abrad-lg-15440-address-error branch April 22, 2025 17:39
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.

3 participants