Skip to content

fix: DAH-4293 Fix housing counselor access granted / revoked toasts - #3035

Open
cliu02 wants to merge 2 commits into
mainfrom
DAH-4293-hc-toasts
Open

fix: DAH-4293 Fix housing counselor access granted / revoked toasts #3035
cliu02 wants to merge 2 commits into
mainfrom
DAH-4293-hc-toasts

Conversation

@cliu02

@cliu02 cliu02 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Description

Separate useStates for access granted toast and access revoked toast on account settings page.

Jira ticket

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

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

@cliu02
cliu02 marked this pull request as ready for review August 18, 2026 20:36
Copilot AI lite review requested due to automatic review settings August 18, 2026 20:36
@alulabeshue-sfgov
alulabeshue-sfgov temporarily deployed to dahlia-webap-dah-4293-h-keqw3v August 18, 2026 20:36 Inactive
@cliu02 cliu02 added the needs review Pull request needs review label Aug 18, 2026
@cliu02
cliu02 requested review from a team, jimlin-sfgov and jtcaovan and removed request for a team August 18, 2026 20:37

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

Fixes the housing counselor “access granted” vs “access revoked” success-toast behavior on the Account Settings page by separating the share vs revoke flows/state so the correct toast is shown for each action.

Changes:

  • Split the prior combined submit handler into onShare (form submit) and onRevoke (button click), with separate grantToast/revokeToast state.
  • Updated the revoke button behavior to avoid form submission when already shared (type="button" + onClick={onRevoke}).
  • Added test cases asserting the granted/revoked toast messages.

Reviewed changes

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

File Description
app/javascript/pages/account/settings.tsx Separates share vs revoke flows and toast state in the Housing Counselor section.
app/javascript/tests/pages/account/settings.test.tsx Adds tests around the housing counselor access success toasts.

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

Comment thread app/javascript/pages/account/settings.tsx
Comment thread app/javascript/pages/account/settings.tsx Outdated
Comment thread app/javascript/__tests__/pages/account/settings.test.tsx
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.

3 participants