From 11f3df62e7f1759e47156e0a5889dc4851e6476f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 10:09:15 +0000 Subject: [PATCH 1/2] Initial plan From daece74ee29ff27766a2acc873f42f8e81b4de81 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 10:14:19 +0000 Subject: [PATCH 2/2] feat: add view mode toggle to Cue List View, persisted in URL hash Agent-Logs-Url: https://github.com/jstarpl/ready2take2/sessions/9ec5501b-9bde-4ff9-8360-a2684fbeb423 Co-authored-by: jstarpl <3635991+jstarpl@users.noreply.github.com> --- .../features/shows/cue-list-view-store.ts | 6 + src/client/features/shows/cue-list-view.tsx | 336 +++++++++++------- 2 files changed, 210 insertions(+), 132 deletions(-) diff --git a/src/client/features/shows/cue-list-view-store.ts b/src/client/features/shows/cue-list-view-store.ts index d9119ab..5d4d5f6 100644 --- a/src/client/features/shows/cue-list-view-store.ts +++ b/src/client/features/shows/cue-list-view-store.ts @@ -1,6 +1,8 @@ import { createContext, useContext } from "react"; import { proxy } from "valtio"; +export type CueListViewMode = "both" | "top" | "bottom"; + export interface CueListViewState { // Track and value selection for bottom pane filtering selectedTrackId: string | null; @@ -9,6 +11,9 @@ export interface CueListViewState { // Horizontal splitter position as percentage (0-100) // 50 = 50/50 split splitterPositionPercent: number; + + // Which pane(s) to display + viewMode: CueListViewMode; } export function createCueListViewStore(): CueListViewState { @@ -16,6 +21,7 @@ export function createCueListViewStore(): CueListViewState { selectedTrackId: null, selectedTechnicalIdentifier: null, splitterPositionPercent: 50, + viewMode: "both", }); } diff --git a/src/client/features/shows/cue-list-view.tsx b/src/client/features/shows/cue-list-view.tsx index 1f6a29e..3b5ac27 100644 --- a/src/client/features/shows/cue-list-view.tsx +++ b/src/client/features/shows/cue-list-view.tsx @@ -8,13 +8,14 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/cli import { cn, getContrastColor } from "@/client/lib/utils"; import { CueListViewStoreContext, + CueListViewMode, getOrCreateCueListViewStore, destroyCueListViewStore, useCueListViewStore, } from "@/client/features/shows/cue-list-view-store"; import { Cue } from "@/server/db/entities/Cue"; import { Show } from "@/server/db/entities/Show"; -import { QrCodeIcon } from "lucide-react"; +import { PanelBottom, PanelTop, QrCodeIcon, Rows2 } from "lucide-react"; function clamp(value: number, min: number, max: number) { return Math.max(min, Math.min(max, value)); @@ -257,12 +258,16 @@ function CueListViewContent() { const params = new URLSearchParams(window.location.hash.slice(1)); const trackId = params.get("trackId"); const identifier = params.get("identifier"); + const view = params.get("view"); if (trackId) { store.selectedTrackId = trackId; } if (identifier) { store.selectedTechnicalIdentifier = identifier; } + if (view === "top" || view === "bottom" || view === "both") { + store.viewMode = view; + } } // On initial load, parse hash for selected track and technical identifier @@ -367,7 +372,7 @@ function CueListViewContent() { updateHash(store.selectedTrackId, selectedTechnicalIdentifier || null); } - function updateHash(selectedTrackId: string | null, selectedTechnicalIdentifier: string | null) { + function updateHash(selectedTrackId: string | null, selectedTechnicalIdentifier: string | null, viewMode?: CueListViewMode) { const params = new URLSearchParams(window.location.hash.slice(1)); if (selectedTrackId) { params.set("trackId", selectedTrackId); @@ -379,38 +384,206 @@ function CueListViewContent() { } else { params.delete("identifier"); } + const resolvedViewMode = viewMode ?? store.viewMode; + if (resolvedViewMode && resolvedViewMode !== "both") { + params.set("view", resolvedViewMode); + } else { + params.delete("view"); + } window.location.hash = params.toString(); } + function handleViewModeChange(newViewMode: CueListViewMode) { + store.viewMode = newViewMode; + updateHash(store.selectedTrackId, store.selectedTechnicalIdentifier, newViewMode); + } + + const viewModeToggle = ( +