Skip to content

feat(PartnerInfoModal): displaying firstName and lastName inputs when… - #521

Merged
AndiLuo merged 22 commits into
masterfrom
add-name-inputs-in-partnerinfomodal
Aug 14, 2026
Merged

feat(PartnerInfoModal): displaying firstName and lastName inputs when…#521
AndiLuo merged 22 commits into
masterfrom
add-name-inputs-in-partnerinfomodal

Conversation

@ashley-osuna

@ashley-osuna Ashley Osuna (ashley-osuna) commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

… either is missing from the user

Description of the change

Description here

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: link
  • 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

@ashley-osuna
Ashley Osuna (ashley-osuna) marked this pull request as ready for review August 14, 2026 19:49
Copilot AI lite review requested due to automatic review settings August 14, 2026 19:49

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

This PR updates the SQM Partner Info Modal to collect firstName/lastName when they’re missing from the participant’s user record, ensuring the Impact connection mutation receives names.

Changes:

  • Add firstName/lastName state + callbacks in the modal hook and include them in startImpactConnection variables.
  • Render conditional First/Last name <sl-input> fields in the modal view and require names for submission.
  • Update the feature spec, Storybook stories, and add a Changesets entry (plus a manual package version bump).

Reviewed changes

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

Show a summary per file
File Description
packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx Adds name field state/validation and passes names into the Impact connection mutation.
packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx Conditionally renders First/Last name inputs and includes them in submit disabled logic.
packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal.feature Documents new scenarios for showing, prefilling, and requiring name inputs.
packages/mint-components/src/components/sqm-partner-info-modal/PartnerInfoModal.stories.tsx Adds/updates stories to demonstrate name-field-related states.
packages/mint-components/package.json Bumps package version to 2.3.1-5.
packages/mint-components/package-lock.json Updates lockfile version metadata to match the package version bump.
packages/mint-components/.changeset/puny-brooms-call.md Adds a minor changeset describing the feature behavior change.
Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file

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

Comment thread packages/mint-components/package.json Outdated
Copilot AI review requested due to automatic review settings August 14, 2026 20:02

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

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

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (4)

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:133

  • shouldDisplayNameFields is stored as boolean | null, but PartnerInfoModalViewProps.states.shouldDisplayNameFields is typed as boolean and the initial null render can briefly hide the name inputs/validation even when the user is missing names. Derive this flag synchronously from user so it’s always a boolean and correct on the first render after userData loads.
  const [shouldDisplayNameFields, setShouldDisplayNameFields] = useState<
    boolean | null
  >(null);
  useEffect(() => {
    if (shouldDisplayNameFields === null && user) {

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:197

  • The new last-name label is hardcoded and uses different casing than the rest of the modal’s localized strings (e.g., intl.formatMessage(...) above). Please use intl.formatMessage here and match the feature/UI copy casing ("Last name").
              label="Last Name"

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:188

  • The new first-name label is hardcoded and uses different casing than the rest of the modal’s localized strings (e.g., intl.formatMessage(...) above). Please use intl.formatMessage here and match the feature/UI copy casing ("First name").

This issue also appears on line 197 of the same file.

              label="First Name"

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal.feature:120

  • This step implies firstName/lastName are always required, but the implementation only requires them when the name inputs are rendered. Update the wording so the feature matches the conditional requirement.
    When any one of (country, currency, allowBankingCollection, firstName, lastName) is missing

This commit was generated by GitHub Actions CI
Copilot AI review requested due to automatic review settings August 14, 2026 20:06

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

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

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (11)

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:133

  • shouldDisplayNameFields is stored as boolean | null and only set in an effect, which introduces an intermediate render where it is still null. During that render the name inputs are hidden and the submit button can be enabled, allowing a submission that sends empty firstName/lastName. Compute this as a derived boolean from user instead of a tri-state state+effect.
  const [shouldDisplayNameFields, setShouldDisplayNameFields] = useState<
    boolean | null
  >(null);
  useEffect(() => {
    if (shouldDisplayNameFields === null && user) {

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:310

  • startImpactConnection now always sends firstName/lastName from local state, even when the name inputs are hidden. On the first render after user loads, those state values can still be empty, causing empty names to be submitted despite the user record having names. Use the user record values when shouldDisplayNameFields is false (and trim user-entered values when true).
        firstName,
        lastName,

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:200

  • Same issue as the first name input: if shouldDisplayNameFields is enabled in a demo/state override but callbacks aren't provided, this will throw. Provide a safe fallback handler (or ensure the demo implementation supplies the callback).
              label="Last Name"
              value={states.lastName}
              onSl-input={callbacks.onLastNameChange}
              disabled={states.submitting}

packages/mint-components/package-lock.json:9

  • The nested package entry version should also match the package version; revert this along with the top-level package-lock.json version if you undo the manual version bump.
    packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:291
  • The submit guard treats whitespace-only values as valid names (e.g. " "). Since these fields are user-entered and required when shown, trim before checking emptiness.
      (shouldDisplayNameFields && (!firstName || !lastName))

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:189

  • The new name field labels are hard-coded strings. Most other user-facing copy in this modal is provided via text props, so these should also be configurable/localizable (e.g., add firstNameLabel/lastNameLabel to text and plumb from sqm-partner-info-modal.tsx).
            <sl-input
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="First Name"
              value={states.firstName}

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:191

  • In demo/state-override contexts, states.shouldDisplayNameFields could be set true without supplying the new callbacks (e.g. useDemoPartnerInfoModal). That would render these inputs and then throw when trying to call an undefined handler. Consider a safe fallback no-op handler here (or ensure all producers always provide the callbacks).

This issue also appears on line 197 of the same file.

              label="First Name"
              value={states.firstName}
              onSl-input={callbacks.onFirstNameChange}
              disabled={states.submitting}

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal.feature:120

  • This step now implies firstName/lastName are always required for enabling submit, but the implementation only requires them when the name inputs are rendered. Update the step text to reflect the conditional requirement to avoid contradicting the behavior described elsewhere in the feature.
    When any one of (country, currency, allowBankingCollection, firstName, lastName) is missing

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal.feature:91

  • The UI labels used by the component are "First Name" / "Last Name" (capitalized). To keep this feature spec aligned with the actual rendered copy (and consistent with other components), update these step strings.
    Then the "First name" input is not rendered
    And the "Last name" input is not rendered

packages/mint-components/package.json:4

  • This package uses Changesets (packages/mint-components/.changeset). Manually bumping package.json to a prerelease (2.3.1-6) alongside a minor changeset is likely to create inconsistent versioning and release output. Typically the version bump is applied by changeset version during release; consider reverting this manual version change.
  "version": "2.3.1-6",

packages/mint-components/package-lock.json:3

  • If the package.json version bump is reverted (recommended when using Changesets), the lockfile top-level version should be reverted as well to keep metadata consistent.

This issue also appears on line 9 of the same file.

Copilot AI review requested due to automatic review settings August 14, 2026 20:53
This commit was generated by GitHub Actions CI

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (4)

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:133

  • shouldDisplayNameFields is stored as boolean | null and returned in states, but PartnerInfoModalViewProps expects a boolean. Keeping it nullable can also briefly skip name validation (e.g. null behaves like false). Prefer deriving a boolean directly from user instead of maintaining separate state.
  const [shouldDisplayNameFields, setShouldDisplayNameFields] = useState<
    boolean | null
  >(null);
  useEffect(() => {
    if (shouldDisplayNameFields === null && user) {

packages/mint-components/package.json:4

  • This PR already adds a Changeset, and the package’s release workflow runs changeset version to update package.json/package-lock versions. Manually bumping the version here is likely to cause churn/merge conflicts with the automated versioning PRs; consider reverting the version change in this feature PR.
  "name": "@saasquatch/mint-components",
  "title": "Mint Components",
  "version": "2.3.1-7",
  "description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal.feature:120

  • This scenario says the submit button is disabled when firstName/lastName are missing, but earlier scenarios explicitly allow submission when the user record already has non-empty names (and the name inputs are hidden). Update this step to only require first/last name when the name inputs are rendered, otherwise the spec contradicts itself.
  @minutia
  Scenario: Submit button is disabled
    Given the partner-info modal is open
    When any one of (country, currency, allowBankingCollection, firstName, lastName) is missing
    Then the submit button is disabled

packages/mint-components/package-lock.json:5

  • If versioning is handled via Changesets, package-lock’s version fields should generally be updated only by changeset version (release workflow), not in a feature PR. Consider reverting these prerelease version edits to keep the lockfile stable until the release/version step runs.

Copilot AI review requested due to automatic review settings August 14, 2026 20:59

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (2)

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:202

  • The newly added name-field labels use title case ("First Name"/"Last Name"), but other Mint components use sentence case for these labels (e.g. sqm-user-info-form.tsx:24-28 defaults to "First name"/"Last name"), and the added .feature text also refers to "First name"/"Last name". Aligning these strings avoids inconsistency and reduces the chance of spec/story tooling looking up fields by label text.
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="First Name"
              value={states.firstName}
              onSl-input={callbacks.onFirstNameChange}
              disabled={states.submitting}
              required
            />
            <sl-input
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="Last Name"
              value={states.lastName}
              onSl-input={callbacks.onLastNameChange}

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:352

  • shouldDisplayNameFields is stored as boolean | null, but PartnerInfoModalViewProps.states.shouldDisplayNameFields is typed as boolean. This also allows a render where userLoading is false but shouldDisplayNameFields is still null, so the modal can briefly render with stale/empty firstName/lastName/publisher values before the effect runs. Consider gating states.loading until the name-field decision has been made for a loaded user, and coerce the exposed state to a boolean.
      open: showModal,
      loading: userLoading || countriesLoading || currenciesLoading,
      submitting: connectLoading,
      shouldDisplayNameFields,
      isExistingPartner,

Copilot AI review requested due to automatic review settings August 14, 2026 21:11

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (3)

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:295

  • shouldDisplayNameFields can be null here (before the effect runs), which means missing first/last name can be skipped and empty names may be submitted. Reorder validation so user is checked first, and compute a boolean mustCollectNames fallback from the loaded user record before enforcing name requirements.

This issue also appears on line 348 of the same file.

  async function onSubmit() {
    if (
      !allowBankingCollection ||
      !countryCode ||
      !currency ||
      (shouldDisplayNameFields && (!firstName || !lastName))
    ) {
      setError(props.missingFieldsErrorText);
      return;
    }
    setError("");

    if (!user) {
      setError(props.networkErrorText);
      return;
    }

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:352

  • PartnerInfoModalViewProps.states.shouldDisplayNameFields is typed as boolean, but the hook returns boolean | null. This can cause type errors and inconsistent UI logic; coerce it to a boolean derived from user when the state hasn't been initialized yet.
      open: showModal,
      loading: userLoading || countriesLoading || currenciesLoading,
      submitting: connectLoading,
      shouldDisplayNameFields,
      isExistingPartner,

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:202

  • The new first/last name input labels are hard-coded strings, while the rest of the modal labels come from text props (and are wrapped with intl.formatMessage in some cases). This makes the new UI text non-localizable/non-customizable compared to the existing API.
            <sl-input
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="First Name"
              value={states.firstName}
              onSl-input={callbacks.onFirstNameChange}
              disabled={states.submitting}
              required
            />
            <sl-input
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="Last Name"
              value={states.lastName}
              onSl-input={callbacks.onLastNameChange}
              disabled={states.submitting}
              required
            />

Copilot AI review requested due to automatic review settings August 14, 2026 21:20
This commit was generated by GitHub Actions CI

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (5)

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:356

  • states.shouldDisplayNameFields is currently set to a boolean | null, but PartnerInfoModalViewProps requires a boolean. Coerce to a boolean when returning view state to avoid type/runtime inconsistencies.
    states: {
      open: showModal,
      loading: userLoading || countriesLoading || currenciesLoading,
      submitting: connectLoading,
      shouldDisplayNameFields,
      isExistingPartner,
      firstName,
      lastName,
      countryCode,

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:287

  • shouldDisplayNameFields can be null during initial render (especially when inModal renders content immediately), which makes the name-required guard effectively skip and can allow submission without first/last name. Default to treating name fields as required until the flag is resolved.

This issue also appears on line 348 of the same file.

  async function onSubmit() {
    if (
      !allowBankingCollection ||
      !countryCode ||
      !currency ||
      (shouldDisplayNameFields && (!firstName || !lastName))
    ) {
      setError(props.missingFieldsErrorText);
      return;

packages/mint-components/package-lock.json:12

  • package-lock.json is updated only to reflect the manual version bump. If versioning is handled by Changesets (and this PR already adds a changeset), revert this lockfile version change to avoid unnecessary churn.
    packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:204
  • The new name input labels use "First Name" / "Last Name", but the updated feature specs assert "First name" / "Last name". This casing mismatch is likely to break the specs and creates inconsistent UI copy.
        {states.shouldDisplayNameFields && (
          <Fragment>
            <sl-input
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="First Name"
              value={states.firstName}
              onSl-input={callbacks.onFirstNameChange}
              disabled={states.submitting}
              required
            />
            <sl-input
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="Last Name"
              value={states.lastName}
              onSl-input={callbacks.onLastNameChange}
              disabled={states.submitting}
              required

packages/mint-components/package.json:6

  • This PR includes a Changeset for mint-components, so the version bump should be handled by the Changesets release flow ("Version Packages" PR) rather than manually editing package.json. Keeping the manual prerelease version here can cause confusing release history and conflicts with the automated workflow described in packages/mint-components/readme.md.
{
  "name": "@saasquatch/mint-components",
  "title": "Mint Components",
  "version": "2.3.1-9",
  "description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
  "icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",

Copilot AI review requested due to automatic review settings August 14, 2026 21:25

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

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (4)

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:200

  • The feature specs refer to a "Last name" input; the label here is "Last Name" (capital N). Aligning the label text with the spec avoids brittle test failures and keeps UI copy consistent.
              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="Last Name"
              value={states.lastName}
              onSl-input={callbacks.onLastNameChange}
              disabled={states.submitting}

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:353

  • shouldDisplayNameFields is stored as boolean | null but is returned in states where PartnerInfoModalViewProps expects a boolean. This can cause a type mismatch and also leaks null into the view layer (where it’s used in boolean expressions). Coerce to a boolean when returning view props (or make the state non-nullable).
      loading: userLoading || countriesLoading || currenciesLoading,
      submitting: connectLoading,
      shouldDisplayNameFields,
      isExistingPartner,

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:191

  • The feature specs refer to a "First name" input; the label here is "First Name" (capital N). If tests/selectors depend on the label text, this will fail and it’s also inconsistent with the spec copy.

This issue also appears on line 195 of the same file.

              exportparts="label: input-label, base: input-base"
              class={sheet.classes.NameInput}
              label="First Name"
              value={states.firstName}
              onSl-input={callbacks.onFirstNameChange}
              disabled={states.submitting}

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal.feature:121

  • This scenario now says firstName/lastName being missing should always disable submit, but the implementation only requires them when the name inputs are rendered (i.e. when the user record is missing either name). As written, the scenario will be false for users who already have both names (inputs hidden). Consider keeping this generic scenario focused on country/currency/allowBankingCollection, since name-required behavior is already covered above.
  Scenario: Submit button is disabled
    Given the partner-info modal is open
    When any one of (country, currency, allowBankingCollection, firstName, lastName) is missing
    Then the submit button is disabled

Comment thread packages/mint-components/package.json Outdated
Copilot AI review requested due to automatic review settings August 14, 2026 22:10

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (7)

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:197

  • Label casing here is inconsistent with other components in this repo (they use "Last name") and with the feature spec text. Prefer sentence case for consistency.
              label="Last Name"

packages/mint-components/package-lock.json:10

  • The root package entry under packages[""] also has version 2.3.1-9, which is inconsistent with package.json (2.3.1). Keeping these aligned avoids unexpected diffs and versioning issues.
    packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:214
  • Name presence checks treat whitespace-only values as valid. Elsewhere in this repo, required string validation trims whitespace (e.g. sqm-user-info-form/useUserInfoForm.tsx:332). Consider trimming here so " " triggers name inputs and doesn’t bypass required validation.
    if (initialized || !user) return;
    setShouldDisplayNameFields(!user.firstName || !user.lastName);
    setFirstName(user.firstName || "");
    setLastName(user.lastName || "");

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:287

  • Submit validation can be bypassed with whitespace-only first/last names when the name fields are rendered. Align with the repo’s required-string checks by trimming before validating.
    if (
      !allowBankingCollection ||
      !countryCode ||
      !currency ||
      (shouldDisplayNameFields && (!firstName || !lastName))
    ) {
      setError(props.missingFieldsErrorText);

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:188

  • Label casing here is inconsistent with other components in this repo (they use "First name" / "Last name") and with the feature spec text. Using sentence case also improves consistency for UI copy.

This issue also appears on line 197 of the same file.

              label="First Name"

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:293

  • Button enablement treats whitespace-only first/last names as valid when name fields are shown, which can allow submit to proceed with effectively empty values. Trim the values in the disabled predicate to match required-field behavior elsewhere in the repo.
        disabled={
          states.submitting ||
          !states.countryCode ||
          !states.currency ||
          !states.allowBankingCollection ||
          (states.shouldDisplayNameFields &&
            (!states.firstName || !states.lastName))
        }

packages/mint-components/package-lock.json:4

  • package-lock.json top-level version is 2.3.1-9, but packages/mint-components/package.json is still 2.3.1. This mismatch can cause confusing publish/install behavior; the lockfile should reflect the package version tracked in package.json (or both should be updated together via the versioning workflow).

This issue also appears on line 7 of the same file.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 14, 2026 22:17

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • packages/mint-components/package-lock.json: Generated file
Suppressed comments (5)

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:197

  • The feature specs reference the label text "Last name" (sentence case). This input currently uses "Last Name" which can break label-based tests and is inconsistent with other labels.
              label="Last Name"

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:292

  • The submit button enable/disable logic treats whitespace-only names as valid because it checks raw truthiness. If the intent is "non-empty" names, trimming avoids allowing " " to pass validation.
          (states.shouldDisplayNameFields &&
            (!states.firstName || !states.lastName))

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:284

  • onSubmit validation treats whitespace-only names as valid. If names are required when fields are shown, consider trimming before checking emptiness to prevent submitting " ".
      (shouldDisplayNameFields && (!firstName || !lastName))

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:188

  • The feature specs reference the label text "First name" (sentence case). This input currently uses "First Name" which can break label-based tests and is inconsistent with other labels.

This issue also appears in the following locations of the same file:

  • line 197
  • line 291
              label="First Name"

packages/mint-components/src/components/sqm-partner-info-modal/usePartnerInfoModal.tsx:210

  • The one-time initialized guard prevents this hook from re-syncing if user changes (e.g., refetch returns updated profile/publisher data), and it also adds extra state that can be avoided. Keying the initialization off user.id and only seeding firstName/lastName when still empty keeps the fields editable without permanently opting out of updates.

This issue also appears on line 284 of the same file.

  const [initialized, setInitialized] = useState(false);
  
  useEffect(() => {
    if (initialized || !user) return;
    setShouldDisplayNameFields(!user.firstName || !user.lastName);

Comment thread packages/mint-components/package-lock.json
Copilot AI review requested due to automatic review settings August 14, 2026 22:26

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (2)

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:197

  • The feature spec expects a "Last name" input, but the label here is "Last Name". Aligning the casing avoids spec/test mismatches and keeps UI copy consistent.
              label="Last Name"

packages/mint-components/src/components/sqm-partner-info-modal/sqm-partner-info-modal-view.tsx:188

  • The feature spec in sqm-partner-info-modal.feature refers to a "First name" input, but the rendered label here is "First Name". If tests/selectors rely on the label text (and to keep copy consistent), update this to sentence case (and ideally source it from text/i18n like other labels).

This issue also appears on line 197 of the same file.

              label="First Name"

@AndiLuo
AndiLuo merged commit cf9bbb1 into master Aug 14, 2026
12 of 13 checks passed
@AndiLuo
AndiLuo deleted the add-name-inputs-in-partnerinfomodal branch August 14, 2026 22:37
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