feat(FN-4743): complete Step 1 — add mail cleanup project setting

Fusion-Task-Id: FN-4743
Fusion-Task-Lineage: 50d1d8e4-66d5-4299-843b-28072a904277
This commit is contained in:
Fusion (runfusion.ai)
2026-05-16 10:20:18 -07:00
committed by gsxdsm
parent 7c0624c74a
commit 92a85b8a9d
3 changed files with 11 additions and 0 deletions

View File

@@ -96,6 +96,13 @@ describe("settings key parity", () => {
expect(isGlobalSettingsKey("chatAutoCleanupDays")).toBe(false);
});
it("defaults mailAutoCleanupDays to off and keeps it project-scoped", () => {
expect(DEFAULT_PROJECT_SETTINGS.mailAutoCleanupDays).toBe(0);
expect(isProjectSettingsKey("mailAutoCleanupDays")).toBe(true);
expect(isGlobalSettingsKey("mailAutoCleanupDays")).toBe(false);
expect(PROJECT_SETTINGS_KEYS).toContain("mailAutoCleanupDays");
});
it("keeps heartbeatScopeDiscipline project-scoped with strict default", () => {
expect(DEFAULT_PROJECT_SETTINGS.heartbeatScopeDiscipline).toBe("strict");
expect(isProjectSettingsKey("heartbeatScopeDiscipline")).toBe(true);

View File

@@ -348,6 +348,7 @@ export const DEFAULT_PROJECT_SETTINGS = {
reviewHandoffPolicy: "disabled",
showQuickChatFAB: false,
chatAutoCleanupDays: 0,
mailAutoCleanupDays: 0,
chatRoomRecentVerbatimMessages: 12,
chatRoomCompactionFetchLimit: 80,
chatRoomSummaryMaxChars: 1_500,

View File

@@ -3030,6 +3030,9 @@ export interface ProjectSettings {
/** Number of days of chat inactivity before old chat sessions/rooms are auto-cleaned.
* Allowed values: 0 (off, default), 7, 14, 30, 60, 90. Uses updatedAt inactivity age. */
chatAutoCleanupDays?: number;
/** Number of days of inactivity before old inbox/outbox messages are auto-pruned.
* Allowed values: 0 (off, default) or one of 7 | 14 | 30 | 60 | 90. Uses messages.updatedAt inactivity age. */
mailAutoCleanupDays?: number;
/** Number of most-recent chat-room messages kept verbatim in the responder transcript.
* Older messages are compacted into a summary block. Default: 12. */
chatRoomRecentVerbatimMessages?: number;