mirror of
https://github.com/block/buzz.git
synced 2026-11-12 04:12:21 +00:00
The thread-open divider missed replies revealed after first open: the open-time read snapshot captured only the initially visible set, so a reply expanded later was both marked read and absent from the snapshot, collapsing the divider. Grow the snapshot per reveal — each reply's read state is captured the first render it becomes visible, before the mark-read effect — so the divider anchors to what was unread when each reply first appeared. The 05/07/14 E2E cases asserted the deleted whole-subtree-on-open contract (single expand clearing a 2-levels-deep badge); rewritten to the v3 direct-children-only contract, with comments updated to drop the removed machinery. AppShell trimmed under the 1000-line gate with no logic change; MessageThreadPanel carries an approved size override for the onMarkRead prop-pair completion. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
55 lines
1.7 KiB
JavaScript
55 lines
1.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],
|
|
["src-tauri/src/managed_agents/nest.rs", 1420],
|
|
["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],
|
|
["src/shared/api/tauri.ts", 1196],
|
|
["src-tauri/src/nostr_convert.rs", 1126],
|
|
["src/shared/api/relayClientSession.ts", 1022],
|
|
["src-tauri/src/migration.rs", 1295],
|
|
// onMarkRead prop-pair completion (mirrors the onMarkUnread prop already
|
|
// threaded here) — a 1-line overage, not generic debt growth. Approved
|
|
// override; still queued to split with the rest of this list.
|
|
["src/features/messages/ui/MessageThreadPanel.tsx", 1002],
|
|
]);
|
|
|
|
await runFileSizeCheck({
|
|
projectRoot,
|
|
rules,
|
|
overrides,
|
|
label: "Desktop",
|
|
scriptPath: "desktop/scripts/check-file-sizes.mjs",
|
|
});
|