Skip to content

Make the Copilot commit mascot keyboard accessible - #23125

Merged
sergiou87 merged 1 commit into
sergiou87-assisted-commit-performancefrom
fix-copilot-mascot-accessibility
Nov 4, 2026
Merged

sergiou87 merged 1 commit into
sergiou87-assisted-commit-performancefrom
fix-copilot-mascot-accessibility

Conversation

@sergiou87

@sergiou87 sergiou87 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

No public tracking issue. Stacked on #23124.

Description

  • Replace the pointer-only Copilot mascot with a named native button. Enter and Space trigger the existing reactions and celebration streak.
  • Preserve the mascot's appearance and expose a visible keyboard focus ring. Keep focus while reactions are unavailable during thinking, using aria-disabled and the existing activation guard.
  • Keep animation, sparkles, and shadow hidden from assistive technology without hiding the button. Remove both accessibility lint suppressions.
  • Add regression coverage for button semantics, focus, celebration, and busy-state reactions.

Screenshots

Keyboard focus ring around the Copilot commit mascot

Actual component rendered in Edge with application styles; not a full Electron app screenshot.

Validation

Revision: 265810087bb6d144fb158771c1369f6a3c1238a0.

  • GIT_CONFIG_PARAMETERS="${GIT_CONFIG_PARAMETERS-} 'safe.bareRepository=all'" corepack yarn test — passed: 3,569 tests passed, 2 skipped, 0 failures. The process-only override allows temporary bare test repositories; persistent Git configuration was not changed.
  • corepack yarn lint — passed.
  • corepack yarn tsc --noEmit — passed.
  • Playwright component check in Edge — passed: Tab focus, visible focus ring, unchanged 48×48 size, Enter and Space activation, five-activation celebration, and focus retention with blocked reactions while thinking.

For manual testing, enter Copilot commit mode, Tab to Animate Copilot, activate with Enter or Space, and activate five times rapidly to trigger celebration. During a commit run, the control should remain focused but not react.

Full Electron app and screen-reader testing were not performed.

Team-authored review

Evidence: Validation and screenshot above cover the committed revision.

Review path: Lightweight review. The author has assessed the change and evidence. This change only affects mascot interaction, styling, and component tests; it does not change commit execution or trust boundaries.

Release notes

Notes: no-notes

@sergiou87
sergiou87 added this pull request to stack #22992 November 4, 2026 16:54
@sergiou87
sergiou87 marked this pull request as ready for review November 4, 2026 16:57
@sergiou87
sergiou87 requested a review from a team as a code owner November 4, 2026 16:57
@sergiou87
sergiou87 requested review from BagToad and a balanced review from Copilot November 4, 2026 16:57

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.

🟢 Approval recommended

No active review issues are reported for the Copilot commit mascot’s keyboard-accessibility changes.

No open issues 🎉

What changed in this PR

Makes the Copilot commit mascot keyboard accessible while preserving its appearance and existing reactions.

Changes:

  • Replaces the pointer-only mascot with a named native button supporting Enter and Space.
  • Adds focus styling and retains focus while reactions are blocked during thinking, keeping decorative elements hidden from assistive technology.
  • Adds regression coverage for button semantics, focus retention, activation, celebration, and busy-state behavior.
File Description
app/​test/​unit/​ui/​copilot-commit-panel-test.tsx Updates accessibility assertions to distinguish the button from decorative animation.
app/​test/​unit/​ui/​copilot-animation-test.tsx Tests button semantics, focus, reactions, celebration, and busy-state handling.
app/​styles/​ui/​changes/​_copilot-commit-panel.scss Preserves mascot styling and adjusts focus outline spacing and disabled cursor.
app/​src/​ui/​changes/​copilot-commit-panel.tsx Introduces the named button and scopes accessibility hiding to decorative elements.

Review effort: Balanced

Replace the pointer-only mascot with a named native button so Enter and Space trigger the existing reactions. Preserve focus while Copilot is busy, keep decorative animation hidden from assistive technology, and remove the accessibility lint suppressions.

