chore: cut dead code, single-impl abstractions, hand-rolled stdlib #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/ponytail-cuts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the Dead files & modules, yagni, and stdlib / native findings from the ponytail audit. Pure over-engineering cuts — no behavior change.
Dead files & modules
lib/bot/nodes/auth-guard.ts+ rewiregraph.ts— redundant DB lookup; the wwebjs connector already verifies identity and passesuserIdintorunBotMessage, and the__handled__short-circuit is still reachable viacleanup-turn-state.ReceiptViewintoFormUpload(near-duplicate upload UI; PDF-preview dialog folded in), deletereceipt-view.tsx; both importers migrated.SummaryTableinto the dashboard page (markup preserved byte-for-byte), deletesummary-table.tsx.separator.tsx(zero importers).settings/whatsapp/page.tsx— unreachable (nav only links/settings/profile), its pairing flow is non-functional (pairingTokenis never written), and its phone list duplicatesPhoneNumbersSection.yagni
McpContext/McpScope/CTX_HEADER/discarded_contextparam). Auth enforcement (static token / JWT / opaque) unchanged.delete-confirmintoDetailsActions.Badgeto a plain<span>(dropuseRender/mergeProps; variants unchanged).FormCardat its single call site.use-media-queryintodetails-panel.tsx.stdlib / native
parseCatalogusing the existing Zod schema (.strict()+.superRefinefor dup slugs); error messages preserved via custom messages (one test regex updated to Zod'sUnrecognized key)..envparser for nativeprocess.loadEnvFile(Node 22; does not override existing env, matching prior semantics — zero new deps).orderItemsWhere→ drizzleinArray(callers guard against empty ids).todayISO()indaily-summary.OrderStatusEnuminclassify-intent.Bufferbase64url inmcp.tshashOpaqueToken(verified byte-identical hash output).force-staticin storesitemap/robots(output: exportforces static).Verification
tsc --noEmit: management + store cleanvitest run: 25/25 pass (management); catalognode:test5/5 passbiome check: cleannext build(management): success, 11/11 pages, route list confirms/settings/whatsappremovedStore
next buildrequires a live catalog API (build-time fetch underoutput: export) — infra dependency unaffected by these changes; covered by tsc + catalog tests.