Files
magpie/internal/gui/assets/plugins/sessions
yetone 838d12d6f8 sessions: the Move sessions to Codex's provider dialog has Select all and Invert selection
Cyrus on Discord asked for a way to pick all and to invert the picks in
the "Move sessions to {to}?" dialog (the Codex sessions made with another
provider, each with a checkbox).

Over a list of more than one, a quiet row above it now says how many are
picked ("{n} selected", the core's word), with two text buttons: Select
all, which reads Deselect all once every one is picked, and Invert
selection. Each press re-ticks the boxes; the count and Move follow, and
Move is off with none picked, as it was for boxes unticked by hand. A
list of one has no row. Plain text buttons, no native select, no
coloured border. Only the sessions plugin changes (client.js, its CSS
and i18n.js); app.js and the core budget are untouched. "Select all" and
"{n} selected" are the core's keys; "Deselect all" and "Invert
selection" are new, in zh, zh-TW, ja and de.

Run on mote at this tree (base d39358f1b, rebased onto origin/main
1a864f156, which touches no sessions-plugin file; the new test, the old
codex-provider test and i18n-keys ran again at the rebased head, 18 of 18):
- new internal/gui/tests/sessions-codex-provider-pick.test.cjs: 10 of 10
  (chromium and webkit x en, zh, zh-TW, ja, de) at 420px: the row sits
  above the list inside the dialog, no sideways scroll; Deselect all,
  Select all, a box unticked by hand then Invert, Invert of all to none
  (Move off), and Move posting exactly the picked ids in order.
- every internal/gui/tests/sessions-*.test.cjs plus i18n-keys: 465 of 465.
- go test -run 'Budget|Asset|Plugin|I18n|Strings' ./internal/gui: ok.

Broken by hand: Move's disabled no longer following the picks, and
Invert only adding: each turned the new test red.

Not tried: the real app window with real Codex sessions of another
provider; the whole GUI suite (app.js is not touched).
2026-11-02 10:34:27 +08:00
..