From daa6f4cdbf02a6ef8ca4e4232e1f69d9010a05d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mazoni?= Date: Wed, 22 Jul 2026 05:36:25 +0930 Subject: [PATCH] Increase LR graph zoom to 400% and remember zoom per direction (#581) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raises the LR graph zoom ceiling from 200% to 400%. TB is unchanged at 200%. Zoom and pan are now tracked separately per direction instead of shared. Switching LR to TB and back restores the viewport you left in each mode, so a round trip no longer loses your position. Previously a single shared zoom value was clamped down whenever you switched into TB, which meant going LR to TB and back cost you your LR zoom. `run-overview.tsx` holds two view states, remembered per run under `-TB` and `-LR`. `clampZoom` and `zoomAtPoint` take a `direction` argument and apply the matching ceiling, so the clamp-on-direction-change effect is gone. 24 tests in `graph-viewport.test.ts`. Requirements: docs/brainstorms/2026-07-21-graph-zoom-lr-increase-requirements.md Plan: docs/plans/2026-07-21-graph-zoom-lr-increase-plan.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 Co-authored-by: Fabro --- .../app/components/graph-toolbar.tsx | 4 +- apps/fabro-web/app/lib/graph-viewport.test.ts | 121 +++++- apps/fabro-web/app/lib/graph-viewport.ts | 13 +- apps/fabro-web/app/routes/run-overview.tsx | 19 +- ...-21-graph-zoom-lr-increase-requirements.md | 98 +++++ .../2026-07-21-graph-zoom-lr-increase-plan.md | 400 ++++++++++++++++++ 6 files changed, 637 insertions(+), 18 deletions(-) create mode 100644 docs/brainstorms/2026-07-21-graph-zoom-lr-increase-requirements.md create mode 100644 docs/plans/2026-07-21-graph-zoom-lr-increase-plan.md diff --git a/apps/fabro-web/app/components/graph-toolbar.tsx b/apps/fabro-web/app/components/graph-toolbar.tsx index 03067059b..47455eef1 100644 --- a/apps/fabro-web/app/components/graph-toolbar.tsx +++ b/apps/fabro-web/app/components/graph-toolbar.tsx @@ -1,6 +1,6 @@ import { ArrowDownIcon, ArrowRightIcon, MinusIcon, PlusIcon } from "@heroicons/react/20/solid"; -import { GRAPH_MAX_ZOOM, GRAPH_MIN_ZOOM } from "../lib/graph-viewport"; +import { GRAPH_MAX_ZOOM_TB, GRAPH_MAX_ZOOM_LR, GRAPH_MIN_ZOOM } from "../lib/graph-viewport"; type Direction = "LR" | "TB"; @@ -81,7 +81,7 @@ export function GraphToolbar({ type="button" title="Zoom in" onClick={() => onZoomBy(ZOOM_STEP_FACTOR)} - disabled={zoom >= GRAPH_MAX_ZOOM} + disabled={zoom >= (direction === "LR" ? GRAPH_MAX_ZOOM_LR : GRAPH_MAX_ZOOM_TB)} className={`${btn} ${btnDisabled}`} >