Commit Graph
2 Commits
Author SHA1 Message Date
yetone 1a84447832 gui: the library's Select keeps its place when it turns Done, in German and at 420
Found while building Select for the skills in your agents (wongxy, the
next commit). Two things moved the library's own Select (#1852) from
under the pointer when it was pressed:

- Done was narrower than Select. In a heading on two lines (German at
  420: Auswählen, Fertig) the narrower word fitted on the first line,
  and the button jumped 52px up and to the right. Select and Done now
  take the width of the wider of the two (data-alt, drawn as a hidden
  zero-height ::after), in the skills', servers' and hooks' headings.
- The heading's first line sat 1px lower on one line than on two (one
  line centred in the 26px, two beginning at the top). A press that
  unwrapped it (German at 1100) moved the button 1px, and the page was
  scrolled 1px to hold it. The wrapping headings now have 1px padding
  above and below, so the first line sits in the same place with one
  line or two.

Run:
- library-pick-remove, library-servers-bulk, library-hooks,
  remove-all-skills and click-scroll, in Chromium and WebKit: 36/36 each.
- library-pick-remove now checks that Done is as wide as Select. With
  the ::after taken out it goes red in every language at both widths
  (Select 80.6px wide, Done 53.0px in German).
- The 1px padding is checked by the next commit's
  found-skill-pick-remove (German at 1100), which goes red without it:
  view-library scrolled 0 to 1.
2026-10-13 11:04:13 +08:00
yetone a4385e0999 gui: the Library's Select bar removes the skills, servers or hooks picked, a whole group at once with its header's box (#1852)
What: Select's bar on the skills, servers and hooks pages gets Remove…
(red, beside Clear). It asks first, as Remove all does, naming the count
("Remove 3 skills?", or "Remove pack-a?" for one), and posts only the
picked names to the existing remove-all endpoints (RemoveSkills /
RemoveServers / RemoveHooks), so each goes exactly as its row's Remove
would: same backups, only magpie's own copies. A group's or part's header
box (already there in Select) picks the whole group, so an outdated group
goes in one step. Groups have no menu, so no "Delete group…" item was
added.

A name that wasn't removed stays picked, its row's second line shows
"Not removed: <error>" in red, the status names it ("notes removed ·
stuck wasn't removed: …"), and nothing reports success for it. When every
name fails the endpoint answers 400: the sheet stays open with its button
enabled again. The label stays "Remove…" whatever the count (the count is
beside it and in the sheet): "Remove 3…" rewrapped the bar at 440px in
ja and moved the box under the pointer (library-servers-bulk caught it).
No Go change: the batch removals already reported Unremoved per name.

Strings in zh, zh-TW, ja, de. docs/subsystems/library.md says it.

Run: new internal/gui/tests/library-pick-remove.test.cjs (Playwright
1.62.0, chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 390 px): group
box picks 3, Cancel posts nothing, Remove takes 3 and leaves the rest, a
partial failure keeps the failed one picked with its error, a total
failure keeps the sheet; every click checked for no scroll and nothing
moving. Red by hand: dropping every name from picked after a partial
failure, and dropping the partial-failure status. With it, both engines:
library-servers-bulk, library-hooks, i18n-keys, gui-de, gui-ja,
gui-zh-tw, click-scroll, group-pick-filter, remove-found-skill,
library-items, remove-all-skills: 60/60 pass. library-servers-bulk
chromium failed once in a parallel run, then passed 3/3 alone and 2/2 in
the same parallel run on this tree and on origin/main.

Not run: pick-skills.test.cjs is red in webkit (en, zh: the click on the
"pdf" row times out) on origin/main 6669d497d without this change too,
the same as before; chromium passes. Not tried in the real app.
2026-10-13 02:48:46 +08:00