Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const WaitlistCheck: React.FC<OnboardingStepProps> = ({
try {
const data = await WaitlistApi.getWaitlistStatus(processedInput);
setWaitlistStatus(data);
setFirstName(data.firstName ?? "Sailor");
setFirstName(data.firstName ?? "");
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing the previous fallback with an empty string means downstream UI (e.g. the welcome message) will render as 'Welcome, Cap'n ' with a trailing space and no name when firstName is missing. Consider retaining a meaningful fallback (e.g. 'Sailor') or conditionally omitting the space/comma when the name is absent.

Suggested change
setFirstName(data.firstName ?? "");
setFirstName(data.firstName ?? "Sailor");

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Oct 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting firstName to an empty string when data.firstName is null/undefined will result in 'Welcome, Cap'n ' (with trailing space) being displayed. Consider using a default name or handle the empty case in the welcome message.

Suggested change
setFirstName(data.firstName ?? "");
setFirstName(data.firstName ?? "matey");

Copilot uses AI. Check for mistakes.

if ((data.isOnWaitlist && data.isInvited) || data.isActive) {
onNext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = ({
onNext={onNext}
prevBtnDisabled={true}
>
<OnboardingText>Welcome, Captain {firstName}</OnboardingText>
<OnboardingText>Welcome, Cap&apos;n {firstName}</OnboardingText>
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using ' here is unnecessary in JSX text and slightly reduces readability; you can safely use a plain apostrophe: Welcome, Cap'n {firstName}. This avoids HTML entity decoding and keeps the string consistent with typical JSX text content.

Suggested change
<OnboardingText>Welcome, Cap&apos;n {firstName}</OnboardingText>
<OnboardingText>Welcome, Cap'n {firstName}</OnboardingText>

Copilot uses AI. Check for mistakes.
<AsciiContainer>
<AsciiArt>
{` | | |
Expand Down