Skip to content

Commit 8070a0e

Browse files
committed
fix(web): explain the 30-day import window on /welcome
The import step listed every folder an agent had used, but the server only imports conversations from the last 30 days. Picking an older folder quietly created an empty project. The step now says only conversations from the last 30 days are imported, and rows whose newest conversation is older than that show "No recent conversations". The cutoff reuses the window that already drives the default selection.
1 parent 2c592a1 commit 8070a0e

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎apps/web/src/components/onboarding/WelcomeWizard.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
4242
import { completeOnboarding } from "../../onboarding/firstRun";
4343
import {
4444
groupOnboardingProjects,
45+
isOutsideImportWindow,
4546
partitionOnboardingProjects,
4647
onboardingProjectKey,
4748
resolveOnboardingLandingProject,
@@ -1425,6 +1426,9 @@ function ImportStep({
14251426
title="Import your projects"
14261427
description="Import projects and conversations from Claude Code and Codex on your selected computers."
14271428
>
1429+
<p className="mt-1 text-sm leading-relaxed text-muted-foreground">
1430+
Only conversations from the last 30 days are imported.
1431+
</p>
14281432
{candidates.length > 0 ? (
14291433
<div className="mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground">
14301434
<span role="status">
@@ -1711,6 +1715,9 @@ function ImportCandidateRow({
17111715
</TooltipTrigger>
17121716
<TooltipPopup variant="code">{candidate.path}</TooltipPopup>
17131717
</Tooltip>
1718+
{isOutsideImportWindow(candidate.lastActiveAt) ? (
1719+
<span className="shrink-0 text-2xs text-muted-foreground">No recent conversations</span>
1720+
) : null}
17141721
<ImportRowMeta
17151722
sources={nested ? null : candidate.sources}
17161723
threadCount={candidate.threadCount}

‎apps/web/src/onboarding/projectImport.logic.test.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { describe, expect, it } from "vite-plus/test";
33

44
import {
55
groupOnboardingProjects,
6+
isOutsideImportWindow,
67
partitionOnboardingProjects,
78
onboardingProjectKey,
89
resolveOnboardingLandingProject,
@@ -70,6 +71,19 @@ describe("partitionOnboardingProjects", () => {
7071
});
7172
});
7273

74+
describe("isOutsideImportWindow", () => {
75+
it("flags folders whose newest conversation is older than 30 days", () => {
76+
expect(isOutsideImportWindow("2026-07-01T12:00:00.000Z", now)).toBe(true);
77+
expect(isOutsideImportWindow("2026-07-23T12:00:00.000Z", now)).toBe(false);
78+
expect(isOutsideImportWindow("2026-08-20T12:00:00.000Z", now)).toBe(false);
79+
});
80+
81+
it("does not flag unknown or future activity", () => {
82+
expect(isOutsideImportWindow(null, now)).toBe(false);
83+
expect(isOutsideImportWindow("2026-09-01T12:00:00.000Z", now)).toBe(false);
84+
});
85+
});
86+
7387
describe("groupOnboardingProjects", () => {
7488
it("groups clones by origin, keeps local repos separate, and folds non-git folders away", () => {
7589
const main = candidate("/code/t3code", {

‎apps/web/src/onboarding/projectImport.logic.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ export function partitionOnboardingProjects<T extends AgentSessionProjectCandida
2626
};
2727
}
2828

29+
/**
30+
* The server imports only conversations from the same 30-day window, so importing such a folder
31+
* adds an empty project. An unknown or future time is not treated as stale.
32+
*/
33+
export function isOutsideImportWindow(lastActiveAt: string | null, now = Date.now()): boolean {
34+
return lastActiveAt !== null && Date.parse(lastActiveAt) < now - RECENT_PROJECT_WINDOW_MS;
35+
}
36+
2937
export interface OnboardingProjectGroup<T> {
3038
readonly key: string;
3139
readonly label: string;

0 commit comments

Comments
 (0)