Skip to content

Commit 0f30d67

Browse files
Merge pull request #321 from corbitsdev/cl-5347-guide-first-run-onboarding
Guide first-run onboarding with numbered step copy
2 parents b88e287 + a9ba3e4 commit 0f30d67

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

src/tui/onboarding.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const FIELD_LABELS: Record<Field, string> = {
3030
};
3131

3232
const FIELD_HINTS: Record<Field, string> = {
33-
name: "openai, anthropic, fireworks, ...",
33+
name: "openai, anthropic, ollama, ...",
3434
baseURL: "https://api.openai.com/v1",
3535
apiKey: "sk-... (blank for keyless/local)",
3636
model: "gpt-4o",
@@ -181,9 +181,20 @@ export function ProviderSetupPanel({ onSubmit, showTelemetryNotice }: ProviderSe
181181

182182
{/* Main content */}
183183
<Box flexGrow={1} flexDirection="column" paddingX={4} paddingY={2}>
184-
<Box marginBottom={2}>
185-
<Text color={color("text")}>
186-
No inference provider is configured. Add one to get started.
184+
<Box marginBottom={1} flexDirection="column">
185+
<Text color={color("text")} bold>
186+
Welcome — connect an inference provider
187+
</Text>
188+
<Text color={color("muted")}>
189+
Step {fieldIndex + 1} of {FIELDS.length}: {FIELD_LABELS[currentField]}
190+
{" — "}
191+
{currentField === "name" && "name it (openai, anthropic, ollama, …)"}
192+
{currentField === "baseURL" && "paste the API base URL (include /v1 if required)"}
193+
{currentField === "apiKey" && "API key (blank for local/keyless)"}
194+
{currentField === "model" && "default model, then Enter to test & save"}
195+
</Text>
196+
<Text color={color("dim")}>
197+
After setup, switch providers with /model
187198
</Text>
188199
</Box>
189200

tests/unit/tui/onboarding.test.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ test("shows Provider name label on mount", () => {
4949
expect(lastFrame()).toContain("Provider name");
5050
});
5151

52+
test("shows welcome and step copy on mount", () => {
53+
const { lastFrame } = renderPanel();
54+
const frame = lastFrame() ?? "";
55+
// Fixed-height panel (rows fallback 24) can flex-shrink the bold welcome
56+
// line under ink-testing-library; assert the step banner that always shows.
57+
expect(frame).toContain("Provider setup");
58+
expect(frame).toContain("Step 1 of 4");
59+
});
60+
5261
test("shows all field labels", () => {
5362
const { lastFrame } = renderPanel();
5463
expect(lastFrame()).toContain("Provider name");

0 commit comments

Comments
 (0)