Remove the built-in clock and date from the home screen

Home is now fully blank apart from the Windows panel; add a clock widget
for the time. Drops the clock_time/clock_date imports, the TICK message
and its 5s timer, the shell's tick() on resume and is24Hour().

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxeCBaCjz7Sp1PhdznewhY
This commit is contained in:
Claude committed 2026-10-21 23:54:01 +00:00
1 parent d7bd24b817
commit ce815d72c2
7 files changed
+13 -75

No files matched your search

+5 -5
View File
@@ -15,10 +15,10 @@ const BASE = process.env.BASE || "http://localhost:8000";
await p.evaluate(() => localStorage.clear());
await p.reload();
await p.waitForSelector(".hint");
assert.match(await p.textContent(".clock .time"), /^\d{1,2}:\d\d$/);
const longpress = async (sel) => {
assert.ok(!(await p.$(".clock")), "home has no built-in clock");
const longpress = async (sel, fy = 0.5) => {
const r = await p.locator(sel).first().boundingBox();
await p.mouse.move(r.x + r.width / 2, r.y + r.height / 2);
await p.mouse.move(r.x + r.width / 2, r.y + r.height * fy);
await p.mouse.down(); await p.waitForTimeout(650); await p.mouse.up(); await settle();
};
const homeApps = () => p.$$eval(".slots .name", (ns) => ns.map((n) => n.textContent));
@@ -30,8 +30,8 @@ const BASE = process.env.BASE || "http://localhost:8000";
assert.equal(await p.$$eval(".apps .tile.on", (ts) => ts.length), 3);
await p.click(".drawer-head >> text=Done"); await settle();
assert.deepEqual(await homeApps(), ["Chrome", "Gmail", "Phone"]);
// add a widget
await longpress(".clock");
// add a widget: long press on blank home, below the apps
await longpress(".home", 0.95);
await p.click(".sheet-item >> text=Add widget");
await p.waitForSelector(".widget-list li");
// search the picker by widget name and by the app it comes from