Skip to content

Refactor/dispute reason shared limit#341

Merged
mikewheeleer merged 8 commits into
Talenttrust:mainfrom
Unclebaffa:refactor/dispute-reason-shared-limit
Jun 29, 2026
Merged

Refactor/dispute reason shared limit#341
mikewheeleer merged 8 commits into
Talenttrust:mainfrom
Unclebaffa:refactor/dispute-reason-shared-limit

Conversation

@Unclebaffa

Copy link
Copy Markdown
Contributor

Summary of Work

  1. Shared Logic: Created a shared module disputeReason.ts containing the DISPUTE_REASON_MAX_LENGTH limit and a validation function validateDisputeReason(), covered by unit tests in disputeReason.test.ts.
  2. ActionPanel Refactor:
    • Integrated the shared validator in ActionPanel.tsx.
    • Fixed pre-existing undefined references (previousConfirmActionRef, disputeTriggerRef, and isOverLimit) to restore compilation and proper keyboard focus restoration.
    • Updated the visual character counter and screen-reader live region copy format from "X / 500 characters remaining" to "X of 500 characters".
    • Cleaned up unused references to comply with strict ESLint lint rules.
  3. Tests & Coverage: Updated component test assertions in ActionPanel.test.tsx. Impacted modules exceed 96% statement coverage (above the 95% minimum requirement).
  4. Documentation: Documented the shared validator and counter format in ActionPanel.md.

For a detailed review, please see the walkthrough.md artifact.

Closes #305

@mikewheeleer

Copy link
Copy Markdown
Contributor

love this — thanks for picking it up 🙌

@mikewheeleer mikewheeleer merged commit b82059f into Talenttrust:main Jun 29, 2026
1 check passed
@Unclebaffa Unclebaffa deleted the refactor/dispute-reason-shared-limit branch June 29, 2026 20:52
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.

Make the dispute reason max-length a shared constant and surface it in the character counter copy

2 participants