Title: fix(chat): autosize long prompts in the composer by BillLeoutsakosvl346 · Pull Request #6495 · simstudioai/sim · GitHub
Open Graph Title: fix(chat): autosize long prompts in the composer by BillLeoutsakosvl346 · Pull Request #6495 · simstudioai/sim
X Title: fix(chat): autosize long prompts in the composer by BillLeoutsakosvl346 · Pull Request #6495 · simstudioai/sim
Description: Summary The initial (hero) composer was pinned to a fixed h-[56px], so a long prompt scrolled inside a two-line box instead of growing. Both views now share one sizing policy — cap at 200px, autosize between — with a 56px resting floor for the hero composer. - className={isInitialView ? 'h-[56px]' : 'max-h-[200px]'} + className={cn('max-h-[200px]', isInitialView && 'min-h-[56px]')} An earlier revision of this branch also restyled the composer's scrollbar (visible thumb, stable gutter, hover reveal). That has been reverted — it did not do what it claimed, and it cost real layout: Chrome ignores ::-webkit-scrollbar customization whenever scrollbar-width is set, and globals.css already applies * { scrollbar-width: thin }. The 4px width, pill radius and 8px track inset were inert. Measured: scrollbar-width:thin + ::-webkit-scrollbar{width:4px} → 11px; with scrollbar-width:auto → 4px. What did survive was scrollbar-gutter: stable, which permanently reserved the 11px thin scrollbar. Prompt text sat 11px off-centre — 14px/25px left/right, against 14px/14px before — for every prompt, including a one-word one. hover:[&::-webkit-scrollbar-thumb]:… compiles to …::-webkit-scrollbar-thumb:hover, so it targeted the thumb rather than the container, and emitted after the sibling rule at equal specificity — silently overriding the hover colour it sat next to. The margin/padding pair and the 8px bottom margin went with it; they existed only to position that scrollbar. Tests The class-literal assertions are replaced with coverage that can actually fail. The previous scrollHeight stub returned the content height unconditionally, so deleting textarea.style.height = 'auto' — the entire reason autosize can shrink — still passed every test. The stub now models the browser rule that scroll height is the greater of the text height and the box the element is pinned to. Deleting that collapse now turns both the new shrink test and the existing widen-back test red. Type of Change Bug fix New feature Breaking change Documentation Other Testing bunx vitest run app/workspace/[workspaceId]/home/components/user-input/ — 6 files, 41 tests passed Mutation-checked the new coverage: removing the height = 'auto' collapse turns 2 tests red; restoring it turns them green Geometry measured in Chromium and WebKit via Playwright against the compiled Tailwind output (source of the 11px / 14px-vs-25px numbers above) bun run type-check, bunx biome check, bun run check:api-validation — all pass Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced
Open Graph Description: Summary The initial (hero) composer was pinned to a fixed h-[56px], so a long prompt scrolled inside a two-line box instead of growing. Both views now share one sizing policy — cap at 200px, autosi...
X Description: Summary The initial (hero) composer was pinned to a fixed h-[56px], so a long prompt scrolled inside a two-line box instead of growing. Both views now share one sizing policy — cap at 200px, autosi...
Opengraph URL: https://github.com/simstudioai/sim/pull/6495
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4f77e000-b334-6256-2177-5e6de248d9c3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E61C:223A5F:877E28:BB3100:6AFB495C |
| html-safe-nonce | bdad48524483b09400fb98d97ab198818ea511d68fae845c0d5856bc9dadd7c3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjFDOjIyM0E1Rjo4NzdFMjg6QkIzMTAwOjZBRkI0OTVDIiwidmlzaXRvcl9pZCI6IjMzNzEzOTk3ODY5ODM1NDEwODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1a682f0c32db327896683fbf77c5a2e3fa11516118d505eaa6c8a68e15d3d8c9 |
| hovercard-subject-tag | pull_request:4246793174 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6495/files |
| twitter:image | https://avatars.githubusercontent.com/u/157128530?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/157128530?s=400&v=4 |
| og:image:alt | Summary The initial (hero) composer was pinned to a fixed h-[56px], so a long prompt scrolled inside a two-line box instead of growing. Both views now share one sizing policy — cap at 200px, autosi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width