feat(FN-4306): complete Step 1 — add capacity risk banner setting
Fusion-Task-Id: FN-4306 Fusion-Task-Lineage: b0ab9b60-de02-40a7-ad8b-0ca18c98e16c
This commit is contained in:
@@ -114,6 +114,12 @@ describe("settings key parity", () => {
|
||||
expect(isGlobalSettingsKey("staleHighFanoutBlockerAgeThresholdMs")).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps capacity risk banner toggle project-scoped with off default", () => {
|
||||
expect(DEFAULT_PROJECT_SETTINGS.capacityRiskBannerEnabled).toBe(false);
|
||||
expect(isProjectSettingsKey("capacityRiskBannerEnabled")).toBe(true);
|
||||
expect(isGlobalSettingsKey("capacityRiskBannerEnabled")).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps github tracking keys in expected scopes with documented defaults", () => {
|
||||
expect(DEFAULT_PROJECT_SETTINGS.githubTrackingEnabledByDefault).toBe(false);
|
||||
expect(DEFAULT_PROJECT_SETTINGS.githubTrackingDefaultRepo).toBeUndefined();
|
||||
|
||||
@@ -230,6 +230,7 @@ export const DEFAULT_PROJECT_SETTINGS = {
|
||||
specStalenessMaxAgeMs: 6 * 60 * 60 * 1000,
|
||||
taskStuckTimeoutMs: 600_000,
|
||||
// Capacity risk warning default: only warn once todo is meaningfully backlogged.
|
||||
capacityRiskBannerEnabled: false,
|
||||
capacityRiskTodoThreshold: 20,
|
||||
staleHighFanoutBlockerAgeThresholdMs: 2 * 60 * 60 * 1000,
|
||||
aiSessionTtlMs: 7 * 24 * 60 * 60 * 1000,
|
||||
|
||||
@@ -2300,6 +2300,10 @@ export interface ProjectSettings {
|
||||
* Blocker age is measured from columnMovedAt when available, otherwise updatedAt.
|
||||
* Only blockers currently in in-progress or in-review are eligible. */
|
||||
staleHighFanoutBlockerAgeThresholdMs?: number;
|
||||
/** When true, the dashboard shows the capacity-risk banner once
|
||||
* capacityRiskTodoThreshold is exceeded with zero idle non-ephemeral agents.
|
||||
* Default: false. */
|
||||
capacityRiskBannerEnabled?: boolean;
|
||||
/** Todo count threshold for raising a capacity-risk warning when there are zero
|
||||
* idle non-ephemeral agents available. Warning fires only when todo is strictly
|
||||
* greater than this threshold. Default: 20. */
|
||||
|
||||
Reference in New Issue
Block a user