Skip to content

MPDX-10416 Mailing Addresses: tab cards, search, no-results actions, tooltip, CSV phone/email - #2324

Open
jeff-clay wants to merge 6 commits into
mpdx-10174-build-out-change-historyfrom
MPDX-10416-mailing-address-search
Open

jeff-clay wants to merge 6 commits into
mpdx-10174-build-out-change-historyfrom
MPDX-10416-mailing-address-search

Conversation

@jeff-clay

@jeff-clay jeff-clay commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

DO NOT MERGE before the Mailing Addresses UAT. This stacks on #2154 (MPDX-10174), which is approved and waiting on UAT. It goes On Staging once the bot approves, so the UAT testers see the final design. Merge only after #2154 merges and UAT passes. When #2154 merges, GitHub retargets this PR to main, which takes back the bot's approval, so it will need a fresh review then.

Description

Joanna ran Lyssna tests with six staff on the new Mailing Addresses page (MPDX-10153) and updated the designs. This builds those changes (MPDX-10416).

  • Tab cards. 4 of 6 testers never opened Change history. The two plain tabs are now cards with an icon, title, count badge and a one-line description: "Confirm addresses" ("Pick each partner's primary address.") and "Change history" ("See what changed, when, and by whom."). The selected card is white with a 4px blue top border and joins the panel below; the other is gray with a chevron and turns white with a blue border on hover. On phones the cards drop the icon, description and chevron, so they read like plain tabs.
  • Search. A Search field ("Partner name or address") is first in the Change history filters. It is debounced (500ms) and combines with the other filters. The list, summary counts and CSV export all follow it, since the search is a query argument.
  • No results for a search. "No address changes for "X" in the last 12 months" (wording per range; "in the selected dates" for a custom range), "There may be older changes, or the partner may not match your other filters.", then "Search all dates" (sets only the range to Any time) and "Clear filters" (resets the search and every filter to the page defaults). When the range is already Any time, "Search all dates" is hidden and the text is "Try a different search, or clear your filters."
  • "Not recorded (before Nov 2026)" tooltip. That Change made by option gets an info icon and a tooltip, on hover and keyboard focus, linked with aria-describedby: "MPDX started saving who made each change in Nov 2026. Changes made in MPDX before then don't have a name." It is placed right and flips left when the menu sits at the right edge of the page.
  • CSV. Two new last columns: "Primary phone (current)" and "Primary email (current)", the partner's current primary phone and email, blank when none.
  • The filter row now wraps on narrow screens (four filters no longer fit in one row on a phone).
  • Screen readers hear the Confirm addresses count as "18 to confirm" instead of a bare number.

Depends on:

Testing

  • Open MPDX Tools > Mailing Addresses. Check the two tab cards, the badge on Confirm addresses, and the hover state on the unselected card.
  • On Change history, type part of a partner's name or an address in Search. Check the list and the summary narrow after you stop typing.
  • Search for a partner whose only change is over a year old. Check the no-results message names your search and "the last 12 months", then click "Search all dates" and check the range becomes Any time and the change appears.
  • Click "Clear filters" on a no-results state. Check the search is empty and the filters are back to All Partners, Last 12 Months, Anyone.
  • Open Change made by, hover "Not recorded (before Nov 2026)" (or arrow down to it). Check the tooltip text.
  • Export CSV. Check the last two columns hold the partner's primary phone and email.

