From 8ae719093ff1454d23ebc761df2e871e2746dd89 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Thu, 24 Sep 2026 14:29:34 +0000 Subject: [PATCH] windows stop flush with the taskbar's top edge instead of tucking 6px under it --- opencode.md | 5 ++++- src/app/components/WindowsDesktop.tsx | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/opencode.md b/opencode.md index a96f244..f054eb6 100644 --- a/opencode.md +++ b/opencode.md @@ -227,7 +227,10 @@ list reordering, not free placement. Don't confuse the two. `moveWin` clamps `x`/`y` (dragging can't push a window off any edge or under the panel), a `resize` effect re-clamps on browser resize, and `.win-window.centered` carries `max-width`/`max-height`. Keep these in sync if - you add a new window path, or windows will escape the viewport. + you add a new window path, or windows will escape the viewport. The bottom + limit is `TASKBAR_HEIGHT = 54` in `WindowsDesktop.tsx` (panel `bottom:10px` + + `height:44px`), so a window lands flush with the panel's top edge; note + `useDesktopIcons.ts` has its **own** `TASKBAR_HEIGHT = 48` for the icon grid. - Exposing the **dev** server over a tunnel needs the tunnel host in `allowedDevOrigins` (`next.config.ts`). Without it Next dev rejects the cross-origin HMR WebSocket, so the client never hydrates — the page is SSR diff --git a/src/app/components/WindowsDesktop.tsx b/src/app/components/WindowsDesktop.tsx index 87ac9d7..7aea1bc 100644 --- a/src/app/components/WindowsDesktop.tsx +++ b/src/app/components/WindowsDesktop.tsx @@ -9,7 +9,11 @@ import { useTheme } from "./useTheme"; import { useDesktopIcons } from "./useDesktopIcons"; import { WALLPAPER, friends } from "../data"; -const TASKBAR_HEIGHT = 48; +// The panel is anchored at `bottom: 10px` and is 44px tall, so the usable +// desktop area ends 54px above the viewport bottom. Windows are clamped to that +// line, so a window dragged down lands flush with the top of the taskbar with +// nothing hidden behind it. +const TASKBAR_HEIGHT = 54; const LEFT_APPS = APPS.filter((a) => a.id !== "services" && a.id !== "friends");