Skip to content

Admin UI: Remove model/provider fields from AI step config modal - #889

Merged
chubes4 merged 1 commit into
mainfrom
fix/admin-ui-remove-model-provider-fields
Mar 20, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/admin-ui-remove-model-provider-fields

Conversation

@chubes4

@chubes4 chubes4 commented Mar 20, 2026

Copy link
Copy Markdown
Member

Summary

Before

The AI step modal had 4 sections: provider dropdown, model dropdown, tools selector, system prompt. The provider/model were sent in PUT requests but the backend now ignores them.

After

The modal has 2 sections: tools selector and system prompt. No provider/model fields, no dead API params.

The ProviderModelSelector shared component is not deleted — it lives in @shared/components/ai/ and may be used by other admin pages. It's just no longer imported by the pipeline step modal.

Files

File Change
ConfigureStepModal.jsx Remove ProviderModelSelector, strip form state/validation/submit
PipelineStepCard.jsx Remove provider/model inline display, fix prompt save call
api.js Remove provider/model from updateSystemPrompt() params
pipelines.js Remove provider/model from mutation

Depends on #887 being merged first (backend).

@homeboy-ci

homeboy-ci Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Homeboy

⚡ Scope: changed files only

audit (changed files only)

lint (changed files only)

test (changed files only)

Tooling versions
  • Homeboy CLI: homeboy 0.82.0+3521659f
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v2

Homeboy Action v1

…erything else is context-managed

Resolves #888. The AI step configuration modal is now fully redundant:
- Model/provider: managed by context_models setting (#886/#887)
- Tools: managed by ToolPolicyResolver context system
- System prompt: already editable inline on the step card via PromptField

Changes:
- ConfigureStepModal: gutted to no-op (auto-closes if triggered)
- PipelineStepCard: removed tools display, removed Configure button,
  removed onConfigure prop. Only inline system prompt remains.
- PipelineCard: removed handleStepConfigured callback
- PipelineSteps: removed onConfigure prop passthrough
- api.js: removed disabledTools from updateSystemPrompt
- pipelines.js: removed disabledTools from mutation

6 files changed, -284 net lines.
@chubes4
chubes4 force-pushed the fix/admin-ui-remove-model-provider-fields branch from 39f5e03 to d10e506 Compare March 20, 2026 15:49
@chubes4
chubes4 merged commit c4d52b1 into main Mar 20, 2026
1 check passed
@chubes4
chubes4 deleted the fix/admin-ui-remove-model-provider-fields branch March 20, 2026 15:54
chubes4 added a commit that referenced this pull request Apr 24, 2026
Removes unambiguously dead code across the Pipelines / Logs React
surface. No behavioural change. Two categories:

## Dead imports
Modules imported but never referenced by any expression in the same
file. `wp-scripts lint-js` surfaces these as `no-unused-vars`;
each was manually verified by grepping the file for the symbol.

- HandlerSettingsModal.jsx — `Notice`, `Spinner`, `FilesHandlerSettings`
  (the latter is dead because the modal dispatches via
  `handlerModel.renderSettingsEditor()` and routes the Files custom
  editor through the model's own import, not the modal's).
- FlowFooter.jsx — `Button`
- ImportExportModal.jsx — `useState`
- AIToolsSelector.jsx — `useState` (orphan file, deleted below)
- ModalManager.jsx — `useQueryClient`
- ModalSwitch.jsx — `Modal`, `Button`, `__`
- HandlerProvider.jsx — `useHandlerDetails`
- LogsAgentTabs.jsx — `AGENTS_KEY`
- queries/flows.js — `updateUserMessage` (re-import of utils/api)
- queries/pipelines.js — `updatePipelineTitle`, `reorderPipelineSteps`,
  `updateSystemPrompt` (same pattern — consumers import these
  directly from utils/api, the queries/ re-imports were never used)

Also removed the dead local `handlerDetailsError = null` in
HandlerSettingsModal which flowed from a TanStack Query refactor
that dropped the error state.

## Dead feature: ConfigureStepModal + configure-step/

PR #889 gutted the AI step config modal — system prompt is now
edited inline via PromptField, everything else is context-managed.
The modal was left as a no-op auto-closer and its child components
were left as orphan files. Nothing ever triggers the
`MODAL_TYPES.CONFIGURE_STEP` route:

- ConfigureStepModal.jsx — deleted (21-line no-op auto-closer)
- configure-step/AIToolsSelector.jsx — deleted
- configure-step/ConfigurationWarning.jsx — deleted
- configure-step/ToolCheckbox.jsx — deleted
- modals/index.js — dropped `ConfigureStepModal` re-export
- shared/ModalSwitch.jsx — dropped import + case
- utils/constants.js — dropped `MODAL_TYPES.CONFIGURE_STEP`
- PipelinesFilters.php — dropped the two now-stale JS comments
  pointing at `ConfigureStepModal` / `AIToolsSelector` from the
  preloaded script-data payload doc

The three PHP step classes (AIStep, WebhookGateStep, SystemTaskStep)
still declare `stepSettings.modal_type => 'configure-step'` in their
step descriptors. That metadata is never read by the React side —
it's vestigial documentation on the PHP side — so it's left for a
separate step-registration cleanup to avoid mixing PHP contract
changes into a JS dead-code PR.

## Not touched
Unused function parameters (e.g. `pipelineConfig` in FlowStepCard,
`onStepConfigured` in PipelineSteps, `flowId` in HandlerSettingsModal)
are intentionally left alone. Some have explicit 'retained' comments,
others are part of callback signatures whose prop-drilling parents
would need touching too. Candidates for a follow-up pass.

Net: 16 files changed, 275 lines deleted, 3 inserted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin UI: Remove model/provider fields from AI step config modal

1 participant