template list: PROJECTS and SUCCESS columns from the catalog's current fields - #170
Conversation
…t fields The platform dropped requiredVarCount and deployCount from the list (the latter counted projects under a deployments name) and the missingVariables alias from the 400 body; the table shows totalProjects and successRate, and the missing-variables reply is read from `missing`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Reviewed by Wang Miao
This repoints insta template list at the two fields the catalog actually serves — totalProjects and the nullable successRate — replacing VARS/DEPLOYS, which the platform stopped sending and which therefore printed 0 on every row, and drops the missingVariables alias the 400 body never carries. I checked the platform's catalog builder and its missing_variables responder, and both match what the CLI now reads; the - for null is the right rendering since the platform documents null, never 0, for "nothing concluded". Approving.
No findings.
Evidence
read-the-code — src/commands/template.ts:16-38,163-173, test/template.test.ts:205-217,326-336; insta-platform (default branch, read-only clone): src/provisioning/templates.ts:118-125,300-390 (entry built with totalProjects/successRate, no requiredVarCount/deployCount), src/openapi/schemas/common.ts:1047-1075 (TemplateListItem), src/server.ts:2640,2687 ({ error: 'missing_variables', missing: [...] } only), test/template-executor.test.ts:1510-1511 (list asserts not.toHaveProperty('deployCount')); insta-oss serves no /templates route, so the CLI's only server for this command is the platform. Column padding for both fixture rows recomputed by hand against the asserted strings.
Pairs with InsForge/insta-platform#365 (merged), which removed the catalog's deprecated fields with no compatibility period.
insta template list: theVARSandDEPLOYScolumns readrequiredVarCountanddeployCount, which the list no longer serves (anddeployCountcounted projects under a deployments name), so both printed0on every row. They becomePROJECTS(totalProjects) andSUCCESS(successRateas a whole percent;-while nothing has concluded — the platform sendsnull, never0, for that).missingVariablesFromreads the 400 body'smissingonly; themissingVariablesalias is gone from the platform.TemplateIndexEntrycarries the fields the list serves (maintainer,totalProjects,successRate).Gate: typecheck and the full vitest suite pass.
Summary by cubic
Fixes
insta template listto use the catalog's current fields after the platform removed the deprecated ones, so the table no longer prints0for every row.VARSandDEPLOYScolumns becomePROJECTS(totalProjects) andSUCCESS(successRateas a whole percent; shows-while nothing has concluded, since the platform sendsnull).missingVariablesFromnow reads only the 400 body'smissingfield; themissingVariablesalias is gone from the platform.TemplateIndexEntrycarriesmaintainer,totalProjects, andsuccessRateinstead of the removed counts.Migration
Written for commit 5422a49. Summary will update on new commits.