Skip to content

fix: presets imports - #48

Merged
brunozoric merged 4 commits into
mainfrom
bruno/fix/presets-imports
Sep 8, 2026
Merged

fix: presets imports#48
brunozoric merged 4 commits into
mainfrom
bruno/fix/presets-imports

Conversation

@brunozoric

@brunozoric brunozoric commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Skip .d.ts files in preset discovery — declaration files like copy-ddb.d.ts were listed as duplicate entries (copy-ddb.d) in the wizard menu. Both presetDiscovery.ts and PresetLoader.ts now filter them out.
  • Read preset name and description from the module exportlistAvailablePresetsWithDescriptions now dynamically imports all preset files in parallel and reads name/description from export default. Broken or nameless files are skipped instead of shown with empty descriptions.
  • Warn on import failure — when a preset file fails to import, a warning is logged with the file path and error message instead of silently skipping.

Test plan

  • yarn transfer wizard shows clean preset list (no .d duplicates)
  • Custom presets with name different from filename show the module name
  • Broken preset file shows a warning in the console
  • yarn full — all tests pass

🤖 Generated with Claude Code

brunozoric and others added 4 commits September 8, 2026 13:45
stripExtension now returns null for .d.ts files so declaration files
like copy-ddb.d.ts don't appear as duplicate preset entries in the
wizard menu.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…filename

listAvailablePresetsWithDescriptions now dynamically imports all preset
files in parallel and reads name + description from the module export.
Broken or nameless files are silently skipped. Deduplication uses the
module's name field. listAvailablePresets (used by PresetLoader) stays
filename-based for the resolution path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Helps debug typos and broken exports in user preset files instead of
silently skipping them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brunozoric
brunozoric merged commit b47e61f into main Sep 8, 2026
9 checks passed
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