Skip to content

Commit f654914

Browse files
committed
Overlay branch overlay/web-import-window on top of origin/main via Merge
* apps/web/src/components/onboarding/WelcomeWizard.tsx * apps/web/src/onboarding/projectImport.logic.ts • 1b4b0e4e7c Overlay branch overlay/web-import-window on top of origin/main via Merge |\ | • 64bd229 Overlay branch overlay/web-import-window on top of origin/main via Merge | |\ | | • 8070a0e fix(web): explain the 30-day import window on /welcome | |/ • | becf853 fix(web): PDF search finds phrases that wrap across lines (pingdotgg#25702) • | 68339a0 refactor(mobile): pull request list, filters and viewed files without synchronizing effects (pingdotgg#25614) • | a2398c2 refactor(mobile): thread inspector mode is derived, not synced (pingdotgg#25682) • | 9bc0c33 refactor(mobile): settings use web's pages and groups (pingdotgg#25686) • | 5432d8e refactor(web): drafts promote from the draft store, not from route effects (pingdotgg#25615)
2 parents becf853 + 64bd229 commit f654914

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,
@@ -1419,6 +1420,9 @@ function ImportStep({
14191420
title="Import your projects"
14201421
description="Import projects and conversations from Claude Code and Codex on your selected computers."
14211422
>
1423+
<p className="mt-1 text-sm leading-relaxed text-muted-foreground">
1424+
Only conversations from the last 30 days are imported.
1425+
</p>
14221426
{candidates.length > 0 ? (
14231427
<div className="mt-5 flex items-center justify-between gap-3 text-xs text-muted-foreground">
14241428
<span role="status">
@@ -1705,6 +1709,9 @@ function ImportCandidateRow({
17051709
</TooltipTrigger>
17061710
<TooltipPopup variant="code">{candidate.path}</TooltipPopup>
17071711
</Tooltip>
1712+
{isOutsideImportWindow(candidate.lastActiveAt) ? (
1713+
<span className="shrink-0 text-2xs text-muted-foreground">No recent conversations</span>
1714+
) : null}
17081715
<ImportRowMeta
17091716
sources={nested ? null : candidate.sources}
17101717
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
@@ -23,6 +23,14 @@ export function partitionOnboardingProjects<T extends AgentSessionProjectCandida
2323
};
2424
}
2525

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

0 commit comments

Comments
 (0)