Skip to content

mattermost(picker): verify picker preserved — #2337 removal premise falsified #2415

@alexey-pelykh

Description

@alexey-pelykh

Status

The Mattermost model picker is LIVE production code on HEAD (2026-04-19) and continues working despite the deletions that #2337 predicted would force its removal.

Evidence that #2337's removal premise is falsified

#2337 listed the picker under "Discord/Mattermost model-picker UI cascade (commands-models.ts deletion)" — the stated rationale was that the picker depended on handleModelsCommand / buildModelsProviderData from the Pi-era commands-models.ts stub, so gutting the stub meant gutting the picker.

What actually happened:

  • commands-models.ts was deleted in gut: eliminate callers and delete ~14 EXCLUDE-STUB files in src/auto-reply/ #2373 (merged 2026-04-16).
  • The Mattermost picker has been stable since. It sources provider data from its own path, not from handleModelsCommand / buildModelsProviderData.
  • git grep -n "handleModelsCommand\|buildModelsProviderData" extensions/mattermost/ returns zero hits — the picker never actually depended on those symbols.

Conclusion: the coupling claim in #2337 was wrong. The picker's inclusion in the cascade was based on a premise that doesn't hold. Removing a working user-facing feature on a falsified premise is not justified.

Default: Keep + verify

Absent a fresh product rationale, the picker stays. It's a working user-facing feature serving Mattermost channels.

Files still live (reference)

File LoC State
extensions/mattermost/src/mattermost/model-picker.ts 360 LIVE — public picker API
extensions/mattermost/src/mattermost/model-picker.test.ts 155 LIVE tests
extensions/mattermost/src/mattermost/monitor.ts (lines 56, 495, 778-887) 1654 total LIVE — handles picker interactions
extensions/mattermost/src/mattermost/slash-http.ts (lines 30-32, 387) 512 total LIVE — resolves picker from slash commands

AC under Keep (default path)

Alternative: Gut (requires fresh product rationale)

The original #2337 rationale (stub coupling) is dead. Gutting now requires a standalone product case such as:

  • Model-selection UI is architecturally out of scope for RemoteClaw (e.g., runtime config owns model selection, not per-channel UI).
  • Maintenance cost of Mattermost-specific picker exceeds its value.
  • Strategic direction removes per-channel model switching entirely.

If product decides to gut on fresh grounds, the cascade is ~700 LoC:

  • extensions/mattermost/src/mattermost/model-picker.{ts,test.ts} — 515 LoC
  • Picker handling in monitor.ts (lines 56, 495, 778-887) — ~150 LoC
  • Picker resolution in slash-http.ts (lines 30-32, 387) — ~5 LoC
  • Any picker re-exports in src/plugin-sdk/mattermost.ts

AC under Gut (if fresh rationale provided)

  • Fresh product rationale documented in issue comment, signed off by product owner.
  • Files deleted + cascade stripped from monitor.ts / slash-http.ts / plugin-sdk.
  • pnpm check / pnpm test green.
  • Verification: git grep -rn "model-picker\|ModelPicker" extensions/mattermost/ src/plugin-sdk/mattermost.ts returns zero.

Relation to #2337

#2337's cascade scoped this picker for deletion based on a coupling claim that was falsified by #2373's real-world execution. Resolution in either direction — Keep (with verification + documentation) or Gut (with fresh rationale) — unblocks closing #2337. Part of #2337.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gutRemoving dead upstream subsystemsneeds-discussionApproach is opinionated or uncertain — needs team alignment before implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions