Files
magpie/docs
yetone b5a78fd8b5 routing: a group's rules are dragged into order
monkeyin_92 on X: "希望可以上下拖动规则". Rules are checked top first, so
their order matters, and it could only be changed a place at a time from
each rule's ⋯ menu (Move up / Move down).

A rule's number is now its handle, as a model's number is in the same
editor (memberHandle): drag it up or down (the shared dragRows, which
the members, groups and agents use), or focus it and press Alt+↑/↓. The
rules are renumbered at once and the keyboard stays on the moved rule's
handle. The grip beside the number shows only on hover, while dragging,
or from the keyboard; the dragged rule is lifted with a card background
and shadow, no coloured border. Move up and Move down stay under ⋯ and
now go through the same moveRule. Saved as the group's rules in their
new order. "Move rule {n}" in zh, zh-TW, ja and de; the title reuses
"Drag to reorder · Alt+↑/↓ to move".

Run at this head:
- routing-rule-drag.test.cjs (new), chromium and webkit, en, zh, zh-TW,
  ja, de: 10 of 10. It checks the handles and their names, the grip hidden
  away from the row and shown on hover, a drag of rule 3 above rule 1
  with nothing opened by the drag's click, Alt+↓/↑ (past the end too)
  with focus kept, ⋯ Move down, the page not moved, and the saved rules'
  order with their conditions. Red on the parent (no .rt-rhandle): 10 of
  10 in the parent's full run.
- GUI: every routing-*.test.cjs plus i18n-keys, click-scroll and
  group-member-drag, both engines: 1321 pass, 55 red, all in files red the
  same on origin/main 42976f9a0 (routing-pause #3410, routing-intent-entry
  #3408, routing-rule-effort #3411, routing-rule-remove #3096/#3094,
  routing-manual #3409, routing-steady #3412/#1804, routing-live-patch
  #2174, routing-time #3465), but one routing-bodies case and one
  routing-intent-entry 440 case, which pass run alone (load ~40).
- Real run: built binary, sandbox HOME, magpie web on 127.0.0.1:3486;
  group Mix with rules "tokens >= 1 -> one/m, two/m" and
  "agent codex -> three/m". In headless Chromium dragged rule 2's number
  above rule 1, Save, reload: the editor and `magpie group rule mix` both
  list "agent codex -> three/m" first, the two-model rule second and
  whole.

Not tried: a real mouse or trackpad; touch; the WebKitGTK app on Linux;
Windows.

Rebased onto 5b2b3d3f5 (10 commits, gateway, gui and routing's
client.js among them) and run again at the rebased pair's head
68701dfe4: gofmt -l clean; GOOS=linux and windows vet -tags nogui of
provider, gateway, cli, tui clean; go test -tags nogui -timeout 45m
internal/provider (171s), cli, tui, gateway (422s), gui (budgets): all
ok; GUI routing-rule-drag, routing-rule-models, routing-compact,
i18n-keys, click-scroll, group-member-drag in both engines all pass;
routing-rule-remove red as on main (#3096, #3094).
2026-10-25 13:32:12 +08:00
..