* test: extract testable services and pin current crypto behaviour
Move the hashing, hmac, crc and ULA logic out of the single file components
into service modules next to them, and cover them with characterization tests
that pin the exact digests, encodings and ciphertexts the tools produce today.
The encryption tool had no tests at all; it now has round trip coverage for
every algorithm plus pinned ciphertexts for the deterministic ones, including
OpenSSL salted payloads produced by previous versions of it-tools.
No behaviour change: this is the reference point the dependency replacements
that follow have to reproduce exactly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq
* chore(deps): replace the five deprecated packages flagged by renovate
Renovate's dependency dashboard lists five deprecated or replaced packages;
this removes all of them, keeping the observable behaviour identical.
- crypto-js -> crypto-es. Upstream discontinued crypto-js; crypto-es is its
maintained ESM/TypeScript successor and is byte for byte compatible, which
the characterization tests added in the previous commit verify: the same
1012 assertions pass before and after the swap, including the OpenSSL
salted ciphertexts of the encryption tool. It ships its own types, so
@types/crypto-js goes away too.
- plausible-tracker -> @plausible-analytics/tracker, the official replacement.
The app keeps providing the same 'plausible' injection shape, so nothing
downstream changes. apiHost maps onto the new endpoint option and keeps
posting to the very same url, trackLocalhost onto captureOnLocalhost, and
the pageviews that enableAutoPageviews() used to start are now captured by
init() itself. init() throws without a domain, unlike the old tracker, so
an enabled but domain-less config now falls back to the no-op instance
instead of breaking the app bootstrap.
- svg2png-wasm -> @resvg/resvg-wasm, the replacement named in its deprecation
notice. The renderer moves into a service covered by tests that rasterize
real svg content, and the 2 MB binary no longer has to be committed under
public/: vite emits it from the package as a hashed asset, so it can never
drift from the js glue on upgrade.
- @types/bcryptjs and @types/uuid are deprecated stubs, bcryptjs and uuid
having shipped their own types for a while.
Also drops the now dead renovate rules that only existed to keep uuid and
@types/uuid in lockstep, and fixes the tool metadata a new guard test caught:
the encryption tool advertised 'crypto-s' and the wysiwyg editor still
advertised monaco and prettier.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq
* test: pin that svg text is actually drawn, document the load bearing empty iv
The resvg swap is pixel identical to svg2png-wasm for shapes and gradients,
and it also fixes text that names the embedded Roboto family: svg2png-wasm
returned an empty canvas there, so the assertion guards a real improvement
rather than only the image dimensions.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq
* fix: address review feedback on the plugin and renderer initialization
Two of the review comments are real regressions against the behaviour the
replaced packages had, so both are fixed with a test that fails without the fix:
- The plausible plugin called init() on every install. init() throws on the
second call, so installing the plugin on a second app instance (tests, hot
reload) would have taken the app down, where the old tracker was happy to be
constructed repeatedly. The tracker is now initialized once and reused. The
api host also gets its trailing slash trimmed so the endpoint cannot end up
with a double slash.
- initializeSvgRenderer() memoized the initialization promise including its
rejections, so one failed wasm download left the tool broken until a page
reload. The old code only latched its flag after a successful load. A failed
attempt is no longer cached.
Also extends the tool metadata guard to the removed stub type packages, and
pins the negative counters that verifyHOTP walks through when the window is
wider than the counter: their hexadecimal form keeps the minus sign, which the
hex parser reads as ffffffff rather than rejecting, and crypto-es reproduces
that exactly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mf5V2jMpFFXxGVXZU5rHBq
---------
Co-authored-by: Claude <noreply@anthropic.com>
* perf(i18n): bundle only English eagerly, lazy-load other locales on demand
The entry bundle previously inlined all 19 locales (11 MB minified, 2.4 MB
gzip) via the virtual @intlify messages module. Now only en (plus tool-level
en files) is compiled into the entry; every other locale becomes its own lazy
chunk fetched the first time it is selected, with vue-i18n falling back to
English until the messages arrive.
VITE_AVAILABLE_LOCALES now filters the locales offered at runtime instead of
trimming the build; unlisted locale chunks are emitted but never fetched.
Also adds shims for *.yml default imports and @tabler/icons-vue per-icon
deep imports (used by the follow-up icon-loading commit).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(tools): load tool icons lazily and parallelize boot config fetches
The eager tool-metadata glob pulled ~460 static icon component modules into
the entry graph. Tool definitions now reference their icon via
defineAsyncComponent + per-icon dynamic import, and an advancedChunks group
merges all of them into a single lazy 'tool-icons' chunk fetched off the
critical path when the menu/home first renders. Exact same glyphs as before.
Entry-graph components (navbar, layouts, ToolCard, copy buttons, command
palette, home) switch from runtime icon packages to build-time-inlined
~icons/tabler imports so no static reference drags the icon chunk into the
entry bundle.
src/tools/index.ts also fetched tools-filter.json and external-tools.json
sequentially under top-level await, blocking first render on two serial
round-trips; they are now fetched in parallel.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(pwa): precache only the app shell, cache chunks and wasm on demand
The service worker precached every JS chunk and WASM binary — 1,679 files,
~162 MB — on first visit, saturating bandwidth while the page was trying to
become interactive. Precache is now limited to the shell (css/html) with
CacheFirst runtime caching for same-origin hashed scripts, workers and wasm,
so offline support covers everything the user has actually opened.
VITE_PWA_FULL_PRECACHE=true restores the previous cache-everything behavior
for self-hosted full-offline deployments.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(menu): eliminate layout thrash in sider and category animations
The sider show/hide animates CSS width, which re-laid-out all ~460 menu
items plus the page content on every frame; category expand/collapse
animates grid-template-rows with the same cost. Two changes cut the
per-frame work:
- content-visibility: auto on each category container so offscreen
categories skip layout and paint entirely during animations
- the sider scroll content is pinned to the expanded width, so the width
transition clips the menu instead of re-wrapping every item per frame
Measured with the Long Animation Frames API (dev mode, full hide+show
cycle): 4 long frames totalling ~395 ms before, 2 totalling ~236 ms after;
animation frames after the initial commit now stay under 50 ms.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(deps): replace moment with date-fns in countdown and alarm tools
moment was only used by three tools, each pulling its ~70 KB gzip bundle
into their chunks while date-fns (already a dependency) covers the same
needs tree-shaken. Also fixes a latent bug: moment's mutating add()/set()
modified the shared 'now' ref on every computed evaluation, so the deadline
could drift by one duration per re-render; date-fns operations are
immutable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(deps): replace lodash with es-toolkit
Full CJS lodash (~70 KB gzip, no tree-shaking) was in the entry graph via
the tools store and shared composables, plus four lodash.* micro-packages.
es-toolkit provides the same functions as tree-shakeable ESM:
- import _ from 'lodash' -> import * as _ from 'es-toolkit/compat'
(namespace member access tree-shakes under Rolldown)
- the 20 _.chain pipelines are rewritten as plain array/object operations
or es-toolkit calls (es-toolkit has no chain, deliberately)
- lodash.defaultsdeep/flattendeep/last/mergewith micro-packages replaced
with es-toolkit core/compat equivalents
- lodash's RecursiveArray type is declared locally in generate-tree.ts
- files whose only lodash use was inside a rewritten chain lose the
dependency entirely
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* fix: catch lodash usages the codemod missed (.js/.tsx files, bare _() wrapper)
outputFormatter.js and diff-viewer.models.tsx were outside the codemod's
*.ts/*.vue glob, and otp.service.ts used the implicit-chain _(...) wrapper
form that the _. usage regex didn't match (its import was wrongly removed).
Both builds still passed because pnpm's hoisted store made 'lodash'
resolvable even after removal from package.json.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(boot): drop the splash screen and parallelize the settings fetch
The splash screen existed to cover a multi-second blank period while the old
13 MB entry bundle parsed; with the startup payload at ~3 MB the app shell
paints fast enough to render directly (measurements in the PR description).
Removes vite-plugin-splash-screen entirely.
tools-settings.json was fetched under top-level await in main.ts, serially
after the config fetches in src/tools/index.ts. It now lives in a sibling
async module so all three optional config fetches share one round-trip.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* fix: defer preload-error reload so it cannot abort an in-flight navigation
Firefox fires vite:preloadError for module preloads cancelled by a user
navigation (NS_BINDING_ABORTED), and the immediate location.reload() raced
and aborted that navigation. With the tool icons now loading via dynamic
imports there are ~460 preloads in flight at startup, which made the race
deterministic in the date-time-converter Playwright specs on firefox.
Deferring the reload by a tick resolves it: if the page is genuinely
navigating away its timers die with the document; on a real chunk-load
failure the reload still happens.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* fix(types): satisfy the vitest tsconfig typecheck
pnpm typecheck runs vue-tsc against tsconfig.vitest.json, which lacks the
unplugin-vue-i18n type shim and infers stricter unions:
- tools/index.ts: type the fetch fallbacks so Promise.all doesn't widen
filterConfig to 'ToolsFilter | {}'
- i18n.plugin.ts: collapse es-toolkit merge's recursive mapped type before
it reaches vue-i18n's generics (TS2589), watch the locale through the
getter, and cast the messages record
- generate-tree.ts: drop flattenDeep/RecursiveArray for a plain spread —
child output is already joined strings, so there was only one level to
flatten
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* perf(bundle): cut startup payload from ~1 MB to ~560 KB gzip
Four eager-loading leaks accounted for almost half the startup JS:
- Font Awesome (298 KB gzip): main.ts registered the entire solid icon set
via library.add(fas) although only the pomodoro timer uses it. The six
icons it needs are now registered inside the tool's lazy chunk.
- tool-icons chunk (67 KB gzip): rolldown's advancedChunks defaults to
includeDependenciesRecursively, which captured shared helpers into the
icon chunk and made entry chunks statically depend on it, dragging the
whole lazy icon set back into the startup payload. Disabled per-group.
- markdown-it + entities + dompurify (~50 KB gzip): eagerly reachable via
three paths — the external-tools mapping in tools/index.ts (now a
conditional dynamic import), vue-markdown-render in tool.layout.vue and
Home.custom.vue (now defineAsyncComponent).
- demo gallery routes: registered behind a runtime env check the bundler
cannot eliminate; now a conditional dynamic import gated on
import.meta.env.DEV so production builds drop it entirely.
Startup JS: 3.2 MB -> 1.92 MB raw, ~1.05 MB -> 562 KB gzip.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
* fix(lint): drop redundant spread flagged by oxlint
Object.values already returns a fresh array, so it can be pushed into
directly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKAJuYi4dP1mwsjPi4v5Ea
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* npm install jwt-decode
* added base tool structure
* added function to decode JWT and display header and payload
* use a table to display the data
* show human readable values
* added switch to toggle display of parsed values
* lint
* replaced basic package-lock.json with pnpm-lock.json
* change the icon of the tool
* simplify return
* use camelCase
* added description of the tool
* always parse the values
* use camelCase...