Local QA (local API on mpdx_api#3845, local seed list, made-up data): all of the above passed. Searching "potter" gave "1 address change for 1 partner"; "Flintstone" showed the no-results state, then his Apr 9, 2025 change after "Search all dates"; "Clear filters" reset to Last 12 Months; the tooltip showed on hover and on keyboard focus with aria-describedby pointing at it; the CSV gained the two columns with the made-up phone and email on the one partner that had them. Before/after screenshots are in a PR comment.

Automated: jest for src/components/Tool/MailingAddresses (96 tests), tsc, eslint, and the CodeScene precheck against the base branch all pass.

AI Review

Local /agent-review:review (agent-review engine: architecture, data-integrity, testing, standards, api-contracts, ux lanes):

  1. Round 1 on 02104c8, not posted (fixed first, no blockers): "Clear filters" sent the old search with the reset filters for 500ms; an export test title overclaimed; no whitespace-only search test; a helpers interface shared the MadeByMenuItem component's name. Fixed in 6e5856f.
  2. Round 2 on 6e5856f, posted, with 2 debate rounds: no blockers, 6 advisory findings. Fixed Tasks #1, add notifications #3, Bump axios from 0.20.0 to 0.21.1 #4 in 9b50a79 (clear-then-type no longer brings the old search back, the whitespace test now catches a missing trim, the tab count reads "18 to confirm" to screen readers). Dismissed contacts #2, Move to Yarn V2 and upgrade packages #5, Remove ts-node #6.
  3. Incremental re-review on 9b50a79: no blockers, 3 advisory test findings, all dismissed (Make prettier config closer to defaults #7 and MPDX-6917-Remove-Lodash #8 verified false by breaking the code and watching the tests fail).

The github-actions bot approved 9b50a79.

Findings deliberately not addressed (and why):

  • contacts #2 [intentional] Reuse Shared/SearchBox: the filter row needs a labeled field matching the shrink-labeled Selects beside it. SearchBox has no label and always shows its own tooltip, and the browser search input already gives a clear button.
  • Move to Yarn V2 and upgrade packages #5 [other] toConfirmCount test id lives in the shared tab label: only the Confirm addresses tab passes a count, and the existing badge tests use that id.
  • Remove ts-node #6 [other] Staging API label: on now; remove it after mpdx_api#3845 reaches production.
  • Make prettier config closer to defaults #7, MPDX-6917-Remove-Lodash #8 [false-positive] Test strength: verified locally that each test fails when the behavior is removed.
  • Bump @storybook/addon-viewport from 6.1.17 to 6.1.18 #9 [other] Singular/99+ hidden count text: it uses the i18n plural helper, and the 99+ cap only changes the visible badge.
  • Round 1, CSV phone in E.164 form ("+12065550100") may show as a number in Excel [intentional]: matches the API's contacts export, which writes the same raw number (Contact::Export::RowService).

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels (Add the label "Preview" to automatically create a preview environment)
  • I have run the Claude Code /quality:agent-review command locally and fixed any relevant suggestions
  • I have requested a review from another person on the project
  • I have tested my changes in preview or in staging
  • I have cleaned up my commit history

🤖 Generated with Claude Code

jeff-clay and others added 4 commits November 30, 2026 14:18
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeff-clay jeff-clay self-assigned this Nov 30, 2026
@jeff-clay

Copy link
Copy Markdown
Contributor Author

Screenshots (local, made-up seed data)

1. Tabs become tab cards

The two plain tabs ("TO CONFIRM", "CHANGE HISTORY") are now cards with an icon, a title, the count badge and a one-line description. The selected card has a blue top border and joins the panel; the other is gray with a chevron.

Before After
Tabs before Tab cards after

Hover on the unselected card (Confirm addresses selected): white with a blue border.
Hover state

Phone (390px): the cards drop the icon and description, and the filters wrap one per row.
Phone

2. Search (new)

Search is first in the filters. Typing "potter" narrows the list and the summary to 1 change for 1 partner.
Search

3. Search with no results (new)

"Flintstone" only moved in 2025, so the last 12 months has nothing. The message names the search and the range, with "Search all dates" and "Clear filters".
No results

After "Search all dates": only the range changed (Any time); the search stayed, and his Apr 9, 2025 change shows.
After Search all dates

No results when the range is already Any time: "Search all dates" is hidden.
No results, any time

4. "Not recorded (before Nov 2026)" tooltip

Only the info icon and tooltip are new. The tooltip opens on hover and on keyboard focus; here it flips to the left because the menu is at the right edge of the page.

Before After
Not recorded before Not recorded tooltip after

Tooltip text: "MPDX started saving who made each change in Nov 2026. Changes made in MPDX before then don't have a name."

5. CSV export

Header plus the one seed partner with a made-up phone and email. Two new columns at the end: "Primary phone (current)" and "Primary email (current)".

Before:
CSV before

After:
CSV after

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeff-clay jeff-clay added the Staging API Run GraphQL codegen against the staging API label Nov 30, 2026
@jeff-clay

jeff-clay commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 agent-review · ✅ no blockers · risk CRITICAL
Rollout: advisory · 4 agents run (Architecture Review Agent, Testing & Quality Review Agent, Standards Compliance Review Agent, UX & Accessibility Review Agent) · incremental since 6e5856f

BLOCKERS: fix or dismiss to pass

✅ No blockers.

OTHER FINDINGS (9)

  • #1 · 5/10 · src/components/Tool/MailingAddresses/ChangeHistoryAddresses/ChangeHistoryAddressesSearch.test.tsx:187 · The 'ignores a search of only spaces' test asserts the query is never sent with search: '', but the code sends undefined for an empty search, so '' is never a possible value. Removing the .trim() in useAddressChangeFilters would send ' ' and this test would still pass. · ✅ fixed in 9b50a79
  • #7 · 5/10 · src/components/Tool/MailingAddresses/ChangeHistoryAddresses/ChangeHistoryAddressesSearch.test.tsx:194 · The whitespace test now asserts that search ' ' was never sent, but the hook trims before querying, so ' ' can never be sent and the assertion cannot fail. A regression that sends an empty or trimmed search would pass, and the old search '' check was dropped. · 🚫 dismissed by @jeff-clay [false-positive]: verified locally, removing the trim from the hook sends ' ' and this test fails, so it does catch the regression
  • #8 · 5/10 · src/components/Tool/MailingAddresses/ChangeHistoryAddresses/ChangeHistoryAddressesSearch.test.tsx:206 · The new 'does not bring back a cleared search' test likely passes without the fix. Smith is cleared as soon as the Clear button appears, before the 500ms debounce fires, so Smith results are never fetched or cached and the 'not Smith' check is vacuous. · 🚫 dismissed by @jeff-clay [false-positive]: verified locally, this test failed against the previous hook (the cached Smith heading came back) and passes only with the fix
  • #2 · 3/10 · src/components/Tool/MailingAddresses/ChangeHistoryAddresses/AddressFilters/AddressFilters.tsx:435 · The search field is a hand-built TextField with a search icon adornment, while src/components/Shared/SearchBox/SearchBox.tsx already provides the repo's search input (icon, clear button, sx passthrough). This adds a second way to render a search box and drops the clear (X) button users get on every other list search. · 🚫 dismissed by @jeff-clay [intentional]: the filter row needs a labeled field that matches the shrink-labeled Selects beside it, and SearchBox has no label and always shows its own tooltip, the browser search input already gives a clear button
  • #3 · 3/10 · src/components/Tool/MailingAddresses/ChangeHistoryAddresses/useAddressChangeFilters.ts:991 · debouncedSearch is derived from two values that can disagree: after the field is cleared, typedSearch still holds the old term until the debounce fires, so typing a new letter within 500 ms makes debouncedSearch the old term again. The old query and its search empty state heading come back briefly while the box shows the new text. · ✅ fixed in 9b50a79
  • #4 · 3/10 · src/components/Tool/MailingAddresses/MailingAddressesTabLabel.tsx:56 · The tab's accessible name now concatenates title, bare count, and description (for example "Confirm addresses 3 Pick each partner's primary address."). The count has no text meaning for screen reader users, and the long name is noisy for a tab. · ✅ fixed in 9b50a79
  • #5 · 3/10 · src/components/Tool/MailingAddresses/MailingAddressesTabLabel.tsx:64 · The new reusable tab label hardcodes data-testid="toConfirmCount" on its count badge, so the History tab would carry a Confirm-specific id if it ever passed a count. · 🚫 dismissed by @jeff-clay [other]: only the Confirm addresses tab passes a count, and the id is what the existing badge tests use
  • #9 · 3/10 · src/components/Tool/MailingAddresses/MailingAddresses.test.tsx:74 · The new screen reader test covers only the plural count of 18. The singular form ('1 to confirm') and the 99+ cap, where the hidden text should still read the real count, are not tested. · 🚫 dismissed by @jeff-clay [other]: the count text uses the i18n plural helper, and the 99+ cap only changes the visible badge, not the hidden text
  • #6 · 1/10 · src/components/Tool/MailingAddresses/ChangeHistoryAddresses/AddressChangeHistory.graphql:8 · The query relies on mpdx_api#3845 fields; the Staging API label is now on the PR, so the only remaining step is removing it after #3845 reaches production. · 🚫 dismissed by @jeff-clay [other]: the Staging API label is on the PR, and removing it after mpdx_api#3845 reaches production is in the PR body
🔧 Fix suggestions (0)

No automated fixes for this review.

📦 Dependency impact

No dependents of the files changed in this delta beyond their own tests.

📊 Review detail & stats

Generated: 2026-11-30T23:39Z · Day: Monday · Files changed in this pass: 5 files changed, 103 insertions(+), 55 deletions(-) · Whole PR: 20 files changed, 860 insertions(+), 59 deletions(-)
Risk score: 22 (whole PR) · CRITICAL · this delta scored 5 (MEDIUM) · Required reviewer: senior maintainer

Risk factors detected: component and test changes in the Mailing Addresses tool; one new translation key

Deterministic evidence:

  • AST/static rules: none
  • CI snapshot: 1 fail 6 pass 15 pending 3 skipping
  • Cross-repo context: none

Agent summary (bands: Critical 9-10 · High 7-8 · Important 5-6 · Suggestions 3-4):

Agent Critical High Important Suggestions Confidence
Architecture Review Agent 0 0 0 0 M
Testing & Quality Review Agent 0 0 2 1 M
Standards Compliance Review Agent 0 0 0 0 M
UX & Accessibility Review Agent 0 0 0 0 H
Total 0 0 2 1 -

Per-agent perspectives on blockers: none (no blockers).

Review quality:

  • Average agent confidence: High · Consensus rate: 0% (single-lane findings) · Review time: 2 minutes
  • Debate rounds not run on this incremental pass: only one lane raised findings, all below 7.
  • Findings suppressed by approved learnings: 0
💬 How to act on this review

Every finding above is numbered. Severity ≥ 7 findings carry a checkbox and must each be fixed or
dismissed
before this review counts as passed; lower severities are advisory. Interact from a
PR comment: @claude fix 1, 3 · @claude dismiss 2 [false-positive]: <one-line reason>
(a reason code and explanation are required), or locally with /agent-review:address. Valid
codes: false-positive, intentional, pre-existing,
deferred, duplicate, insufficient-evidence, other.

Or locally: /agent-review:address pulls this ledger into a Claude Code session.

github-actions[bot]
github-actions Bot previously approved these changes Nov 30, 2026

@github-actions github-actions Bot 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.

Auto-approved: the agent-review report for this head passes with no open blockers, and no repo rule or recorded check needs a person.

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against c8a4738

Route Size (gzipped) Diff
/accountLists/[accountListId]/hrTools/additionalSalaryRequest 178.79 KB -2.79 KB
/accountLists/[accountListId]/hrTools/goalCalculator 127.78 KB -1.54 KB
/accountLists/[accountListId]/hrTools/goalCalculator/[goalCalculationId] 401.45 KB -1.67 KB
/accountLists/[accountListId]/hrTools/mhaCalculator 165.43 KB -2.81 KB
/accountLists/[accountListId]/hrTools/mhaCalculator/[requestId] 180.97 KB -1.76 KB
/accountLists/[accountListId]/hrTools/mpdGoalAdmin 165.96 KB -1.18 KB
/accountLists/[accountListId]/hrTools/mpdSupervisorReport 161.03 KB -7.81 KB
/accountLists/[accountListId]/hrTools/salaryCalculator 162.83 KB -5.83 KB
/accountLists/[accountListId]/hrTools/salaryCalculator/[calculationId] 180.76 KB -6.06 KB
/accountLists/[accountListId]/reports/mpgaIncomeExpenses 434.07 KB -1.19 KB
/accountLists/[accountListId]/reports/partnerCurrency/[[...contactId]] 119.59 KB -1.05 KB
/accountLists/[accountListId]/reports/salaryCurrency/[[...contactId]] 119.59 KB -1.05 KB
/accountLists/[accountListId]/reports/staffExpense 325.13 KB -1.22 KB
/accountLists/[accountListId]/tools/mailingAddresses/[[...contactId]] 211.9 KB added
/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]] no change removed
Dynamic import Size (gzipped) Diff
src/components/Contacts/ContactDetails/ContactDetailsTab/DynamicContactDetailsTab.tsx -> ./ContactDetailsTab 63.39 KB +1.25 KB
src/components/Contacts/ContactDetails/ContactDetailsTab/Mailing/AddAddressModal/DynamicAddAddressModal.tsx -> ./AddAddressModal 49.22 KB -27.3 KB
src/components/Contacts/ContactDetails/ContactDetailsTab/Mailing/EditContactAddressModal/DynamicEditContactAddressModal.tsx -> ./EditContactAddressModal 50.05 KB -27.32 KB
src/components/Contacts/ContactsList/DynamicContactsList.tsx -> ./ContactsList 39.24 KB +5.19 KB
src/components/Contacts/ContactsRightPanel/DynamicContactsRightPanel.tsx -> ./ContactsRightPanel 148.82 KB +3.7 KB
src/components/Shared/Filters/DynamicFilterPanel.tsx -> ./FilterPanel 100.67 KB +3.71 KB
src/components/Tool/Appeal/List/ContactsList/DynamicContactsList.tsx -> ./ContactsList 39.24 KB +5.19 KB
src/components/HrTools/MpdGoalAdmin/MpdCoaches/DynamicAddMpdCoachModal.tsx -> ./AddMpdCoachModal no change removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot dismissed their stale review November 30, 2026 23:37

agent-review: the bot took back its approval of 6e5856f because the PR's base branch is not the repo's default branch. Run /agent-review:re-review (or /agent-review:review) and post the report. The bot approves again when the report passes for the new head.

@github-actions github-actions Bot 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.

Auto-approved: the agent-review report for this head passes with no open blockers, and no repo rule or recorded check needs a person.

@github-actions github-actions Bot 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.

Auto-approved: the agent-review report for this head passes with no open blockers, and no repo rule or recorded check needs a person.

@jeff-clay jeff-clay added the On Staging Will be merged to the staging branch by Github Actions label Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Staging Will be merged to the staging branch by Github Actions Staging API Run GraphQL codegen against the staging API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant