mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
69 lines
2.7 KiB
JavaScript
69 lines
2.7 KiB
JavaScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { runFileSizeCheck } from "../../scripts/check-file-sizes-core.mjs";
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const projectRoot = path.resolve(__dirname, "..");
|
|
|
|
const MAX_LINES = 1000;
|
|
|
|
const rules = [
|
|
{ root: "src-tauri/src", extensions: new Set([".rs"]), maxLines: MAX_LINES },
|
|
{
|
|
root: "src/app",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/features",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/api",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: MAX_LINES,
|
|
},
|
|
];
|
|
|
|
// TEMP — these files exceed the 1000-line limit and are queued to be split.
|
|
// Do not add to this list; split the file instead. Remove each entry as its
|
|
// file is broken up. Tracked as a follow-up.
|
|
const overrides = new Map([
|
|
["src-tauri/src/commands/agents.rs", 1294],
|
|
// Residual repos_dir integration in ensure_nest_at: REPOS is provisioned
|
|
// outside NEST_DIRS (it may be a symlink), so it needs its own create +
|
|
// chmod-only-when-real-dir handling plus integration test coverage. The
|
|
// self-contained repos_dir functions and their unit tests live in repos.rs;
|
|
// this is the seam that must stay in nest.rs. Approved override; still queued
|
|
// to split with the rest of this list.
|
|
["src-tauri/src/managed_agents/nest.rs", 1447],
|
|
["src-tauri/src/managed_agents/runtime.rs", 1953],
|
|
["src-tauri/src/managed_agents/personas.rs", 1080],
|
|
["src-tauri/src/managed_agents/persona_card.rs", 1050],
|
|
// applyWorkspace reposDir parameter threaded through the Tauri invoke for
|
|
// configurable repos_dir — a 3-line overage from load-bearing parameter
|
|
// plumbing, not generic debt growth. Approved override; still queued to split.
|
|
["src/shared/api/tauri.ts", 1198],
|
|
["src-tauri/src/nostr_convert.rs", 1126],
|
|
["src/shared/api/relayClientSession.ts", 1022],
|
|
["src-tauri/src/migration.rs", 1295],
|
|
// onMarkRead + isUnread prop threading (mirrors the onMarkUnread prop
|
|
// already here) for the single-toggle mark-read/unread menu item — a small
|
|
// overage from load-bearing per-message plumbing, not generic debt growth.
|
|
// Approved override; still queued to split with the rest of this list.
|
|
["src/features/messages/ui/MessageThreadPanel.tsx", 1006],
|
|
// useDueReminderBadgeCount hook call + sum to wire due-reminder count into
|
|
// the Inbox nav badge — a small overage from load-bearing badge plumbing,
|
|
// not generic debt growth. Approved override; still queued to split.
|
|
["src/app/AppShell.tsx", 1007],
|
|
]);
|
|
|
|
await runFileSizeCheck({
|
|
projectRoot,
|
|
rules,
|
|
overrides,
|
|
label: "Desktop",
|
|
scriptPath: "desktop/scripts/check-file-sizes.mjs",
|
|
});
|