Skip to content

Commit 2456b6d

Browse files
committed
fix(web): home computer-open split — match bud (wide panel, narrow left column)
Two bugs made the home 'computer open' layout wrong vs bud (content stayed wide + centered, panel capped narrow): 1. The computer-open shift rules lived in @layer utilities, so the elements' own Tailwind utilities (px-6, max-w-[740px], right-0) won and the content never collapsed. Moved them UNLAYERED (unlayered beats layered) so they apply. 2. The Computer panel was capped at max-w-[760px] (~40vw); bud's is ~68vw. Dropped the cap so it fills the right (w = 100vw - sidebar - 34rem), and set the content reserve/composer to 100vw - sidebar - 32rem so the content is a ~30rem left column and the composer aligns under it. Verified live: narrow left column + aligned composer + wide panel, matching bud.
1 parent 4726b3f commit 2456b6d

2 files changed

Lines changed: 27 additions & 24 deletions

File tree

apps/web/src/app/globals.css

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -566,32 +566,35 @@
566566
}
567567
}
568568

569-
@layer utilities {
570-
@media (min-width: 768px) {
571-
html.cheatcode-home-computer-open .cheatcode-home-main {
572-
padding-right: min(58vw, 48rem);
573-
transition: padding-right 200ms ease;
574-
}
569+
/* Home "computer open" split — content collapses to a narrow left column and the
570+
Computer panel takes the wide right side (bud parity). Left UNLAYERED on purpose:
571+
inside @layer utilities these lose to the elements' own Tailwind utilities
572+
(px-6 / max-w / right-0); unlayered rules win. Reserve = viewport minus the
573+
sidebar rail minus the ~32rem content column, matching the panel's own width. */
574+
@media (min-width: 768px) {
575+
html.cheatcode-home-computer-open .cheatcode-home-main {
576+
padding-right: calc(100vw - var(--cheatcode-sidebar-offset, 4rem) - 32rem);
577+
transition: padding-right 200ms ease;
578+
}
575579

576-
html.cheatcode-home-computer-open .cheatcode-home-center {
577-
max-width: 30rem;
578-
transition: max-width 200ms ease;
579-
}
580+
html.cheatcode-home-computer-open .cheatcode-home-center {
581+
max-width: 30rem;
582+
transition: max-width 200ms ease;
583+
}
580584

581-
html.cheatcode-home-computer-open .cheatcode-home-composer-form {
582-
right: min(58vw, 48rem);
583-
padding-left: var(--cheatcode-sidebar-offset, 4rem);
584-
width: auto;
585-
transition:
586-
right 200ms ease,
587-
width 200ms ease,
588-
padding-left 200ms ease;
589-
}
585+
html.cheatcode-home-computer-open .cheatcode-home-composer-form {
586+
right: calc(100vw - var(--cheatcode-sidebar-offset, 4rem) - 32rem);
587+
padding-left: var(--cheatcode-sidebar-offset, 4rem);
588+
width: auto;
589+
transition:
590+
right 200ms ease,
591+
width 200ms ease,
592+
padding-left 200ms ease;
593+
}
590594

591-
html.cheatcode-home-computer-open .cheatcode-home-composer-shell {
592-
max-width: 28rem;
593-
transition: max-width 200ms ease;
594-
}
595+
html.cheatcode-home-computer-open .cheatcode-home-composer-shell {
596+
max-width: 30rem;
597+
transition: max-width 200ms ease;
595598
}
596599
}
597600

apps/web/src/components/home/home-session-chrome.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function HomeComputerPanel({
154154
return (
155155
<aside
156156
aria-label="Computer"
157-
className="fixed top-3.5 right-3.5 bottom-3.5 z-30 hidden w-[calc(100vw-var(--cheatcode-sidebar-offset,4rem)-32rem)] min-w-[420px] max-w-[760px] flex-col overflow-hidden bg-white md:flex"
157+
className="fixed top-3.5 right-3.5 bottom-3.5 z-30 hidden w-[calc(100vw-var(--cheatcode-sidebar-offset,4rem)-34rem)] min-w-[420px] flex-col overflow-hidden bg-white md:flex"
158158
>
159159
<div className="flex h-10 shrink-0 items-center justify-between pr-36">
160160
<div

0 commit comments

Comments
 (0)