From ca01e44ad24b1dc3217ae85ee9b43f8fb4244d5b Mon Sep 17 00:00:00 2001 From: wangwei Date: Tue, 16 Jun 2026 17:55:07 +0800 Subject: [PATCH] feat(webapp): add session persistence via URL hash routing + sessionStorage - app.js: hash-based router (#runs / #new / #profiles / #report/{runId}) - navigate() pushes history entries for back/forward support - _restoreSession() reads hash on load and popstate - sessionStorage fallback for same-tab refreshes - run-card highlights selected run (.run-card.selected) - runner.js: use App.navigate() for report redirect; persist lastRunId to sessionStorage - index.html: report nav button starts disabled (enabled on run select/restore) - app.css: .run-card.selected with petrol border + ring Co-Authored-By: Claude --- webapp/static/css/app.css | 6 ++ webapp/static/index.html | 2 +- webapp/static/js/app.js | 130 +++++++++++++++++++++++++++---------- webapp/static/js/runner.js | 4 +- 4 files changed, 106 insertions(+), 36 deletions(-) diff --git a/webapp/static/css/app.css b/webapp/static/css/app.css index 2735eb0..c4f54fc 100644 --- a/webapp/static/css/app.css +++ b/webapp/static/css/app.css @@ -295,6 +295,12 @@ table.group-table td { border-bottom: 1px solid #f1f5f9; font-variant-numeric: t .btn-danger { color: var(--bad); border-color: var(--bad); } .btn-danger:hover { background: #fee2e2; } +/* 选中态 run 卡片 */ +.run-card.selected { + border-color: var(--petrol); + box-shadow: 0 0 0 2px rgba(0,153,153,0.25), var(--shadow); +} + /* ---------- LLM 角色配置面板 ---------- */ .llm-assignment-panel { border-left: 3px solid var(--petrol); } .llm-role-rows { display: flex; flex-direction: column; gap: 10px; } diff --git a/webapp/static/index.html b/webapp/static/index.html index e8e2ba5..691d939 100644 --- a/webapp/static/index.html +++ b/webapp/static/index.html @@ -22,7 +22,7 @@ -