Cover button semantics, focus, celebration streaks, and busy-state reaction guards with component tests.
@sergiou87
sergiou87 force-pushed the fix-copilot-mascot-accessibility branch from 2658100 to 9b13fc1 Compare November 4, 2026 18:00

@tidy-dev tidy-dev 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.

💖

@sergiou87
sergiou87 enabled stacked auto-merge November 4, 2026 18:21
@sergiou87
sergiou87 merged commit 5c43eb4 into development Nov 4, 2026
9 checks passed
@sergiou87
sergiou87 deleted the fix-copilot-mascot-accessibility branch November 4, 2026 18:53
bahooo22 added a commit to bahooo22/github_desktop that referenced this pull request Nov 14, 2026
RU: Мерж апстрима a95e13a — переход на npm, версия 3.6.11-beta1

Апстрим влил 84 коммита, главный из которых — PR desktop#22983, миграция с yarn на npm:
удалён вендоренный yarn и все yarn.lock, добавлены package-lock.json, .npmrc и
обёртки script/npm.ts. Заодно пришли Copilot assisted commit (PR desktop#23132, desktop#23125,
desktop#23059) и dependabot ansi-regex. Наш готовый мерж PR desktop#23044 (1527ef6) принят
первым родителем.

Что изменено?
- `package.json` (+35/-27): апстримный блок scripts в npm-форме, `engines` node
  >=22.12.0 и npm >=11.17.0, `overrides` вместо `resolutions`; форковые
  `l10n:parity`, `l10n:audit`, `l10n:upstream`, `l10n:bundles` и
  `release-build-info` сохранены внутри нового блока, ссылок на yarn в scripts нет.
- `package-lock.json` (+17484/-0) и `app/package-lock.json` (+4163/-0): локи
  апстрима приняты без правок — иначе `npm ci` не пройдёт; `yarn.lock` (-7272),
  `app/yarn.lock` (-2304) и `vendor/yarn-1.21.1.js` (-147315) удалены апстримом.
- `.github/workflows/ci.yml` (+29/-24): приняты `cache: npm` и
  `cache-dependency-path` по четырём локам, `npm ci` и `npm run …`; поверх
  возвращён форковый кеш встроенного Git (dugite) с ключом по
  `hashFiles('app/package-lock.json')` и три попытки установки вокруг `npm ci`.
- `.github/actions/setup-ci-environment/action.yml` (+11/-18): апстримный
  `npm ci` с `npm_config_arch`, форковый повтор установки сохранён; шаг
  `yarn add --optional` для cross-arch Copilot SDK удалён — npm ставит нужный
  runtime сам через `--cpu`.
- `app/src/lib/stores/app-store.ts` (+1487/-380): принят апстримный
  `performPush`; блоки, где жили `t('appStore.pushingTo')` и подписи
  fast-forward, апстрим вынес из этого места, поэтому конфликт снят удалением
  наших блоков, импорт `t` из `../l10n/core` и остальные 10 вызовов на месте.
- `app/src/ui/changes/commit-message.tsx` (+845/-291): файл переписан апстримом
  (режимы коммита, `DropdownSelectButton`, `CopilotCommitPanel`); из нашей
  версии возвращены 42 вызова `t()` — заголовок кнопки и «последний коммит»,
  тексты хуков, подсказки длины summary, статус «Committed Just now», бейдж New,
  выбранные файлы и требование summary; импорт `t` добавлен заново.
- `app/src/ui/clone-repository/clone-repository.tsx` (+42/-0) и
  `app/src/ui/add-repository/create-repository.tsx` (+129/-40): объединены
  импорты — наш `t`/`Trans` плюс апстримные `canonicalMutationPath`,
  `isRepositoryAffectedByAssistedCommit`, `withoutRepositoryGitAccess`.
- `app/src/ui/lib/author-input/author-handle.tsx` (+19/-3): апстримная подпись
  с `instruction`; фраза «press backspace…» вынесена в новый ключ
  `authorHandle.removeInstruction`, «Remove {author}» — в
  `authorHandle.removeAriaLabel`.
- `app/src/ui/lib/author-input/author-input.tsx` (+157/-40): принята апстримная
  логика `pendingAuthorResolutions`; импорты `t` и `arrayEquals` объединены.
- `app/src/ui/worktrees/worktree-list-item-context-menu.ts` (+5/-2): объединены
  импорты `t` и `isRepositoryAffectedByAssistedCommit`.
- Остальные 237 файлов — правки апстрима без форкового пересечения.

Зачем?
Апстрим сменил пакетный менеджер: yarn в репозитории больше нет, установка идёт
через `npm ci`, а скрипты — через `npm run`. Без резолва форк остался бы с
yarn-вызовами в CI и релизных workflow, которые этот мерж ломает. Одновременно
появилась новая механика коммита через Copilot, и её строки надо было вернуть в
слой перевода, иначе эти экраны остались бы на английском.

Замеры?
Сняты на хосте, контейнер ещё не переведён на npm. `git merge --no-ff` дал 9
контентных конфликтов против 9 предсказанных `git merge-tree`; маркеров
конфликта в `app/src`, `app/locales`, `script`, `docs`, `.github` и
`package.json` — 0; `git diff --check` чист. Форковые скрипты в `package.json`
проверены разбором JSON: `l10n:parity/audit/upstream/bundles` и
`release-build-info` присутствуют, ни один script не содержит `yarn`. Точных
`t()`-вызовов: 10 в `app-store.ts`, 42 в `commit-message.tsx`; импорт `t`
добавлен там, где апстримная версия его не содержала. Локи не правились:
`git diff --cached --numstat 1527ef6 -- package-lock.json app/package-lock.json`
показывает только добавления апстрима. Итог мержа — 246 файлов,
+81 728/-160 879.

Принятый остаток?
Гейты не сняты: `tsc --noEmit`, `npm test`, `l10n:parity/audit/upstream/bundles`,
`lint`, `markdownlint` и `test:script` требуют контейнера на npm — его перевод и
пересборка идут следующим коммитом. Форматирование Prettier не прогонялось.
Восемь новых строк Copilot-панели и ещё около десяти краевых (`commitMessage.*`,
`authorHandle.*`) пока литералы: они переводятся отдельными коммитами, поэтому
`l10n:audit` временно покажет рост. `tlh` и `qya` для этих строк получат
перевод, а не заглушки. Пуш — за пользователем.

Итог
Дерево догнало апстрим по структуре: npm-миграция принята, форковые скрипты и
dugite-кеш сохранены, все локализованные экраны удержали перевод после
переписывания `commit-message.tsx` и выбора аккаунта. Проверка типов и тестов —
следующий шаг, до неё коммит считается непринятым.

---

EN: Merge upstream a95e13a - npm migration, version 3.6.11-beta1

Upstream brought 84 commits; the main one is PR desktop#22983, the yarn-to-npm migration:
the vendored yarn and every yarn.lock are gone, package-lock.json, .npmrc and the
script/npm.ts wrappers are in. Copilot assisted commit (PR desktop#23132, desktop#23125,
desktop#23059) and the ansi-regex bump came along. Our finished PR desktop#23044 merge
(1527ef6) is the first parent.

What changed?
- `package.json` (+35/-27): upstream's scripts block in npm form, `engines` node
  >=22.12.0 and npm >=11.17.0, `overrides` instead of `resolutions`; the fork's
  `l10n:parity`, `l10n:audit`, `l10n:upstream`, `l10n:bundles` and
  `release-build-info` survive inside the new block, and no script mentions yarn.
- `package-lock.json` (+17484/-0) and `app/package-lock.json` (+4163/-0):
  upstream locks taken untouched - editing them would break `npm ci`; `yarn.lock`
  (-7272), `app/yarn.lock` (-2304) and `vendor/yarn-1.21.1.js` (-147315) are
  deleted upstream.
- `.github/workflows/ci.yml` (+29/-24): `cache: npm` and `cache-dependency-path`
  for the four locks, `npm ci` and `npm run …` accepted; the fork's embedded Git
  (dugite) cache is restored on top with a key from
  `hashFiles('app/package-lock.json')` and three install attempts around `npm ci`.
- `.github/actions/setup-ci-environment/action.yml` (+11/-18): upstream `npm ci`
  with `npm_config_arch`, the fork's retry kept; the `yarn add --optional`
  cross-arch Copilot SDK step is gone because npm now picks the runtime via
  `--cpu`.
- `app/src/lib/stores/app-store.ts` (+1487/-380): upstream `performPush`
  accepted; the blocks that held `t('appStore.pushingTo')` and the fast-forward
  labels moved elsewhere upstream, so the conflict was resolved by dropping our
  blocks while the `t` import from `../l10n/core` and the other 10 calls stay.
- `app/src/ui/changes/commit-message.tsx` (+845/-291): the file was rewritten by
  upstream (commit modes, `DropdownSelectButton`, `CopilotCommitPanel`); 42 `t()`
  calls are back from our version - button title and "last commit", hook texts,
  summary-length hints, "Committed Just now", the New badge, file selection and
  the required-summary error; the `t` import was re-added.
- `app/src/ui/clone-repository/clone-repository.tsx` (+42/-0) and
  `app/src/ui/add-repository/create-repository.tsx` (+129/-40): imports merged -
  our `t`/`Trans` plus upstream's `canonicalMutationPath`,
  `isRepositoryAffectedByAssistedCommit`, `withoutRepositoryGitAccess`.
- `app/src/ui/lib/author-input/author-handle.tsx` (+19/-3): upstream's label with
  an `instruction`; the "press backspace…" phrase moved to the new
  `authorHandle.removeInstruction` key and "Remove {author}" to
  `authorHandle.removeAriaLabel`.
- `app/src/ui/lib/author-input/author-input.tsx` (+157/-40): upstream's
  `pendingAuthorResolutions` logic accepted; `t` and `arrayEquals` imports
  merged.
- `app/src/ui/worktrees/worktree-list-item-context-menu.ts` (+5/-2): `t` and
  `isRepositoryAffectedByAssistedCommit` imports merged.
- The remaining 237 files are upstream edits with no fork overlap.

Why?
Upstream switched package managers: yarn no longer exists in the repository,
installs go through `npm ci` and scripts through `npm run`. Without this
resolution the fork would keep yarn calls in CI and release workflows that this
merge breaks. At the same time Copilot gained a new commit flow whose strings had
to be returned to the translation layer, or those screens would stay English.

Verified
Measured on the host; the container is not on npm yet. `git merge --no-ff`
produced 9 content conflicts against 9 predicted by `git merge-tree`; conflict
markers in `app/src`, `app/locales`, `script`, `docs`, `.github` and
`package.json`: 0; `git diff --check` is clean. Fork scripts in `package.json`
were checked by parsing the JSON: `l10n:parity/audit/upstream/bundles` and
`release-build-info` are present and no script contains `yarn`. Strict `t()`
calls: 10 in `app-store.ts`, 42 in `commit-message.tsx`; the `t` import was
re-added wherever upstream's version lacked it. Locks were not edited:
`git diff --cached --numstat 1527ef6 -- package-lock.json app/package-lock.json`
shows upstream additions only. The merge itself is 246 files, +81 728/-160 879.

Accepted remainder
Gates are not taken: `tsc --noEmit`, `npm test`, `l10n:parity/audit/upstream/bundles`,
`lint`, `markdownlint` and `test:script` need an npm-based container, whose
conversion and rebuild are the next commit. Prettier was not run. Eight new
Copilot-panel strings and about ten edge ones (`commitMessage.*`,
`authorHandle.*`) are still literals: they get their own translation commits, so
`l10n:audit` will temporarily show growth. `tlh` and `qya` will receive real
translations, not stubs. Pushing stays with the author.

Result
The tree caught up structurally: the npm migration is in, fork scripts and the
dugite cache survive, and every localized screen kept its translation after
`commit-message.tsx` and the account picker were rewritten. Type-checking and
tests are the next step; until then this commit is not accepted.
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.

3 participants