Show the `ordinal` plugin settings menu in the `clai2` web UI

Merged
MP
2mo ago
+189-163

Part 22 of the clai2 web UI stack (… → #10322 → this PR). Based on #10322. No linked issue: requested by the CLAI maintainer.

Why. One PR per plugin: ordinal now declares its settings menu (settings_menu(), #10312) instead of running termflow widgets in configure(). The same menu, sign-in and /keys steps included, opens in the terminal and in the web UI's plugins panel (#10315), where those steps show as dialogs.

What changes

  • Sign-in row → action: dialogs.choose (browser / saved key / environment variable), then sign_in_now(SIGN_IN, dialogs) when browser sign-in is chosen and none is stored. That sign-in used to run inside the terminal menu only; it now also runs from the web UI.
  • /keys entry row → action using the shared choose_key. It also switches Sign-in to the key, as before.
  • Removed: the plugin's own MaskedPrompt, choose_key and confirm_replace copies, and the run_coroutine_threadsafe(...).result() bridge, which never noticed a cancelled menu.
  • Messages: "Ordinal: nothing changed." replaces "Ordinal settings unchanged.", and without a terminal the menu says to use one instead of trying to open.
  • Known limit, unchanged: with the key or environment variable chosen but missing, the plugin still refuses to load without a TTY, so a fully headless clai2 --web can't show its menu until that's fixed.
  • Its tests drive the actions with ScriptedDialogs (#10316) and the terminal path through plugin.configure() with scripted runners. Its PLUGINS.md section says the menu also opens in the web UI.

Verification.

  • Ported in its own herdr worktree and stacked here. The porting agent got 100% branch coverage of the plugin and clean pyright and ruff, and walked the menu in tmux and a headed browser without completing a real sign-in.
  • On the stacked branch: 371 tests pass across every ported plugin's suite plus web, loader, keys, sign-in and settings compatibility.
  • I re-checked it in a headed browser against an isolated clai2 --web -m test: the rows render, each action's first dialog opens, Esc backs out, and there are no page errors.

What changes for existing users. The terminal menu keeps its rows, labels and choices. Only the messages above differ, and /keys uses the shared picker from #10316. The menu now also works in the web UI.

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver.
  • PR title is fit for the release changelog.