Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8ffeaed
feat: task history retention purge uses provider delete path; checkpo…
hannesrudolph Nov 14, 2025
e6395f2
fix: address race condition in task purge by processing deletions seq…
hannesrudolph Nov 19, 2025
7b8555d
fix: update translations for task history retention settings
hannesrudolph Nov 19, 2025
5f08421
fix: update settings.json translations for task history retention
hannesrudolph Nov 19, 2025
f7298a0
fix: update task history retention descriptions for multiple languages
hannesrudolph Nov 26, 2025
be916ca
fix: remove unused import and fix translation issues
hannesrudolph Nov 26, 2025
fc04b9f
fix: add missing props to About.spec.tsx tests
hannesrudolph Nov 26, 2025
8b30590
fix: remove 'as any' type casts in retention feature
hannesrudolph Nov 26, 2025
dbf47c2
refactor(retention): narrow RetentionSetting type and optimize deleti…
hannesrudolph Nov 27, 2025
8c14275
test(webview): align About component test props with new retention union
hannesrudolph Jan 20, 2026
d1bdbd5
test: stabilize checkpoint service temp dir cleanup
hannesrudolph Jan 20, 2026
06df1ca
Update src/extension.ts
hannesrudolph Jan 20, 2026
64b08fb
Update src/__tests__/task-history-retention.spec.ts
hannesrudolph Jan 20, 2026
f145a52
fix: clarify aboutRetention text - runs on extension activation, not …
daniel-lxs Jan 20, 2026
b6f662f
feat: add task storage size display to settings
daniel-lxs Jan 20, 2026
86f29ec
i18n: add taskHistoryStorage translations to all locales
daniel-lxs Jan 20, 2026
33b58be
fix: add background purgeOldTasks call and remove duplicate NLS keys
hannesrudolph Jan 20, 2026
523abdb
fix: resolve merge conflict, use startBackgroundRetentionPurge() for …
daniel-lxs Jan 20, 2026
7c0ce3e
fix: handle non-existent workspace repo in checkpoint cleanup
daniel-lxs Jan 20, 2026
0ba7cda
chore: move task history retention to app state
hannesrudolph Jan 20, 2026
bf483c9
fix: address mrubens review feedback for task history retention
hannesrudolph Jan 20, 2026
7083b1a
fix: add missing task history retention translations
hannesrudolph Jan 20, 2026
1eb887d
test(core): increase timeout for CustomToolRegistry clearCache test
hannesrudolph Jan 20, 2026
56ac6ef
Update webview-ui/src/components/settings/SettingsView.tsx
hannesrudolph Jan 21, 2026
18894da
fix: address mrubens review on retention types and settings navigation
hannesrudolph Jan 21, 2026
b19ab45
perf: replace storage size calculation with fast task count
hannesrudolph Jan 26, 2026
1ee2ac9
chore: remove unnecessary backwards compat re-export
hannesrudolph Jan 26, 2026
c9cb00e
chore: remove unrelated formatBytes tests from task-storage-size
hannesrudolph Jan 26, 2026
4c173af
fix: add taskHistoryRetention default to initial state to fix persist…
hannesrudolph Jan 26, 2026
b5e3a3d
perf: optimize task history retention purge with parallel processing
hannesrudolph Jan 26, 2026
19efb33
feat: add automatic checkpoint culling for inactive tasks
hannesrudolph Jan 26, 2026
0540d27
fix: simplify retention purge notification - remove non-working View …
hannesrudolph Jan 26, 2026
69b6ba5
feat: add progress logging to checkpoint culling
hannesrudolph Jan 26, 2026
739f6c1
feat(history): move retention settings to history view with gear icon…
hannesrudolph Jan 27, 2026
fea999b
feat: improve retention UX with confirmation dialog and friendly mess…
hannesrudolph Jan 27, 2026
9c92200
chore: remove unused formatBytes.ts file
hannesrudolph Jan 27, 2026
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 @@ -281,7 +281,7 @@ describe("CustomToolRegistry", () => {
const result = await registry.loadFromDirectory(TEST_FIXTURES_DIR)

expect(result.loaded).toContain("cached")
}, 30000)
}, 120_000)
})

