From bb44530649702a94ca9e28e883e0520dd412cc7a Mon Sep 17 00:00:00 2001 From: Kamil Krzywda Date: Tue, 6 Oct 2026 12:51:11 +0000 Subject: [PATCH] =?UTF-8?q?fix(ui):=20move=20NEXT=20TURN=20into=20the=20ri?= =?UTF-8?q?ght=20pane=20=E2=80=94=20full=20width,=20no=20longer=20overlapp?= =?UTF-8?q?ed=20(#52)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/mission-control.tsx | 18 +++++++++++------- components/next-turn-button.tsx | 27 ++++++++++++++------------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/components/mission-control.tsx b/components/mission-control.tsx index 03e874e..159d54f 100644 --- a/components/mission-control.tsx +++ b/components/mission-control.tsx @@ -529,6 +529,14 @@ export function MissionControl() { )} + + {/* #52 — the manual tick control (5b), moved in from the fixed bottom-right overlay: + last child of the pane's flex column — full width, size MD, pinned to the pane + bottom when the content is short (the wrapper's marginTop:auto) and scrolling + with the pane when the cargo list is long. In normal flow, the active-tasks strip + can no longer paint over it; the pane (unlike the tab content) is outside Radix's + unmount, so it stays visible on every tab. */} + @@ -567,13 +575,9 @@ export function MissionControl() { SYS ONLINE - {/* #44 — the manual tick control (5b): fixed bottom-right, outside the tab grid so it - stays visible on every tab (Radix unmounts inactive tabs — the button only refreshes - the snapshots this shell owns) */} - - - {/* #44 — the active-tasks strip: fixed bottom-left (same mount convention as the button — - outside the tab grid so it stays visible on every tab). Data: the shell's system + {/* #44 — the active-tasks strip: fixed bottom-left, outside the tab grid so it stays + visible on every tab. (#52 moved the NEXT TURN button out of this fixed-overlay area + and into the right pane, so the two can no longer overlap.) Data: the shell's system snapshot (JC-15) — refreshAll re-runs /api/system on every turn, so it updates on every shell refresh with no fetch of its own. */} diff --git a/components/next-turn-button.tsx b/components/next-turn-button.tsx index 9d5d10e..60b2e3b 100644 --- a/components/next-turn-button.tsx +++ b/components/next-turn-button.tsx @@ -3,12 +3,16 @@ import { useState } from 'react' import { Button } from '@/components/ui/button' -// NEXT TURN — the manual tick control (5b): a fixed bottom-right button + the current turn from -// the ship snapshot the shell holds. One click = POST /api/turn (no body); on success the shell -// re-fetches its snapshots. Review Focus 4: the button is NEVER disabled by game state — an -// empty queue is a FREE SKIP (the route always returns 200) — and the only transient is an -// in-flight request, which the handler ignores. `disabled` is never set, so the cva -// disabled:opacity-40 styling never applies either. +// NEXT TURN — the manual tick control (5b): a normal-flow block in the right pane (#52) carrying +// the current turn from the ship snapshot the shell holds. One click = POST /api/turn (no body); +// on success the shell re-fetches its snapshots. Review Focus 4: the button is NEVER disabled by +// game state — an empty queue is a FREE SKIP (the route always returns 200) — and the only +// transient is an in-flight request, which the handler ignores. `disabled` is never set, so the +// cva disabled:opacity-40 styling never applies either. +// #52 — the fixed bottom-right overlay became the right pane's last flex child (mission-control): +// full width, size MD, pinned to the pane bottom when the content is short (marginTop:auto) and +// scrolling with the pane when the cargo list is long. No position/zIndex any more — so the +// active-tasks strip can no longer paint over it. export function NextTurnButton({ turn, onTicked }: { turn: number | null; onTicked: () => void }) { const [inFlight, setInFlight] = useState(false) @@ -30,14 +34,11 @@ export function NextTurnButton({ turn, onTicked }: { turn: number | null; onTick return (
{error && ( @@ -46,7 +47,7 @@ export function NextTurnButton({ turn, onTicked }: { turn: number | null; onTick TURN {turn ?? '—'} -