Skip to content

feat(swiss): ask for a variant's requires.inputs when deploying - #125

Merged
aceforeverd merged 9 commits into
mainfrom
feat-variant-inputs
Nov 10, 2026
Merged

aceforeverd merged 9 commits into
mainfrom
feat-variant-inputs

Conversation

@aceforeverd

@aceforeverd aceforeverd commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The deploy and upgrade forms in modules/swiss now show each input the catalog variant declares in its top-level inputs, by its key.

  • Deploy: prefills the answer swissd would use: the site profile's inputs answer, with its template filled for the model, else the input's catalog default. An input with neither shows as unanswered. The input's example is the placeholder.
  • Upgrade: shows the release's own answer, which swissd carries forward.
  • What's sent: only a typed answer, as a typed override. An untouched field keeps following the site profile.
  • Checks: the type and pattern are checked as you type.

Needs modelsphere/swiss#54.

Not covered yet:

  • The modules/inferences DeploySheet doesn't render inputs. A deploy there works only if the site profile answers every input; otherwise swissd refuses the plan and names the missing input.
  • The site profile page doesn't show the profile's inputs.
  • Clearing a field on upgrade doesn't fall back to the site's answer, because swissd merges the earlier form layer back in.

Related: modelsphere/model-catalog#103

Each input the catalog variant declares is a field on the deploy and upgrade
forms. The site profile's features.inputs answer is prefilled, its template
filled for the model; an upgrade shows the release's own answer. Only a typed
answer is sent, as a typed override, so an untouched field keeps following the
site profile. The type and pattern are checked as the deployer types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
aceforeverd and others added 5 commits November 10, 2026 10:45
An input field now shows the answer swissd would use, in its order: the
release's (on upgrade), the site profile's, then the variant's own value. Only
an input with none of them is marked required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
A row with no answer from the release, the site or the variant shows as
unanswered, and "" counts as an answer, as swissd reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
An input field falls back to requires.inputs[].default, after the release's
and the site's answers, the order swissd selects in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
Variant.inputs replaces requires.inputs, and SiteProfile.inputs replaces
features.inputs, as swissd now serves them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bWVCSybBZ1QmsL9gjrqxW
@aceforeverd
aceforeverd marked this pull request as ready for review November 10, 2026 04:54
… input's answers

- Both site profile pages (inferences and swiss) show and edit `inputs`
  as a key/value table. A value reads as the YAML tab reads it: 8000 is
  a number, true a boolean, quotes keep a string, since swissd checks an
  answer's type against the input's.
- The inferences deploy form lists an input's answers (the release's,
  the site profile's, the variant default) when its empty field is
  clicked, where more than one is found.
- An input is checked once typing pauses for 500ms, its pattern compiled
  once; the deploy fields turn off the browser's autofill list, which
  covered their own suggestion.
…loy applies

An input's key is any chart value, so a deployer who answers one by hand
may want every later deploy at the site to take that answer.

- Under an input field, a typed answer the input takes and the site does
  not already give can be ticked "Save to the site profile", naming the
  site's answer it replaces. Review (inferences) and the Plan tab (swiss)
  list what will be saved.
- The save runs after the install or upgrade succeeds, so one abandoned
  before that leaves the profile as it was. It re-reads the profile and
  sets inputs[key] in the YAML text, keeping its comments and any edit
  made meanwhile; the value is typed as the input is. A failed save is a
  toast, and the deploy stands.
- The swiss deploy form lists an input's answers when its empty field is
  clicked, as the inferences one does.
@aceforeverd

Copy link
Copy Markdown
Contributor Author

This PR coveres the L3 config part in modelsphere/modelsphere#57

@aceforeverd
aceforeverd merged commit 7b6e687 into main Nov 10, 2026
4 checks passed
@aceforeverd
aceforeverd deleted the feat-variant-inputs branch November 10, 2026 11:30
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.

1 participant