Commit Graph
20 Commits
Author SHA1 Message Date
SebastianandClaude Fable 5 bad27cfe39 perf: overhaul startup performance, dependencies and UI responsiveness (#419)
* 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>
2026-07-08 22:46:19 +02:00
ShareVB 3ccbd85342 fix: use t for translate in tools name/description 2025-07-20 22:45:56 +02:00
sharevb a8c6ebc81b Feat/translate all content (#121)
* feat: add script to extract strings

* feat: extract many strings (html, attr, label)

* feat(extract string): extract html only for .vue and single file mode

* fix: __i18n_ally_root__

* feat: nestify en.yml + extract tab attributes

* feat: add script to extract strings

* feat: extract many strings (html, attr, label)

* feat(extract string): extract html only for .vue and single file mode

* fix: __i18n_ally_root__

* feat: nestify en.yml + extract tab attributes

* fix: lint

* feat: add vue-i18n-extract to check missing keys

* fix: unit tests

* fix: update vue i18n plugin
2025-07-20 21:01:01 +02:00
ShareVB 207b2ab54d Squashed commit of the following:
commit d20c027957ddbdd26194550cfbf5917c43585779
Merge: d91a867c 63fbd3b4
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Dec 12 23:42:30 2024 +0100

    Merge branch 'main' into translatable

commit d91a867cf113369bd23b297b15040042ac74daca
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Oct 27 13:48:36 2024 +0000

    update

commit 9c023636c655554a560f03035cfbeaf7d0fed8f7
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Oct 27 13:48:03 2024 +0000

    update

commit 32ca8e35de981811b6445d166367918bb64df67c
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Oct 27 13:47:19 2024 +0000

    update

commit 2b94b06ac1236788018617b2ad77c35a8e65355e
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Oct 27 13:46:19 2024 +0000

    update

commit aca9d139434ead3b6f6b827928f1ccddfcacf68f
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Oct 27 13:43:36 2024 +0000

    update

commit 78267978388d756879bb059d02e19b8ff37001e0
Merge: f9031a98 0b1b98f9
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sat Oct 26 00:08:54 2024 +0200

    Merge branch 'main' into translatable

commit f9031a98f66ef9ef94dec43ca3eec49a070e6a59
Merge: eaab7a8b f8366664
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Oct 24 22:24:45 2024 +0200

    Merge branch 'main' into translatable

commit eaab7a8ba26c07603c46a4f48d7b77bc79588c5f
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Sep 29 20:22:32 2024 +0000

    regex update

commit 3cc6a2547e6de9b99fddf527e5c2eda1de9a3d53
Merge: e0291730 1c35ac37
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sun Sep 29 22:20:54 2024 +0200

    Merge branch 'main' into translatable

commit e02917305eb5ee50efa67c6b3918a6e6253a2999
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sat Sep 21 10:11:08 2024 +0000

    improve regex

commit c69d55afe1b20570102f5b3a57e53983d8366f10
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sat Sep 21 09:41:53 2024 +0000

    fix

commit 24c9131f80377a74543e0ed1a4a6d2fc470225d6
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sat Sep 21 09:40:54 2024 +0000

    search

commit e3992d9187f06f74ef9222fb94d66d57717dc25e
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Sat Sep 21 09:30:17 2024 +0000

    copy

commit 563900dc1130495293d2db418f86922a6c31f9e0
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Sep 20 20:11:39 2024 +0000

    improve

commit 95a1939cfcaf8fee797d86beba809ffa27f93c14
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Sep 20 20:09:47 2024 +0000

    improve

commit 75c790062da0e115494a6b1440fd6d81427205db
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Sep 20 20:02:57 2024 +0000

    fix

commit bb7d703cc5f1583fbbeca6cf1f30b87cf1045de5
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Sep 20 19:59:02 2024 +0000

    regex

commit 6b8cfca29d62c775f3b790e025707283d235be51
Merge: 9fa9dc04 f5c4ab19
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Sep 20 20:50:51 2024 +0200

    Merge branch 'main' into translatable

commit 9fa9dc047ea3d93fba242c77aef2ba747f6f9240
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 17:28:55 2024 +0000

    revert

commit 3eefdacf9c7281b845fae5a418815cb0f018ce9e
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 17:26:23 2024 +0000

    fix

commit ab7b3a6588f9d1f05db5286a722717b359b37177
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 17:21:43 2024 +0000

    copy

commit 917ff521ea6073e5fbf4862e3af5f81fbc6747ef
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 17:01:34 2024 +0000

    more tools

commit c756058c5c759066bbc4672f29cc39b52f55a0da
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 16:46:55 2024 +0000

    json xml texts

commit f5a5ca65507cf33a9c0aaf11aa8702f691941762
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 16:31:40 2024 +0000

    email-normalizer-texts

commit 0a72a2b24b128fccee6349966d7c5047bfc849ba
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Sep 5 16:12:26 2024 +0000

    ascii-texts

commit 8e4a2206a72e087d3e06b7c6864350ba21a97921
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Tue Sep 3 16:54:31 2024 +0000

    qr code generator

commit ff46f178ce8073cc0ce574a39b8f0caf0b53c612
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Tue Aug 27 17:04:48 2024 +0000

    fix

commit 42170052eca699b68610299c0f50103ef9ba2234
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Tue Aug 27 17:02:01 2024 +0000

    fix

commit 867d415fea8e5fd7d48c9d6c3ac2dd702d3da582
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Tue Aug 27 16:47:17 2024 +0000

    copy

commit a97e1897e59d5701aef9f99349d24600a12ca505
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Tue Aug 27 16:28:27 2024 +0000

    markdown-to-html

commit b986c49df60c28f4256cf6e53e2ca007d97bba89
Merge: 028a4ce3 87984e20
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Tue Aug 27 18:12:30 2024 +0200

    Merge branch 'main' into translatable

commit 028a4ce3258342467dc1d9b8c9847706fa3e3816
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Aug 15 19:13:03 2024 +0000

    fix

commit bff4984998a293e6455ad2695061c2aff2c08569
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Aug 15 18:58:26 2024 +0000

    fix

commit c6ca07e7a0374aeb3f97c0afde1a4b16976cebaf
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Aug 15 16:51:14 2024 +0000

    fix

commit 6892b68819f036580bbf302a3ab3bd9d03bf07b4
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Aug 15 16:43:17 2024 +0000

    more texts

commit 7c5f6e7797ec91d42a1a6bef6a241f2be1c38a91
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Aug 15 14:44:39 2024 +0000

    email normalizer

commit 174046079e3b35ee1e7cb505d3456b394eadab79
Merge: a81514d3 318fb6ef
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Thu Aug 15 16:38:40 2024 +0200

    Merge branch 'main' into translatable

commit a81514d383bec3049c00ed434904bb7363864388
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Mon Aug 12 17:39:18 2024 +0000

    more tools

commit 5ceb46855df890280e6256cc8665512c676d8ae8
Merge: 703e5e6a f1a5489e
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Mon Aug 12 19:30:26 2024 +0200

    Merge branch 'main' into translatable

commit 703e5e6abb7cad27d5a3bd60fd1b31e0427cb1c0
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Aug 2 14:58:35 2024 +0000

    update

commit 1d15baaf291e5898b9ffcab58d85033a5fca5f7e
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Jun 21 20:34:05 2024 +0000

    package

commit e926a79180e4c93a3b899a0f81ea925a03d208a1
Author: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date:   Fri Jun 21 20:25:47 2024 +0000

    fix(i18n): Make rest of the tools translatable and translate them to German
2025-07-06 19:33:01 +02:00
ShareVB 153e79a171 refactor: simplify tools integration
feat: script:create:tool command supports specifying tool categories: pnpm script:create:tool [tool-name] [category-name]
feat: A locales folder can be created independently under each tool to support independent configuration of the tool's own internationalization, making developers more focused and reducing file modification conflicts
perf: Optimize the script:create:tool command to create generated files, reduce the chance of public file modification conflicts, and allow developers to focus more on developing their own
perf: Improve the category field in defineTool for existing tools
2025-04-05 11:17:29 +02:00
Corentin THOMASSET dc0461595f feat(i18n): get locales on build (#880) 2024-02-11 00:33:52 +01:00
David Nguyen 079aa2164c feat(i18n): added vi tools translations (#876)
* Update Vietnamese translations in vi.yml file

* Add Vietnamese translations for various tools
2024-02-05 10:09:07 +00:00
QingFeng 9c6b12225e feat(i18n): added zh tools translations (#874) 2024-02-05 11:06:36 +01:00
Corentin THOMASSET 7f5fa00147 feat(i18n): added missing locale files in tools (#863) 2024-02-01 17:05:05 +00:00
Corentin THOMASSET 95698cb938 refactor(i18n): added locales per tool (#861) 2024-02-01 14:05:54 +01:00
Corentin THOMASSET 86e964a274 fix(copy): prevent shorthand copy if source is present in useCopy (#559)
* fix(copy): prevent shorthand copy if source is present in useCopy

* refactor(copy): normalized copy usage
2023-08-09 22:07:44 +00:00
Corentin Thomasset fe61f0f2f2 refactor(imports): removed unnecessary imports to vue 2023-06-10 17:24:10 +02:00
Corentin Thomasset 33c9b6643f chore(lint): switched to a better lint config 2023-05-28 23:29:14 +02:00
Corentin Thomasset 4d2b037dbe refactor(ui): removed all n-space 2023-05-27 17:53:13 +02:00
Corentin Thomasset 77f2efc0b9 refactor(ui): replaced some n-input with c-input-text 2023-05-14 22:30:23 +02:00
Corentin Thomasset f080933d2a refactor(ui): replaced naive ui cards with custom ones 2023-04-20 20:57:38 +02:00
Corentin Thomasset 74073f5038 refactor(clean): removed useless br tags 2023-04-19 22:50:02 +02:00
Corentin Thomasset c45bce36f9 refactor(ui): getting ride of naive ui buttons 2023-04-19 22:33:22 +02:00
Corentin Thomasset 447bdf2148 refactor(base64): mutualized base64 functions into global utilities 2022-08-04 12:09:32 +02:00
Corentin Thomasset bdee93a9e4 feat(new-tool): added a basic auth generator 2022-07-25 18:47:27 +02:00