Files
magpie/internal/gui/assets/plugins/library
yetone 9829d2f553 gui: a hook's description is shown whole, wrapped, and written in a box that wraps (#2085, emo172)
Library › Hooks cut a hook's description to one line with an ellipsis and
no tooltip, and the editor's Description was a one-line input, so an
80–150 character Chinese description could neither be read nor seen while
written.

- The list wraps the description (at most 200 characters, the user's own
  words). The row's text block takes a 240px basis, so the long text no
  longer pushes the name under the glyph at narrow widths.
- The editor's Description is a textarea that wraps and grows to fit. It
  stays one paragraph (library.SaveHook joins its lines), so Enter still
  saves, an IME's Enter still doesn't, as in every other field there.
- Siblings left as they are on purpose: skills, subagents and market rows
  hold one line with the whole text in a tooltip, because their lists are
  windowed to a fixed row height and their descriptions are authors'
  paragraphs, not the user's 200 characters.

Verified:
- library-hooks.test.cjs now gives a hook a 90-character Chinese
  description and checks it is not clipped and wraps at 440 and 1100 (1100
  in a window of its own: resizing one window across the page's breakpoint
  raises a WebKit ResizeObserver-loop error under load), that the name
  stays beside its glyph, and that the editor's box is a textarea showing
  all of it. On the old code it fails 12/12 ("the description is cut off
  at 440"); without the 240px basis, "the name is 38px off its glyph at
  440".
- All 484 library*.test.cjs pass in Chromium and WebKit, en/zh/zh-TW/ja/de;
  the hooks test 4x concurrently in both engines, 48/48.
- Screenshots at 440 and 1100, both engines, looked at.
Not run: Go checks (no Go changed); not tried in the built app.
2026-10-14 13:30:06 +08:00
..