From 62067e2258b539742eedfb9270ce6de78fa755eb Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Jul 2026 06:40:11 +0000 Subject: [PATCH 1/2] refactor(configurator): type codec.ts and its call sites, document shared limit constants SL-017/024: replace `any` at codec.ts's 7 registry/options parameters and its two consumers (App.svelte, CheatsheetPanel.svelte) with new TokenRegistry, ApiIndex, SlashedClass and DecodeOptions interfaces in types.ts, so malformed JSON or option shapes are caught at compile time instead of silently no-op'ing at runtime. SL-026: document why MAX_VALUE_BYTES and MAX_ID share the same numeric value (65535) despite being independent limits, so a future edit doesn't assume they're the same constant in disguise. --- configurator/src/App.svelte | 4 +- .../components/panels/CheatsheetPanel.svelte | 7 +-- configurator/src/lib/codec.ts | 20 ++++--- configurator/src/types.ts | 54 +++++++++++++++++++ 4 files changed, 73 insertions(+), 12 deletions(-) diff --git a/configurator/src/App.svelte b/configurator/src/App.svelte index fb436fa0..937b0704 100644 --- a/configurator/src/App.svelte +++ b/configurator/src/App.svelte @@ -1,7 +1,7 @@