From 1ae853370205731226391e6f65ac305ebaaa4591 Mon Sep 17 00:00:00 2001 From: timmy Date: Sat, 22 Aug 2026 08:10:24 +0000 Subject: [PATCH] feat: persist weekly availability defaults (Closes #1256) --- frontend/dashboard.css | 9 ++ frontend/index.html | 20 +++++ frontend/week-plan.js | 94 ++++++++++++++++++--- src/main.py | 4 + src/today_store.py | 35 ++++++-- tests/e2e/test_mobile_week_ahead_release.py | 25 ++++++ tests/test_week_plan.py | 38 +++++++++ tests/test_week_plan_frontend.py | 47 +++++++++++ 8 files changed, 255 insertions(+), 17 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index d3cb2aa..e83763f 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -392,6 +392,15 @@ textarea { resize: vertical; min-height: 120px; } .week-capacity-day span { color:#bfdbfe; font-weight:700; } .week-capacity-day small { color:#a9bdd3; } #apply-week-capacities { width:100%; min-height:48px; position:sticky; bottom:0; } +.week-availability-editor { margin:12px 0; padding:12px; border:1px solid #31577f; border-radius:12px; background:#10233a; } +#open-week-availability { min-height:44px; } +.week-availability-editor h3 { margin-top:0; } +.week-availability-grid { display:grid; grid-template-columns:1fr; gap:8px; } +.week-availability-grid label { display:grid; grid-template-columns:minmax(0,1fr) minmax(92px,120px); gap:10px; align-items:center; } +.week-availability-grid input { min-height:44px; min-width:0; box-sizing:border-box; } +.week-availability-actions { display:grid; grid-template-columns:1fr; gap:8px; margin-top:12px; } +.week-availability-actions button { min-height:44px; } +@media (min-width:600px) { .week-availability-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .week-availability-actions { grid-template-columns:repeat(3,minmax(0,1fr)); } } @media (max-width:359px) { .week-capacity-hours { grid-template-columns:1fr; } } .week-calendar-handoff h2 { margin-bottom:6px; } .week-calendar-days { display:grid; gap:12px; margin:14px 0; } diff --git a/frontend/index.html b/frontend/index.html index 4fbbed1..9203d8d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -523,6 +523,26 @@ + +