From 33d9e6553d1c48e2fce7647af1afcb73fe22f784 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 28 Sep 2026 22:00:09 +0000 Subject: [PATCH 1/2] Phones get the phone layout, and the phone layout gets dense MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KERNEL·A has no phone CSS: on an iPhone its header stacked the toolbar into a column, the page laid out 534px wide, the footer wrapped into a tall block, and COPY/CSV covered table headers. - kernel-agent.html sends touch devices with a phone-sized screen to kernel-agent-mobile.html, keeping the query and hash, so example links work. ?layout=desktop keeps the desktop layout for the tab, and the app menu's KERNEL·A entry uses it. In narrow windows the desktop header takes two rows with a sideways-scrolling toolbar, and the footer wraps. - KERNEL·M's header is one row: brand without the version, notebook, status dot (words only while booting, busy or failed), Interrupt while busy, and ⋯, which now holds New, Open, Save .ipynb, Save ZIP and Restart Python. - Density: 12.5px code in a 34px gutter, 14px prose, and tighter cells, outputs, tables, cell tools, first-run card (keyboard tips hidden), toasts, tab bar, sheets and modals. Files and Variables sheets fit their contents. On iOS the viewport tag stops focus zoom, so fields no longer need 16px type and the code editor matches its overlay. - On touch screens, output buttons sit in a row under the output. The iOS install hint hides itself after nine seconds, and toasts stay above it. tests/e2e/phone.mjs checks all of this at iPhone size: the redirect and its opt-out, no sideways scroll, a compact header, the ⋯ actions, code aligned with its highlighting, buttons below tables, and a Files sheet shorter than the screen. It fails on the previous build. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01S9PfSmbaV1CY9ZawtfbiEm --- CHANGELOG.md | 6 + README.md | 2 +- docs/kernel-agent-mobile.html | 192 +++++++++++++++++++--------- docs/kernel-agent.html | 51 +++++++- docs/kernel.html | 6 +- src/agent/css/agent.css | 2 +- src/agent/css/desktop.css | 14 ++ src/agent/css/mobile.css | 149 +++++++++++++-------- src/agent/desktop.html | 20 ++- src/agent/js/mobile/controller.js | 4 + src/agent/js/mobile/pwa.js | 4 + src/agent/js/notebook/260-wiring.js | 2 + src/agent/mobile.html | 16 ++- src/suite/suite-menu.js | 13 +- tests/e2e/harness.mjs | 10 +- tests/e2e/phone.mjs | 49 +++++++ tests/e2e/run.mjs | 5 +- tests/e2e/ui.mjs | 2 +- 18 files changed, 412 insertions(+), 135 deletions(-) create mode 100644 tests/e2e/phone.mjs diff --git a/CHANGELOG.md b/CHANGELOG.md index 7130519..ea22f0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Notable changes to KERNEL, KERNEL·A (the agent), and KERNEL·M (the phone build ## [Unreleased] +### Phones +- Opening KERNEL·A on a phone opens KERNEL·M, the same app laid out for touch, with the same notebooks and the same link parameters, so example links work too. `?layout=desktop` keeps the desktop layout for the tab, and the app menu's KERNEL·A entry uses it. +- KERNEL·M is denser: a one-row header with every toolbar action under ⋯, 12.5px code in a narrower gutter, and tighter cells, outputs, first-run card and sheets. Files and Variables sheets fit their contents. On iOS the viewport stops focus zoom, so fields no longer need 16px type. +- On touch screens, COPY, CSV and PNG sit under an output instead of covering it. The iOS install hint hides itself after a few seconds, and toasts stay above it. +- The desktop layout holds together in narrow windows: the header takes two rows with a sideways-scrolling toolbar, and the footer wraps. + ### Getting started - Example links: `kernel-agent.html?example=` opens one of the curated runs in `examples/` with its original outputs, in a new notebook if the current one has work in it. The welcome card has a *See a real agent run* button, and the landing page and README link all four. Fleet DNA reads public data the repository doesn't include, so it links to where to get it. - A demo of an agent run at the top of the README and the landing page, recorded by `npm run demo`. diff --git a/README.md b/README.md index 44a52b5..246c1fb 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ They were captured with KERNEL Agent 2.3.0. The published notebooks keep the vis ## Use it -**The apps** are single HTML files. Open them from the [live page](https://dogum.github.io/kernel/), download one from [`docs/`](docs/) and open it locally, or put it on any static host. Pyodide downloads about 10 MB on first run and is cached after. Installing KERNEL·M to a home screen and using it offline need https, which GitHub Pages provides. +**The apps** are single HTML files. Open them from the [live page](https://dogum.github.io/kernel/), download one from [`docs/`](docs/) and open it locally, or put it on any static host. Pyodide downloads about 10 MB on first run and is cached after. Installing KERNEL·M to a home screen and using it offline need https, which GitHub Pages provides. On a phone, KERNEL·A opens as KERNEL·M; add `?layout=desktop` to keep the desktop layout. **The agent** needs an API key from Anthropic, OpenAI, or xAI; add it in the agent's settings. Keys stay in your browser and requests go straight to the provider (or a compatible gateway you choose). diff --git a/docs/kernel-agent-mobile.html b/docs/kernel-agent-mobile.html index 77b0566..a37e37b 100644 --- a/docs/kernel-agent-mobile.html +++ b/docs/kernel-agent-mobile.html @@ -5,6 +5,14 @@ + @@ -555,7 +563,7 @@ .out{position:relative} .out-acts{position:absolute;top:6px;right:8px;display:flex;gap:4px;opacity:0;transition:opacity .12s;z-index:2} .out:hover .out-acts,.out:focus-within .out-acts{opacity:1} -@media (hover:none){.out-acts{opacity:.85}} +@media (hover:none){.out-acts{position:static;opacity:1;justify-content:flex-end;margin-top:5px}} /* no hover on touch: a row under the output, never over it */ .out-acts button{font:600 9.5px var(--mono);letter-spacing:.06em;color:var(--ink-3);background:var(--surface);border:1px solid var(--line-2);border-radius:3px;padding:3px 7px;cursor:pointer} .out-acts button:hover{color:var(--accent);border-color:var(--accent)} .out.long{max-height:460px} @@ -689,7 +697,7 @@
-

+