From b4e2d8618e8e2b37012577822b31e61d3ff0e123 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 05:58:37 +0000 Subject: [PATCH] Fit more rows on the home screen and let it hold 200 slots Rows shrink to 72px with 12px gaps (tiles are 70px), and the home screen's slot limit goes from 40 to 200 (its arrays are already 512 long). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01NYASJ6JNxhYwNNJK7ypK2V --- tests/e2e.cjs | 2 +- web/app.py | 6 +++--- web/app.wasm | Bin 14070 -> 14071 bytes web/style.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e.cjs b/tests/e2e.cjs index 8255de3..845b9ec 100644 --- a/tests/e2e.cjs +++ b/tests/e2e.cjs @@ -115,7 +115,7 @@ const BASE = process.env.BASE || "http://localhost:8000"; await p.mouse.up(); await settle(); const [w1, h1] = await size(); assert.ok(w1 < w0 && Math.abs(w1 - (2 * tile.width + 8)) < 3, `two columns wide: ${w1} (tile ${tile.width})`); - assert.equal(h1, 2 * 76 + 16, "snapped to two whole rows of tiles"); + assert.equal(h1, 2 * 72 + 12, "snapped to two whole rows of tiles"); assert.ok(await p.$(".widget-slot.resizing"), "letting go of a handle keeps the handles"); await p.click(".resize-bar >> text=Done"); await settle(); assert.ok(!(await p.$(".resize-handle"))); diff --git a/web/app.py b/web/app.py index f0d92e4..3b90049 100644 --- a/web/app.py +++ b/web/app.py @@ -104,7 +104,7 @@ GRAB: Const[i32] = 42 # arg: the widget slot showing handles, picked up CHECK_UPDATES: Const[i32] = 43 CAP: Const[i32] = 512 -HOME_CAP: Const[i32] = 40 +HOME_CAP: Const[i32] = 200 WCAP: Const[i32] = 256 APP: Const[i32] = 0 @@ -624,7 +624,7 @@ def view_resize_bar() -> None: def widget_rows(h: i32) -> i32: """Rows of app tiles nearest to a widget height in CSS px, at least one.""" - k: i32 = (h + 16 + 46) // 92 + k: i32 = (h + 12 + 42) // 84 if k < 1: k = 1 return k @@ -639,7 +639,7 @@ def view_home_slot(i: i32) -> None: cls_if("lifted", i == lifted) cls_if("resizing", i == resizing) attr_num("data-slot", i) - # Its height spans whole rows of app tiles (76px rows, 16px gaps; style.css). + # Its height spans whole rows of app tiles (72px rows, 12px gaps; style.css). s_set(scratch, "grid-row:span ") s_add_num(scratch, widget_rows(hh[i])) if hw[i] > 0: diff --git a/web/app.wasm b/web/app.wasm index 66ca9dca396f7cc0c867344f298a1613d0f6d9af..e45e33e53e41e0b57825189ad64ffb845357c350 100644 GIT binary patch delta 34 qcmeyC`#pDqC@bTm$zrT+OeYvO&t