Skip to content

Commit dd47734

Browse files
committed
fix(init): fix LearnCard height and tighten content
All content blocks now have exactly 8 lines (padded with empty strings) so the panel height stays fixed when blocks rotate. Rewrote content to be more concise and consistent — each block fits cleanly in the ~36-col sidebar. Moved the block counter (1/6) to the title row header to save a line.
1 parent 9cf6915 commit dd47734

2 files changed

Lines changed: 58 additions & 57 deletions

File tree

src/lib/init/ui/ink-app.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
type FileTreeRow,
4141
flattenTree,
4242
} from "./file-tree.js";
43-
import { LEARN_SEQUENCE } from "./learn-content.js";
43+
import { BLOCK_LINE_COUNT, LEARN_SEQUENCE } from "./learn-content.js";
4444
import { SENTRY_TIPS, type SentryTip } from "./sentry-tips.js";
4545
import type { WizardSummary } from "./types.js";
4646
import type {
@@ -680,7 +680,9 @@ function LearnPanel({
680680
if (!block) {
681681
return null;
682682
}
683-
const visibleLines = block.lines;
683+
// Pad short blocks to BLOCK_LINE_COUNT so height stays fixed.
684+
const lines = block.lines.slice(0, BLOCK_LINE_COUNT);
685+
const padding = Math.max(0, BLOCK_LINE_COUNT - lines.length);
684686
return (
685687
<Box
686688
borderColor={MUTED_DIM}
@@ -689,22 +691,23 @@ function LearnPanel({
689691
flexShrink={0}
690692
paddingX={1}
691693
>
692-
<Text bold color={ACCENT}>
693-
{block.title}
694-
</Text>
695-
<Box height={1} />
696-
{visibleLines.map((line, i) => (
697-
// biome-ignore lint/suspicious/noArrayIndexKey: positional content lines
698-
<Text key={i} wrap="wrap">
699-
{line || " "}
694+
<Box justifyContent="space-between">
695+
<Text bold color={ACCENT}>
696+
{block.title}
700697
</Text>
701-
))}
702-
<Box height={1} />
703-
<Box justifyContent="flex-end">
704698
<Text color={MUTED_DIM}>
705699
{learnState.blockIndex + 1}/{LEARN_SEQUENCE.length}
706700
</Text>
707701
</Box>
702+
<Box height={1} />
703+
{lines.map((line, i) => (
704+
// biome-ignore lint/suspicious/noArrayIndexKey: positional content lines
705+
<Text key={i}>{line || " "}</Text>
706+
))}
707+
{Array.from({ length: padding }, (_, i) => (
708+
// biome-ignore lint/suspicious/noArrayIndexKey: positional filler
709+
<Text key={`p${i}`}> </Text>
710+
))}
708711
</Box>
709712
);
710713
}

src/lib/init/ui/learn-content.ts

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,100 @@
11
/**
22
* Educational Content Sequence
33
*
4-
* Content blocks shown in the sidebar while the wizard runs. Each
5-
* block reveals line by line on a timer, transforming dead wait time
6-
* into product education. After all blocks complete, the panel falls
7-
* back to the rotating tip cards.
4+
* Content blocks shown in the sidebar while the wizard runs,
5+
* transforming dead wait time into product education. After all
6+
* blocks complete, the panel falls back to rotating tip cards.
7+
*
8+
* All blocks MUST have exactly `BLOCK_LINE_COUNT` content lines
9+
* (pad with empty strings) so the panel height stays fixed and
10+
* doesn't jump when blocks rotate.
811
*/
912

1013
export type ContentBlock = {
1114
title: string;
1215
lines: string[];
13-
/** Dwell time (ms) after all lines are revealed before advancing. */
14-
pauseMs: number;
1516
};
1617

18+
/** Fixed line count per block — keeps panel height stable. */
19+
export const BLOCK_LINE_COUNT = 8;
20+
1721
export const LEARN_SEQUENCE: ContentBlock[] = [
1822
{
1923
title: "How Sentry Works",
2024
lines: [
21-
"Your App → SDK → Sentry",
25+
"App → SDK → Sentry → Alert",
26+
"",
27+
"The SDK captures errors and",
28+
"performance data, then sends",
29+
"them to Sentry for grouping,",
30+
"alerting, and root-cause",
31+
"analysis.",
2232
"",
23-
"The SDK captures errors, traces,",
24-
"and performance data from your",
25-
"running application and sends",
26-
"them to Sentry for analysis.",
2733
],
28-
pauseMs: 4000,
2934
},
3035
{
3136
title: "Error Tracking",
3237
lines: [
3338
"Every crash is captured with:",
34-
" • Stack trace",
35-
" • Breadcrumbs (user actions)",
36-
" • Device/browser context",
39+
"",
40+
" • Full stack trace",
41+
" • Breadcrumbs & context",
3742
" • Release & commit info",
3843
"",
3944
"Errors are grouped into issues",
40-
"so you fix root causes, not",
41-
"individual reports.",
45+
"so you fix causes, not symptoms.",
4246
],
43-
pauseMs: 4000,
4447
},
4548
{
46-
title: "Performance Monitoring",
49+
title: "Performance Tracing",
4750
lines: [
4851
"Traces show the full journey:",
4952
"",
50-
" Request ─┬─ DB Query (120ms)",
51-
" ├─ API Call (340ms)",
52-
" └─ Render (80ms)",
53+
" Request ─┬─ DB (120ms)",
54+
" ├─ API (340ms)",
55+
" └─ Render (80ms)",
5356
"",
5457
"Find the slow piece without",
5558
"adding manual timers.",
5659
],
57-
pauseMs: 4000,
5860
},
5961
{
6062
title: "Session Replay",
6163
lines: [
62-
"See exactly what the user saw:",
63-
" DOM mutations, clicks,",
64-
" network calls, and console",
65-
" logs — all synced with your",
66-
" error timeline.",
64+
"See what the user saw: DOM",
65+
"mutations, clicks, network",
66+
"calls, and console logs —",
67+
"all synced to the error.",
6768
"",
6869
"Debug by scrubbing a video,",
69-
"not guessing from a stack trace.",
70+
"not reading a stack trace.",
71+
"",
7072
],
71-
pauseMs: 4000,
7273
},
7374
{
7475
title: "Alerts & Integrations",
7576
lines: [
7677
"Get notified when it matters:",
77-
" • Spike in error frequency",
78-
" • New issue after deploy",
78+
"",
79+
" • Error spike after deploy",
7980
" • Slow transaction p95",
81+
" • New regression detected",
8082
"",
8183
"Routes to Slack, PagerDuty,",
82-
"Jira, or email automatically.",
84+
"or email automatically.",
8385
],
84-
pauseMs: 4000,
8586
},
8687
{
8788
title: "What's Next?",
8889
lines: [
89-
"After this wizard finishes:",
90-
"",
91-
" sentry issue list",
92-
" → see your first errors",
93-
"",
94-
" sentry issue explain <id>",
95-
" → AI root-cause analysis",
90+
"After setup finishes, try:",
9691
"",
97-
" sentry trace list",
98-
" → explore performance data",
92+
" sentry issue list",
93+
" → see your first errors",
94+
" sentry issue explain <id>",
95+
" → AI root-cause analysis",
96+
" sentry trace list",
97+
" → explore performance",
9998
],
100-
pauseMs: 5000,
10199
},
102100
];

0 commit comments

Comments
 (0)