Skip to content
Merged
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
7 changes: 4 additions & 3 deletions src/settings/tabs/AboutTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,18 @@ function ShapeThukiCard() {
className={styles.rowHelper}
style={{ marginBottom: 10, fontStyle: 'italic' }}
>
Hey there, I'm{' '}
Hey, I'm{' '}
<InlineLink
url="https://x.com/quiet_node"
ariaLabel="Open Logan's profile on X"
style={{ fontWeight: 600 }}
>
Logan
</InlineLink>
, founder of Thuki. I'd love to learn how you use it and hear your
, the founder here. Thuki is early and I'm building it around how people
really use it. I'd love to learn how you will use it and hear your
ideas, so I can shape what's next to genuinely help you. Leave your
email and I'll personally reach out, I'd love to talk!
email and I'll reach out personally. Thanks!
</div>
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
<div style={{ flex: 1 }}>
Expand Down
11 changes: 6 additions & 5 deletions src/view/onboarding/SubscribeStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,18 @@ export function SubscribeStep({ onContinue, downloadStatus }: Props) {
}}
>
<Quote />
Hey there, I'm{' '}
Hey, I'm{' '}
<InlineLink
url={X_PROFILE_URL}
ariaLabel="Open Logan's profile on X"
style={{ fontWeight: 600 }}
>
Logan
</InlineLink>
, founder of Thuki. I'd love to learn how you actually use it and hear
, the founder here. Thuki is early and I'm building it around how
people really use it. I'd love to learn how you will use it and hear
your ideas, so I can shape these upcoming features to genuinely help
you. Leave your email and I'll personally reach out, I'd love to talk!
you. Leave your email and I'll reach out personally. Thanks!
<Quote closing />
</p>

Expand Down Expand Up @@ -334,7 +335,7 @@ export function SubscribeStep({ onContinue, downloadStatus }: Props) {
<button
onClick={() => void handleSubscribe()}
disabled={submitting}
aria-label="Help shape what's next for Thuki"
aria-label="Count me in"
style={{
display: 'block',
width: '100%',
Expand All @@ -352,7 +353,7 @@ export function SubscribeStep({ onContinue, downloadStatus }: Props) {
textAlign: 'center',
}}
>
{submitting ? 'Sending…' : "Help shape what's next for Thuki"}
{submitting ? 'Sending…' : 'Count me in'}
</button>

{sendError ? (
Expand Down
44 changes: 13 additions & 31 deletions src/view/onboarding/__tests__/SubscribeStep.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ describe('SubscribeStep', () => {
it('renders the founder note with the inline Logan link', () => {
render(<SubscribeStep onContinue={vi.fn()} />);
expect(
screen.getByText(/founder of Thuki/i, { exact: false }),
screen.getByText(/the founder here/i, { exact: false }),
).toBeInTheDocument();
expect(
screen.getByText(/I'll personally reach out, I'd love to talk!/i, {
screen.getByText(/I'll reach out personally\. Thanks!/i, {
exact: false,
}),
).toBeInTheDocument();
Expand All @@ -77,9 +77,7 @@ describe('SubscribeStep', () => {
const onContinue = vi.fn();
render(<SubscribeStep onContinue={onContinue} />);

fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));

expect(
screen.getByText(/enter a valid email address/i),
Expand All @@ -98,9 +96,7 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: 'not-an-email' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));

expect(
screen.getByText(/enter a valid email address/i),
Expand All @@ -115,9 +111,7 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: ' founder@thuki.app ' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));

expect(invoke).toHaveBeenCalledWith('subscribe_email', {
email: 'founder@thuki.app',
Expand All @@ -142,7 +136,7 @@ describe('SubscribeStep', () => {
target: { value: 'founder@thuki.app' },
});
const button = screen.getByRole('button', {
name: /help shape what's next for thuki/i,
name: /count me in/i,
});
fireEvent.click(button);

Expand All @@ -166,9 +160,7 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: 'founder@thuki.app' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));
// Skip while the subscribe is still pending; this is the single hand-off.
fireEvent.click(screen.getByRole('button', { name: /maybe later/i }));
expect(onContinue).toHaveBeenCalledTimes(1);
Expand All @@ -189,17 +181,15 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: 'founder@thuki.app' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));

expect(
await screen.findByText(/couldn't send right now/i),
).toBeInTheDocument();
expect(onContinue).not.toHaveBeenCalled();
// The button returns to its idle, clickable state for a retry.
expect(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
screen.getByRole('button', { name: /count me in/i }),
).not.toBeDisabled();

// "Maybe later" must still be a way out after a failed send.
Expand All @@ -215,9 +205,7 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: 'founder@thuki.app' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));

expect(await screen.findByText(/too many requests/i)).toBeInTheDocument();
expect(onContinue).not.toHaveBeenCalled();
Expand All @@ -230,9 +218,7 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: 'founder@thuki.app' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));
expect(
await screen.findByText(/couldn't send right now/i),
).toBeInTheDocument();
Expand All @@ -251,9 +237,7 @@ describe('SubscribeStep', () => {
fireEvent.change(screen.getByLabelText('Email address'), {
target: { value: 'not-an-email' },
});
fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));

expect(invoke).not.toHaveBeenCalledWith(
'subscribe_email',
Expand All @@ -264,9 +248,7 @@ describe('SubscribeStep', () => {
it('clears the error as soon as the user edits the email', () => {
render(<SubscribeStep onContinue={vi.fn()} />);

fireEvent.click(
screen.getByRole('button', { name: /help shape what's next for thuki/i }),
);
fireEvent.click(screen.getByRole('button', { name: /count me in/i }));
expect(
screen.getByText(/enter a valid email address/i),
).toBeInTheDocument();
Expand Down
Loading