Skip to content

refactor(composer): unify session and creator inputs - #766

Merged
beruro merged 2 commits into
developfrom
dev/unify-session-creator-composer
Aug 10, 2026
Merged

refactor(composer): unify session and creator inputs#766
beruro merged 2 commits into
developfrom
dev/unify-session-creator-composer

Conversation

@Harry19081

@Harry19081 Harry19081 commented Aug 10, 2026

Copy link
Copy Markdown
Member

Problem

Session inputs used a compact-versus-expanded layout while Session Creator/Launchpad used a separate full-height composer. Their editor bounds, toolbar structure, control gaps, padding, and width were defined along different paths, so the two surfaces did not align or look identical. Focused Launchpad also lacked the empty workstation-track space used by focused sessions.

Solution

Remove the compact session composer state and always render the full-height editor. Share the 60–140px editor bounds, editor presentation class, and mode/model control spacing through input-area tokens. Collapse ComposerBar to one toolbar layout for session and creator surfaces, cap the creator composer at the shared 900px content width, and reserve the collapsed 44px workstation track in focused Launchpad without mounting workstation controls or subscriptions.

The review follow-up removes the obsolete newline-expansion callback chain and fixed editor-height constant, and gives the recording-state add-content control an accessible name with regression coverage.

Session navigation, autofocus, and per-session draft persistence are intentionally unchanged.

Potential risks

Short session prompts now occupy the taller full-height composer instead of the former compact capsule. The empty Launchpad workstation track appears only under the existing focused-chat 1100px container breakpoint, matching session behavior; narrower layouts retain zero track width. Automated checks cover layout tokens, mount policy, composer behavior, and the reviewed accessibility fix, but visual theme/viewport screenshots were not captured because desktop UI control was not authorized.

Verification

  • npx vitest run src/components/ComposerBar/index.test.ts src/components/ComposerSurface/index.test.ts src/components/ComposerInput/__tests__ src/config/inputAreaTokens.test.ts src/engines/ChatPanel/focusedChatWorkstationLayout.test.ts — 83 tests passed.
  • npx vitest run src/components/Voice/VoiceRecordingBar.test.ts — 1 test passed.
  • npm run typecheck — passed.
  • npx eslint over all changed TypeScript files — passed.
  • Repository pre-commit hooks ran lint-staged, Prettier, ESLint, and the staged TypeScript check — passed.
  • git diff --check origin/develop...HEAD — passed.

Audit

  • Architecture audit covered layers 1–7 (compile/type integrity, dead paths, naming, defaults, shared boundaries, and developer clarity). Wire protocol, initialization parity, and resolver symmetry (layers 8–10) are not touched by this frontend-only change.
  • Frontend UI audit: docs/frontend-ui-audit-2026-08-10/ComposerUnification.md records 1 resolved fix, 12 keep-with-reason findings, and 0 abstraction candidates.
  • Effects: no Effect was added; the compact-layout observer/listener Effects were removed.
  • Performance guard: focused Launchpad renders an inert spacer while SessionWorkstationRail stays unmounted, so no timer, listener, cache, request, or subscription is created for the placeholder. Pure mount-policy tests cover focused session, focused Launchpad, and inactive states. Performance verdict: pass.

Pre-commit hook ran. Total eslint: 0, total circular: 0
@Harry19081
Harry19081 requested a review from beruro August 10, 2026 09:21

@beruro beruro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the final two-commit diff. Compact composer state and its dead callback/config paths are fully removed, shared layout tokens are consumed by both surfaces, the Launchpad placeholder does not mount workstation subscriptions, accessibility regression coverage is included, and all required CI checks pass.

@beruro
beruro merged commit d7c854f into develop Aug 10, 2026
3 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.

2 participants