Skip to content

perf+design: sandbox-ui 0.15.3 + dead-code purge + lazy routes + font WOFF2 + cache headers#3186

Merged
drewstone merged 1 commit intodevelopfrom
feat/perf-and-design-overhaul
May 7, 2026
Merged

perf+design: sandbox-ui 0.15.3 + dead-code purge + lazy routes + font WOFF2 + cache headers#3186
drewstone merged 1 commit intodevelopfrom
feat/perf-and-design-overhaul

Conversation

@drewstone
Copy link
Copy Markdown
Contributor

The omnibus perf + design polish PR. Six coordinated changes that ship the 1-year roadmap of debt in one push.

TL;DR — bundle deltas

Asset Before After Delta
tangle-dapp main index 3.36MB 1.47MB -56%
tangle-cloud font payload 1.19MB 443KB -63%
Dead-chain chunks (combined) 282KB 0 gone
LOC removed - -4,250 -

What ships

  1. Package bumps: @tangle-network/sandbox-ui 0.13 → 0.15.3, @tangle-network/brand 0.2 → 0.3, @tangle-network/ui (new direct dep) 1.0.1. New components available: SegmentedControl, StatCard, EmptyState, InlineCode/CodeBlock/CopyButton, SkeletonCard/SkeletonTable, plus tokenized typography/spacing.

  2. Implicit-any cleanup: 46 callback param types fixed across the dapp after the bump exposed Radix passthrough types. Real types (React.ChangeEvent<HTMLInputElement>, MouseEvent<HTMLButtonElement>, etc.) — zero any, zero @ts-ignore.

  3. Dead-code purge (~4,250 LOC): @hyperlane-xyz/{sdk,registry,utils}, @livepeer/* (lpt), astar chain configs gone. Includes orphan apps/bridge-dapp legacy hubble code and a 3,932-LOC bridge config file. The bridge UI was a half-finished hubble pivot — not coming back.

  4. Font externalization: Cousine + Satoshi families converted from TTF to WOFF2 (33-41% smaller per file, 750KB saved per app). font-display: swap on all 11 @font-face declarations.

  5. Cache headers: Both apps' netlify.toml get Cache-Control: public, max-age=31536000, immutable for /assets/* and /fonts/* (Vite hashes filenames so this is safe). /index.html stays no-cache for atomic deploys. Repeat-visit loads near-instant.

  6. Route-level React.lazy on tangle-dapp: 7 routes converted, dropping main bundle 3.36MB → 1.47MB. tangle-cloud was already optimally lazy-loaded; left alone.

  7. Design surface adoption (12 tangle-cloud files): replaced ad-hoc filter pills, stat blocks, empty placeholders, and skeleton shimmers with sandbox-ui 0.15.3 primitives (SegmentedControl, StatCard, EmptyState, InlineCode, SkeletonTable).

Verified

  • tangle-cloud:typecheck
  • tangle-cloud:lint
  • tangle-cloud:build
  • tangle-dapp:typecheck
  • tangle-dapp:lint
  • tangle-dapp:test ✓ (5 lazy-route tests converted to async findByTestId)
  • tangle-dapp:build

…onts, cache headers, lazy routes

Six coordinated changes shipping the 1-year roadmap of perf + design
debt in one push. Net result: 56% smaller tangle-dapp main chunk, 63%
smaller font payload, 4250 LOC of dead bridge code removed, modern
design surface adopted across tangle-cloud.

────────────────────────────────────────────────────────────────────────

1. Package bumps
   - @tangle-network/sandbox-ui: ^0.13.0 -> ^0.15.3 (SegmentedControl,
     StatCard, EmptyState, InlineCode/CodeBlock/CopyButton, TaskBoard,
     CalendarView, ApprovalQueue, ModelPicker, HarnessPicker, tokenized
     typography/spacing, font-loading fix)
   - @tangle-network/brand: ^0.2.0 -> ^0.3.0 (themed code primitives)
   - @tangle-network/ui: new direct dep at ^1.0.1 (sandbox-ui peer)

2. Implicit-any cleanup (46 files)
   New sandbox-ui re-exports raw Radix primitives whose callback types
   don't auto-infer in TS. Added explicit React.ChangeEvent / MouseEvent
   / FormEvent / boolean / string types to every callback site. Zero
   'any', zero @ts-ignore, real types only.

3. Dead-code removal (~4,250 LOC)
   Deleted @hyperlane-xyz/{sdk,registry,utils}, @livepeer/* (lpt), and
   astar chain configs. They're not coming back — the bridge UI was a
   half-finished hubble pivot. Removed: 12 files (incl. orphan bridge-
   dapp + 3,932-LOC bridge config), 5 SVG icons, 3 modified type files.
   Net effect on bundle: dead chunks (livepeer 117KB, lpt 117KB,
   astar 24KB, astr 24KB, hyperlane.*) gone forever.

4. Font externalization (1.19MB -> 443KB)
   Cousine + Satoshi families converted from TTF to WOFF2 (per-file
   ~33-41% smaller, ~750KB saved per app). Added font-display: swap to
   all 11 @font-face declarations so text renders immediately with
   fallback while fonts stream in.

5. Cache + immutable asset headers (netlify.toml)
   /assets/* and /fonts/* get max-age=31536000 immutable (Vite hashes
   filenames so this is safe). /index.html stays no-cache so deploys
   replace atomically. Repeat-visit loads near-instant.

6. Route-level React.lazy (tangle-dapp)
   Converted 7 top-level routes to React.lazy() with a Suspense boundary
   wrapping <Routes> and a SkeletonLoader fallback. tangle-dapp main
   index chunk: 3.36MB -> 1.47MB (-56%). tangle-cloud was already lazy
   pre-existing — left alone.

7. Design surface adoption (12 tangle-cloud files)
   Replaced ad-hoc UI with sandbox-ui 0.15.3 primitives:
   - Filter pill row -> SegmentedControl (BlueprintListing)
   - Card+stat-number-with-label -> StatCard (SlashingSummaryCards,
     payments/pool)
   - 'No X yet' placeholders -> EmptyState (rewards, blueprints/manage,
     services/[id]/JobHistoryTable + JobResultsModal,
     SandboxBlueprintServicePage, TxHistoryDrawer, CreditBalanceContainer)
   - <code> spans -> InlineCode (blueprints/create)
   - 3-stack manual Skeletons -> SkeletonTable (JobHistoryTable)
   Unified module shim type definitions for the new primitives.

────────────────────────────────────────────────────────────────────────

Bundle deltas summary:

| Chunk                          | Before  | After   | Delta     |
| tangle-dapp main index         | 3.36 MB | 1.47 MB | -56%      |
| tangle-cloud font payload      | 1.19 MB | 443 KB  | -63%      |
| dead chain chunks (combined)   | 282 KB  | 0       | gone      |
| TOTAL CODE / LOC removed       |    -    | -4,250  | net loss  |

Verified: typecheck + build pass on both apps.
@drewstone drewstone requested a review from AtelyPham as a code owner May 7, 2026 17:34
@drewstone drewstone merged commit 7f180b7 into develop May 7, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for tangle-leaderboard ready!

Name Link
🔨 Latest commit e53eaa3
🔍 Latest deploy log https://app.netlify.com/projects/tangle-leaderboard/deploys/69fccd44609b3d000860e20f
😎 Deploy Preview https://deploy-preview-3186--tangle-leaderboard.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit e53eaa3
🔍 Latest deploy log https://app.netlify.com/projects/tangle-dapp/deploys/69fccd4406a6c70008a2af2a
😎 Deploy Preview https://deploy-preview-3186--tangle-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for tangle-cloud ready!

Name Link
🔨 Latest commit e53eaa3
🔍 Latest deploy log https://app.netlify.com/projects/tangle-cloud/deploys/69fccd44ddc772000857e633
😎 Deploy Preview https://deploy-preview-3186--tangle-cloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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