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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NYASJ6JNxhYwNNJK7ypK2V
This commit is contained in:
Claude committed 2026-10-22 05:58:37 +00:00
1 parent 8dd46b20a5
commit b4e2d8618e
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -115,7 +115,7 @@ const BASE = process.env.BASE || "http://localhost:8000";
await p.mouse.up(); await settle(); await p.mouse.up(); await settle();
const [w1, h1] = await size(); 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.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"); assert.ok(await p.$(".widget-slot.resizing"), "letting go of a handle keeps the handles");
await p.click(".resize-bar >> text=Done"); await settle(); await p.click(".resize-bar >> text=Done"); await settle();
assert.ok(!(await p.$(".resize-handle"))); assert.ok(!(await p.$(".resize-handle")));
+3 -3
View File
@@ -104,7 +104,7 @@ GRAB: Const[i32] = 42 # arg: the widget slot showing handles, picked up
CHECK_UPDATES: Const[i32] = 43 CHECK_UPDATES: Const[i32] = 43
CAP: Const[i32] = 512 CAP: Const[i32] = 512
HOME_CAP: Const[i32] = 40 HOME_CAP: Const[i32] = 200
WCAP: Const[i32] = 256 WCAP: Const[i32] = 256
APP: Const[i32] = 0 APP: Const[i32] = 0
@@ -624,7 +624,7 @@ def view_resize_bar() -> None:
def widget_rows(h: i32) -> i32: def widget_rows(h: i32) -> i32:
"""Rows of app tiles nearest to a widget height in CSS px, at least one.""" """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: if k < 1:
k = 1 k = 1
return k return k
@@ -639,7 +639,7 @@ def view_home_slot(i: i32) -> None:
cls_if("lifted", i == lifted) cls_if("lifted", i == lifted)
cls_if("resizing", i == resizing) cls_if("resizing", i == resizing)
attr_num("data-slot", i) 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_set(scratch, "grid-row:span ")
s_add_num(scratch, widget_rows(hh[i])) s_add_num(scratch, widget_rows(hh[i]))
if hw[i] > 0: if hw[i] > 0:
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -40,7 +40,7 @@ body { margin: 0; min-height: 100vh; color: #fff; -webkit-tap-highlight-color: t
all one height, so a widget spans whole rows of app tiles, and apps fill the cells all one height, so a widget spans whole rows of app tiles, and apps fill the cells
beside a widget rather than leaving holes (dense packing). Keep the row height and beside a widget rather than leaving holes (dense packing). Keep the row height and
row gap in sync with widget_rows in app.py. */ row gap in sync with widget_rows in app.py. */
.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4.75rem; row-gap: 1rem; .slots { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 4.5rem; row-gap: .75rem;
grid-auto-flow: row dense; } grid-auto-flow: row dense; }
@media (min-width: 480px) { .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); } @media (min-width: 480px) { .apps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.slots { grid-template-columns: repeat(6, minmax(0, 1fr)); } } .slots { grid-template-columns: repeat(6, minmax(0, 1fr)); } }