Skip to content

chore: DAH-4277 cleaning up deprecated I2X code - #3028

Merged
alulabeshue-sfgov merged 5 commits into
mainfrom
DAH-4277_deprecated-backend-calls
Aug 20, 2026
Merged

chore: DAH-4277 cleaning up deprecated I2X code#3028
alulabeshue-sfgov merged 5 commits into
mainfrom
DAH-4277_deprecated-backend-calls

Conversation

@alulabeshue-sfgov

@alulabeshue-sfgov alulabeshue-sfgov commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

The sf-dahlia-backend has two sets of endpoints for sending I2X emails, /messages/invite-to-apply and /api/v1/message. The former API has been deprecated for the latter, in this ticket we clean up any code used to call /messages/invite-to-apply.

Jira ticket

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

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

@alulabeshue-sfgov
alulabeshue-sfgov temporarily deployed to dahlia-webap-dah-4277-d-py3tyk August 13, 2026 16:49 Inactive
@alulabeshue-sfgov
alulabeshue-sfgov temporarily deployed to dahlia-webap-dah-4277-d-py3tyk August 17, 2026 17:16 Inactive
@alulabeshue-sfgov
alulabeshue-sfgov temporarily deployed to dahlia-webap-dah-4277-d-py3tyk August 17, 2026 17:19 Inactive
@alulabeshue-sfgov
alulabeshue-sfgov temporarily deployed to dahlia-webap-dah-4277-d-py3tyk August 17, 2026 17:27 Inactive
@alulabeshue-sfgov alulabeshue-sfgov changed the title chore: cleaning up deprecated I2X code chore: DAH-4277 cleaning up deprecated I2X code Aug 17, 2026
@alulabeshue-sfgov
alulabeshue-sfgov marked this pull request as ready for review August 17, 2026 18:06
@alulabeshue-sfgov
alulabeshue-sfgov requested review from a team, cliu02 and josh-chou and a lite review from Copilot and removed request for a team August 17, 2026 18:07

Copilot AI left a comment

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.

Pull request overview

Removes deprecated Invite-to-Apply (I2A) / legacy I2X email-recording code paths and standardizes “invite to X” response recording on the /api/v1/message backend endpoint, with corresponding Rails + React + test updates.

Changes:

  • Simplifies DahliaBackend::MessageService#send_invite_to_response to always post to /api/v1/message and removes deprecated endpoint mapping/field-building logic.
  • Updates Rails controllers to send only (app_id, action) and removes the listingId requirement from the public record-response API.
  • Updates React next-steps flows and Jest/RSpec coverage to match the new request shape/signatures.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/services/dahlia_backend/message_service_spec.rb Updates service specs for the new (app_id, action) contract and /api/v1/message payload.
spec/controllers/invite_to_controller_spec.rb Updates controller spec expectations for the new send_invite_to_response signature.
spec/controllers/api/v1/invite_to_response_controller_spec.rb Updates API controller specs to remove listingId from required record params.
app/services/dahlia_backend/message_service.rb Removes deprecated I2A endpoint logic and standardizes I2X sending via /api/v1/message.
app/javascript/pages/inviteTo/inviteToInterview/InviteToInterviewNextSteps.tsx Stops sending listingId in recordResponse calls; cleans up hook deps.
app/javascript/pages/inviteTo/inviteToApply/InviteToApplyNextSteps.tsx Stops sending listingId in recordResponse calls.
app/javascript/modules/constants.tsx Removes deprecated I2A_RESPONSES enum.
app/javascript/api/inviteToApiService.ts Updates recordResponse type to drop listingId.
app/javascript/tests/pages/invite-to-interview.test.tsx Updates tests to expect recordResponse without listingId.
app/javascript/tests/api/inviteToApiService.test.ts Strengthens test to assert exact POST payload without listingId.
app/controllers/invite_to_controller.rb Updates server-side recording to use (app_id, act) only and adjusts token preview encoding.
app/controllers/api/v1/invite_to_response_controller.rb Removes listingId strong-param expectation/validation for record-response.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread spec/controllers/invite_to_controller_spec.rb
Comment thread app/controllers/invite_to_controller.rb
Comment thread app/services/dahlia_backend/message_service.rb
@alulabeshue-sfgov
alulabeshue-sfgov requested review from a team, cade-exygy and jimlin-sfgov and removed request for a team August 17, 2026 19:22
@alulabeshue-sfgov
alulabeshue-sfgov temporarily deployed to dahlia-webap-dah-4277-d-py3tyk August 19, 2026 20:19 Inactive

@cade-exygy cade-exygy left a comment

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.

LG!

@alulabeshue-sfgov
alulabeshue-sfgov merged commit 4365bd8 into main Aug 20, 2026
22 checks passed
@alulabeshue-sfgov
alulabeshue-sfgov deleted the DAH-4277_deprecated-backend-calls branch August 20, 2026 15:29
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