Skip to content

fix(desktop): keep the project picker beside composer parameters - #6011

Merged
Astro-Han merged 2 commits into
mainfrom
fix/composer-project-layout
Oct 9, 2026
Merged

Astro-Han merged 2 commits into
mainfrom
fix/composer-project-layout

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix a composer layout regression introduced by #5763: the model/thinking group grew into the available footer space, pushing the project selector next to Send instead of keeping the parameters together.

  • Make the model group content-sized but shrinkable, and leave space allocation with the existing footer-leading marker rather than duplicating it on the controls group.
  • Let the project trigger shrink within its allocated slot; its fixed sizing also caused a narrow new-task composer with a Host badge to overlap Send.
  • Extend the existing new-task story with geometry assertions for parameter adjacency and narrow-slot containment. The narrow case sets the card's max-width to --maka-conversation-min-width and compares the card width with its computed max-width, so the story reads no custom property and the ink ladder contract's allowlist is unchanged. No new component, state, breakpoint, or story is introduced. Session/project ownership, picker order, and menu behavior are unchanged; no migration is needed.

Refs #5763.

Verification

  • npm --workspace @maka/desktop run build:workspace-deps — passed on current main (6d53ca8e9).
  • npm run format and npm run lint — passed.
  • npm --workspace @maka/desktop run typecheck — passed, including renderer and stories.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • Focused static Storybook smoke — passed: new-task composer in light/dark, narrow composer footer, pending project selection, empty-composer lifecycle, executor catalog ready, long model names, and separate thinking-level selection.
  • Red/green: the adjacency assertion fails with the growing model group; the narrow containment assertion fails with the non-shrinkable project trigger. Both pass with the fix.
  • CDP attached to a running Electron renderer using an isolated profile: parameters remain 6px apart in wide/narrow renderer viewports, no leading-slot overflow, project menu opens/closes, and no console errors during acceptance. No model request was sent.
  • node --test dist/main/__tests__/ink-ladder-contract.test.js in apps/desktop — 6 passed (it failed on the first push, which read the property through getPropertyValue).
  • Full-repository tests and Electron E2E were not run; this change adds browser-layout assertions, not Electron-boundary behavior.

Same story and 1280×900 viewport, cropped to the Composer. BEFORE uses a static build of current main; AFTER uses this branch. Main's measured model-to-project gap was 224px; it is now 6px.

Light Composer before and after

Dark Composer before and after

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Maka (GPT-6.1) diagnosed the regression, edited the layout rules and existing story assertions, ran verification, and prepared this PR. Claude Code fixed the story's custom-property read flagged by the ink ladder contract.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Keep model/thinking controls content-sized while retaining their ability to shrink. Let the project trigger shrink with its assigned footer slot so a narrow new-task composer does not paint over send. Leave space allocation with the existing footer-leading marker instead of duplicating it on the controls group.

Extend the existing new-task story with adjacency and narrow-slot geometry assertions; the former fails with the growing model group, and the latter fails with the fixed-size project trigger.

Generated-by: Maka
@Astro-Han Astro-Han added the effort/S Under 100 readable lines label Oct 9, 2026
…tory

The narrow-composer assertion read `--maka-conversation-min-width` through
getPropertyValue, which the ink ladder contract rejects because custom
property reads return declarations rather than resolved values. The story
already sets the card's max-width to that variable, so compare the card
width with its computed max-width instead and leave the allowlist unchanged.

Generated-by: Claude Code
@Astro-Han
Astro-Han marked this pull request as ready for review October 9, 2026 02:43

@zhiiw zhiiw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on a real Windows machine against d12e16e824f9439da7bfeee9c86a84ad9782b1a9 (CI label + test green on this head, unmoved at posting):

  • The flex contract reads correctly: left controls no longer claim the row (flex: 1 1 0 removed), the model pair and the workspace picker both shrink (flex: 0 1 auto), so a long project name spends its own box, not the send button's.
  • Storybook smoke on this head: 451 stories / 491 renders pass, including the extended NewChatComposer play — gap equality, send stays inside the card at the conversation-min width, ordering holds, no horizontal overflow. (One unrelated concurrency flake passed alone — known on this machine.)

No blocking issues.

@Astro-Han
Astro-Han merged commit d3cbdc8 into main Oct 9, 2026
2 checks passed
@Astro-Han
Astro-Han deleted the fix/composer-project-layout branch October 9, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants