Skip to content

Commit 307263d

Browse files
cynfriaclaude
andcommitted
fix(desktop): resolve minor onboarding review items
- CommunityOnboardingFlow: derive the step-dot position from the same condition that picks the rendered page, so the dots no longer regress 6->5 while the starter-team page shows 'Preparing Welcome...' during the finalizing transient. - onboarding-avatar-skip / onboarding-backup specs: capture the full viewport instead of the step subtree, so the portaled docked CTAs actually appear in the QA screenshots again. - NsecMaskedDisplay: memoize the masked-bullet string on nsec instead of reallocating it every render. Co-Authored-By: Claude Opus 4.8 <[email protected]>
1 parent faed2d7 commit 307263d

4 files changed

Lines changed: 22 additions & 10 deletions

File tree

‎desktop/src/features/onboarding/ui/CommunityOnboardingFlow.tsx‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,16 @@ export function CommunityOnboardingFlow({
109109
};
110110

111111
// Community join is the tail of the 6-page journey: profile is page 5, the
112-
// starter-team intro is page 6. Transient join states sit on page 5.
113-
const communityStep = transaction.stage === "team-intro" ? 6 : 5;
112+
// starter-team page is page 6. That page renders for both "team-intro" and
113+
// the "finalizing" transient, so mirror the render condition here — only the
114+
// claiming/connecting/profile states sit on page 5. (Keying off "team-intro"
115+
// alone made the dots regress 6→5 while "Preparing Welcome…" was shown.)
116+
const communityStep =
117+
transaction.stage === "claiming" ||
118+
transaction.stage === "connecting" ||
119+
transaction.stage === "profile"
120+
? 5
121+
: 6;
114122

115123
return (
116124
<div

‎desktop/src/features/onboarding/ui/NsecMaskedDisplay.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ export function NsecMaskedDisplay({
5252
// explicit break opportunity the masked key overflows its container. The mask
5353
// is decorative and non-selectable, and copy uses the raw nsec, so the
5454
// injected ZWSP is never surfaced.
55-
const maskedNsec = Array.from(nsec, () => "•").join("​");
55+
const maskedNsec = React.useMemo(
56+
() => Array.from(nsec, () => "•").join("\u200b"),
57+
[nsec],
58+
);
5659
const iconSize = isBare ? "h-6 w-6" : "h-4 w-4";
5760

5861
return (

‎desktop/tests/e2e/onboarding-avatar-skip.spec.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ test("avatar step always shows Skip for now button without an error", async ({
3131
await expect(skipBtn).toBeEnabled();
3232
await expect(skipBtn).toHaveText("Skip for now");
3333

34-
// Capture a screenshot showing the avatar step with the skip button.
34+
// Capture the whole viewport: the Skip/Next/Back CTAs are portaled into the
35+
// docked footer (a sibling of the step subtree), so a section-scoped shot
36+
// would omit the very buttons this artifact is meant to show.
3537
await waitForAnimations(page);
36-
const avatarSection = page.locator('[data-testid="onboarding-page-avatar"]');
37-
await avatarSection.screenshot({
38+
await page.screenshot({
3839
path: `${SHOTS}/01-avatar-skip-button.png`,
3940
});
4041
});

‎desktop/tests/e2e/onboarding-backup.spec.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ test("backup step shows masked nsec from mock bridge", async ({ page }) => {
3838
await expect(revealBtn).toBeVisible();
3939
await expect(nsecDisplay).toHaveCSS("filter", /blur/);
4040

41-
// Take a screenshot of the masked state.
41+
// Take a screenshot of the masked state. Capture the whole viewport: the CTAs
42+
// are portaled into the docked footer outside the step subtree.
4243
await waitForAnimations(page);
43-
const backupSection = page.locator('[data-testid="onboarding-page-backup"]');
44-
await backupSection.screenshot({
44+
await page.screenshot({
4545
path: `${SHOTS}/02-backup-step-masked.png`,
4646
});
4747

@@ -52,7 +52,7 @@ test("backup step shows masked nsec from mock bridge", async ({ page }) => {
5252

5353
// Take a screenshot of the revealed state.
5454
await waitForAnimations(page);
55-
await backupSection.screenshot({
55+
await page.screenshot({
5656
path: `${SHOTS}/03-backup-step-revealed.png`,
5757
});
5858
});

0 commit comments

Comments
 (0)