feat(onboarding): tighten setup copy from demo feedback · Entire

feat(onboarding): tighten setup copy from demo feedback

fd12e44·

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

Sessions

01KXPCWKWNGG7HVJEXP7ZF70JYView transcript

Changes

7

432 unmodified lines

// expertsWebBaseURL is the origin used to build user-facing session links.
// webBaseURL is the origin used to build user-facing entire.io web links
// (expert sessions, the setup checklist's repo overview link).

// Session links must point at the real Entire web app, not at whatever data API
// the CLI happens to be talking to. So:

//     it (frontend and API share that origin).
//   - otherwise (local dev API like 127.0.0.1) fall back to the canonical
//     https://entire.io so links still resolve to the proper site.
func expertsWebBaseURL() string {
func webBaseURL() string {
    if raw := strings.TrimSpace(os.Getenv("ENTIRE_WEB_BASE_URL")); raw != "" {
        return strings.TrimRight(raw, "/")
    }
}

Mcmd/entire/cli/experts_cmd.go+4/-3

268 unmodified lines

// onboardingSetupSummary describes what the fast path will do, e.g.
// "Logs in to entire.io and mirrors this repo so your work shows up in the
// web UI." The import step carries its own benefit clause: imported history
// is local-only (session list, explain) and does not appear in the web UI,
// so the web-UI promise must never attach to it.
func onboardingSetupSummary(missing []onboarding.Result) string {
    webSteps := make([]string, 0, len(missing))
    importStep := false
    lines := make([]string, 0, len(missing))
    for _, r := range missing {
        switch r.Rung.Key {
        case onboarding.KeyAuth:
            webSteps = append(webSteps, "logs in to entire.io")
            lines = append(lines, "• Log in")
        case onboarding.KeyMirror:
            webSteps = append(webSteps, "mirrors this repo")
            lines = append(lines, "• Mirror this repo")
        case onboarding.KeyImport:
            importStep = true
            lines = append(lines, "• Import local sessions")
        }
    }
    var sentences []string
    if len(webSteps) > 0 {
        sentences = append(sentences, formatTokenClassList(webSteps)+" so your work shows up in the web UI.")
    }
    if len(lines) == 0 {
        return ""
    }
    if importStep {
        sentences = append(sentences, "imports existing agent history so past sessions show up in entire session list.")
    }
    noun := "steps"
    if len(lines) == 1 {
        noun = "step"
    }
    // Capitalize each sentence: summaries are full sentences in the prompt.
    for i, s := range sentences {
        sentences[i] = strings.ToUpper(s[:1]) + s[1:]
    }
    return fmt.Sprintf("%d %s left:\n%s", len(lines), noun, strings.Join(lines, "\n"))
}

Mcmd/entire/cli/onboarding_offer.go+35/-23

534 unmodified lines

// renderConnectedLine is the fully-connected collapse: identity plus mirror
// slug when one exists, e.g. "Connected: peyton · mirrored to github.com/o/r".
// renderConnectedLine is the fully-connected collapse: identity plus, when a
// mirror exists, the repo's entire.io overview link — the payoff the setup
// was for, e.g. "Connected: peyton · https://entire.io/gh/o/r".
func renderConnectedLine(results []onboarding.Result, sty statusStyles) string {
    var identity, mirror string
    for _, r := range results {

}
    line += ": " + identity
    if mirror != "" {
        line += sty.render(sty.dim, " · ") + "mirrored to " + mirror
        if u := repoWebURL(mirror); u != "" {
            line += sty.render(sty.dim, " · ") + sty.render(sty.cyan, u)
        } else {
            line += sty.render(sty.dim, " · ") + "mirrored to " + mirror
        }
    }
    return line + "\n"
}

Mcmd/entire/cli/onboarding_render.go+24/-3

49 unmodified lines

// Fully connected collapses to a single quiet line carrying the repo's
// entire.io overview link. Not parallel: pins the web base via env.
func TestRunStatus_CollapsedChecklistWhenConnected(t *testing.T) {
    setupTestRepo(t)
    t.Setenv("ENTIRE_WEB_BASE_URL", "https://entire.example")
    writeSettings(t, testSettingsEnabled)
    stubOnboardingResults(t, []onboarding.Result{
        {Rung: onboarding.Rung{Key: onboarding.KeyHooks, Title: "Agent hooks"}, Check: onboarding.Check{State: onboarding.StateDone, Detail: "Claude Code"}},
    }
    out := stdout.String()
    if !strings.Contains(out, "Connected: peyton · mirrored to github.com/acme/api") {
        t.Errorf("expected collapsed connected line, got: %s", out)
    }
    if !strings.Contains(out, "Connected: peyton · https://entire.example/gh/acme/api") {
        t.Errorf("expected collapsed connected line with overview link, got: %s", out)
    }
    if strings.Contains(out, "Setup") {
        t.Errorf("connected status should not show setup counter, got: %s", out)
    }
}