Skip to content

Studio: drop a duplicate import that breaks the frontend build - #8553

Merged
danielhanchen merged 1 commit into
mainfrom
fix-model-selector-duplicate-import
Aug 12, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-model-selector-duplicate-import

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

model-selector.tsx imports HubModelPicker and hasDownloadedModels from ./model-selector/pickers twice, at line 46 and line 53. tsc rejects that:

src/features/model-picker/components/model-selector.tsx(46,10): error TS2300: Duplicate identifier 'HubModelPicker'.
src/features/model-picker/components/model-selector.tsx(46,26): error TS2300: Duplicate identifier 'hasDownloadedModels'.
src/features/model-picker/components/model-selector.tsx(53,10): error TS2300: Duplicate identifier 'HubModelPicker'.
src/features/model-picker/components/model-selector.tsx(53,26): error TS2300: Duplicate identifier 'hasDownloadedModels'.

The vite build exits 2, which currently fails three jobs on every PR:

  • Tauri Linux debug build (no codesign), at the Frontend build (npm ci, vite) step
  • linux ubuntu2404-arm-root, at Install (root)
  • mac macos-26 / mask / file, at Install

The two install jobs run studio setup, which runs the same npm run build, so all three are the one error:

error          npm run build failed (exit code 2)
error          studio setup failed (exit code 2)

Introduced by #8470, which added the second copy above the pill-tabs import while the first was already sitting above the missing-external-model import.

Fix

Remove the stray copy at line 46 and keep the one at line 53, which is already in alphabetical order inside the ./model-selector/ import group (audio-picker-policy, model-catalog, pickers, pill-tabs, source-tabs).

One line deleted, no behavior change. Both symbols are still imported once and both call sites (hasDownloadedModels() and <HubModelPicker>) resolve unchanged.

model-selector.tsx imports HubModelPicker and hasDownloadedModels twice from
./model-selector/pickers, so tsc fails with TS2300 Duplicate identifier and the
vite build exits 2. That takes down the Tauri Linux debug build, and both the
linux and mac install jobs, which run studio setup and hit the same npm run
build.

Introduced by #8470, which added the second copy above the pill-tabs import
while the first was already sitting above the missing-external-model import.

Keep the copy that sits in the existing alphabetical order inside the
./model-selector/ group and remove the stray one.
@danielhanchen
danielhanchen merged commit bdd8a8f into main Aug 12, 2026
38 of 45 checks passed
@danielhanchen
danielhanchen deleted the fix-model-selector-duplicate-import branch August 12, 2026 12:25
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