chore: simplify file-size check to a flat 1000-line limit#839
Merged
Conversation
Replace the homegrown per-file override sprawl with a single shared check. The 500-line limit had grown ~50 grandfathered overrides in desktop, turning the escape hatch into the norm. - Extract the walk/count/violation logic into a shared core at scripts/check-file-sizes-core.mjs; desktop and web now import it so the two checks can't drift. The core also guards missing root dirs (previously only web did). - Raise the limit to a flat 1000 per rule. No warnings, no two-tier. - Drop all overrides except the 7 desktop files that genuinely exceed 1000; those stay as TEMP entries (at current line count) to be split in a follow-up. Web has no overrides. pnpm -r check is green: biome clean + both file-size checks pass. Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
wpfleger96
added a commit
that referenced
this pull request
Jun 4, 2026
mergeDetails unconditionally overwrote memberCount with details.memberCount, which is always 0 — ChannelDetails is built from kind:39000 metadata that carries no member information. The batch kind:39002 fetch in channelsProvider correctly populates the count, but mergeDetails clobbered it before the UI rendered. Preserve the base channel's memberCount instead. Also restores desktop/scripts/check-file-sizes.mjs to main's simplified format — rebase replayed branch commits that modified the old per-file overrides map, re-introducing the pre-#839 format.
michaelneale
added a commit
that referenced
this pull request
Jun 4, 2026
* origin/main: (36 commits) fix: use immutable commit-SHA URLs in screenshot PR comments (#842) feat(mobile+desktop): two-tier Slack-style app icon badge (#802) chore: simplify file-size check to a flat 1000-line limit (#839) fix(desktop): robust emoji picker — unify picker + fix custom emoji in editing, status, reactions (#837) feat(desktop): reusable screenshot workflow for agents (#826) desktop(mesh-llm): let a serving node route a different model (#833) chore(release): release version 0.3.9 (#832) fix: native arbitrary-file download + image context-menu flash (#830) fix(desktop): custom emoji reaction rendering + picker autofocus (#831) Mesh-LLM v1: relay-gated direct-iroh inference between users (WAN) (#822) chore(release): release version 0.3.8 (#829) chore(release): release version 0.3.7 (#825) feat: code block rendering, syntax highlighting, and compose fixes (#803) feat: custom emoji — user-owned NIP-30 sets with a client-side union (#816) Install sprout-cli skill at repo root + fix desktop clippy (#818) fix(desktop): use public re-export path for ensure_client_node_for_model (#824) refactor(desktop): feature-gate mesh-llm-sdk behind optional Cargo feature (#823) fix(desktop): align workflow read/save commands to the frontend contract (#820) fix(desktop): disable mesh-llm auto-build to prevent git config corruption (#819) fix(desktop): clear clippy lints in agents/mesh_llm commands (#817) ... # Conflicts: # Cargo.lock # desktop/scripts/check-file-sizes.mjs # desktop/src-tauri/Cargo.toml # desktop/src/app/AppShell.tsx # desktop/src/app/AppTopChrome.tsx # desktop/src/features/messages/hooks.ts # desktop/src/features/workspaces/useWorkspaceInit.ts # desktop/src/shared/api/tauri.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Simplify the file-size check to a flat 1000-line limit and replace the per-file override sprawl with a single shared implementation.
The previous 500-line limit had accumulated ~50 grandfathered overrides in desktop, each with a paragraph of justification — the escape hatch had become the norm rather than the exception. This raises the floor to a level where overrides are genuinely rare.
Changes
scripts/check-file-sizes-core.mjs(new) — shared walk/count/violation/exit logic at the repo root, owned by neither app. Desktop and web both import it so the two checks can't drift. Also folds in the missing-root-dir guard that previously onlywebhad.desktop/scripts/check-file-sizes.mjs→ thin config (rules + 7 TEMP overrides).web/scripts/check-file-sizes.mjs→ thin config (rules only, no overrides).Behavior
TEMPentries (at current line count) and marked "split me, don't add to this list." They're a deferred backlog to split in a follow-up.Verification
pnpm -r checkgreen — biome clean (566 desktop + 53 web files) + both size checks pass on a clean tree.Follow-up
Split the 7 oversized files:
nest.rs,runtime.rs,huddle/tts.rs,tauri.ts,nostr_convert.rs,relayClientSession.ts,migration.rs.