describe.sequential("loadFromDirectories", () => {
Expand Down
18 changes: 18 additions & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ export const MAX_CHECKPOINT_TIMEOUT_SECONDS = 60
*/
export const DEFAULT_CHECKPOINT_TIMEOUT_SECONDS = 15

/**
* Allowed values for the task history retention setting.
* Stored as strings in most UI/extension flows.
*/
export const TASK_HISTORY_RETENTION_OPTIONS = ["never", "90", "60", "30", "7", "3"] as const

export type TaskHistoryRetentionSetting = (typeof TASK_HISTORY_RETENTION_OPTIONS)[number]

/**
* GlobalSettings
*/
Expand Down Expand Up @@ -181,6 +189,16 @@ export const globalSettingsSchema = z.object({
customSupportPrompts: customSupportPromptsSchema.optional(),
enhancementApiConfigId: z.string().optional(),
includeTaskHistoryInEnhance: z.boolean().optional(),
// Auto-delete task history on extension reload.
taskHistoryRetention: z.enum(TASK_HISTORY_RETENTION_OPTIONS).optional(),
// Calculated task history count for the Settings > About page
// Note: Size calculation was removed for performance reasons - with large numbers of
// tasks (e.g., 9000+), recursively stat'ing every file caused significant delays.
taskHistorySize: z
.object({
taskCount: z.number(),
})
.optional(),
historyPreviewCollapsed: z.boolean().optional(),
reasoningBlockCollapsed: z.boolean().optional(),
/**
Expand Down
10 changes: 10 additions & 0 deletions packages/types/src/vscode-extension-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ export type ExtensionState = Pick<
| "maxGitStatusFiles"
| "requestDelaySeconds"
| "showWorktreesInHomeScreen"
| "taskHistoryRetention"
> & {
version: string
clineMessages: ClineMessage[]
Expand Down Expand Up @@ -395,6 +396,14 @@ export type ExtensionState = Pick<
marketplaceInstalledMetadata?: { project: Record<string, any>; global: Record<string, any> }
profileThresholds: Record<string, number>
hasOpenedModeSelector: boolean
/** Task history count for the Settings > About page
* Note: Size calculation was removed for performance reasons - with large numbers of
* tasks (e.g., 9000+), recursively stat'ing every file caused significant delays.
*/
taskHistorySize?: {
/** Number of task directories */
taskCount: number
}
openRouterImageApiKey?: string
messageQueue?: QueuedMessage[]
lastShownAnnouncementId?: string
Expand Down Expand Up @@ -592,6 +601,7 @@ export interface WebviewMessage {
| "requestModes"
| "switchMode"
| "debugSetting"
| "refreshTaskHistorySize"
// Worktree messages
| "listWorktrees"
| "createWorktree"
Expand Down
13 changes: 13 additions & 0 deletions src/__tests__/extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ vi.mock("../core/config/ContextProxy", () => ({
setValue: vi.fn(),
getValues: vi.fn().mockReturnValue({}),
getProviderSettings: vi.fn().mockReturnValue({}),
// Needed by retention purge on activation
globalStorageUri: { fsPath: "/tmp/roo-retention-test" },
}),
},
}))
Expand Down Expand Up @@ -157,6 +159,17 @@ vi.mock("../utils/autoImportSettings", () => ({
autoImportSettings: vi.fn().mockResolvedValue(undefined),
}))

// Avoid filesystem access during activation by stubbing background purge
vi.mock("../utils/task-history-retention", () => ({
startBackgroundRetentionPurge: vi.fn(),
startBackgroundCheckpointPurge: vi.fn(),
}))

// Ensure storage base path resolves to provided path to avoid touching VS Code config
vi.mock("../utils/storage", () => ({
getStorageBasePath: (p: string) => Promise.resolve(p),
}))

vi.mock("../extension/api", () => ({
API: vi.fn().mockImplementation(() => ({})),
}))
Expand Down
Loading
Loading