Skip to content

Clone with a single GitHub tab and account picker - #23044

Merged
niik merged 14 commits into
niik-publish-account-pickerfrom
niik-clone-account-picker
Nov 3, 2026
Merged

niik merged 14 commits into
niik-publish-account-pickerfrom
niik-clone-account-picker

Conversation

@niik

@niik niik commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Part of the multi-account stack (#23020 → #23021 → #23022 → #23023 → #23024 → this). Closes the remaining gaps in #383 (Clone repositories across accounts).

Description

One GitHub tab with an account picker

  • Clone Repository now has two tabs: GitHub and URL. The GitHub.com and GitHub Enterprise tabs are gone. CloneRepositoryTab is now GitHub | Generic. The selected tab was only ever kept in AppStore memory, so there's no saved value to migrate. Entry points that open the dialog with a URL (showCloneRepo(url), openOrCloneRepository) already target the URL tab.
  • The GitHub tab always shows the shared AccountPicker with groupByHost (GitHub.com first, then one heading per enterprise hostname), even when only one account is signed in.
  • There's no sign-in link under the picker. Additional accounts are signed in from Settings.
  • With no accounts signed in, the tab shows the Sign in prompt and a "Sign in to GitHub Enterprise" link, the same as Publish. After a successful sign-in the dialog selects the new account.
  • Initial account: the account picked in Clone earlier in this app session. It's kept in AppStore next to the selected tab and stores only { endpoint, login }. If that account has signed out, or nothing was picked yet, the first account in picker order is used.
  • The repository list follows the selected account. Switching accounts, or the selected account signing out while the dialog is open, clears the selected repository and filter so you can't clone a repository listed for a different account.
  • Clone captures the selected tab and account when it's pressed, and the dialog is disabled while the repository is looked up, so changing accounts mid-lookup can't pair one account's repository with another account.
  • Cloning from this tab works as before: it uses the repository's HTTPS clone_url and passes account, so only the selected account is used and associated.

URL tab fix

Before cloning, the URL tab looked the repository up with only the first account on the URL's host, or anonymously, and blocked the clone with "We couldn't find that repository…" if that lookup failed. As a result:

  • a URL that only the second account on a host could access was blocked;
  • an SSH URL to a private GitHub.com repository that no signed-in account could see was blocked, even though the user's SSH keys would work. This also contradicted docs/technical/oauth.md.

The new resolveURLCloneInfo helper (app/src/lib/clone-info.ts) tries every signed-in account on the URL's host, then anonymous access for GitHub.com, and keeps the URL's protocol. If none of them can see the repository:

  • an SSH URL is cloned as entered, stays unassociated and keeps its SSH remote;
  • an HTTPS URL still shows the existing access error.

owner/name shortcuts and URLs for hosts with no signed-in account behave as before. Choosing between several accounts with access and associating the result after the clone was already handled by AppStore._clone and is unchanged.

#383 scenario checklist

  • One authenticated GitHub tab with an account picker, plus a separate URL tab
  • Selecting an account lists that account's repositories
  • Cloning from the GitHub tab uses the HTTPS URL and associates the selected account
  • A URL clone accessible to exactly one account keeps its protocol and associates that account (store logic was already there; the dialog no longer blocks it)
  • Multiple matching accounts → account choice (existing chooseAccountForRemoteRepository)
  • Inaccessible HTTPS URL → access error
  • Unmatched SSH clone succeeds, stays unassociated and keeps its SSH remote

Screenshots

GitHub tab, defaulting to the first account:
Clone dialog with GitHub and URL tabs, account picker set to @niik on GitHub.com

Account picker grouped by host:
Open account picker with a GitHub.com heading listing @niik and @niik-work and a ghe.example.com heading listing @molsson

Enterprise account selected, with its repositories listed:
Clone dialog with @molsson on ghe.example.com selected, listing molsson/infra and platform/deploy-tools, with molsson/infra selected

URL tab:
URL tab with the repository URL field and local path

(Screenshots use temporary fake accounts and repositories that are not part of this branch. They were taken before the "Sign in to another account…" link under the picker was removed.)

Tests

  • app/test/unit/clone-info-test.ts: tries accounts on the host in order, keeps the SSH protocol, falls back to anonymous access, clones SSH as entered when nothing has access, returns null for HTTPS when nothing has access, ignores accounts on other hosts, falls back when a lookup errors.
  • app/test/unit/ui/multi-account-pickers-test.tsx: tab structure and host headings, initial account (last picked, or fallback when it signed out), sign-in prompt with no accounts, the list follows the selected account and cloning sends the HTTPS URL and selected account, switching accounts clears the selection.
  • app/test/unit/ui/clone-repository-test.tsx: the URL tab clones an inaccessible SSH URL unassociated and shows the access error for an inaccessible HTTPS URL; the GitHub tab has no sign-in link, clears the selection when the selected account signs out or the account changes under an active filter, and clones with the account selected when Clone was pressed even if it changes during the lookup.

Type-check, the full unit test suite, ESLint and Prettier all pass.

Release notes

Notes: [Improved] Clone Repository has a single GitHub tab with an account picker covering all signed-in accounts

Replace the GitHub.com / GitHub Enterprise tabs in Clone Repository with one
GitHub tab whose account picker groups signed-in accounts by host, next to
the existing URL tab. The tab starts out on the account last picked during
the session (kept in AppStore alongside the selected tab), otherwise on the
first account in picker order. Switching accounts clears the selected
repository, and signing in from the dialog selects the new account.

Before cloning from the URL tab, look the repository up with every signed-in
account on the URL's host (then anonymously for GitHub.com) instead of only
the first one, preserving the URL's protocol. When no account can see the
repository an SSH URL is cloned as entered, since the user's SSH
configuration may still grant access, while an HTTPS URL keeps failing with
the access error.

Co-authored-by: Copilot App <[email protected]>
@niik
niik added this pull request to stack #23045 October 19, 2026 10:02
Copilot AI balanced review requested due to automatic review settings October 19, 2026 10:42

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.

🟡 Changes recommended

Account changes can retain stale clone targets or leave filtered repositories selected while cloning remains disabled.

2 open issues
What changed in this PR

Unifies repository cloning across signed-in accounts and improves URL cloning for multi-account and SSH access.

Changes:

  • Replaces host-specific tabs with GitHub and URL tabs, adding a grouped account picker.
  • Remembers account selection and expands URL access checks.
  • Adds regression tests and updates documentation.
File Description
docs/​technical/​oauth.md Documents account selection and URL cloning.
docs/​process/​testing.md Updates clone testing checklist.
app/​test/​unit/​ui/​multi-account-pickers-test.tsx Tests account selection and repository lists.
app/​test/​unit/​ui/​clone-repository-test.tsx Tests inaccessible SSH and HTTPS URLs.
app/​test/​unit/​clone-info-test.ts Tests URL resolution and fallbacks.
app/​styles/​ui/​_add-repository.scss Styles sign-in links.
app/​src/​ui/​dispatcher/​dispatcher.ts Dispatches account selection changes.
app/​src/​ui/​clone-repository/​clone-repository.tsx Unifies tabs and integrates account selection.
app/​src/​ui/​clone-repository/​clone-github-repository.tsx Displays grouped picker and sign-in link.
app/​src/​ui/​app.tsx Passes remembered account selection.
app/​src/​models/​clone-repository-tab.ts Defines the two clone tabs.
app/​src/​lib/​stores/​app-store.ts Remembers the selected account.
app/​src/​lib/​clone-info.ts Resolves URLs across matching accounts.
app/​src/​lib/​app-state.ts Exposes clone account selection.

Review effort: Balanced

niik and others added 4 commits October 19, 2026 14:56
Clear the GitHub tab's selected repository, filter text and URL whenever the
account it browses changes, whether picked or because the selected account
was signed out while the dialog was open. Previously a sign-out kept the old
repository selected under the fallback account, possibly on another host,
and an active filter made the list silently reselect a repository shared by
both accounts after the URL had been cleared, leaving Clone disabled.

The account the tab state belongs to is tracked so that picking an account
resets the tab only once, even though the pick also arrives through props.

Co-authored-by: Copilot App <[email protected]>
Capture the selected tab and account before resolving the repository so
changing accounts during the lookup can't pair one account's repository
with another account, and disable the dialog while loading.

Co-authored-by: Copilot App <[email protected]>
Users can sign in to other accounts from Settings.

Co-authored-by: Copilot App <[email protected]>
…cker

Use the shared groupAccountsByHost helper for the Clone account order.

Co-authored-by: Copilot App <[email protected]>
@niik
niik marked this pull request as ready for review October 19, 2026 15:06
@niik
niik requested a review from a team as a code owner October 19, 2026 15:06
@niik
niik requested a review from babakks October 19, 2026 15:06
niik and others added 8 commits October 20, 2026 12:22
Use remoteMatchesEndpoint so an HTTPS URL on a GitHub Enterprise server's
non-default port resolves to the account on that port, while SSH URLs
still match by hostname.

Co-authored-by: Copilot App <[email protected]>

@sergiou87 sergiou87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested it and works as expected!

@niik
niik merged commit 2d36510 into development Nov 3, 2026
9 checks passed
@niik
niik deleted the niik-clone-account-picker branch November 3, 2026 09:38
lucienlmy pushed a commit to lucienlmy/Github-desktop that referenced this pull request Nov 11, 2026
With only one signed-in account the picker offers no choice, takes space
from the repository list and steals initial focus from the filter box.
Show it only when more than one account is signed in, as before desktop#23044
and as the no-repositories view does.

Co-authored-by: Copilot App <[email protected]>
bahooo22 added a commit to bahooo22/github_desktop that referenced this pull request Nov 14, 2026
RU: Мерж апстрима PR desktop#23044 — выбор аккаунта, резолв 11 локализованных файлов

Замечание о проверке: гейты НЕ сняты. Контейнер закрыт, на хосте `node` отсутствует,
поэтому `tsc --noEmit`, `yarn test`, `yarn l10n:parity`, `l10n:audit`, `l10n:upstream`,
`l10n:bundles`, `yarn lint` и `yarn markdownlint` по этому дереву не измерялись. Ниже
приведены только меры, снятые на хосте (git, python, grep). В релиз это дерево брать
нельзя, пока полный набор не станет зелёным.

Что изменено?
- `app/src/ui/account-picker.tsx` (+91/-29): принята апстримная версия целиком
  (`renderButtonContent`, `groupAccountsByHost`, `getItemAriaLabel`), в неё возвращён
  `t('account-picker.account')` и добавлены два ключа для заголовка и заглушки
  пикера; `contentTitle` больше не литерал.
- `app/src/ui/clone-repository/clone-repository.tsx` (+251/-188): апстрим убрал вкладки
  GitHub.com/Enterprise и ввёл `resolveCloneInfo` с единым списком аккаунтов; принята
  его структура, возвращены 13 вызовов `t()`, ссылки входа в Enterprise вынесены в
  новый ключ `cloneRepository.sign-in-to-enterprise`.
- `app/src/ui/preferences/accounts.tsx` (+49/-33): группировка аккаунтов по хосту от
  апстрима, перевод возвращён в заголовки `h2`, кнопки «добавить», кнопку выхода и оба
  `CallToAction`; для новой кнопки GitHub.com заведён `settings.accounts.add-dotcom`.
- `app/src/ui/sign-in/sign-in.tsx` (+23/-50): шаг `ExistingAccountWarning` из диалога
  удалён апстримом, вместо него `state.expected-login`; модульные константы заголовков
  заменены на `t()` при рендере, текст про редирект остался функцией
  `getBrowserSignInInfoContent()`, чтобы смена языка доходила до подписи.
- `app/src/ui/lib/sign-in.tsx` (+5/-35): принята апстримская версия — метод
  `renderExistingAccountWarningStep` удалён вместе с импортами `Ref`, `getHTMLURL`
  и `Trans`, которые больше не используются.
- `app/src/ui/repository-settings/repository-settings.tsx` (+95/-15): апстрим добавил
  выбор аккаунта репозитория; возвращены заголовок, четыре вкладки, `okButtonText` и
  три существующих текста ошибок, для новой ошибки сохранения аккаунта заведён
  `repositorySettings.error-save-account`.
- `app/src/ui/publish-repository/publish.tsx` (+163/-276): диалог публикации перешёл на
  единый вход с ссылкой на Enterprise; `title`, `signInTitle`, `okButtonText` и описание
  возвращены в `t()`, значение `publish.dotcom-sign-in-description` обновлено под новый
  апстримный текст («…to publish your repository»).
- `app/src/ui/preferences/test-token-expiration-dialog.tsx` (+26/-14): принята апстримская
  логика `getAccountKey`/`accountKey`, все 26 ключей группы возвращены в `t()`;
  `presets` оставлен геттером, а не модульным массивом, и `key` у кнопок — `preset.id`.
- `app/src/ui/invalidated-token/invalidated-token.tsx` (+9/-14): апстрим добавил логин в
  текст; `<Trans>` получает `params={{ login, endpoint }}`, значение ключа переписано.
- `app/src/ui/repository-settings/remote.tsx` (+8/-11) и
  `app/src/ui/repository-settings/no-remote.tsx` (+11/-14): апстрим снял обёртку
  `DialogContent` (её делает родитель); переводы `t()` сохранены, импорт
  `DialogContent` удалён вместе с обёрткой.
- `app/locales/en.json` (+28/-9): десять ключей — семь новых, три изменённых значения;
  `cloneRepository.save-dialog-select-label` исправлен с «Clone As:» на апстримный
  «Select».
- `app/locales/ru.json` (+19/-10) и `app/locales/uk.json` (+19/-10): переводы тех же
  десяти ключей.
- `app/locales/la.json` (+23/-11) и `app/locales/eo.json` (+23/-11): переводы тех же
  десяти ключей.
- `app/locales/tlh.json` (+35/-11) и `app/locales/qya.json` (+35/-11): восемь новых
  ключей положены заглушками `en` (16 форм) и НЕ занесены в `meta.ready`; изменённые
  формы `invalidatedToken.message` и `cloneRepository.save-dialog-select-label`
  переведены.
- `docs/fork-localization-progress.md` (+74/-0): секция «Мерж PR desktop#23044» с этими же
  мерами, списком конфликтов и принятым остатком.
- Остальные 110 файлов — правки апстрима без пересечения с форковыми: ни один из них
  форк не менял (`git log upstream/development..HEAD -- <файл>` пуст).

Зачем?
PR desktop#23044 меняет то, как Desktop предлагает аккаунты при клонировании, публикации и в
настройках: вместо вкладок — один список, сгруппированный по хосту. Без резолва эти
экраны вернулись бы к английским литералам и потеряли форковый перевод, а диалог
проверки истечения токена перестал бы обновлять подписи пресетов при смене языка.

Замеры?
Сняты на хосте, без контейнера. `git merge --no-ff upstream/development` дал 11
контентных конфликтов — ровно те файлы, что предсказал `git merge-tree --write-tree
--name-only HEAD upstream/development`. Маркеров конфликта в `app/src`, `app/locales`,
`script` и `docs` — 0; неразрешённых путей в индексе — 0. `t()`-вызовов в
`test-token-expiration-dialog.tsx` — 26 из 26 ключей группы, в `clone-repository.tsx` —
13 (три ключа вкладок апстрим упразднил). Лист-ключей в `en.json` — 2 052; `tlh` и `qya`
совпадают с `en` по структуре (0 отсутствует, 0 лишних), `la`, `eo`, `ru`, `uk` расходятся
только оформлением пар `@darwin`/`@other`. Несовпадений плейсхолдеров и разметочных тегов
между `en` и шестью остальными каталогами — 0. Байты каталогов: CRLF и отступ 2 сохранены,
дельть каждого каталога — 19-35 изменённых строк вместо полной перезаписи; в дневнике
CRLF-строк 4 916 из 4 916. Итог мержа относительно первой ветки — 129 файлов,
+12 397/-1 760.

Принятый остаток?
Гейты не сняты: `tsc --noEmit`, `yarn test` (в том числе `menu-test`, обязательный после
правок меню и диалогов), `yarn l10n:parity`, `l10n:audit`, `l10n:upstream`,
`l10n:bundles`, `yarn lint` и `yarn markdownlint` — всё это требует контейнера. Форматирование
Prettier тоже не применялось: правки сделаны «вручную» в стиле 80 колонок, но без
автосверки, и `yarn lint:fix` может изменить строки. Восемь новых ключей в `tlh` и `qya`
не переведены (16 форм) и не отмечены в `meta.ready` — перевод требует зондов по
словарю. `README` и `changelog-fork.json` не тронуты: версия апстрима осталась 3.6.10,
запись под неё есть с 28.10. Пуш и перенос этого мержа в основное дерево — за
пользователем: в основном дереве на момент работы лежал чужой незакоммиченный мерж того
же PR (45 файлов, `account-picker.tsx` с маркером конфликта), он сохранён патчем
`foreign-wip-20261103.patch` (234 784 байта) и не удалён.

Итог
Локализация форка переживает переход апстрима на единый выбор аккаунта: 11 конфликтных
экранов приняты в апстримской структуре с возвращёнными `t()`/`<Trans>`, каталоги
содержат все десять новых и изменённых строк, разметка и плейсхолдеры совпадают с `en`.
Дерево при этом не проверено ни типами, ни тестами — это единственный незакрытый гейт.

---

EN: Merge upstream PR desktop#23044 - account picker, resolving 11 localized files

Verification notice: no gates were taken. The container is closed and the host has no
`node`, so `tsc --noEmit`, `yarn test`, `yarn l10n:parity`, `l10n:audit`, `l10n:upstream`,
`l10n:bundles`, `yarn lint` and `yarn markdownlint` were never measured on this tree. Only
host-side measures (git, python, grep) are listed below. This tree must not be released
until the full set is green.

What changed?
- `app/src/ui/account-picker.tsx` (+91/-29): upstream version taken whole
  (`renderButtonContent`, `groupAccountsByHost`, `getItemAriaLabel`), with
  `t('account-picker.account')` restored and two new keys for the popover title and its
  placeholder; `contentTitle` is no longer a literal.
- `app/src/ui/clone-repository/clone-repository.tsx` (+251/-188): upstream removed the
  GitHub.com/Enterprise tabs and introduced `resolveCloneInfo` with one account list; its
  structure is kept, 13 `t()` calls restored, and the Enterprise link moved to the new
  `cloneRepository.sign-in-to-enterprise`.
- `app/src/ui/preferences/accounts.tsx` (+49/-33): upstream host grouping kept,
  translations restored for both headings, the add buttons, sign out and both
  `CallToAction`s; the new GitHub.com button got `settings.accounts.add-dotcom`.
- `app/src/ui/sign-in/sign-in.tsx` (+23/-50): upstream dropped the `ExistingAccountWarning`
  step in favour of `state.expected-login`; module-level title constants became `t()` calls
  evaluated at render and the redirect note stayed a `getBrowserSignInInfoContent()`
  function so a language change reaches the label.
- `app/src/ui/lib/sign-in.tsx` (+5/-35): upstream version accepted - the
  `renderExistingAccountWarningStep` method is gone together with the now unused `Ref`,
  `getHTMLURL` and `Trans` imports.
- `app/src/ui/repository-settings/repository-settings.tsx` (+95/-15): upstream added the
  repository account picker; title, four tabs, `okButtonText` and three existing error
  strings restored, plus a new `repositorySettings.error-save-account` for the new failure.
- `app/src/ui/publish-repository/publish.tsx` (+163/-276): the dialog now signs in through
  one flow with an Enterprise link; `title`, `signInTitle`, `okButtonText` and the
  description returned to `t()`, and `publish.dotcom-sign-in-description` re-pointed at the
  new upstream wording ("…to publish your repository").
- `app/src/ui/preferences/test-token-expiration-dialog.tsx` (+26/-14): upstream
  `getAccountKey`/`accountKey` logic accepted, all 26 keys of the group restored to `t()`;
  `presets` stayed a getter rather than a module array and buttons key on `preset.id`.
- `app/src/ui/invalidated-token/invalidated-token.tsx` (+9/-14): upstream added the login to
  the sentence, so `<Trans>` now takes `params={{ login, endpoint }}` and the key value was
  rewritten.
- `app/src/ui/repository-settings/remote.tsx` (+8/-11) and
  `app/src/ui/repository-settings/no-remote.tsx` (+11/-14): upstream removed the
  `DialogContent` wrapper (the parent provides it); translations kept and the now unused
  import dropped.
- `app/locales/en.json` (+28/-9): ten keys - seven new, three rewritten values;
  `cloneRepository.save-dialog-select-label` corrected from "Clone As:" to the upstream
  "Select".
- `app/locales/ru.json` (+19/-10) and `app/locales/uk.json` (+19/-10): translations of the
  same ten keys.
- `app/locales/la.json` (+23/-11) and `app/locales/eo.json` (+23/-11): translations of the
  same ten keys.
- `app/locales/tlh.json` (+35/-11) and `app/locales/qya.json` (+35/-11): the eight new keys
  are `en` stubs (16 forms) and are deliberately not added to `meta.ready`; the changed
  `invalidatedToken.message` and `cloneRepository.save-dialog-select-label` are translated.
- `docs/fork-localization-progress.md` (+74/-0): the "Merge PR desktop#23044" section carrying the
  same measurements, the conflict list and the accepted remainder.
- The remaining 110 files are upstream-only edits with no fork overlap: the fork never
  touched any of them (`git log upstream/development..HEAD -- <file>` is empty).

Why?
PR desktop#23044 changes how Desktop offers accounts when cloning, publishing and in settings:
one host-grouped list instead of tabs. Without the resolution those screens would have
reverted to English literals and lost the fork's translation, and the token-expiration
dialog would have stopped re-labeling its presets when the language changes.

Verified
Host-side only. `git merge --no-ff upstream/development` produced 11 content conflicts -
exactly the files predicted by `git merge-tree --write-tree --name-only HEAD
upstream/development`. Conflict markers across `app/src`, `app/locales`, `script` and `docs`:
0; unresolved paths in the index: 0. `t()` calls: 26 of the 26 keys of the group in
`test-token-expiration-dialog.tsx`, 13 in `clone-repository.tsx` (upstream retired three tab
keys). `en.json` has 2 052 leaf keys; `tlh` and `qya` match `en` structurally (0 missing, 0
extra), while `la`, `eo`, `ru` and `uk` differ only in spelling `@darwin`/`@other` pairs as a
single string. Placeholder and markup-tag mismatches between `en` and the other six
catalogs: 0. Catalog bytes preserved: CRLF and two-space indent, each catalog changed by
19-35 lines rather than being rewritten; the diary keeps CRLF on 4 916 of 4 916 lines. The
merge against the first branch is 129 files, +12 397/-1 760.

Accepted remainder
Gates not taken: `tsc --noEmit`, `yarn test` (including `menu-test`, mandatory after menu and
dialog edits), `yarn l10n:parity`, `l10n:audit`, `l10n:upstream`, `l10n:bundles`, `yarn lint`
and `yarn markdownlint` all need the container. Prettier was not run either: edits were made
by hand in an 80-column style, so `yarn lint:fix` may still reflow lines. Eight new keys are
untranslated in `tlh` and `qya` (16 forms) and are not marked ready. `README` and
`changelog-fork.json` untouched: upstream stayed at 3.6.10 and its entry exists since Oct 28.
Pushing and moving this merge into the main working tree is the author's call - that tree
still holds someone else's unfinished merge of the same PR (45 files, `account-picker.tsx`
with a conflict marker), preserved as `foreign-wip-20261103.patch` (234 784 bytes) and not
deleted.

Result
The fork's localization survives upstream's move to a single account picker: all 11 conflicted
screens carry upstream's structure with `t()`/`<Trans>` restored, the catalogs hold all ten new
and rewritten strings, and markup matches `en`. The tree is nevertheless unverified by types
and tests - that is the one gate still open.
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