← back to Cli Printing Press
fix(cli): unhide sub-resource groups when wired into promoted commands
26fe57271ed5b3b2bfbc6d3205dec259e9179940 · 2026-04-04 16:14:06 -0700 · Trevin Chow
The generator hides raw parent commands when a promoted command exists
(correct — avoids duplicate entries). But sub-resource groups (attendees,
recordings, transcripts, etc.) inherited Hidden: true when wired into
the promoted command, making their children unreachable.
Now the promoted template sets Hidden: false on multi-endpoint
sub-resource groups after AddCommand. The parent stays hidden, the
children become discoverable through the promoted command.
Cal.com dogfood: 119 → 15 unregistered commands (remaining 15 are
name-matching edge cases in the scorer, not structural wiring issues).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files touched
M internal/generator/templates/command_promoted.go.tmpl
Diff
commit 26fe57271ed5b3b2bfbc6d3205dec259e9179940
Author: Trevin Chow <trevin@trevinchow.com>
Date: Sat Apr 4 16:14:06 2026 -0700
fix(cli): unhide sub-resource groups when wired into promoted commands
The generator hides raw parent commands when a promoted command exists
(correct — avoids duplicate entries). But sub-resource groups (attendees,
recordings, transcripts, etc.) inherited Hidden: true when wired into
the promoted command, making their children unreachable.
Now the promoted template sets Hidden: false on multi-endpoint
sub-resource groups after AddCommand. The parent stays hidden, the
children become discoverable through the promoted command.
Cal.com dogfood: 119 → 15 unregistered commands (remaining 15 are
name-matching edge cases in the scorer, not structural wiring issues).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---
internal/generator/templates/command_promoted.go.tmpl | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/internal/generator/templates/command_promoted.go.tmpl b/internal/generator/templates/command_promoted.go.tmpl
index bda9d969..df403eb1 100644
--- a/internal/generator/templates/command_promoted.go.tmpl
+++ b/internal/generator/templates/command_promoted.go.tmpl
@@ -161,7 +161,11 @@ func new{{camel .PromotedName}}PromotedCmd(flags *rootFlags) *cobra.Command {
cmd.AddCommand(new{{camel $.FuncPrefix}}{{camel $subName}}{{camel $eName}}Cmd(flags))
{{- end}}
{{- else}}
- cmd.AddCommand(new{{camel $.FuncPrefix}}{{camel $subName}}Cmd(flags))
+ {
+ sub := new{{camel $.FuncPrefix}}{{camel $subName}}Cmd(flags)
+ sub.Hidden = false // unhide: the raw parent is hidden but these are useful under the promoted command
+ cmd.AddCommand(sub)
+ }
{{- end}}
{{- end}}
← b80d3140 fix(cli): dogfood uses cobra Use: fields and recursive help
·
back to Cli Printing Press
·
feat(cli): detect and emit required API headers from OpenAPI 79a94585 →