Skip to content

Improve validation and error feedback for Co-Authors input - #21821

Closed
hi2242 wants to merge 1 commit into
desktop:developmentfrom
hi2242:issue-21736
Closed

hi2242 wants to merge 1 commit into
desktop:developmentfrom
hi2242:issue-21736

Conversation

@hi2242

@hi2242 hi2242 commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Add validation to the Co-Authors input field to display error messages in two scenarios:

  • When a user attempts to add their own account (preventing self-assignment).
  • When a user tries to add a co-author that has already been added (preventing silent failures on duplicates).

This provides clear visual feedback and prevents logical redundancies.

Closes #21736

Description

This PR introduces explicit validation for the Co-Authors input field to prevent logical redundancies and improve UX by eliminating silent failures.

Currently, the app allows users to add their own account as a co-author, and silently ignores attempts to add duplicate co-authors without any visual feedback. While the raw Git CLI permits these, GitHub Desktop as a GUI should provide clearer guardrails.

Changes made:

Self-assignment prevention: Added validation to check if the entered handle matches the currently logged-in user. If it does, the UI now explicitly prevents the addition and displays an error state (warning message). (app\src\ui\autocompletion\user-autocompletion-provider.tsx, app\src\ui\lib\author-input\author-input.tsx)

Duplicate prevention feedback: Modified the logic so that when a user attempts to add an already existing co-author, the action is no longer silently ignored. Instead, it triggers an error state to clearly inform the user why the action was rejected. (app\src\ui\lib\author-input\author-input.tsx)

This provides users with immediate, clear visual feedback and prevents unnecessary confusion.

Screenshots

Before

UX.non-sense.in.Co-Authors.Before.mp4

After

UX.non-sense.in.Co-Authors.After.mp4

Release notes

Notes: Added validation and error feedback when attempting to add yourself or a duplicate user as a co-author.

Add validation to the Co-Authors input field to display error messages in two scenarios:
- When a user attempts to add their own account (preventing self-assignment).
- When a user tries to add a co-author that has already been added (preventing silent failures on duplicates).

This provides clear visual feedback and prevents logical redundancies.

Fixes desktop#21736
@github-actions github-actions Bot added unmet-requirements external Pull request originating outside of the Desktop core team needs-triage labels Mar 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request! Unfortunately, it doesn't meet the minimum requirements for review:

  • None of the referenced issues have the help wanted label

Please update your PR to address the above. Requirements:

  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123 if it resolves the issue)

This PR will be automatically closed in 7 days if these requirements are not met.

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

Labels

external Pull request originating outside of the Desktop core team unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve UX for Co-Authors: Prevent self-assignment and provide duplicate warning

1 participant