fix(onboarding): point the import hint at the group command for multi-agent history · Entire

fix(onboarding): point the import hint at the group command for multi-agent history

fcdbe77·

peyton-alt·2d ago·2 files·+29 added/-1 removed

With several agents' history pending, the single 'run later' hint named only the first agent's import subcommand, so following it looked like the whole import step was resolved. Keep the direct subcommand for one agent; point at 'entire import' (which lists the per-agent subcommands) for several.

Trail-Finding: 019f6822-9c6f-7efa-979c-e2b3cd87598b

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

Sessions

01KXM40XHS2JJZASD3SX9WKQXAView transcript

[?
Fix Onboarding History and Scan Cache IssuesClaude Code·Fable 5·5 steps](/content/gh/entireio/cli/session/4c8ea8be-3447-426e-b8cb-07f2c8a04b71#timeline-01KXM40XHS2JJZASD3SX9WKQXA/index.html)

Changes

2

481 unmodified lines

482
483
484
485
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505

481 unmodified lines

return onboarding.Check{
            State:  onboarding.StateMissing,
            Detail: unimportedDetail(unimported),
            Hint:   "entire import " + unimported[0].Agent,
            Hint:   importHint(unimported),
        }
    },
}

// importHint is the import rung's remediation command. With one agent pending
// it names that agent's import subcommand directly. With several there is
// only one hint slot, and naming just the first would read as "the import
// step is resolved" after running it — point at the group command instead,
// which lists the per-agent subcommands.
func importHint(unimported []agentImportStatus) string {
    if len(unimported) == 1 {
        return "entire import " + unimported[0].Agent
    }
    return "entire import"
}

// unimportedDetail phrases the import rung's remaining work. When nothing was
// ever imported, session counts are accurate ("12 claude-code sessions found,
// not imported"). After a partial import, claiming every discovered session is

Mcmd/entire/cli/onboarding_rungs.go+13/-1

681 unmodified lines

682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703

681 unmodified lines

}

// One hint slot, several agents with pending history: naming only the first
// agent's subcommand would read as "import resolved" after running it. The
// hint points at the group command instead, which lists the per-agent
// subcommands; a single pending agent keeps the direct subcommand.
func TestImportHint_MultiAgentPointsAtGroupCommand(t *testing.T) {
    t.Parallel()
    one := []agentImportStatus{{Agent: "claude-code", UnimportedTurns: 3}}
    if got := importHint(one); got != "entire import claude-code" {
        t.Errorf("importHint(one agent) = %q, want %q", got, "entire import claude-code")
    }
two := []agentImportStatus{{Agent: "claude-code", UnimportedTurns: 3}, {Agent: "cursor", UnimportedTurns: 1}}
    if got := importHint(two); got != "entire import" {
        t.Errorf("importHint(two agents) = %q, want %q", got, "entire import")
    }
}

// Regression: under a git-refs checkpoint primary, an import writes
// refs/entire/checkpoints/<shard>/<id> and never moves the v1 metadata
// branch. The scan fingerprint's metadata tip must still change, or the