Skip to content

refactor: delete unreferenced components and the unused hiIQ ABI - #77

Merged
invisiblemask merged 2 commits into
restructure/iq-hiiq-scopefrom
chore/drop-dead-code
Aug 21, 2026
Merged

refactor: delete unreferenced components and the unused hiIQ ABI#77
invisiblemask merged 2 commits into
restructure/iq-hiiq-scopefrom
chore/drop-dead-code

Conversation

@invisiblemask

@invisiblemask invisiblemask commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Stacked on #76, which is stacked on #74. Review those first.

Pure deletion — 17 files, 1,942 lines, two dependencies. No behaviour changes.

How dead was verified

For each candidate: no import of the file by path anywhere in src, i18n, messages or the root configs, and no reference to any exported identifier. Then pnpm build with a full TypeScript pass, which is the authoritative check for a broken import.

This turned up more than the four files I flagged during #74. Two were mislabelled as live by a first pass and had to be re-checked by hand — zod-enum-from-record is used by messages/_schema.ts, and ui/button / ui/dropdown-menu are used by locale-switcher. Both stay.

What goes

File Why
src/abis/hiIQABI.abi.ts (786 lines) getLockOverview calls Alchemy with a hardcoded 0x18160ddd totalSupply() selector and never loads an ABI. Dead since it landed.
icons/1inch.tsx Duplicate of one-inch.tsx, exporting the same OneInchIcon name. data/exchanges.ts imports the latter.
icons/{QuickSwapIcon,bitget,bithumb,cryptocom,fraxswap,iq-wiki,sushiswap} Venues the current design dropped — markets now shows Binance, Upbit, 1inch and Frax.
svgs/ (all 4) BraindaoLogo, BraindaoLogoDark, BrainLogoWhite, HeroBackground — superseded by layouts/brand-logo and layouts/hero-orbits. Directory removed.
transitions/InViewAnimateBottom.tsx Unused and broken. Directory removed.
ui/{card,container-scroll-animation,popover}.tsx Unused shadcn scaffolding.

InViewAnimateBottom is worth calling out: it destructured const { inView } = useInView() without ever attaching the observer's ref to a node, so inView was permanently false, and the useAnimation() controls it drove were never bound to any motion component. The animation that actually ran came from whileInView on the motion.div. So the component was doing nothing even if something had imported it.

Dependencies dropped

  • @radix-ui/react-popover — sole consumer was ui/popover.tsx
  • react-intersection-observer — sole consumer was InViewAnimateBottom.tsx

Verification

  • pnpm build clean; TypeScript pass clean; both routes generated
  • pnpm biome check . clean (scope drops 89 → 72 files)
  • Dev server, /en and /en/hiiq: 29 SVGs, 0 empty, 1 zero-box (the hidden mobile hamburger) — identical to the pre-deletion baseline
  • All 7 chain and venue icons in #markets render with real geometry and child nodes, including 1inch at 18×18 from the surviving one-inch.tsx
  • Footer socials render (3 SVGs); #treasury anchor resolves; live data intact (0.0006 / 16.68M / 27B / 2.5B locked, and 8B HiIQ on /hiiq)
  • Console clean apart from HMR websocket noise from the server restart

Note on the stack

Ten of the files reformatted in #76 are deleted here, so most of that PR's churn evaporates at merge. Leaving the order as-is rather than rewriting two open PRs' history — but if you'd rather review a small #76, say so and I'll reorder the stack so the deletion lands first.

One non-deletion change

pnpm remove silently dropped the pnpm.comment key documenting why the overrides block exists and that Tailwind 4 retires it — pnpm rewrites its own pnpm field and discards keys it doesn't recognise. Restored as a top-level "//pnpm", which survives an add + remove round-trip (verified).

Rebased on the updated base

The merge of #73's hiIQ page rewrite is propagated down the stack (#74#76 → here). No conflicts at this level. Re-verified after the merge: none of the 18 files the base added imports anything this PR deletes, biome check . is clean over 84 files, pnpm build and the TypeScript pass are clean, and all three deleted directories stay gone.

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
braindao-ui Ready Ready Preview Aug 21, 2026 9:04am

Request Review

Nothing imports any of these — verified by path and by exported
identifier across src, i18n and messages, then confirmed by a clean
tsc pass.

- src/abis/hiIQABI.abi.ts (1.5k lines): getLockOverview talks to Alchemy
  with a hardcoded `0x18160ddd` totalSupply selector and never loads an
  ABI, so this has been dead since it landed
- icons/1inch.tsx: a duplicate of one-inch.tsx exporting the same
  OneInchIcon name; exchanges.ts imports the latter
- icons for QuickSwap, Bitget, Bithumb, Crypto.com, Fraxswap, IQ.wiki
  and SushiSwap: venues the current design dropped
- svgs/: all four logo and hero-background variants, superseded by
  layouts/brand-logo and hero-orbits
- transitions/InViewAnimateBottom.tsx: also broken — it never attached
  useInView's ref to a node, so `inView` was permanently false and the
  useAnimation controls were never bound to a component. The visible
  animation came from `whileInView` on the motion.div all along
- ui/card.tsx, ui/container-scroll-animation.tsx, ui/popover.tsx:
  unused shadcn scaffolding

Drops @radix-ui/react-popover (only popover.tsx) and
react-intersection-observer (only InViewAnimateBottom.tsx).
@invisiblemask
invisiblemask changed the base branch from chore/biome-formatting to restructure/iq-hiiq-scope August 21, 2026 09:28
@invisiblemask
invisiblemask merged commit 879d823 into restructure/iq-hiiq-scope Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant