Show the `linear` plugin settings menu in the `clai2` web UI
Merged
MP
2mo ago+253+253+012345678901234567890123456789-245-245-012345678901234567890123456789
Part 19 of the clai2 web UI stack (… → #10318 → this PR). Based on #10318. No linked issue: requested by the CLAI maintainer.
Why. One PR per plugin: linear 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 and Access rows → actions. Each picks a value through
dialogs.choose, then signs in (sign_in_now(method, dialogs)) when browser sign-in has no stored sign-in for its endpoint. The old menu did this only after closing, so a web edit would never have signed in. The endpoint depends on both rows, which is why both are actions. - API key row → action using the shared
choose_key. The typed[y/N]replacement prompt (prompt_toolkit) is now the shared confirm dialog. - Removed: the module-level
configure,choose_keyand thePromptSessionuse. - Its tests drive the actions with
ScriptedDialogs(#10316) and the terminal path throughplugin.configure()with scripted runners. Its PLUGINS.md section says the menu also opens in the web UI's plugins panel.
Verification.
- Ported in its own herdr worktree and stacked here.
- On the stacked branch (grain, linear, notion and pylon together): 308 tests pass across the four plugins' suites plus web, loader, keys, sign-in, reload and startup imports. Pyright is clean on the plugins and their tests.
- Headed Playwright against an isolated
clai2 --web -m testwith all four enabled: the rows render, each action's first dialog opens, Esc backs out with the plugin's "unchanged" message, and there are no page errors. Screenshots are in/tmp/clai-web-shots/port-linear-*.png.
What changes for existing users. The terminal menu keeps its rows, labels and messages. The /keys step uses the shared picker and confirmation 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.