Skip to content

Migrate to HeroUI v3 + theme border-radius + realtime polling - #10

Merged
kevincodex1 merged 4 commits into
Gitlawb:mainfrom
itsmeadarsh2008:heroui-migration
Aug 17, 2026
Merged

Migrate to HeroUI v3 + theme border-radius + realtime polling#10
kevincodex1 merged 4 commits into
Gitlawb:mainfrom
itsmeadarsh2008:heroui-migration

Conversation

@itsmeadarsh2008

Copy link
Copy Markdown
Contributor

Summary

Migrates the explorer to @heroui/react (React Aria Components under the hood),
centralises corner radius on the theme --radius variable, and removes the
manual Refresh button in favour of visibility-aware polling across every data view.

HeroUI v3 migration

  • Replaces native HTML button, select, and a with HeroUI equivalents
    (Button, Select+Menu, Link) across ~10 components.
  • Rewrote the Command Palette as a custom fixed overlay (dropped cmdk):
    transparent backdrop (centered, no dimming), body-scroll lock on open.
  • Drawer navigation: trigger/close buttons styled directly (no nested ),
    close wired to onPress so the menu dismisses reliably on all pages.
  • Removed obsolete local components/ui/{badge,card,button,input-group,separator,table,tabs}.tsx.

Theme

  • Customizer exposes 10 accent colors, 5 base hues, 10 fonts (dynamic Google
    Fonts CDN), and 4 radius presets (--radius / --field-radius).
  • All border-radius now driven by the theme variable — replaced hardcoded
    rounded-[2px]/rounded-lg/rounded-sm/rounded-md across 14 files.

Realtime (no manual refresh)

  • Deleted useRefreshKey; polling covers every hook via visibility-aware
    useAutoRefresh:
    • events / tasks: 30s (high-churn feeds)
    • repos / agents / peers / network / home / topbar: 60s
  • Error blocks re-fetch on the next tick instead of offering a Retry button.

Verification

  • tsc --noEmit clean
  • npm run build succeeds
  • 122 tests pass

Notes

  • Repo is a fork of Gitlawb/node-explorer; this PR opens from the fork
    (itsmeadarsh2008:heroui-migration) against Gitlawb:main.

Introduce the HeroUI v3 theme layer that the rest of the migration builds on:
- package: @heroui/react, @heroui/styles, lucide-react, csstype; add Tailwind v4
  postcss plugin (postcss.config.mjs), configure vite plugin / font handling;
- src/index.css: lean on @heroui/styles color-mix ranges for accent/base
  variables; drop prior redundant overrides
- src/lib/fileIcons.tsx: colorized per-extension/per-name icon map with
  dynamic Lucide icon + color tuple
- src/hooks/useTheme.ts: theme state (accent/base/font/radius), Google Fonts
  CDN link injection, localStorage persistence (incl. migration of old keys)
- delete useRefreshKey (no more manual refresh key plumbing)
- useAutoRefresh polling now covers every data hook:
  - events/tasks: 30s (high-churn feeds), visibility-aware
  - repos/agents/peers/network/home: 60s
- useNodesStatus re-validates every 60s instead of one-shot/session cache
- useAgents gains a 60s visibility-aware tick (re-uses session cache
  on first load, bypasses it on each tick)
- hooks no longer accept refreshKey; render-phase reset keys tick instead
Replace native HTML controls with HeroUI equivalents across components:
- Button variant="tertiary" for all clickables (repos, events, agents,
  peers, tasks, network, command palette)
- <select> -> HeroUI Select+Menu (RepoToolbar, RepoPagination)
- <a> -> HeroUI Link (PeerList, FileViewer, DocsPage) with target/rel

Fixes & polish:
- TopBar mobile Drawer: style DrawerTrigger/DrawerCloseTrigger directly
  (no nested <button>), wire close to onPress; simple SVG hamburger/close
  icons replacing lucide Menu/X
- Command Palette: custom fixed overlay (cmdk dropped), transparent
  ModalBackdrop (centered w/o dimming), body-scroll lock
- FileList: colorized per-type file icons via fileIcons.ts utility

Theme radius:
- drop hardcoded rounded-[2px]/rounded-lg/rounded-sm/rounded-md across
  components in favour of rounded-[--radius] (theme-driven)
- remove obsolete components/ui/{badge,card,button,input-group,
  separator,table,tabs,theme-toggle}.tsx (superseded by HeroUI)
All list pages (repos, agents, peers, events, tasks, network, home):
- remove useRefreshKey usage and refresh/retry pills
- RepoHero no longer takes refreshing/onRefresh props (button removed)
- RepoHero accepts only display props (totalCount, page windows, title,
  description, cells)
- RepoHero no longer renders a refresh pill; the page title block is clean

The data layer (commit c71dd9c) now polls each hook on a 30s/60s tick,
so the removed Retry buttons are unnecessary — transient errors self-heal
on the next tick.
@itsmeadarsh2008

itsmeadarsh2008 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author
image New looks image image

@euxaristia

Copy link
Copy Markdown

Lovely 2026 rounded aesthetic design. Well done @itsmeadarsh2008

@kevincodex1

Copy link
Copy Markdown
Member

thanks for this looks awesome !

@kevincodex1
kevincodex1 merged commit c4603e4 into Gitlawb:main Aug 17, 2026
1 check 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.

3 participants