Summary
Gut the Mattermost model-picker UI. Parallel pattern to the Discord gut in #2414 — both are triggered by /model and /models slash commands and depended on model-provider data sources that were removed during the #2337 cascade. Per Middleware Boundary Principle, model selection is owned by CLI runtimes, not RemoteClaw middleware.
Mattermost is a published extension package (@remoteclaw/mattermost) with a live slash-http integration. This gut removes the model-picker handler path while preserving the rest of the channel plugin.
Current state
Model-picker surface in Mattermost:
extensions/mattermost/src/mattermost/model-picker.ts (360 LoC) — defines resolveMattermostModelPickerEntry, resolveMattermostModelPickerCurrentModel, parseMattermostModelPickerContext, MattermostModelPickerState, MattermostModelPickerEntry, etc.
extensions/mattermost/src/mattermost/model-picker.test.ts (155 LoC) — tests for above
extensions/mattermost/src/mattermost/slash-http.ts:30-32, 388 — imports + calls resolveMattermostModelPickerEntry(commandText) in slash-command flow
extensions/mattermost/src/mattermost/monitor.ts:56, 496, 760-880 — parseMattermostModelPickerContext import, handleModelPickerInteraction handler, buildModelPickerProps, updateModelPickerPost, plus handleInteraction: handleModelPickerInteraction wiring
Files
| File |
LoC |
Disposition |
extensions/mattermost/src/mattermost/model-picker.ts |
360 |
DELETE |
extensions/mattermost/src/mattermost/model-picker.test.ts |
155 |
DELETE |
extensions/mattermost/src/mattermost/slash-http.ts |
— |
MODIFY — remove resolveMattermostModelPickerEntry import + the call at line 388 + any branch that handles the resolved entry |
extensions/mattermost/src/mattermost/monitor.ts |
— |
MODIFY — remove parseMattermostModelPickerContext import, handleModelPickerInteraction handler, buildModelPickerProps, updateModelPickerPost, and the handleInteraction: handleModelPickerInteraction wiring near line 496 |
Protocol
- Delete
model-picker.ts + model-picker.test.ts
- Strip model-picker code paths from
slash-http.ts — /model and /models will fall through to normal slash-command handling (verify the resulting behavior: likely unknown-command response, which is correct)
- Strip model-picker code paths from
monitor.ts — stale model-picker buttons in old Mattermost posts will no longer have a handler; they fall to default interaction handling (acknowledge/noop)
- Run
pnpm check + pnpm test + node scripts/check-no-zombie-imports.mjs
- Scrub
scripts/data/zombie-import-allowlist.json if any stale entries reference the deleted paths
AC
Rationale
Per Middleware Boundary Principle, model selection is a CLI-agent concern — Claude, Gemini, Codex, and OpenCode each handle their own model choice. The model-picker UI was inherited from the Pi-era provider catalog (gutted in #2337 across src/agents/model-catalog.ts, src/gateway/server-methods/models.ts, etc.). The Mattermost channel UI is the last surface in this repo holding onto the pattern and should be removed for consistency.
Relation to #2414
#2414 handles the Discord parallel (dead but compile-linked model-picker inside src/discord/monitor/). This issue is filed as a sibling — same pattern, different channel package, independent blast radius. Should land after #2414 or alongside it.
Summary
Gut the Mattermost model-picker UI. Parallel pattern to the Discord gut in #2414 — both are triggered by
/modeland/modelsslash commands and depended on model-provider data sources that were removed during the #2337 cascade. Per Middleware Boundary Principle, model selection is owned by CLI runtimes, not RemoteClaw middleware.Mattermost is a published extension package (
@remoteclaw/mattermost) with a live slash-http integration. This gut removes the model-picker handler path while preserving the rest of the channel plugin.Current state
Model-picker surface in Mattermost:
extensions/mattermost/src/mattermost/model-picker.ts(360 LoC) — definesresolveMattermostModelPickerEntry,resolveMattermostModelPickerCurrentModel,parseMattermostModelPickerContext,MattermostModelPickerState,MattermostModelPickerEntry, etc.extensions/mattermost/src/mattermost/model-picker.test.ts(155 LoC) — tests for aboveextensions/mattermost/src/mattermost/slash-http.ts:30-32, 388— imports + callsresolveMattermostModelPickerEntry(commandText)in slash-command flowextensions/mattermost/src/mattermost/monitor.ts:56, 496, 760-880—parseMattermostModelPickerContextimport,handleModelPickerInteractionhandler,buildModelPickerProps,updateModelPickerPost, plushandleInteraction: handleModelPickerInteractionwiringFiles
extensions/mattermost/src/mattermost/model-picker.tsextensions/mattermost/src/mattermost/model-picker.test.tsextensions/mattermost/src/mattermost/slash-http.tsresolveMattermostModelPickerEntryimport + the call at line 388 + any branch that handles the resolved entryextensions/mattermost/src/mattermost/monitor.tsparseMattermostModelPickerContextimport,handleModelPickerInteractionhandler,buildModelPickerProps,updateModelPickerPost, and thehandleInteraction: handleModelPickerInteractionwiring near line 496Protocol
model-picker.ts+model-picker.test.tsslash-http.ts—/modeland/modelswill fall through to normal slash-command handling (verify the resulting behavior: likely unknown-command response, which is correct)monitor.ts— stale model-picker buttons in old Mattermost posts will no longer have a handler; they fall to default interaction handling (acknowledge/noop)pnpm check+pnpm test+node scripts/check-no-zombie-imports.mjsscripts/data/zombie-import-allowlist.jsonif any stale entries reference the deleted pathsAC
model-picker.ts,model-picker.test.ts)slash-http.ts+monitor.tsmodified — grepModelPicker|model-picker|modelPickerinextensions/mattermost/returns only migration/detection comments, no live referencespnpm checkpassespnpm testpassesnode scripts/check-no-zombie-imports.mjspassesRationale
Per Middleware Boundary Principle, model selection is a CLI-agent concern — Claude, Gemini, Codex, and OpenCode each handle their own model choice. The model-picker UI was inherited from the Pi-era provider catalog (gutted in #2337 across
src/agents/model-catalog.ts,src/gateway/server-methods/models.ts, etc.). The Mattermost channel UI is the last surface in this repo holding onto the pattern and should be removed for consistency.Relation to #2414
#2414 handles the Discord parallel (dead but compile-linked model-picker inside
src/discord/monitor/). This issue is filed as a sibling — same pattern, different channel package, independent blast radius. Should land after #2414 or alongside it.