From 9c4eb04d5bcb9ec868fa32767bde0af1600f18db Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Jul 2026 23:19:54 +0000 Subject: [PATCH] Add rearrangeable drag-and-drop dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main panels are now drag-to-rearrange cards, modeled on Fresharr's layout system. Hover a panel header for a grip handle; drag to reorder or move a card between responsive columns (3/2/1 by width). Each width keeps its own arrangement, persisted per-browser in localStorage alongside the existing collapse-state. A "Reset layout" button restores the default. The transient run-status widgets (shutdown warning, progress bar, result tiles) are lifted into a fixed strip above the grid so live repair status never moves mid-run. On narrow screens it degrades to the original single stacked column, so it's a pure progressive-enhancement — no API/backend changes. Verified in a headless browser: 3/2/1 responsive columns, drag reorder, per-width persistence across reload, reset, and single-column fallback. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013ffp2b19PUmzEU1fxpnURA --- CHANGELOG.md | 5 + app/templates/index.html | 221 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 218 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53462ef..1d13c59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes are documented here. Releases follow [SemVer](https://semver.org). Image tags published to Docker Hub (`krippler52/starr`) and GHCR (`ghcr.io/krippler/starr`). +## [Unreleased] + +### Added +- **Rearrangeable dashboard** — the main panels (Connection, Repair Log, Operations, Trends, Backups, Schedules, Notifications) are now drag-to-rearrange cards. Hover a panel header to reveal a grip handle and drag it to reorder or move it between columns. On wide screens the panels flow into 2–3 responsive columns (single column on narrow/mobile, identical to before); each width remembers its own arrangement, saved per-browser in `localStorage` (same mechanism as the existing panel collapse-state). A **Reset layout** button restores the default. The live run status (shutdown warning, progress bar, result tiles) stays in a fixed strip above the grid so it never moves mid-repair. Purely a frontend enhancement — no API or backend changes. + ## [1.2.10] — 2026-07-16 ### Fixed diff --git a/app/templates/index.html b/app/templates/index.html index c7b20dd..5257a9d 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -123,6 +123,33 @@ .phase.failed { border-color: var(--err); } .phase.failed .phase-num, .phase.failed .phase-label { color: var(--err); } .panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; } + +/* ── Rearrangeable dashboard (drag cards between responsive columns) ─────────── */ +.dashboard { display: flex; align-items: flex-start; gap: 14px; } +.dash-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; } +/* Cards keep their own styling; the column's flex-gap replaces per-card margin. */ +.dash-col > .dash-card { margin-bottom: 14px; } +.dash-card { position: relative; } +/* Grip handle injected into each card header by JS. Hidden until you hover the + card (or while a drag is in progress), Fresharr-style. */ +.drag-handle { + cursor: grab; user-select: none; flex-shrink: 0; + font-size: 14px; line-height: 1; color: var(--muted); + opacity: 0; transition: opacity .15s; padding: 0 6px 0 0; margin-right: -2px; +} +.dash-card:hover .drag-handle, .dashboard.dnd-active .drag-handle { opacity: .5; } +.drag-handle:hover { opacity: 1; color: var(--app); } +.drag-handle:active { cursor: grabbing; } +.dash-card.is-dragging { opacity: .35; } +.dash-col.drop-into { outline: 2px dashed var(--app); outline-offset: -2px; border-radius: var(--radius); } +.dash-card.drop-before { box-shadow: 0 -3px 0 -1px var(--app); } +.dash-card.drop-after { box-shadow: 0 3px 0 -1px var(--app); } +#resetLayoutBtn { display: none; } +#layoutTools.show #resetLayoutBtn { display: inline-flex; } +#layoutTools { display: flex; justify-content: flex-end; gap: 8px; margin: -4px 0 10px; } +#runStatus:empty { display: none; } +.layout-hint { font-size: 10px; color: var(--muted); align-self: center; margin-right: auto; opacity: .8; } +@media (max-width: 720px) { .drag-handle { display: none; } .layout-hint { display: none; } } .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--border); @@ -478,7 +505,17 @@

STARR DB REPAIR

6
Online
-
+ +
+ Drag a panel's ⠿ grip to rearrange your dashboard + +
+
+ +
@@ -546,7 +583,7 @@

STARR DB REPAIR

Duration
-
+
REPAIR LOG
@@ -563,7 +600,7 @@

STARR DB REPAIR

-