Skip to content

Commit 5528d20

Browse files
committed
fix(review): avoid a UI typecheck regression from a new agent-actions import
focus-manifest.ts is part of the UI package's typechecked closure (its transitive deps get walked by apps/gittensory-ui's own tsc run). Importing MAX_REVIEW_NAG_COOLDOWN_DAYS from settings/agent-actions.ts pulled that module's own import of github/commands.ts -> utils/crypto.ts into the UI build for the first time, exposing a pre-existing latent Uint8Array<ArrayBufferLike>/BufferSource type mismatch in crypto.ts that the UI's tsc had never previously reached. Duplicates the small constant locally in focus-manifest.ts instead of importing it, keeping db/repositories.ts's own import from agent-actions.ts (never part of the UI closure) unaffected. Also rebases the branch's merge commit into a linear rebase onto current main.
1 parent f9526e8 commit 5528d20

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/signals/focus-manifest.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { normalizeAutonomyPolicy, normalizeAutoMaintainPolicy } from "../setting
44
import { normalizeCommandAuthorizationPolicy } from "../settings/command-authorization";
55
import { mergeContributorBlacklists, normalizeContributorBlacklist } from "../settings/contributor-blacklist";
66
import { normalizeAutoCloseExemptLogins } from "../settings/auto-close-exempt";
7-
import { MAX_REVIEW_NAG_COOLDOWN_DAYS } from "../settings/agent-actions";
87
import { hasUnsafeWildcardCount } from "./change-guardrail";
98
import { PUBLIC_LOCAL_PATH_INLINE } from "./redaction";
109

@@ -742,6 +741,13 @@ function normalizeOptionalString(value: JsonValue | undefined, field: string, wa
742741
return null;
743742
}
744743

744+
// Keep the review-nag lookback operationally bounded so repo-controlled config cannot overflow Date
745+
// arithmetic. Duplicated from settings/agent-actions.ts's own MAX_REVIEW_NAG_COOLDOWN_DAYS (same value,
746+
// same rationale) rather than imported: this module is part of the UI package's typechecked closure, and
747+
// agent-actions.ts transitively imports github/commands.ts -> utils/crypto.ts, pulling a heavier
748+
// GitHub-App-specific dependency chain into the UI build for one small constant.
749+
const MAX_REVIEW_NAG_COOLDOWN_DAYS = 365;
750+
745751
/**
746752
* Parse the optional `settings:` mapping — a partial repository-settings override. Only recognized
747753
* fields are kept; unknown/invalid values are dropped with a warning and never throw.

0 commit comments

Comments
 (0)