Skip to content

fix: enforce the Vike-only constraint on --compose-extensions#203

Merged
suleimansh merged 1 commit into
mainfrom
fix/compose-extensions-vike-only-guard
Jul 4, 2026
Merged

fix: enforce the Vike-only constraint on --compose-extensions#203
suleimansh merged 1 commit into
mainfrom
fix/compose-extensions-vike-only-guard

Conversation

@suleimansh

Copy link
Copy Markdown
Member

--compose-extensions is documented as Vike-only, but runFramework applied vikeExtensionPersonas regardless of the detected preset. On a Next project it framed the agent with nextPageBuilder + the five vike-* composers telling it to install vike-auth/vike-crud/etc.: an incoherent prompt. Latent (compose defaults off; an empty dir falls back to the flagship Vike preset), but the stated contract was unenforced.

Fix

Gate compose on preset.name === 'vike'. On any other preset, fall back to the hand-rolled + Prisma path and emit a log explaining why. Kept in run.ts at the two-line wiring level (not pushed into the preset registry, which would be speculative generality for a single extension set).

Test

Added a case: a Next-detected project with composeExtensions: true gets no vike-auth framing and emits a --compose-extensions ignored log. Framework tests 58 pass (was 57); typecheck clean.

Found during the compose-personas quality sweep (pass 1). Patch changeset since it changes behavior on the non-Vike + compose path.

Note: touches the same run.ts comment block as #199, so whichever merges second may need a trivial rebase.

Closes #202

@suleimansh suleimansh added bug Something isn't working priority: low Nice to have / latent labels Jul 4, 2026
@suleimansh suleimansh self-assigned this Jul 4, 2026
runFramework applied the vike-* composer personas regardless of the detected
preset, so --compose-extensions on a Next project framed the agent with
nextPageBuilder plus composers telling it to install vike-auth/vike-crud, an
incoherent prompt. Gate compose on the Vike preset; on any other preset fall
back to the hand-rolled + Prisma path and emit a log explaining why.

Closes #202
@suleimansh suleimansh force-pushed the fix/compose-extensions-vike-only-guard branch from 40a74c4 to 0c5cf6e Compare July 4, 2026 09:56
@suleimansh suleimansh merged commit 5288ca6 into main Jul 4, 2026
2 checks passed
@suleimansh suleimansh deleted the fix/compose-extensions-vike-only-guard branch July 4, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: low Nice to have / latent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce the Vike-only constraint on --compose-extensions

1 participant