Skip to content

[feat] canvas: open model settings from an empty model selector - #398

Merged
FayeSpica merged 2 commits into
ThinkFlowLab:mainfrom
Maurokrekels:feat/composer-configure-model-action
Nov 23, 2026
Merged

FayeSpica merged 2 commits into
ThinkFlowLab:mainfrom
Maurokrekels:feat/composer-configure-model-action

Conversation

@Maurokrekels

Copy link
Copy Markdown
Contributor

Summary

  • When no model is configured for the selected node type, the model selector in NodeComposer was a disabled placeholder with no way forward. It now shows a "Configure video model" button (or image, or audio) in its place.
  • Clicking it, or pressing Enter on it, opens Settings on Model connections, directly on that category. This reuses the existing ModelSettings category state through a new initialModelKind prop, so there is no new settings page.
  • The composer stays mounted under the dialog, so the prompt, references, parameters and selected node are kept. Opening settings does not submit anything.
  • The button only appears when the current node type has no model. A model in another category does not hide it, and the existing selector, running-task restriction and validation are unchanged when a model exists.
  • No new strings: the existing modelSetup.videoAction, modelSetup.imageAction and modelSetup.audioAction entries are used, so both zh-CN and en-US are covered.

Linked issue

Refs #370. I used Refs because I did not verify the "save a model and it becomes selectable" and focus-restoration criteria (see below).

  • Fixes #N or Refs #N is included, or no issue applies

Labels

Suggested: type:feat, area:canvas, area:i18n. I cannot set labels myself.

  • Labels applied

Test plan

  • Local:
    • npx tsc --noEmit
    • npm run check:i18n (0 problems)
    • npm test (838 pass)
    • pre-commit hooks on the changed files
    • tests/browser/composer_configure_model.mjs against the isolated fixture API and Vite, with system Chrome. It passes with this change and fails on main (the button is not found). It checks that the action is absent for image (an image model exists in the fixture), present for video, opens by keyboard, lands on the Video category, keeps the prompt after closing the dialog, and makes no generation request.
  • Left to CI: the rest of the browser suite. I only ran the new test, not the existing browser tests such as provider_settings.mjs.
  • Not run: Firefox and WebKit, Windows.

Evidence that it works

The "before" state is in the screenshot of the issue.

Composer with the new button:

composer

Settings opened on the Video category:

dialog

  • Media attached, or N/A because:

Provider verification

No provider calls were made. Everything ran against the isolated fixture API. The fixture has a segmentation service listed under Video, so the screenshot shows one service there; with a truly empty category the dialog shows its existing empty state with an "Add service" button.

  • Real-provider calls are described honestly, or none were made

Bilingual UI

No user-facing strings were added; the existing bilingual modelSetup.*Action entries are reused. I checked the button in en-US (screenshot) and zh-CN (the browser test).

  • Both locales are updated, or no user-facing copy changed

Not verified

  • Saving a model from the dialog and then seeing it become selectable in the composer, and focus restoration after closing the dialog (the browser restores focus to the button when the dialog closes, but I did not test this beyond the button still being present).
  • The indentation of the SearchableSelect changed because it is now in a conditional, so ?w=1 gives a much smaller diff.

@github-actions github-actions Bot added area:canvas Canvas, nodes and direct manipulation type:feat New capability or behaviour labels Nov 18, 2026
When no generation model is configured for the selected node type, the composer showed a disabled selector with no way forward. It now shows a Configure image/video/audio model button that opens Settings on that model category. The composer stays mounted, so the prompt, references and parameters are kept, and nothing is submitted.

Refs ThinkFlowLab#370
@Maurokrekels
Maurokrekels force-pushed the feat/composer-configure-model-action branch from a94b071 to d5f4c57 Compare November 19, 2026 09:32
@Maurokrekels

Copy link
Copy Markdown
Contributor Author

Friendly ping: this is ready for a first look whenever you have time. I rebased it on main yesterday, so it is conflict-free. If you would prefer a different approach for the empty model selector (for example opening Settings without preselecting the category), I am happy to adjust.

@FayeSpica

Copy link
Copy Markdown
Collaborator

@Maurokrekels, it looks like there are merge conflicts. Could you resolve them?

@FayeSpica FayeSpica left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,Thanks

Verified in Chrome that “Configure video model” opens the Video settings directly and preserves the draft prompt when the dialog closes.

@FayeSpica
FayeSpica merged commit dfe61c6 into ThinkFlowLab:main Nov 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:canvas Canvas, nodes and direct manipulation type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants