Skip to content

feat: DAH-4006 I2I Next steps page and refactor with I2A#2862

Merged
cliu02 merged 30 commits intomainfrom
DAH-4006-i2i-next-steps
Apr 20, 2026
Merged

feat: DAH-4006 I2I Next steps page and refactor with I2A#2862
cliu02 merged 30 commits intomainfrom
DAH-4006-i2i-next-steps

Conversation

@cliu02
Copy link
Copy Markdown
Collaborator

@cliu02 cliu02 commented Apr 15, 2026

Description

Continued I2I/I2A refactoring and next steps page frontend.

Note: this PR builds on #2855

New strings need an engineer with Phrase access to push.

Jira ticket

https://sfgovdt.jira.com/browse/DAH-4006

Before requesting eng review

Version Control

  • branch name begins with angular if it contains updates to Angular code
  • branch name contains the Jira ticket number
  • PR name follows type: TICKET-NUMBER Description format, use DAH-000 if it does not need a ticket
  • PR name follows urgent: Description format if it is urgent and does not need a ticket

Code quality

  • the set of changes is small
  • all automated code checks pass (linting, tests, coverage, etc.)
  • if the PR is a bugfix, there are tests and logs around the bug

Code conventions

  • web pages are formatted with .scss stylesheets and ui-seeds tokens, rather than inline styles or Tailwind

Review instructions

  • instructions specify which environment(s) it applies to
  • instructions work for PA testers
  • instructions have already been performed at least once

Request eng review

  • PR has needs review label
  • Use Housing Eng group to automatically assign reviewers, and/or assign specific engineers
  • If time sensitive, notify engineers in Slack

Before merging

Request product acceptance (PA) testing

  • PA tested in the review environment (use needs product acceptance label)
  • if PA testing cannot be done, changes are behind a feature flag

Copilot AI review requested due to automatic review settings April 15, 2026 20:43
@wiz-dt-tis
Copy link
Copy Markdown

wiz-dt-tis Bot commented Apr 15, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data 1 Info
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 1 Info

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Info Sensitive Data Finding

PII

More Details
Attribute Value
Data Classifier PII/Name
Data Classifier ID BUILTIN-125

Sampled Examples

Key Value
assistance.contact.helpLine.title1 Frc*o
assistance.contact.questionsAboutListings.title1 D****A

Rule ID: BUILTIN-125


To ignore this finding as an exception, reply to this conversation with #wiz_ignore reason

If you'd like to ignore this finding in all future scans, add an exception in the .wiz file (learn more) or create an Ignore Rule (learn more).


To get more details on how to remediate this issue using AI, reply to this conversation with #wiz remediate

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a unified “Invite To” (Next Steps) experience that consolidates Invite-to-Apply (I2A) and adds Invite-to-Interview (I2I) pages, along with backend/API changes to record invite responses and send messages through the updated messaging endpoint.

Changes:

  • Add new /next-steps React page(s) for I2A + I2I and update Rails routes/views to render the new page.
  • Replace the legacy invite-to-apply response API controller with a new InviteToResponseController and update the JS API client accordingly.
  • Refactor DahliaBackend::MessageService to support sending messages via /api/v1/messages and update specs/tests/translations.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
spec/services/dahlia_backend/message_service_spec.rb Updates service specs for new argument shape and /api/v1/messages endpoint.
spec/controllers/invite_to_controller_spec.rb Renames controller spec target and updates expected props/params (currently inconsistent with implementation).
spec/controllers/api/v1/invite_to_response_controller_spec.rb Adds specs for the new response-recording API controller.
config/routes.rb Adds /next-steps routes, re-points record-response routes to the new controller, keeps deprecated I2A paths.
app/views/invite_to_apply_page/invite_to_apply.html.slim Removes old I2A Slim view.
app/views/invite_to/invite_to.html.slim Adds new Slim view mounting InviteToPage.
app/services/dahlia_backend/message_service.rb Updates invite response sending to support new action-based endpoint selection and payload prep.
app/javascript/util/routeUtil.ts Adds generateSubmitLink and renames AppPages.InviteToApply to InviteTo.
app/javascript/pages/inviteToApply/invite-to-apply.tsx Removes legacy InviteToApplyPage React entry.
app/javascript/pages/inviteTo/inviteToInterview/InviteToInterviewNextSteps.tsx Adds I2I next steps page content.
app/javascript/pages/inviteTo/inviteToInterview/InviteToInterviewDocuments.tsx Adds I2I document checklist page content.
app/javascript/pages/inviteTo/inviteToApply/InviteToApplyWithdrawn.tsx Refactors I2A withdrawn page to shared module styles/imports.
app/javascript/pages/inviteTo/inviteToApply/InviteToApplySubmitYourInfo.tsx Refactors I2A submit page; updates response recording payload to new API.
app/javascript/pages/inviteTo/inviteToApply/InviteToApplyDocuments.tsx Refactors I2A documents page to shared module styles/imports.
app/javascript/pages/inviteTo/inviteToApply/InviteToApplyContactMeLater.tsx Refactors I2A contact-me-later page to shared module styles/imports.
app/javascript/pages/inviteTo/invite-to.tsx Adds unified InviteToPage routing logic for I2A/I2I.
app/javascript/pages/inviteTo/invite-to.module.scss Updates shared styles used across new InviteTo pages.
app/javascript/pages/inviteTo/InviteToLeasingAgentInfo.tsx Updates shared leasing agent component to use new shared styles.
app/javascript/pages/inviteTo/InviteToHeader.tsx Updates shared header component to use new shared styles.
app/javascript/pages/inviteTo/InviteToGetHelp.tsx Updates shared “Get help” component to use new shared styles.
app/javascript/pages/inviteTo/InviteToDeadlinePassed.tsx Renames/refactors deadline-passed component to shared InviteTo naming/styles.
app/javascript/packs/react_application.tsx Switches pack entry from InviteToApplyPage to InviteToPage.
app/javascript/api/inviteToApplyApiService.ts Updates response-recording API path and payload fields.
app/javascript/tests/pages/invite-to-interview.test.tsx Adds initial test coverage for I2I documents rendering.
app/javascript/tests/pages/invite-to-apply.test.tsx Updates I2A tests to use InviteToPage (currently inconsistent with component prop names).
app/javascript/tests/api/inviteToApplyApiService.test.ts Updates API service test for new payload fields.
app/controllers/invite_to_controller.rb Replaces old controller with unified InviteTo controller (token decode currently disabled).
app/controllers/api/v1/invite_to_response_controller.rb Adds new API controller for recording responses.
app/controllers/api/v1/invite_to_apply_controller.rb Removes legacy invite-to-apply API controller.
app/assets/json/translations/react/en.json Adds new translation strings for I2I pages.
Comments suppressed due to low confidence (6)

app/controllers/invite_to_controller.rb:17

  • The upload URL is merged into @invite_to_props as a top-level url, but the React page reads urlParams.url (and older code/tests expect fileUploadUrl). As-is, the upload URL likely won’t reach the component. Please normalize where this value lives (either inside urlParams or consumed as a top-level prop).
    app/controllers/invite_to_controller.rb:8
  • Token decoding is currently commented out, so params[:t] is ignored and token-based links can’t populate deadline/appId/inviteAction (and won’t record a response). Re-enable decode_token (at least when t is present) so emailed JWT links work.
    spec/controllers/api/v1/invite_to_response_controller_spec.rb:20
  • The controller expects a type key (params.expect(record: %i[type ...])), but this spec’s request payload omits it. If params.expect enforces presence, this will raise. Include type in the test request (or make type optional in the controller).
    app/controllers/invite_to_controller.rb:43
  • props and record_response only look at inviteAction/response, but the token/test data uses action. To avoid silently dropping responses, accept action as an alias (e.g., decoded_params['inviteAction'] || decoded_params['action']).
    spec/controllers/invite_to_controller_spec.rb:78
  • The spec expects urlParams to contain action, but the React component/controller use inviteAction. Align the spec with the actual contract (or update the controller/component) so the prop naming is consistent.
    spec/controllers/invite_to_controller_spec.rb:81
  • The spec expects a top-level fileUploadUrl, but the controller currently merges a top-level url (and the React page reads urlParams.url). Update the spec and implementation to agree on a single prop name/location so the upload URL is actually usable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/javascript/__tests__/pages/invite-to-apply.test.tsx
Comment thread app/services/dahlia_backend/message_service.rb
Comment thread app/javascript/pages/inviteTo/invite-to.tsx
Comment thread app/controllers/api/v1/invite_to_response_controller.rb
Comment thread app/controllers/api/v1/invite_to_response_controller.rb
Comment thread app/services/dahlia_backend/message_service.rb Outdated
Comment thread app/javascript/pages/inviteTo/invite-to.tsx
Comment thread app/services/dahlia_backend/message_service.rb Outdated
Comment thread app/javascript/pages/inviteTo/invite-to.tsx Outdated
Comment thread app/javascript/pages/inviteTo/inviteToInterview/InviteToInterviewNextSteps.tsx Outdated
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 21:27 Inactive
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 21:36 Inactive
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 21:45 Inactive
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 22:20 Inactive
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 22:46 Inactive
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 22:50 Inactive
@cliu02 cliu02 added the needs review Pull request needs review label Apr 15, 2026
@cliu02 cliu02 requested review from a team, alulabeshue-sfgov, jimlin-sfgov and jtcaovan and removed request for a team April 15, 2026 22:53
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 15, 2026 23:07 Inactive
@cliu02 cliu02 mentioned this pull request Apr 16, 2026
16 tasks
Comment thread app/services/dahlia_backend/message_service.rb Outdated
Comment thread app/controllers/invite_to_controller.rb Outdated
@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 16, 2026 23:53 Inactive
return []
}
})()
: []
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

suggestion: can we pull this out into a small function with a clear name for readability?

const isI2IEnabled = isI2IEnabledFlag && listing?.Id && enabledListingIds.includes(listing.Id)

/* I2I - Invite to Interview pages */
if (type === "I2I") {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question/suggestion: Would it make sense to create separate component files for rendering the I2I type and the I2A type?

There is a decent amount of branching render logic that is a little tricky to track.

for example:

if (type === "I2I"){
    ...
    return <I2I {props} />
}
if (type === "I2A") {
    ...
    return <I2A {props} />
}

@cliu02 cliu02 temporarily deployed to dahlia-webap-dah-4006-i-ij4poz April 20, 2026 16:39 Inactive
@cliu02 cliu02 merged commit 3c443a7 into main Apr 20, 2026
26 checks passed
@cliu02 cliu02 deleted the DAH-4006-i2i-next-steps branch April 20, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Pull request needs review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants