Skip to content

refactor(types): extract chains + devices type clusters - #839

Draft
graciangabriel8 wants to merge 3 commits into
mainfrom
refactor/717-1-chains-devices
Draft

refactor(types): extract chains + devices type clusters#839
graciangabriel8 wants to merge 3 commits into
mainfrom
refactor/717-1-chains-devices

Conversation

@graciangabriel8

@graciangabriel8 graciangabriel8 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Cuts the chains cluster (SupportedChain, RpcProvider, chain-id tables, 11 exports) and the devices cluster (Ledger pairing entries, 6 exports) byte-identically out of src/types/index.ts into src/types/chains.ts and src/types/devices.ts. index.ts re-exports both via export * so all 158 existing import specifiers stay byte-identical.

Note: the block immediately preceding PairedSolanaEntry in the original file carries a stray one-line comment (/** Shape of ~/.vaultpilot-mcp/config.json. */) that actually describes UserConfig, defined ~380 lines later — a pre-existing source quirk, not something this mechanical extraction alters. It rides along into devices.ts since it has no blank-line separation from PairedSolanaEntry.

Part of #717

Note: export * from "./x.js" re-exports but does not locally bind names, so index.ts also carries import type { ... } from "./x.js" for every moved name its own remaining declarations still reference by bare identifier — scope-plumbing that vanishes once the last domain leaves the file.

Editorial deviation (per reviewer advice): deleted the stray /** Shape of ~/.vaultpilot-mcp/config.json. */ one-liner noted above rather than leaving it riding into devices.ts — it read there as a misleading file header. Everything else in this PR remains byte-mechanical.

graciangabriel8 and others added 3 commits August 21, 2026 15:21
Part of #717. Cuts the chains cluster (SupportedChain/RpcProvider/
chain-id tables, 11 exports) and devices cluster (Ledger pairing
entries, 6 exports) byte-identically out of src/types/index.ts into
src/types/chains.ts and src/types/devices.ts; index.ts re-exports both
via export * so all 158 existing import specifiers stay unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ation)

EDITORIAL DEVIATION from byte-mechanical extraction, per reviewer
advice on PR #839: the one-line comment /** Shape of
~/.vaultpilot-mcp/config.json. */ had no blank-line separation from
PairedSolanaEntry in the original file, so the mechanical block-cut
carried it into devices.ts, where it read as (and was mistaken for) a
file header despite actually describing UserConfig ~380 lines away in
the original source. Deleting it rather than relocating it, per the
reviewer's judgment that it's worse in devices.ts than left in situ.
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