Repository navigation
perf: lazy-load welcome banner and settings preview libraries - #1860
Srinidhi444 wants to merge 1 commit into
Conversation
nc-review: comments — 2 important, 3 nits@Srinidhi444 — a few things worth a look, none blocking. The PR replaces the eager 🟠 important ·
savePreferences({nanocoderShape: '3d'});
const output = stripAnsi(
renderWithTheme(<WelcomeMessage availableRows={40} />).lastFrame() ?? '',
);
t.notRegex(output, THREE_D_GLYPHS, 'a wordmark that cannot fit must be dropped');
t.notRegex(output, BLOCK_GLYPHS, 'and no other font stands in for it');At 30 columns 🟠 important · The ⚪ nit · Roughly thirty tests were mechanically rewritten from ⚪ nit · The rejection handler swallows the error entirely: () => {
// Keep the plain-text fallback when the optional modules fail.
},The comment describes the user-visible behaviour, not why the failure is invisible. A module that cannot resolve is a real (if unlikely) install/packaging problem, and per CONTRIBUTING's logging section a ⚪ nit · The eager-import guard is a good regression test and correctly excludes 🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with |
|
hey @addyCooks please review it and let me know if there are any issues |
|
hey @addyCooks any updates |
Description
Fixes #1820
Lazy-loads
ink-big-textandink-gradientinstead of importing them at startup. Both the welcome banner and Nanocoder Shape settings preview now use a shared, cached asynchronous loader with a lightweight text fallback.Startup module comparison:
This removes 43 modules (~2.9%) from the startup import graph.
Type of Change
Changeset
pnpm changeset) describing this change for the changelogDocs-only or internal chores need no changeset (or run
pnpm changeset --emptyto note that intentionally).Testing
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)Manual Testing
Checklist