Skip to content

Mint/Update Tax Dashboard Tax Section#488

Merged
AndiLuo merged 9 commits intomasterfrom
dashboard-tax-ui-update
Mar 31, 2026
Merged

Mint/Update Tax Dashboard Tax Section#488
AndiLuo merged 9 commits intomasterfrom
dashboard-tax-ui-update

Conversation

@AndiLuo
Copy link
Copy Markdown
Contributor

@AndiLuo AndiLuo commented Mar 25, 2026

  • Modified tax dashboard handling when User was previously required to submit a tax form, submitted it, but may/may not needs to have one.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

Links

  • Jira issue number: (PUT IT HERE)
  • Process.st launch checklist: (PUT IT HERE)

Checklists

Development

  • Prettier was run (if applicable)
  • The behaviour changes in the pull request are covered by specs
  • All tests related to the changed code pass in development

Paperwork

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has a Jira number
  • This pull request has a Process.st launch checklist

Code review

  • Changes have been reviewed by at least one other engineer
  • Security impacts of this change have been considered

Copilot AI review requested due to automatic review settings March 25, 2026 22:52
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

Updates the Mint tax & cash dashboard to display appropriate copy when a user previously submitted a tax form but is no longer required to submit one.

Changes:

  • Added a new configurable text prop for the “previously submitted but not required” tax-document state.
  • Rendered a new tax-documents UI block for the noFormNeeded && status === "ACTIVE" scenario.
  • Updated docs/types and added a Storybook story for the new state; bumped mint-components version.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.tsx Adds new Stencil @Prop for the new tax-documents description text.
packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx Adds a new conditional tax section rendering for noFormNeeded + ACTIVE status and wires in the new text.
packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/readme.md Documents the new component property/attribute.
packages/mint-components/src/components/tax-and-cash/TaxForm.stories.tsx Adds a Storybook scenario for the new UI state.
packages/mint-components/src/components.d.ts Updates generated typings to include the new component prop.
packages/mint-components/package.json Version bump to 2.1.5-0.

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

Copilot AI review requested due to automatic review settings March 26, 2026 17:35
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

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

Comments suppressed due to low confidence (1)

packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx:1160

  • !!states.status will also be true for tax document status "NEW" (see TaxDocumentStatus), but statusMap doesn't define a rendering for "NEW". With this change, users in "NEW" state can end up seeing an empty status area (and the “Submit new tax form” button, since only "NOT_VERIFIED" is excluded). Add explicit handling for "NEW" (e.g., treat it like "NOT_VERIFIED") and ensure the new-form button logic matches that state.
                        <span class={sheet.classes.StatusAlert}>
                          {statusMap[states.status]}
                        </span>
                      </div>
                    </span>
                    {(!states.noFormNeeded || !!states.status) &&
                      states.status !== "NOT_VERIFIED" && (
                        <sl-button
                          disabled={states.disabled || states.loading}
                          onClick={callbacks.onClick}

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

"name": "@saasquatch/mint-components",
"title": "Mint Components",
"version": "2.1.4",
"version": "2.1.5-1",
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.

This needs to be set to a stable version number before we approve and merge this PR.

Copilot AI review requested due to automatic review settings March 31, 2026 00:14
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

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


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

Copilot AI review requested due to automatic review settings March 31, 2026 18:46
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

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


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

Comment on lines 834 to 840
{intl.formatMessage(
{
id: `badgeTextSubmittedOn`,
defaultMessage:
states.documentType === "W9"
states.documentType === "W9" || !states.documentType
? text.badgeTextSubmittedOn
: text.badgeTextSubmittedOnW8,
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

statusMap.ACTIVE now treats a missing states.documentType as W-9 (states.documentType === "W9" || !states.documentType), which can produce incorrect copy for users who previously submitted a W-8 but no longer have a required document type (the hook sets documentType from requiredTaxDocumentType, which becomes null). If the intent is to reflect the submitted form type, consider basing this choice on the submitted document type (e.g., currentTaxDocument.type exposed in state) rather than defaulting to W-9 when documentType is absent.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

@AndiLuo AndiLuo Mar 31, 2026

Choose a reason for hiding this comment

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

This is an edgecase because if the user submitted a W8 before and they get ported over to CASH_ONLY_DEFER_W9 tax setting, the requiredTaxDocumentType will equal null and the document type will not be available due to comply-exchange.

TLDR we want to display the W9 submittedOn text when requiredTaxDocumentType === null

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

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/mint-components/src/components/tax-and-cash/TaxForm.stories.tsx:1091

  • In this story, noFormNeeded is set to true while documentType is set to "W9". In the real hook (useTaxAndCashDashboard), noFormNeeded is derived from !documentType, so this combination is not representable and can make the story misleading. Consider either setting noFormNeeded: false or setting documentType/documentTypeString to undefined/"" to reflect the intended scenario.
        states: {
          veriffLoading: false,
          noFormNeeded: true,
          canEditPayoutInfo: true,
          status: "INACTIVE",
          documentType: "W9",
          documentTypeString: taxTypeToName("W9"),

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

Comment on lines 570 to 574
},
},
props.demoData || props.stateController || {},
{ arrayMerge: (_, a) => a }
{ arrayMerge: (_, a) => a },
);
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

In useDemoTaxAndCashDashboard, the second deepmerge argument uses props.stateController directly, but stateController is a JSON string (defaulting to "{}"). Passing a string into deepmerge can override the merged object (or break merging), which makes demo/state-controller-driven rendering unreliable. Parse stateController into an object (e.g., via the existing parseStates pattern used in other demo hooks) before merging, and then merge props.demoData/parsed state consistently.

Copilot uses AI. Check for mistakes.
@AndiLuo AndiLuo merged commit 2f6b879 into master Mar 31, 2026
16 of 18 checks passed
@AndiLuo AndiLuo deleted the dashboard-tax-ui-update branch March 31, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants