Skip to content

feat(gbc): pick a control preset and GBC-Nest from the 解析 panel - #102

Merged
CloverIris merged 1 commit into
mainfrom
feat/gbc-presets-nest
Nov 18, 2026
Merged

CloverIris merged 1 commit into
mainfrom
feat/gbc-presets-nest

Conversation

@CloverIris

Copy link
Copy Markdown
Member

What and why

The first slice of P2: the controls the installed KohakuGBC version already ships, exposed in the 解析 panel.

  • 规模: small / mid / large, the shipped control presets, appended as a config layer after the generated machine (gbcConfigLayers).
  • 程序: 标准 (the plain GBC program) or 分格 (GBC-Nest, configs/programs/gbc_nest.py), for panels and people. A version without that file is refused with a message rather than silently running the plain program; a preset the version does not ship is skipped.
  • Training uses the mid preset and the standard program, so its captions come from the same graph size as the Studio's default.

It also fixes a real gap found while wiring this: startGbcJob ignored settings.gbcVersionId, so the panel and the training batch could run a global gbc from PATH instead of the installed version. The job now defaults to the installed version and only uses another when the caller names one.

How it was verified

  • pnpm typecheck: all five projects pass.

  • pnpm --filter @clover/desktop exec vitest run --project main test/main/services/gbc.test.ts: 10 passed; the new cases cover an existing preset being added, a missing one skipped, no version meaning no layers, a version without GBC-Nest refused, and the exact run arguments with the preset then Nest after the machine.

  • pnpm --filter @clover/desktop exec vitest run --project renderer --project shared: 2162 passed, the one failure is the known mock-install environment test.

  • ESLint and Prettier clean; pnpm build succeeds.

  • No e2e change: the mock ignores the two new optional fields and the panel flow is already covered.

  • pnpm typecheck, lint and Prettier, the suites above

  • pnpm test:e2e — no new UI path that e2e does not already walk

  • pnpm test:install — not needed

  • Docs updated: reference/studio-node-board.md §11 (规模 / 程序, the layers, the version default)

Platforms affected

  • Windows
  • Platform-independent

Notes for the reviewer

Deferred from P2 with reasons, so the PR stays reviewable:

  • Tags: upstream's tag_* controls exist, but we have no installed clone on this machine to confirm where tags land in graphs.jsonl; guessing a schema we cannot test is worse than leaving it out.
  • gbc host remote engines: needs the host/SSH management the app does not have for GBC yet.
  • Region-aware training data: the trainer still reads only the .txt (decision in feat(gbc): a 解析 panel in the Studio and a labelling batch in 训练 #99); the graphs are stored per picture, so this is unblocked when the trainer supports it.

The panel gains 规模 (the shipped small / mid / large control presets) and 程序
(the plain program or GBC-Nest for panels and people). Both are passed as config
layers after the generated machine (gbcConfigLayers): a preset that the installed
version does not ship is skipped, and a version without configs/programs/gbc_nest.py
is refused with a message instead of silently running the plain program. The
training batch uses the mid preset and the standard program.

Also fixes a real gap: startGbcJob now runs the installed GBC version
(settings.gbcVersionId) unless the caller names another, so the panel and the batch
no longer fall back to a global gbc on PATH.
@CloverIris
CloverIris added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 046d9b3 Nov 18, 2026
5 checks passed
@CloverIris
CloverIris deleted the feat/gbc-presets-nest branch November 18, 2026 15:51
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