From 553a39f09bc22aecfb15fdce45f533bc92ffa2b4 Mon Sep 17 00:00:00 2001 From: xarmian Date: Mon, 4 May 2026 10:44:07 -0400 Subject: [PATCH] fix(cli): pad auth setup hint should point at pad init, not a nonexistent IDEA-1 (TASK-1143) (#407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #403 (TASK-1134) added printIdeaOneTriggerHint() to the pad auth setup success path so freshly-bootstrapped admins would learn about the seeded onboarding entry point. But pad auth setup only creates the first admin account — no workspace. IDEA-1 is only seeded when a startup-template workspace is created (via pad init / pad workspace init). A user following the original hint immediately would hit "workspace not found" / "item not found". Caught by Codex during review of PR #406 (the docs PR for TASK-1138). TASK-1143 was spawned then to keep PR #406 docs-only; this is the fix. Reframe (Option 2 from the task spec): keep the hint, but point at the next concrete action — `pad init` — rather than at IDEA-1. The IDEA-1 trigger phrase still surfaces in `printOnboardingHints`, which runs after `pad init` / `pad workspace init`. By then the workspace exists and the trigger phrase resolves correctly. Renamed `printIdeaOneTriggerHint` → `printPostSetupNextStepsHint` since the hint no longer names IDEA-1 directly. Wording matches CLAUDE.md / README — workspace creation precedes the trigger phrase everywhere. Parent: PLAN-1131 (follow-up). Origin: Codex review of PR #406 round 1. --- cmd/pad/main.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cmd/pad/main.go b/cmd/pad/main.go index 844bd786..956d2da5 100644 --- a/cmd/pad/main.go +++ b/cmd/pad/main.go @@ -841,26 +841,27 @@ func setupCmd() *cobra.Command { green := color.New(color.FgGreen).SprintFunc() fmt.Printf("%s First admin account created\n", green("✓")) fmt.Printf("%s Logged in as %s (%s)\n", green("✓"), resp.User.Name, resp.User.Email) - printIdeaOneTriggerHint() + printPostSetupNextStepsHint() return nil }, } } -// printIdeaOneTriggerHint surfaces the trigger phrase that points a fresh -// agent session at the seeded IDEA-1 onboarding item. The phrase is named -// (not generic) so a copy-paste lands deterministically on the right ref -// in software-category workspaces. People-category and other templates -// will need a template-aware version of this hint — tracked under -// PLAN-1140 (the people-category onboarding plan). -func printIdeaOneTriggerHint() { +// printPostSetupNextStepsHint walks the freshly-bootstrapped admin to the +// next step that actually does something useful: creating a workspace. +// The IDEA-1 trigger phrase belongs in `printOnboardingHints` (which runs +// after `pad init` / `pad workspace init`) — by then the workspace +// exists and IDEA-1 is seeded. Calling out the trigger phrase here would +// have sent users at a nonexistent ref (TASK-1143 / Codex review of PR +// #406). +func printPostSetupNextStepsHint() { bold := color.New(color.Bold) cyan := color.New(color.FgCyan) fmt.Println() - bold.Println("To get started:") - fmt.Printf(" Open a fresh agent session (Claude Code, Cursor, etc.) and say:\n") - fmt.Printf(" %s\n", cyan.Sprint("use pad to get IDEA-1")) + bold.Println("Next:") + fmt.Printf(" Run %s in your project directory to create your first workspace.\n", cyan.Sprint("pad init")) + fmt.Printf(" The success message will tell you how to kick off your first agent session.\n") } func loginCmd() *cobra.Command {