Skip to content

Fix service-framework selection and the growing command panel#15

Merged
DanMat merged 1 commit into
mainfrom
fix/web-configurator-when-and-layout
Jul 21, 2026
Merged

Fix service-framework selection and the growing command panel#15
DanMat merged 1 commit into
mainfrom
fix/web-configurator-when-and-layout

Conversation

@DanMat

@DanMat DanMat commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Both bugs from using the configurator.

Picking a service framework did nothing

Selecting Express left the command as npx create-packkit my-package -y.

The command builder only emits --server when the service target is selected, and that's correct — the flag is inert without it. The bug is that the control was rendered unconditionally, so clicking Express changed neither the command nor the files, which reads as a broken app.

Options can already declare when they apply, via a when predicate. Nothing honored it. The web configurator now does, so a control that can't affect the output isn't offered at all.

That also fixes a second instance I'd introduced: Monorepo layout shipped in 2.9.0 with a when that was quietly dead code, so it rendered even with monorepo off. The CLI wizard already guarded both cases by hand, so it was correct throughout — the web surface was the inconsistent one.

The command box grew the page

Grid items default to min-width: auto, so an unwrapped 300-character command sets the column's minimum width. .cmd already had overflow-x: auto; it never got the chance to scroll.

Measured in the live page, toggling the fix off and on:

columns page scroll width
without min-width: 0 48px / 1534px 1582px (overflows)
with it 720px / 720px 1440px (no overflow)

That 48/1534 split is exactly the squeeze in the report — the form crushed, the preview enormous.

Verified in the browser

  • Default state: neither Service framework nor Monorepo layout is shown.
  • Select HTTP service → the framework picker appears → Express yields --server express --target library --target service.
  • Columns hold 720/720 whether the command is 194 or 303 characters, and .cmd scrolls internally.

49 tests pass, including new ones asserting both when predicates behave.

🤖 Generated with Claude Code

…he page

Two bugs in the web configurator, reported from use.

Picking a service framework did nothing. The command only emits --server
when the service target is selected, which is correct — the flag is inert
otherwise — but the control was rendered unconditionally, so clicking
"Express" changed neither the command nor the files and looked broken.

Options can already declare when they apply; nothing honored it. The web
configurator now does, so a control that cannot affect the output isn't
offered. That also fixes "Monorepo layout", added in 2.9.0 with a `when`
that was quietly dead. The CLI wizard already guarded both by hand.

The command box also grew the page. Grid items default to min-width:auto,
so an unwrapped 300-character command set the column's minimum width:
measured in-page, the columns went from an even 720/720 to 48/1534 with a
1582px scroll. min-width:0 lets them hold their share and lets the
existing overflow-x on .cmd actually scroll.

Verified in the browser: selecting the service target reveals the
framework picker and Express then yields `--server express`; columns stay
720/720 whether the command is 194 or 303 characters.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DanMat
DanMat merged commit 65a325a into main Jul 21, 2026
32 checks passed
@DanMat
DanMat deleted the fix/web-configurator-when-and-layout branch July 21, 2026 23:59
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