Skip to content

feat(templates): offer API-node starter templates in the install picker - #1341

Merged
deepme987 merged 8 commits into
mainfrom
feat/partner-node-templates-install-picker
Jul 29, 2026
Merged

feat(templates): offer API-node starter templates in the install picker#1341
deepme987 merged 8 commits into
mainfrom
feat/partner-node-templates-install-picker

Conversation

@MaanilVerma

@MaanilVerma MaanilVerma commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

The install picker only offered local-model templates, so a new user's first run was always a multi-GB download. Each modality now also offers one API-node template, badged with its credit cost before Install.

Changes

What

  • Swaps each modality's heaviest pick for its top API-node equivalent, placed second so it sits right after the recommended card: Seedream 5.0 Pro, Seedance 2.0, Tripo H3.1, Seed Audio 1.0.
  • API-node cards get a crown chip reading "Requires credits", replacing the size in the footer. It sits outside the aria-hidden thumbnail so the cost reaches the accessible name.
  • The auto-selected pick can never cost money: recommended and apiNode are mutually exclusive by type.
  • API-node status comes from the manifest, not the index's openSource flag (that means closed weights, and 13 entries carry it alongside a multi-GB size).
  • Fixes a card tagged ["API", "Image Edit"] being subtitled "API", and a model-download phase showing for zero-model picks.
  • Adds is_api_node to both template telemetry events.
Screen.Recording.2026-07-29.at.11.11.34.PM.mov

Zero-model picks still create a download-task state entry for their input
assets, so the existing guards all passed and the launch stepper showed a
model-download phase for a template that downloads no models.
Hydrate `apiNode` from the manifest only — the index's `openSource` flag means
closed weights, and 13 entries carry it alongside a multi-GB size.

Also skip `api`/`3d model` when picking a card's task tag, and keep an API-node
slot on its snapshot rather than substituting a local download into it.
Swap each modality's heaviest pick for its highest-usage API-node template, so
the picker is no longer open-source only:

- Seedream 5.0 Pro: Image Edit, Seedance 2.0: Reference to Video
- Tripo H3.1: Image to Model, Seed Audio 1.0: Text to Audio

`recommended` and `apiNode` are mutually exclusive by type — the auto-selected
pick must never cost credits.
Badge the card with a crown and "Requires credits", and show the crown in place
of a download size. The badge sits outside the aria-hidden media span so the
cost reaches the card's accessible name.

Reset an auto-selected API-node template to "none" when the picker step is
skipped, so a credit-costing pick can't install without its only cost surface.
Keep the picker on offer when the disk fits no local template, since the
API-node cards need none.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 684d2e31-8c84-48ba-bbd0-88eae3f02fcc

📥 Commits

Reviewing files that changed from the base of the PR and between 1c53325 and 63e081f.

📒 Files selected for processing (4)
  • src/main/sources/standalone/curatedTemplates.ts
  • src/renderer/src/components/BrandVariantList.vue
  • src/renderer/src/components/TemplatePickerStep.vue
  • src/renderer/src/views/InstallWizardModal.vue
💤 Files with no reviewable changes (1)
  • src/renderer/src/views/InstallWizardModal.vue

📝 Walkthrough

Walkthrough

API-node starter templates are added to curated catalogs, propagated through standalone installation options, excluded from local-download substitution, and rendered with credit badges or crown indicators. Wizard sizing, telemetry, launch gating, localization, and tests are updated accordingly.

Changes

API-node template flow

Layer / File(s) Summary
Curated catalog and hydration
src/main/sources/standalone/curatedTemplates.ts, src/main/sources/standalone/templateCatalog.ts, src/main/sources/standalone/*test.ts
Curated entries now distinguish API-node templates, use zero-size snapshots, preserve vanished API-node slots, filter non-task tags, and validate catalog invariants.
Option metadata and installation handling
src/main/sources/standalone/index.ts, src/main/lib/ipc/sessionActions/launch.ts, src/renderer/src/lib/installHelpers.ts, src/renderer/src/views/InstallWizardModal.vue, src/main/sources/standalone/index.test.ts
API-node metadata and size values flow through field options and installation handling; API-node selections avoid downloads, report telemetry, bypass disk-shortfall gating, and suppress the template download phase.
Template picker presentation
src/renderer/src/components/TemplatePickerStep.vue, src/renderer/src/components/TemplatePickerStep.test.ts, src/renderer/src/assets/main.css, locales/en.json, locales/zh.json, src/renderer/src/components/BrandVariantList.vue
API-node cards display localized credit badges or decorative crowns, while local cards retain size indicators and theme styling gains the shared upgrade color.

Sequence Diagram(s)

sequenceDiagram
  participant TemplatePickerStep
  participant InstallWizardModal
  participant standalone
  participant handleLaunch
  TemplatePickerStep->>InstallWizardModal: select API-node template
  InstallWizardModal->>standalone: read apiNode and sizeBytes metadata
  standalone-->>InstallWizardModal: return zero-download selection
  InstallWizardModal->>handleLaunch: configure bundledTemplateSizeBytes = 0
  handleLaunch-->>InstallWizardModal: skip template download phase
Loading

Suggested reviewers: deepme987, kosinkadink

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/partner-node-templates-install-picker
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/partner-node-templates-install-picker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested review from Kosinkadink and deepme987 July 29, 2026 16:20

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/renderer/src/assets/main.css`:
- Line 194: Update the --upgrade light-theme color token to provide sufficient
contrast for 12px badge text against its badge surface, using a darker
light-theme value or an opaque dark background while preserving the badge’s
intended upgrade styling.

In `@src/renderer/src/views/InstallWizardModal.vue`:
- Around line 243-246: Remove the assignments to bundledTemplate in the
templateIsApiNode branch so an explicitly selected API-node option from the
Advanced fallback remains unchanged; preserve the existing exclusion of API
nodes from automatic selection.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3ab2c759-7726-481c-b924-9d3787a7df80

📥 Commits

Reviewing files that changed from the base of the PR and between e76e15f and 1c53325.

📒 Files selected for processing (14)
  • locales/en.json
  • locales/zh.json
  • src/main/lib/ipc/sessionActions/launch.ts
  • src/main/sources/standalone/curatedTemplates.test.ts
  • src/main/sources/standalone/curatedTemplates.ts
  • src/main/sources/standalone/index.test.ts
  • src/main/sources/standalone/index.ts
  • src/main/sources/standalone/templateCatalog.test.ts
  • src/main/sources/standalone/templateCatalog.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/TemplatePickerStep.test.ts
  • src/renderer/src/components/TemplatePickerStep.vue
  • src/renderer/src/lib/installHelpers.ts
  • src/renderer/src/views/InstallWizardModal.vue

Comment thread src/renderer/src/assets/main.css
Comment thread src/renderer/src/views/InstallWizardModal.vue Outdated
…back

The picker step is not the only place a starter template can be chosen: when
it is gated off, the field renders as cards in Advanced. Resetting the
selection there discarded a deliberate choice, so surface the credit cost on
those rows instead.
@deepme987
deepme987 added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit b6ccfc4 Jul 29, 2026
12 checks passed
@deepme987
deepme987 deleted the feat/partner-node-templates-install-picker branch July 29, 2026 21:07
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants