+ The open source workspace for your coding agents. Zeron runs
+ Claude Code,
+ Codex,
+ OpenCode,
+ Cursor,
+ Antigravity,
+ and more on your machines.
+
Zeron is not a new harness. It drives Claude Code, Codex, Cursor,
+ Grok, Hermes and Pi — the same sessions and tools you use each day,
+ in one fast native window on every device.
+
+
+ Every machine's sessions, one list
+
+
+
+ Branch diffs, live as agents work
+
+
+
+ Commit history for every workspace
+
+
+
+
+
Three screens, one session
+
Sessions live on your machines, every device you own can pilot
+ them. Start Claude Code at your desk, watch it from your phone,
+ approve the diff from the couch. Nothing to hand off, nothing
+ to re-open.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MacBook Pro
+
+
+
+ iPhone
+
+
+
+ iPad
+
+
+
+ Claude Code
+
+
+
+
+
+
+
+
+
+
+
+
+
“Oh man, this is the best UI I’ve ever tried! For real. It feels really smooth. Typing, reading, everything. Really fast. Right now it’s my main UI for coding.”
@@ -200,5 +300,14 @@ import Base from "../layouts/Base.astro";
1499487 B.C. LTD., British Columbia, Canada sina@zeron.sh
-
-
+
+
+
+
+
+
diff --git a/apps/landing/src/assets/desktop.webp b/apps/landing/src/assets/desktop.webp
deleted file mode 100644
index e4af690eb..000000000
Binary files a/apps/landing/src/assets/desktop.webp and /dev/null differ
diff --git a/apps/landing/src/components/app/ChartReply.astro b/apps/landing/src/components/app/ChartReply.astro
deleted file mode 100644
index 42c0089b3..000000000
--- a/apps/landing/src/components/app/ChartReply.astro
+++ /dev/null
@@ -1,51 +0,0 @@
----
-// A reply with a visual, as a session's transcript draws it, in HTML: the
-// same paragraph, title, legend and grouped bar chart, to the point, that
-// public/hero/chrome.js `drawReply` draws (and tools/native checked against
-// the app). The chart's labels are the system's face, as in the app.
-import Stage from "./Stage.astro";
-
-const SERIES = [
- { name: "Compile", colour: "#9277b0", values: [42, 38, 51, 47, 33, 29] },
- { name: "Link", colour: "#58c2b2", values: [12, 14, 11, 16, 9, 8] },
- { name: "Test", colour: "#e9a64b", values: [20, 22, 19, 25, 18, 21] },
-];
-const MONTHS = ["Jun", "Jul", "Aug", "Sep", "Oct", "Nov"];
-const lines = ["Compile is still the biggest share, but it has dropped since August,", "when the workspace was split. Here are the last six months, by", "step:"];
-
-// The column's left, the title's top, the visual's width (the app's numbers).
-const X = 24, Y = 108, CW = 464;
-const top = Y + 72, left = X + 32.93, pw = CW - 32.93 - 6, ph = 120;
-const vy = (v: number) => top + ph - (v / 60) * ph;
-const band = pw / 6, group = band * 0.68, per = group / 3, gap = Math.min(2, per * 0.15), bw = per - gap;
-const ticks = [0, 10, 20, 30, 40, 50, 60];
-const bars = MONTHS.flatMap((_, i) => SERIES.map((series, si) => ({ x: left + i * band + (band - group) / 2 + si * per + gap / 2, y: vy(series.values[i]!), h: vy(0) - vy(series.values[i]!), colour: series.colour })));
-const px = (n: number) => `${Math.round(n * 100) / 100}px`;
-const label = "A reply in Zeron: a sentence about build times, then a grouped bar chart titled Where the build's time goes, with compile, link and test time for June to November.";
----
-
-
- {lines.map((line, i) =>
{line}
)}
-
Where the build's time goes
-
- {SERIES.map((series) => {series.name})}
-
- {ticks.map((t) => )}
- {ticks.map((t) => {t} s)}
- {bars.map((bar) => )}
- {MONTHS.map((month, i) => {month})}
-
-
-
diff --git a/apps/landing/src/components/app/PhoneSession.astro b/apps/landing/src/components/app/PhoneSession.astro
deleted file mode 100644
index 90a5fad0c..000000000
--- a/apps/landing/src/components/app/PhoneSession.astro
+++ /dev/null
@@ -1,16 +0,0 @@
----
-// The iOS app's session screen, recreated in HTML against the app's own
-// screenshot (tools/recreate/phone_check.py diffs it). A 402 × 874 point
-// stage that scales to the box it is put in.
-import fragment from "./phone.fragment.html?raw";
-import "./phone.css";
-
-interface Props {
- class?: string;
-}
-const label = "Zeron on an iPhone: a side chat with Claude Code about a streaming animation, with a message from another agent's chat.";
----
-
-
-
-
diff --git a/apps/landing/src/components/app/SessionWindow.astro b/apps/landing/src/components/app/SessionWindow.astro
deleted file mode 100644
index 113d2f4c9..000000000
--- a/apps/landing/src/components/app/SessionWindow.astro
+++ /dev/null
@@ -1,32 +0,0 @@
----
-// A Zeron session with its panel open, recreated in HTML from the app
-// itself: every box, word and icon is placed where the app's layout tree
-// places it, in the app's own colours, and diffed against a native capture
-// (tools/recreate). The markup, masks and theme values are generated;
-// don't edit them by hand.
-//
-// Whole, it is the window. With `crop` it is a piece of it: that part of
-// the 1320 × 840 stage, as wide as the box it is put in. Being HTML, a
-// piece shown large is as sharp as the window itself.
-import fragment from "./session.fragment.html?raw";
-import "./session.icons.css";
-import "./session.vars.css";
-import "./zw.css";
-
-interface Props {
- theme?: "dark" | "light";
- /** x, y, width, height, in the stage's points. */
- crop?: [number, number, number, number];
- /** Not for readers: a second copy on a page, or a piece used as a picture. */
- decorative?: boolean;
- class?: string;
-}
-const { theme = "dark", crop = [0, 0, 1320, 840], decorative = false, class: className } = Astro.props;
-const [x, y, w, h] = crop;
-const label =
- "Zeron with a session open. The sidebar groups eight sessions under four projects, run by Claude Code, Codex and Grok; two are still working. In the open one, Claude Code explains and fixes a rate limiter bug, and the Changes panel beside it shows the diff of window.ts.";
----
-
-
-
-
diff --git a/apps/landing/src/components/app/Stage.astro b/apps/landing/src/components/app/Stage.astro
deleted file mode 100644
index ee0581313..000000000
--- a/apps/landing/src/components/app/Stage.astro
+++ /dev/null
@@ -1,23 +0,0 @@
----
-// A fixed stage of the app's points that scales to the box it is put in
-// (a point is 1/width of the box), for pieces of the app written in HTML.
-interface Props {
- width: number;
- height: number;
- class?: string;
- label?: string;
-}
-const { width, height, class: className, label } = Astro.props;
----
-
-
-
-
-
-
diff --git a/apps/landing/src/components/app/ThemesWindow.astro b/apps/landing/src/components/app/ThemesWindow.astro
deleted file mode 100644
index fb82710fd..000000000
--- a/apps/landing/src/components/app/ThemesWindow.astro
+++ /dev/null
@@ -1,24 +0,0 @@
----
-// The same session with its panel closed, in each theme the app was
-// captured in (themes.themes.json), with the window's frosted glass kept:
-// every surface carries the alpha the app drew, so what is behind the
-// window shows through it. Generated by tools/recreate, as SessionWindow.
-// The stage's class (t0, t1, …) picks the theme.
-import fragment from "./themes.fragment.html?raw";
-import "./themes.icons.css";
-import "./themes.vars.css";
-import "./zw.css";
-
-interface Props {
- id?: string;
- crop?: [number, number, number, number];
- class?: string;
-}
-const { id, crop = [0, 0, 1320, 840], class: className } = Astro.props;
-const [x, y, w, h] = crop;
-const label = "Zeron with its frosted glass window: the sidebar's projects and sessions, and a conversation with Claude Code, in the chosen theme.";
----
-
-
-
-
diff --git a/apps/landing/src/components/app/WorkIn.astro b/apps/landing/src/components/app/WorkIn.astro
deleted file mode 100644
index 6e00200e2..000000000
--- a/apps/landing/src/components/app/WorkIn.astro
+++ /dev/null
@@ -1,118 +0,0 @@
----
-// The message box of a new chat with its "Work in" picker open on the list
-// of machines, in HTML: the composer's foot, its chips, and the two menus
-// that hang from the place chip, laid out to the point as the app lays
-// them (the numbers are those of the canvas drawing the earlier landing
-// page checked against the app: zeron/landing-newchat-hero,
-// public/hero/chrome.js `drawOver` and `drawPopups`). Not diffed again here.
-import api from "../../../tools/recreate/reference/artwork/api.svg?raw";
-import AgentMark from "../ui/AgentMark.astro";
-import Icon from "../ui/Icon.astro";
-import Stage from "./Stage.astro";
-
-type Row = { y: number; icon?: string; art?: boolean; label: string; tag?: string; chevron?: boolean; state?: "hover" | "selected" };
-const workIn: Row[] = [
- { y: 29, icon: "monitor", label: "MacBook Pro", chevron: true, state: "hover" },
- { y: 57, art: true, label: "api", chevron: true },
- { y: 85, icon: "worktree", label: "Worktree", chevron: true },
- { y: 159, icon: "git-branch", label: "main", tag: "Current", state: "selected" },
- { y: 189, icon: "git-branch", label: "fix/retry-after" },
- { y: 219, icon: "git-branch", label: "feat/sweep-idle-keys" },
-];
-const devices: Row[] = [
- { y: 42, icon: "monitor", label: "MacBook Pro", tag: "You", state: "selected" },
- { y: 72, icon: "monitor", label: "devbox" },
- { y: 156, icon: "cloud", label: "Cloud" },
-];
-const art = `data:image/svg+xml,${encodeURIComponent(api)}`;
-const label = "Zeron's message box with its Work in menu open: the machine, project and branch a new session will run on, and the list of machines: this MacBook Pro, a Linux devbox, a Mac mini that is offline, and Cloud.";
----
-
-
-
-
-
-
-
-
- Full access
-
- MacBook Proapimain
-
- Opus 5.5High
-
-
α = 0.2 over inter-append gaps, seeded from the first two chunks.
-
Message fromSpring vs. power curve for the veil
-
-
Keeping the power curve for the veil. Which EMA window should the fade track so the cadence stays steady?
-
Track α = 0.2: it settles within five appends and ignores a single slow chunk. I've replied to your chat with the numbers.
-
-
-
-Message Claude Code
-
-
diff --git a/apps/landing/src/components/app/session.fragment.html b/apps/landing/src/components/app/session.fragment.html
deleted file mode 100644
index bbd868c44..000000000
--- a/apps/landing/src/components/app/session.fragment.html
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-New chat
-⌘N
-Search
-⌘K
-Pull requests
-Projects
-api
-Fix burst at the rate limit boundary
-now
-Return a real Retry-After
-Sweep idle keys without a timer
-web
-Speed up the dashboard's first paint
-Add dark mode to settings
-uptime
-Page only when two regions agree
-Why Frankfurt flapped overnight
-docs
-Write up the October incident
-Local
-
Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it.
-Thought process · ran 1 command · read 2 files
-
Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after.
-Ran 1 command · edited 2 files
-
Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary.
-
test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls
-5 of 5 tests pass
-
This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet.
-Ask anything, @ to mention…
-Full access
-studio
-api
-main
-Opus 5.5
-High
-Changes
-Working tree
-main
-2 files in 2 folders
-+12
-−1
-Filter files
-src
-1
-M
-window.ts
-+3
-−1
-@@ -20,7 +20,9 @@
-export class SlidingWindow {
-20
- estimate(now = Date.now()): number {
-21
- this.roll(now);
-22
- const into = (now - this.start) / this.windowMs;
-23
--
- return this.current + this.previous * Math.floor(1 - in
-23
-+
- // The previous window counts for the part of it that s
-24
-+
- // last `windowMs`. Rounding that share down dropped it
-25
-+
- return this.current + this.previous * (1 - into);
-26
- }
-27
-28
- /** Counts one request, or refuses it when the window is
-test
-1
-M
-window.test.ts
-+9
-−0
-What changed, and why
-0/50
-Mara Okafor
-Fix burst at the rate limit boundary
-
-
-Commit
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/apps/landing/src/components/app/session.icons.css b/apps/landing/src/components/app/session.icons.css
deleted file mode 100644
index 337ce6816..000000000
--- a/apps/landing/src/components/app/session.icons.css
+++ /dev/null
@@ -1,24 +0,0 @@
-.zw .i-access-full{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M4.75%2011.75C4.75%2010.6454%205.64543%209.75%206.75%209.75H17.25C18.3546%209.75%2019.25%2010.6454%2019.25%2011.75V19.25C19.25%2020.3546%2018.3546%2021.25%2017.25%2021.25H6.75C5.64543%2021.25%204.75%2020.3546%204.75%2019.25V11.75Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M12%2014V17%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M7.75%209.75V7C7.75%204.65279%209.65279%202.75%2012%202.75C14.0926%202.75%2015.832%204.26237%2016.1847%206.25371%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E")}
-.zw .i-alt-arrow-down{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M17.5%209.25%2012%2014.75%206.5%209.25%22/%3E%3C/svg%3E")}
-.zw .i-alt-arrow-right{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M9%205L15%2012L9%2019%22/%3E%3C/svg%3E")}
-.zw .i-alt-arrow-right-bold{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.25%22%20d%3D%22M9%205L15%2012L9%2019%22/%3E%3C/svg%3E")}
-.zw .i-arrow-left{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%2012H5m5.5-5.5L5%2012l5.5%205.5%22/%3E%3C/svg%3E")}
-.zw .i-arrow-right{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%2012h14m-5.5-5.5L19%2012l-5.5%205.5%22/%3E%3C/svg%3E")}
-.zw .i-arrow-up{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%221.5%22%20d%3D%22M12%2020V4m0%200l6%206m-6-6l-6%206%22/%3E%3C/svg%3E")}
-.zw .i-expand-arrows{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%204H4v5m0-5%206%206m5%2010h5v-5m0%205-6-6%22/%3E%3C/svg%3E")}
-.zw .i-file-diff{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cg%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M4%2010c0-3.771%200-5.657%201.172-6.828S8.229%202%2012%202s5.657%200%206.828%201.172S20%206.229%2020%2010v4c0%203.771%200%205.657-1.172%206.828S15.771%2022%2012%2022s-5.657%200-6.828-1.172S4%2017.771%204%2014z%22/%3E%3Cpath%20d%3D%22M12%206.5v6M9%209.5h6M9%2017h6%22/%3E%3C/g%3E%3C/svg%3E")}
-.zw .i-folder{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207a3%203%200%200%201%203-3h2.6a2%202%200%200%201%201.6.8L12%207h6a3%203%200%200%201%203%203v7a3%203%200%200%201-3%203H6a3%203%200%200%201-3-3Z%22/%3E%3C/svg%3E")}
-.zw .i-git-branch{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208.5v7M6%2012h10a2%202%200%200%200%202-2V8.5%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3C/svg%3E")}
-.zw .i-mark-claude{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20257%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z%22/%3E%3C/svg%3E%20")}
-.zw .i-mark-grok{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%20%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20d%3D%22M0.58392448%2C14.9254204%20L0.8326%2C14.66295%20C2.004465%2C13.42985%203.1678%2C12.2082%202.45814%2C10.48105%20C1.50813%2C8.1701%202.061355%2C5.4619%203.820575%2C3.70057%20C5.6495%2C1.8709%208.3431%2C1.40957%2010.59295%2C2.336505%20C11.0907%2C2.52161%2011.5245%2C2.785025%2011.86295%2C3.02993%20L9.98425%2C3.89849%20C8.235%2C3.163775%206.23115%2C3.66355%205.0081%2C4.88809%20C3.354105%2C6.5426%203.019895%2C9.4117%204.95835%2C11.2656%20L-0.335%2C15.99995%20C-0.066496%2C15.62975%200.2538896%2C15.275934%200.58392448%2C14.9254204%20Z%20M14.0391%2C2.288155%20L16.33165%2C2.57749377e-12%20L16.20795%2C0.172288%20C14.4658%2C2.574355%2013.6153%2C3.749045%2014.29795%2C6.6879%20C14.76445%2C8.68415%2014.261%2C10.90255%2012.63545%2C12.53005%20C10.5861%2C14.58325%207.3066%2C15.0403%204.6059%2C13.19215%20L6.48885%2C12.3193%20C8.2125%2C12.99705%2010.0983%2C12.69945%2011.4536%2C11.34255%20C12.80895%2C9.9856%2013.1133%2C8.00925%2012.4321%2C6.3647%20C12.30265%2C6.05285%2011.9144%2C5.97455%2011.64275%2C6.1753%20L6.102%2C10.27035%20L14.0391%2C2.288155%20Z%22/%3E%20%3C/svg%3E%20")}
-.zw .i-mark-openai{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20256%20260%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M239.184%20106.203a64.716%2064.716%200%200%200-5.576-53.103C219.452%2028.459%20191%2015.784%20163.213%2021.74A65.586%2065.586%200%200%200%2052.096%2045.22a64.716%2064.716%200%200%200-43.23%2031.36c-14.31%2024.602-11.061%2055.634%208.033%2076.74a64.665%2064.665%200%200%200%205.525%2053.102c14.174%2024.65%2042.644%2037.324%2070.446%2031.36a64.72%2064.72%200%200%200%2048.754%2021.744c28.481.025%2053.714-18.361%2062.414-45.481a64.767%2064.767%200%200%200%2043.229-31.36c14.137-24.558%2010.875-55.423-8.083-76.483Zm-97.56%20136.338a48.397%2048.397%200%200%201-31.105-11.255l1.535-.87%2051.67-29.825a8.595%208.595%200%200%200%204.247-7.367v-72.85l21.845%2012.636c.218.111.37.32.409.563v60.367c-.056%2026.818-21.783%2048.545-48.601%2048.601Zm-104.466-44.61a48.345%2048.345%200%200%201-5.781-32.589l1.534.921%2051.722%2029.826a8.339%208.339%200%200%200%208.441%200l63.181-36.425v25.221a.87.87%200%200%201-.358.665l-52.335%2030.184c-23.257%2013.398-52.97%205.431-66.404-17.803ZM23.549%2085.38a48.499%2048.499%200%200%201%2025.58-21.333v61.39a8.288%208.288%200%200%200%204.195%207.316l62.874%2036.272-21.845%2012.636a.819.819%200%200%201-.767%200L41.353%20151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466%2041.695-63.08-36.63L161.73%2077.86a.819.819%200%200%201%20.768%200l52.233%2030.184a48.6%2048.6%200%200%201-7.316%2087.635v-61.391a8.544%208.544%200%200%200-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39%208.39%200%200%200-8.492%200L99.98%2099.808V74.587a.716.716%200%200%201%20.307-.665l52.233-30.133a48.652%2048.652%200%200%201%2072.236%2050.391v.205ZM88.061%20139.097l-21.845-12.585a.87.87%200%200%201-.41-.614V65.685a48.652%2048.652%200%200%201%2079.757-37.346l-1.535.87-51.67%2029.825a8.595%208.595%200%200%200-4.246%207.367l-.051%2072.697Zm11.868-25.58%2028.138-16.217%2028.188%2016.218v32.434l-28.086%2016.218-28.188-16.218-.052-32.434Z%22/%3E%3C/svg%3E%20")}
-.zw .i-microphone{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Crect%20width%3D%227%22%20height%3D%2212.5%22%20x%3D%228.5%22%20y%3D%222.25%22%20rx%3D%223.5%22/%3E%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M5%2011a7%207%200%200%200%2014%200M12%2018v3.75M9%2021.75h6%22/%3E%3C/g%3E%3C/svg%3E")}
-.zw .i-more-horizontal{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Cg%20fill%3D%22black%22%20stroke%3D%22black%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%223.75%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3Ccircle%20cx%3D%2220.25%22%20cy%3D%2212%22%20r%3D%221%22/%3E%3C/g%3E%3C/svg%3E")}
-.zw .i-pen{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20d%3D%22m14.36%204.079l.927-.927a3.932%203.932%200%200%201%205.561%205.561l-.927.927m-5.56-5.561s.115%201.97%201.853%203.707C17.952%209.524%2019.92%209.64%2019.92%209.64m-5.56-5.561l-8.522%208.52c-.577.578-.866.867-1.114%201.185a6.6%206.6%200%200%200-.749%201.211c-.173.364-.302.752-.56%201.526l-1.094%203.281m17.6-10.162L11.4%2018.16c-.577.577-.866.866-1.184%201.114a6.6%206.6%200%200%201-1.211.749c-.364.173-.751.302-1.526.56l-3.281%201.094m0%200l-.802.268a1.06%201.06%200%200%201-1.342-1.342l.268-.802m1.876%201.876l-1.876-1.876%22/%3E%3C/svg%3E")}
-.zw .i-plus{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22/%3E%3C/svg%3E")}
-.zw .i-pull-request{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208.5v7M18%2015.5V8.25a2%202%200%200%200-2-2h-3.5m2.25-2.25L12.5%206.25l2.25%202.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%226.25%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2217.75%22%20r%3D%222.25%22/%3E%3C/svg%3E")}
-.zw .i-search{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2210.5%22%20cy%3D%2210.5%22%20r%3D%226.5%22/%3E%3Cpath%20d%3D%22m15.5%2015.5%204.5%204.5%22/%3E%3C/svg%3E")}
-.zw .i-settings{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%20%20%20%3Cg%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%3E%20%20%20%20%20%3Cpath%20d%3D%22M7.878%205.21415L7.17474%205.05186C6.58003%204.91462%205.95657%205.09343%205.525%205.525C5.09343%205.95657%204.91462%206.58003%205.05186%207.17474L5.21415%207.878C5.40122%208.6886%205.06696%209.53036%204.37477%209.99182L3.51965%2010.5619C3.03881%2010.8825%202.75%2011.4221%202.75%2012C2.75%2012.5779%203.03881%2013.1175%203.51965%2013.4381L4.37477%2014.0082C5.06696%2014.4696%205.40122%2015.3114%205.21415%2016.122L5.05186%2016.8253C4.91462%2017.42%205.09343%2018.0434%205.525%2018.475C5.95657%2018.9066%206.58003%2019.0854%207.17474%2018.9481L7.878%2018.7858C8.6886%2018.5988%209.53036%2018.933%209.99182%2019.6252L10.5619%2020.4804C10.8825%2020.9612%2011.4221%2021.25%2012%2021.25C12.5779%2021.25%2013.1175%2020.9612%2013.4381%2020.4804L14.0082%2019.6252C14.4696%2018.933%2015.3114%2018.5988%2016.122%2018.7858L16.8253%2018.9481C17.42%2019.0854%2018.0434%2018.9066%2018.475%2018.475C18.9066%2018.0434%2019.0854%2017.42%2018.9481%2016.8253L18.7858%2016.122C18.5988%2015.3114%2018.933%2014.4696%2019.6252%2014.0082L20.4804%2013.4381C20.9612%2013.1175%2021.25%2012.5779%2021.25%2012C21.25%2011.4221%2020.9612%2010.8825%2020.4804%2010.5619L19.6252%209.99182C18.933%209.53036%2018.5988%208.6886%2018.7858%207.878L18.9481%207.17473C19.0854%206.58003%2018.9066%205.95657%2018.475%205.525C18.0434%205.09343%2017.42%204.91462%2016.8253%205.05186L16.122%205.21415C15.3114%205.40122%2014.4696%205.06696%2014.0082%204.37477L13.4381%203.51965C13.1175%203.03881%2012.5779%202.75%2012%202.75C11.4221%202.75%2010.8825%203.03881%2010.5619%203.51965L9.99182%204.37477C9.53036%205.06696%208.6886%205.40122%207.878%205.21415Z%22/%3E%20%20%20%20%20%3Cpath%20d%3D%22M14.75%2012C14.75%2013.5188%2013.5188%2014.75%2012%2014.75C10.4812%2014.75%209.25%2013.5188%209.25%2012C9.25%2010.4812%2010.4812%209.25%2012%209.25C13.5188%209.25%2014.75%2010.4812%2014.75%2012Z%22/%3E%20%20%20%3C/g%3E%20%3C/svg%3E")}
-.zw .i-split-columns{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%3E%3Cpath%20d%3D%22M2%2011c0-3.771%200-5.657%201.172-6.828S6.229%203%2010%203h4c3.771%200%205.657%200%206.828%201.172S22%207.229%2022%2011v2c0%203.771%200%205.657-1.172%206.828S17.771%2021%2014%2021h-4c-3.771%200-5.657%200-6.828-1.172S2%2016.771%202%2013z%22/%3E%3Cpath%20stroke-linecap%3D%22round%22%20d%3D%22M12%2021V3%22/%3E%3C/g%3E%3C/svg%3E")}
-.zw .i-status-done{--m:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22/%3E%3Cpath%20d%3D%22m9%2012%202%202%204-4%22/%3E%3C/svg%3E")}
-.zw .i-wrap-text{--m:url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%20%20%20%3Cpath%20d%3D%22M4%206H20%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22/%3E%20%20%20%3Cpath%20d%3D%22M4%2010H17C18.6569%2010%2020%2011.3431%2020%2013C20%2014.6569%2018.6569%2016%2017%2016H9%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%20%20%20%3Cpath%20d%3D%22M12%2013L9%2016L12%2019%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%20%20%20%3Cpath%20d%3D%22M4%2020H7%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22/%3E%20%3C/svg%3E")}
\ No newline at end of file
diff --git a/apps/landing/src/components/app/session.vars.css b/apps/landing/src/components/app/session.vars.css
deleted file mode 100644
index b91edeb92..000000000
--- a/apps/landing/src/components/app/session.vars.css
+++ /dev/null
@@ -1,2 +0,0 @@
-.zw-session.t0{--zw-window:#0e0e10;--zw-code:#9277b0;--zw-wash:#231f27;--zw-text:#ededef}
-.zw-session.t1{--zw-window:#eeeef0;--zw-code:#7a55c4;--zw-wash:#e5e0ef;--zw-text:#1b1b1d}
diff --git a/apps/landing/src/components/app/themes.fragment.html b/apps/landing/src/components/app/themes.fragment.html
deleted file mode 100644
index 98104996c..000000000
--- a/apps/landing/src/components/app/themes.fragment.html
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-New chat
-⌘N
-Search
-⌘K
-Pull requests
-Projects
-web
-Speed up the dashboard's first paint
-Add dark mode to settings
-api
-Sweep idle keys without a timer
-Fix burst at the rate limit boundary
-30m
-Return a real Retry-After
-uptime
-Page only when two regions agree
-Why Frankfurt flapped overnight
-docs
-Write up the October incident
-Local
-
Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it.
-Thought process · ran 1 command · read 2 files
-
Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after.
-Ran 1 command · edited 2 files
-
Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary.
-
test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls
-5 of 5 tests pass
-
This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet.
-
-
-
diff --git a/apps/landing/src/components/home/Yours.astro b/apps/landing/src/components/home/Yours.astro
deleted file mode 100644
index 7e32cf572..000000000
--- a/apps/landing/src/components/home/Yours.astro
+++ /dev/null
@@ -1,111 +0,0 @@
----
-// The app in each of its themes, with its frosted glass window over a
-// desktop. The window is the generated recreation (ThemesWindow); the list
-// beside it is what tools/recreate captured (themes.themes.json).
-import desktop from "../../assets/desktop.webp";
-import ThemesWindow from "../app/ThemesWindow.astro";
-import themes from "../app/themes.themes.json";
-import Icon from "../ui/Icon.astro";
-
-const NAMES: Record = { "zeron-dark": "Zeron", "tokyo-night": "Tokyo Night", catppuccin: "Catppuccin", dracula: "Dracula", gruvbox: "Gruvbox", "github-light": "GitHub Light" };
----
-
-
-
-
Make it your own. Change how Zeron looks with themes, and what it can do with plugins.
-
-
-
-
-
Pick a theme
-
Zeron comes with themes for light and dark, and its window is frosted glass, so your desktop shows through it.
-
-
- {
- themes.map((theme, index) => (
-
- ))
- }
-
-
-
-
-
-
-
-
-
-
-
Plugins
-
Add panels, commands and status lines to Zeron, or ask an agent to write a plugin for you.
-
-
-
-
VS Code themes
-
Import any VS Code theme, including its syntax and terminal colours.
-
-
-
-
Scenes
-
Put artwork behind new chats that moves with your pointer.
-
-
-
-
-
-
-
-
diff --git a/apps/landing/src/components/site/Footer.astro b/apps/landing/src/components/site/Footer.astro
deleted file mode 100644
index 6fb6f590c..000000000
--- a/apps/landing/src/components/site/Footer.astro
+++ /dev/null
@@ -1,49 +0,0 @@
----
-import { RELEASE_NOTES_URL } from "../../data/releases.ts";
-import { SITE } from "../../data/site.ts";
-import Mark from "../ui/Mark.astro";
-
-const columns = [
- { name: "Product", links: [["Release notes", RELEASE_NOTES_URL], ["Architecture", "https://github.com/zeronsh/zeron/blob/main/ARCHITECTURE.md"]] },
- { name: "Community", links: [["GitHub", SITE.github], ["Discord", SITE.discord], ["Sponsor", SITE.sponsor]] },
- { name: "Legal", links: [["Privacy", "/privacy"], ["MIT License", SITE.license]] },
-];
----
-
-
-
-
diff --git a/apps/landing/src/components/site/GitHubStars.astro b/apps/landing/src/components/site/GitHubStars.astro
deleted file mode 100644
index 6d5450c78..000000000
--- a/apps/landing/src/components/site/GitHubStars.astro
+++ /dev/null
@@ -1,43 +0,0 @@
----
-// The repository's star count, filled in by the browser and cached for an
-// hour so repeat visits stay under GitHub's unauthenticated rate limit.
-import { SITE } from "../../data/site.ts";
----
-
-
-
-
-
-
diff --git a/apps/landing/src/components/site/Nav.astro b/apps/landing/src/components/site/Nav.astro
deleted file mode 100644
index 99adaf978..000000000
--- a/apps/landing/src/components/site/Nav.astro
+++ /dev/null
@@ -1,50 +0,0 @@
----
-import { SITE } from "../../data/site.ts";
-import Button from "../ui/Button.astro";
-import Mark from "../ui/Mark.astro";
-import GitHubStars from "./GitHubStars.astro";
-
-interface Props {
- /** Where "Download" goes before the script points it at a build. */
- downloads?: string;
-}
-const { downloads = "#downloads" } = Astro.props;
----
-
-
-
-
-
-
diff --git a/apps/landing/src/components/ui/AgentMark.astro b/apps/landing/src/components/ui/AgentMark.astro
deleted file mode 100644
index a8a94bf8b..000000000
--- a/apps/landing/src/components/ui/AgentMark.astro
+++ /dev/null
@@ -1,30 +0,0 @@
----
-import type { AgentMark } from "../../data/agents.ts";
-
-interface Props {
- mark: AgentMark;
-}
----
-
-
-
-
diff --git a/apps/landing/src/components/ui/Button.astro b/apps/landing/src/components/ui/Button.astro
deleted file mode 100644
index 33db5f974..000000000
--- a/apps/landing/src/components/ui/Button.astro
+++ /dev/null
@@ -1,55 +0,0 @@
----
-// The app's buttons (apps/zgx/ui/ds/button.luau): the same tones, heights
-// and corners, as links.
-import type { HTMLAttributes } from "astro/types";
-
-interface Props extends HTMLAttributes<"a"> {
- tone?: "primary" | "secondary" | "ghost";
- size?: "sm" | "md" | "lg";
-}
-const { tone = "primary", size = "md", class: className, ...rest } = Astro.props;
----
-
-
-
-
diff --git a/apps/landing/src/components/ui/CopyCommand.astro b/apps/landing/src/components/ui/CopyCommand.astro
deleted file mode 100644
index 87105dd60..000000000
--- a/apps/landing/src/components/ui/CopyCommand.astro
+++ /dev/null
@@ -1,68 +0,0 @@
----
-// A shell command with a button that copies it.
-interface Props {
- command: string;
-}
-const { command } = Astro.props;
----
-
-
- $ {command}
-
-
-
-
-
-
diff --git a/apps/landing/src/components/ui/Icon.astro b/apps/landing/src/components/ui/Icon.astro
deleted file mode 100644
index 4a1ea2aca..000000000
--- a/apps/landing/src/components/ui/Icon.astro
+++ /dev/null
@@ -1,18 +0,0 @@
----
-// One of the app's own icons (apps/zgx/ui/ds/icon_svgs.luau; the ones the
-// site uses are copied to src/data/icons.json), in the text's colour.
-import icons from "../../data/icons.json";
-
-interface Props {
- name: keyof typeof icons;
- size?: number;
-}
-const { name, size = 16 } = Astro.props;
----
-
-
-
-
diff --git a/apps/landing/src/components/ui/Mark.astro b/apps/landing/src/components/ui/Mark.astro
deleted file mode 100644
index b4d4936df..000000000
--- a/apps/landing/src/components/ui/Mark.astro
+++ /dev/null
@@ -1,25 +0,0 @@
----
-// Zeron's mark: twelve cells of a 5 × 3 grid. Drawn from rects so it takes
-// the colour of the text around it.
-interface Props {
- class?: string;
-}
-const cells = [
- [0, 0], [1, 0], [2, 0], [4, 0],
- [0, 1], [1, 1], [3, 1], [4, 1],
- [0, 2], [2, 2], [3, 2], [4, 2],
-];
----
-
-
- {cells.map(([x, y]) => )}
-
-
-
diff --git a/apps/landing/src/components/ui/PlatformMark.astro b/apps/landing/src/components/ui/PlatformMark.astro
deleted file mode 100644
index 245335b32..000000000
--- a/apps/landing/src/components/ui/PlatformMark.astro
+++ /dev/null
@@ -1,25 +0,0 @@
----
-import type { Platform } from "../../data/releases.ts";
-
-interface Props {
- platform: Platform;
-}
----
-
-
-
-
diff --git a/apps/landing/src/data/agents.ts b/apps/landing/src/data/agents.ts
deleted file mode 100644
index 8084d2f05..000000000
--- a/apps/landing/src/data/agents.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// The agents Zeron runs. `mark` names a file in src/assets/agents, drawn as
-// a mask so it takes the colour of the text around it.
-export const AGENTS = [
- { mark: "claude", name: "Claude Code" },
- { mark: "openai", name: "Codex" },
- { mark: "cursor", name: "Cursor" },
- { mark: "opencode", name: "OpenCode" },
- { mark: "antigravity", name: "Antigravity" },
- { mark: "devin", name: "Devin" },
- { mark: "grok", name: "Grok" },
- { mark: "hermes", name: "Hermes" },
- { mark: "pi", name: "Pi" },
-] as const;
-
-export type AgentMark = (typeof AGENTS)[number]["mark"];
diff --git a/apps/landing/src/data/icons.json b/apps/landing/src/data/icons.json
deleted file mode 100644
index e8c337032..000000000
--- a/apps/landing/src/data/icons.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "file-diff": "",
- "terminal": "",
- "git-commit": "",
- "folder-with-files": "",
- "global": "",
- "side-chat": "",
- "laptop": "",
- "remote-server": "",
- "cloud": "",
- "smartphone": "",
- "palette": "",
- "plug-circle": "",
- "monitor": "",
- "lock-keyhole-unlocked": "",
- "shield-check": "",
- "arrow-up-right": "",
- "alt-arrow-right": "",
- "download": "",
- "star": "",
- "copy": "",
- "check": "",
- "git-branch": "",
- "wifi-off": "",
- "worktree": "",
- "search": "",
- "access-full": "",
- "microphone": "",
- "plus": "",
- "arrow-up": "",
- "alt-arrow-right-bold": "",
- "gallery": ""
-}
diff --git a/apps/landing/src/data/releases.ts b/apps/landing/src/data/releases.ts
deleted file mode 100644
index 629e4c6f9..000000000
--- a/apps/landing/src/data/releases.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-// Where Zeron is downloaded from. One list feeds the downloads table, the
-// download buttons and the script that points them at the latest release.
-
-export const RELEASES_URL = "https://zeron.sh/releases/";
-export const RELEASE_NOTES_URL = "https://github.com/zeronsh/zeron/releases/latest";
-export const INSTALL_COMMAND = "curl -fsSL https://zeron.sh/install.sh | sh";
-
-/** Links use this version until `latest.txt` answers, and when it can't.
- * 0.2.97 is the first release with the Windows installer. */
-export const FALLBACK_VERSION = "0.2.97";
-
-export type Platform = "macos" | "windows" | "linux" | "ios" | "android";
-
-export interface DesktopBuild {
- platform: Platform;
- name: string;
- /** What the downloads table says beside the name. */
- detail: string;
- /** The file name after `zeron--`. */
- file: string;
- /** The main button's words when this build is the visitor's. */
- label: string;
- /** Its tooltip and accessible detail. */
- hint: string;
-}
-
-export const DESKTOP_BUILDS = {
- macos: { platform: "macos", name: "macOS", detail: "Apple silicon · dmg", file: "macos-arm64.dmg", label: "Download for macOS", hint: "Apple silicon" },
- windows: { platform: "windows", name: "Windows", detail: "x64 · installer", file: "windows-x86_64-setup.exe", label: "Download for Windows", hint: "Windows x64 · Installer" },
- "windows-portable": { platform: "windows", name: "Windows", detail: "x64 · portable zip", file: "windows-x86_64.zip", label: "Download for Windows", hint: "Windows x64 · Portable ZIP" },
- linux: { platform: "linux", name: "Linux", detail: "x64 · tar.gz", file: "linux-x86_64.tar.gz", label: "Download for Linux", hint: "Linux x64" },
- "linux-arm": { platform: "linux", name: "Linux", detail: "arm64 · tar.gz", file: "linux-aarch64.tar.gz", label: "Download for Linux", hint: "Linux ARM64" },
-} as const satisfies Record;
-
-export type BuildId = keyof typeof DESKTOP_BUILDS;
-
-/** Android builds publish on every change under one stable name. */
-export const ANDROID_APK = `${RELEASES_URL}zeron-android-arm64.apk`;
-export const APP_STORE = "https://apps.apple.com/us/app/zeron-coding-agents/id6803187897";
diff --git a/apps/landing/src/data/site.ts b/apps/landing/src/data/site.ts
deleted file mode 100644
index 3c94536d9..000000000
--- a/apps/landing/src/data/site.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export const SITE = {
- name: "Zeron",
- title: "Zeron: the open source workspace for your coding agents",
- description:
- "Zeron runs Claude Code, Codex, Cursor and other coding agents on your own machines, in one native app you can pick up from any device.",
- github: "https://github.com/zeronsh/zeron",
- githubApi: "https://api.github.com/repos/zeronsh/zeron",
- discord: "https://discord.gg/rnynTdgZ24",
- sponsor: "https://github.com/sponsors/zeronsh",
- license: "https://github.com/zeronsh/zeron/blob/main/LICENSE",
- company: "1499487 B.C. LTD.",
-} as const;
diff --git a/apps/landing/src/data/voices.ts b/apps/landing/src/data/voices.ts
deleted file mode 100644
index 9ace81cdb..000000000
--- a/apps/landing/src/data/voices.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-// What people have posted about Zeron, in their own words and spelling.
-import type { ImageMetadata } from "astro";
-import afortunado from "../assets/voices/afortunado124.jpg";
-import dev from "../assets/voices/dev_shekhawat.jpg";
-import franco from "../assets/voices/francoe114696.jpg";
-import leander from "../assets/voices/leanderriefel.jpg";
-import sahil from "../assets/voices/sahilcodex.jpg";
-import seis from "../assets/voices/stlaurentgod.jpg";
-import adam from "../assets/voices/thecto.jpg";
-
-export interface Voice {
- text: string;
- name: string;
- handle: string;
- url: string;
- avatar: ImageMetadata;
-}
-
-export const LEAD_VOICE: Voice = {
- text: "Oh man, this is the best UI I’ve ever tried! For real. It feels really smooth. Typing, reading, everything. Really fast. Right now it’s my main UI for coding.",
- name: "Fran Escob",
- handle: "@FrancoE114696",
- url: "https://x.com/FrancoE114696/status/2102551301871501508",
- avatar: franco,
-};
-
-export const VOICES: Voice[] = [
- {
- text: "I’m getting emotional seeing a UI so buttery smooth in performance after using the Codex App on Windows all day.",
- name: "Leander",
- handle: "@leanderriefel",
- url: "https://x.com/leanderriefel/status/2088396806396809544",
- avatar: leander,
- },
- {
- text: "bro i tested it all night, and it feels so good, congratulations i have a new daily driver, excelent taste",
- name: "af0r",
- handle: "@afOrtunado124",
- url: "https://x.com/afOrtunado124/status/2102727775991869480",
- avatar: afortunado,
- },
- {
- text: "if Zed & Cursor had a baby",
- name: "adam",
- handle: "@theCTO",
- url: "https://x.com/theCTO/status/2088337024868889064",
- avatar: adam,
- },
- {
- text: "best thing to happen to my agents this past week ✨",
- name: "seis dios ☽",
- handle: "@stlaurentgod",
- url: "https://x.com/stlaurentgod/status/2102509074097258904",
- avatar: seis,
- },
- {
- text: "This feels refreshing! already loving it",
- name: "Dev",
- handle: "@dev_shekhawat",
- url: "https://x.com/dev_shekhawat/status/2102533565590462728",
- avatar: dev,
- },
- {
- text: "one of the best app i have ever used",
- name: "丂ムんノレ",
- handle: "@sahilcodex",
- url: "https://x.com/sahilcodex/status/2102602368512860598",
- avatar: sahil,
- },
-];
diff --git a/apps/landing/src/layouts/Base.astro b/apps/landing/src/layouts/Base.astro
deleted file mode 100644
index 287b69851..000000000
--- a/apps/landing/src/layouts/Base.astro
+++ /dev/null
@@ -1,67 +0,0 @@
----
-import { Font } from "astro:assets";
-import Footer from "../components/site/Footer.astro";
-import Nav from "../components/site/Nav.astro";
-import { SITE } from "../data/site.ts";
-import "../styles/global.css";
-
-interface Props {
- title?: string;
- description?: string;
- /** Where the nav's Download goes on this page. */
- downloads?: string;
- /** The landing page counts its own views (public/telemetry.js). */
- telemetry?: boolean;
-}
-const { title = SITE.title, description = SITE.description, downloads, telemetry = false } = Astro.props;
-const canonical = new URL(Astro.url.pathname, Astro.site);
-const image = new URL("/assets/og.png", Astro.site);
----
-
-
-
-
-
-
- {title}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {telemetry && }
-
-
-
-
-
-
-
-
diff --git a/apps/landing/src/lib/downloads.test.ts b/apps/landing/src/lib/downloads.test.ts
deleted file mode 100644
index 007920498..000000000
--- a/apps/landing/src/lib/downloads.test.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { describe, expect, test } from "vitest";
-import { ANDROID_APK } from "../data/releases.ts";
-import { acceptVersion, buildUrl, detectTarget, targetUrl } from "./downloads.ts";
-
-describe("detectTarget", () => {
- test.each([
- [{ platform: "MacIntel", userAgent: "Macintosh" }, "macos"],
- [{ platform: "Win32", userAgent: "Windows NT" }, "windows"],
- [{ platform: "Linux x86_64", userAgent: "Linux" }, "linux"],
- [{ platform: "Linux aarch64", userAgent: "Linux" }, "linux-arm"],
- [{ userAgentData: { platform: "macOS" } }, "macos"],
- ])("desktop %j", (client, build) => {
- expect(detectTarget(client)).toEqual({ kind: "desktop", build });
- });
-
- test.each([
- [{ platform: "Linux armv8l", userAgent: "Mozilla/5.0 (Linux; Android 16; Pixel 9)" }],
- [{ platform: "Linux", userAgent: "Android" }],
- ])("android %j", (client) => {
- expect(detectTarget(client)).toEqual({ kind: "android" });
- });
-
- test.each([[{ platform: "MacIntel", maxTouchPoints: 5 }], [{ platform: "iPhone" }], [{ userAgent: "Mozilla/5.0 (iPad)" }], [{}]])(
- "a phone, a tablet or an unknown system keeps the table: %j",
- (client) => {
- expect(detectTarget(client)).toEqual({ kind: "table" });
- },
- );
-});
-
-describe("urls", () => {
- test("a desktop build's file under the release", () => {
- expect(buildUrl("0.2.98", "windows")).toBe("https://zeron.sh/releases/zeron-0.2.98-windows-x86_64-setup.exe");
- expect(targetUrl({ kind: "desktop", build: "linux-arm" }, "1.0.0")).toBe("https://zeron.sh/releases/zeron-1.0.0-linux-aarch64.tar.gz");
- });
- test("android has one stable file; the table has none", () => {
- expect(targetUrl({ kind: "android" }, "0.2.98")).toBe(ANDROID_APK);
- expect(targetUrl({ kind: "table" }, "0.2.98")).toBeNull();
- });
-});
-
-describe("acceptVersion", () => {
- test("takes a newer or equal release", () => {
- expect(acceptVersion("0.3.7\n", "0.2.97")).toBe("0.3.7");
- expect(acceptVersion("0.2.97", "0.2.97")).toBe("0.2.97");
- expect(acceptVersion("1.0.0", "0.9.99")).toBe("1.0.0");
- });
- test.each(["", "0.2.96", "", "0.3", "v0.3.7", "0.3.7-beta"])("refuses %j", (text) => {
- expect(acceptVersion(text, "0.2.97")).toBeNull();
- });
-});
diff --git a/apps/landing/src/lib/downloads.ts b/apps/landing/src/lib/downloads.ts
deleted file mode 100644
index 6c5e974b7..000000000
--- a/apps/landing/src/lib/downloads.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-// Which build a visitor should be offered, and where it lives. No DOM here:
-// src/scripts/downloads.ts applies these to the page.
-
-import { ANDROID_APK, DESKTOP_BUILDS, FALLBACK_VERSION, RELEASES_URL, type BuildId } from "../data/releases.ts";
-
-/** The parts of `navigator` that say what a visitor is running. */
-export interface Client {
- userAgent?: string;
- platform?: string;
- maxTouchPoints?: number;
- userAgentData?: { platform?: string; mobile?: boolean };
-}
-
-export type Target =
- | { kind: "desktop"; build: BuildId }
- | { kind: "android" }
- /** A phone or tablet with no direct download, or a system we can't name:
- * the buttons keep pointing at the downloads table. */
- | { kind: "table" };
-
-export function detectTarget(client: Client): Target {
- const ua = client.userAgent ?? "";
- const platform = client.userAgentData?.platform || client.platform || "";
- if (/Android/i.test(ua) || /Android/i.test(platform)) return { kind: "android" };
- // An iPad reports itself as a Mac with a touch screen.
- const mobile = /iPhone|iPad|iPod/i.test(ua) || client.userAgentData?.mobile === true || (/Mac/i.test(platform) && (client.maxTouchPoints ?? 0) > 1);
- if (mobile) return { kind: "table" };
- if (/Win/i.test(platform)) return { kind: "desktop", build: "windows" };
- if (/Mac/i.test(platform)) return { kind: "desktop", build: "macos" };
- if (/Linux/i.test(platform)) return { kind: "desktop", build: /aarch64|arm64/i.test(`${platform} ${ua}`) ? "linux-arm" : "linux" };
- return { kind: "table" };
-}
-
-export function buildUrl(version: string, build: BuildId): string {
- return `${RELEASES_URL}zeron-${version}-${DESKTOP_BUILDS[build].file}`;
-}
-
-export function targetUrl(target: Target, version: string): string | null {
- if (target.kind === "desktop") return buildUrl(version, target.build);
- return target.kind === "android" ? ANDROID_APK : null;
-}
-
-/** `latest.txt`'s answer as a version to link to, or null when it isn't one
- * or is older than the fallback (a stale cache must not roll links back). */
-export function acceptVersion(text: string, floor: string = FALLBACK_VERSION): string | null {
- const version = text.trim();
- if (!/^\d+\.\d+\.\d+$/.test(version)) return null;
- const a = version.split(".").map(Number);
- const b = floor.split(".").map(Number);
- for (let i = 0; i < 3; i++) {
- if (a[i]! !== b[i]!) return a[i]! > b[i]! ? version : null;
- }
- return version;
-}
diff --git a/apps/landing/src/pages/404.astro b/apps/landing/src/pages/404.astro
deleted file mode 100644
index b39960afe..000000000
--- a/apps/landing/src/pages/404.astro
+++ /dev/null
@@ -1,18 +0,0 @@
----
-import Button from "../components/ui/Button.astro";
-import Base from "../layouts/Base.astro";
----
-
-
-
-
There is no page here
-
The link may be old, or the address mistyped.
-
-
-
-
-
diff --git a/apps/landing/src/pages/index.astro b/apps/landing/src/pages/index.astro
deleted file mode 100644
index e32c821e6..000000000
--- a/apps/landing/src/pages/index.astro
+++ /dev/null
@@ -1,22 +0,0 @@
----
-import Agents from "../components/home/Agents.astro";
-import Downloads from "../components/home/Downloads.astro";
-import Hero from "../components/home/Hero.astro";
-import Logos from "../components/home/Logos.astro";
-import Machines from "../components/home/Machines.astro";
-import Review from "../components/home/Review.astro";
-import Voices from "../components/home/Voices.astro";
-import Yours from "../components/home/Yours.astro";
-import Base from "../layouts/Base.astro";
----
-
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/landing/src/scripts/downloads.ts b/apps/landing/src/scripts/downloads.ts
deleted file mode 100644
index dd571e27d..000000000
--- a/apps/landing/src/scripts/downloads.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-// Points the page's download links at the latest release, and its main
-// buttons at the visitor's own build. The HTML already links every build at
-// the fallback version, so nothing here is needed for a download to work.
-//
-// [data-build=""] a row of the downloads table
-// [data-download] a main button; "long" takes the build's label
-// [data-release-version] shows the latest version once it is known
-
-import { DESKTOP_BUILDS, FALLBACK_VERSION, RELEASES_URL, type BuildId } from "../data/releases.ts";
-import { acceptVersion, buildUrl, detectTarget, targetUrl } from "../lib/downloads.ts";
-
-const target = detectTarget(navigator);
-
-function apply(version: string): void {
- for (const link of document.querySelectorAll("[data-build]")) {
- const id = link.dataset.build as BuildId;
- if (id in DESKTOP_BUILDS) link.href = buildUrl(version, id);
- }
- const url = targetUrl(target, version);
- if (!url) return;
- const words =
- target.kind === "desktop"
- ? { os: target.build, label: DESKTOP_BUILDS[target.build].label, hint: DESKTOP_BUILDS[target.build].hint }
- : { os: "android", label: "Download for Android", hint: "arm64 APK" };
- for (const link of document.querySelectorAll("[data-download]")) {
- link.href = url;
- link.dataset.os = words.os;
- link.title = words.hint;
- link.setAttribute("aria-label", `${words.label} (${words.hint})`);
- const text = link.querySelector("[data-download-label]");
- if (text && link.dataset.download === "long") text.textContent = words.label;
- }
-}
-
-apply(FALLBACK_VERSION);
-fetch(`${RELEASES_URL}latest.txt`, { credentials: "omit" })
- .then((response) => (response.ok ? response.text() : Promise.reject()))
- .then((text) => {
- const version = acceptVersion(text);
- if (!version) return;
- apply(version);
- for (const el of document.querySelectorAll("[data-release-version]")) {
- el.textContent = version;
- el.hidden = false;
- }
- })
- .catch(() => {});
diff --git a/apps/landing/src/styles/global.css b/apps/landing/src/styles/global.css
deleted file mode 100644
index 9600c229c..000000000
--- a/apps/landing/src/styles/global.css
+++ /dev/null
@@ -1,241 +0,0 @@
-/* zeron.sh wears the app's own dark theme. Every colour, radius and control
- size here is a token from apps/zgx/ui/ds/themes/zeron-dark.json, so the
- site and the window pictured on it are one design. Change them there
- first. Fonts come from astro.config.mjs (Geist and Geist Mono, the app's). */
-
-:root {
- color-scheme: dark;
-
- --window: #0e0e10;
- /* The page sits a step under the app's window, so a window on it reads as lifted. */
- --page-bg: #08080a;
- --glass-tint: #0d0d0dcc;
- --surface: #ffffff08;
- --surface-raised: #ffffff0f;
- --text: #ededef;
- /* Muted text is the primary at less opacity, as in the app: it takes the
- colour of whatever is behind it. */
- --text-2: rgb(237 237 239 / 0.64);
- --text-3: rgb(237 237 239 / 0.46);
- --border: #ffffff12;
- --border-subtle: #ffffff0a;
- --border-strong: #ffffff2e;
- --line: rgb(255 255 255 / 0.08);
- --line-strong: rgb(255 255 255 / 0.16);
- --accent: #9277b0;
- --accent-soft: #b9a3d2;
- --hover: #ffffff0d;
- --selected: #ffffff1a;
- --success: #34d399;
-
- --primary-bg: #ececee;
- --primary-hover: #ffffff;
- --primary-active: #d2d2d7;
- --primary-text: #0b0b0c;
- --secondary-bg: #ffffff14;
- --secondary-hover: #ffffff1f;
- --secondary-active: #ffffff29;
-
- --radius-sm: 4px;
- --radius-md: 6px;
- --radius-lg: 8px;
- --radius-xl: 12px;
-
- --sans: var(--font-sans);
- --mono: var(--font-mono);
-
- --gutter: clamp(20px, 4vw, 40px);
- --page: 1200px;
- --nav-height: 60px;
- --section: clamp(88px, 11vw, 152px);
-}
-
-*, *::before, *::after { box-sizing: border-box; }
-* { margin: 0; padding: 0; }
-html {
- background: var(--page-bg);
- scroll-behavior: smooth;
- scroll-padding-top: 32px;
- -webkit-text-size-adjust: 100%;
- text-size-adjust: 100%;
-}
-body {
- min-height: 100vh;
- font-family: var(--sans);
- font-size: 16px;
- line-height: 1.6;
- color: var(--text);
- background: var(--page-bg);
- font-synthesis: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- overflow-x: clip;
-}
-::selection { background: color-mix(in srgb, var(--accent) 60%, transparent); color: #fff; }
-a { color: inherit; text-decoration: none; }
-img, svg, picture { display: block; max-width: 100%; }
-img { height: auto; }
-ul, ol { list-style: none; }
-button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
-code, pre, kbd { font-family: var(--mono); }
-:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 3px; border-radius: var(--radius-sm); }
-@media (prefers-reduced-motion: reduce) {
- html { scroll-behavior: auto; }
-}
-
-.wrap {
- width: 100%;
- max-width: calc(var(--page) + 2 * var(--gutter));
- margin-inline: auto;
- padding-inline: var(--gutter);
-}
-.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- overflow: hidden;
- clip-path: inset(50%);
- white-space: nowrap;
-}
-
-/* Type: the app's styles, at a page's sizes. */
-h1, h2, h3 { font-weight: 600; text-wrap: balance; }
-h2 {
- font-size: clamp(28px, 3.2vw, 40px);
- line-height: 1.12;
- letter-spacing: -0.025em;
-}
-h3 { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
-.lead {
- font-size: clamp(17px, 1.45vw, 19px);
- line-height: 1.55;
- color: var(--text-2);
- text-wrap: pretty;
-}
-.muted { color: var(--text-2); }
-.faint { color: var(--text-3); }
-
-.section { padding-top: var(--section); }
-
-/* A section opens with a statement: its first sentence in ink, the rest quiet. */
-.statement {
- max-width: 21em;
- font-size: clamp(24px, 2.9vw, 38px);
- font-weight: 550;
- line-height: 1.18;
- letter-spacing: -0.028em;
- color: var(--text-3);
- text-wrap: pretty;
-}
-.statement b { font-weight: inherit; color: var(--text); }
-
-/* Cards. One line colour for everything inside the page: a card's ring and
- every divider in it are --line, and the ring is drawn above the card's
- content, so nothing a card holds can paint over its edge or its corners. */
-.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: clamp(36px, 5vw, 64px); }
-.bento + .also { margin-top: 40px; }
-/* Under a section's cards, what else there is to say: three columns under one rule, without boxes. */
-.also { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; padding-top: 36px; border-top: 1px solid var(--line); }
-.also li { color: var(--text-2); }
-.also h3 { margin-top: 14px; font-size: 16px; font-weight: 550; color: var(--text); }
-.also p { margin: 6px 0 0; max-width: 26em; font-size: 15px; line-height: 1.5; text-wrap: pretty; }
-.also .command { margin-top: 16px; }
-.also .command code { font-size: 12px; }
-@media (max-width: 800px) {
- .also { grid-template-columns: minmax(0, 1fr); }
-}
-.card {
- position: relative;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- isolation: isolate;
- background: linear-gradient(180deg, #111113 0%, #0b0b0d 100%);
- border-radius: 16px;
-}
-.card::after {
- content: "";
- position: absolute;
- inset: 0;
- z-index: 5;
- border-radius: inherit;
- box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 0 rgb(255 255 255 / 0.03);
- pointer-events: none;
- transition: box-shadow 0.25s;
-}
-.card:hover::after { box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 1px 0 0 rgb(255 255 255 / 0.03); }
-.card-copy { padding: 28px 28px 0; }
-.card-copy h3 { font-size: 18px; font-weight: 550; letter-spacing: -0.02em; }
-.card-copy p { margin-top: 6px; max-width: 29em; font-size: 15px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
-/* What a card shows sits at its foot, under the words. */
-.card-visual { margin-top: auto; padding-top: 28px; }
-.card-visual.flush > * { border-top: 1px solid var(--line); }
-.span-12 { grid-column: span 12; }
-.span-7 { grid-column: span 7; }
-.span-6 { grid-column: span 6; }
-.span-5 { grid-column: span 5; }
-.span-4 { grid-column: span 4; }
-@media (max-width: 900px) {
- .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
-}
-/* A piece of the app inside a card: set in from the left under the words,
- running off the card to the right and below, dissolving before the edge.
- It leans out a little under the pointer. */
-.piece {
- margin-left: 28px;
- border-radius: 10px 0 0 0;
- overflow: hidden;
- box-shadow: 0 0 0 1px var(--line);
- -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 99%), linear-gradient(to right, #000 80%, transparent 99.5%);
- mask-image: linear-gradient(to bottom, #000 60%, transparent 99%), linear-gradient(to right, #000 80%, transparent 99.5%);
- -webkit-mask-composite: source-in;
- mask-composite: intersect;
- transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
-}
-/* A piece that isn't faded: it is cut by the card's own edge (one with a light theme in it, which a fade would turn to a glow). */
-.piece.plain { -webkit-mask-image: none; mask-image: none; }
-/* A piece shown whole: set in on every side, all four corners. */
-.piece.whole { margin: 0 28px 28px; border-radius: 12px; -webkit-mask-image: none; mask-image: none; }
-@media (hover: hover) and (prefers-reduced-motion: no-preference) {
- .card:hover .piece { translate: -6px -6px; }
-}
-
-/* Parts of the page rise in as they are reached (the script in Base arms this). */
-@media (prefers-reduced-motion: no-preference) {
- .js [data-reveal] { opacity: 0; translate: 0 20px; filter: blur(6px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.8s; transition-delay: calc(var(--i, 0) * 90ms); }
- .js [data-reveal].is-in { opacity: 1; translate: none; filter: none; }
- .bento > :nth-child(2) { --i: 1; }
- .bento > :nth-child(3) { --i: 2; }
-}
-
-/* The page arrives in order: each part rises out of a blur, a beat after the last. */
-@media (prefers-reduced-motion: no-preference) {
- .rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
- @keyframes rise {
- from { opacity: 0; filter: blur(8px); translate: 0 14px; }
- to { opacity: 1; filter: none; translate: none; }
- }
-}
-
-/* Prose pages (the privacy policy). */
-.prose { max-width: 720px; padding-block: clamp(48px, 7vw, 88px) clamp(72px, 9vw, 120px); }
-.prose h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; }
-.prose .updated { margin-top: 12px; font-size: 14px; color: var(--text-3); }
-.prose .lede { margin-top: 28px; font-size: 17px; color: var(--text); }
-.prose h2 { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); font-size: 22px; letter-spacing: -0.02em; }
-.prose h3 { margin-top: 28px; font-size: 16px; }
-.prose p, .prose li { font-size: 15.5px; line-height: 1.7; color: var(--text-2); }
-.prose p { margin-top: 14px; }
-.prose ul { margin-top: 12px; padding-left: 20px; list-style: disc; }
-.prose li + li { margin-top: 6px; }
-.prose li::marker { color: var(--text-3); }
-.prose strong { font-weight: 500; color: var(--text); }
-.prose a { color: var(--accent-soft); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
-.prose a:hover { text-decoration-color: var(--accent-soft); }
-.prose code { font-size: 0.9em; color: var(--text); }
-.prose .table-scroll { margin-top: 16px; overflow-x: auto; }
-.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
-.prose th, .prose td { padding: 10px 14px 10px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
-.prose th { font-weight: 500; color: var(--text); white-space: nowrap; }
-.prose td { color: var(--text-2); }
-.prose thead th { border-top: 0; font-size: 13px; font-weight: 400; color: var(--text-3); }
diff --git a/apps/landing/tests/telemetry.test.js b/apps/landing/telemetry.test.mjs
similarity index 96%
rename from apps/landing/tests/telemetry.test.js
rename to apps/landing/telemetry.test.mjs
index bca013396..02b26d40f 100644
--- a/apps/landing/tests/telemetry.test.js
+++ b/apps/landing/telemetry.test.mjs
@@ -1,13 +1,11 @@
import assert from "node:assert/strict";
import { randomUUID } from "node:crypto";
import { readFileSync } from "node:fs";
-import { test } from "vitest";
+import test from "node:test";
import { runInNewContext } from "node:vm";
-// The tracker is served as written (public/telemetry.js), so what is tested
-// here is byte for byte what a visitor runs. The page is the built one.
-const source = readFileSync(new URL("../public/telemetry.js", import.meta.url), "utf8");
-const html = readFileSync(new URL("../dist/index.html", import.meta.url), "utf8");
+const source = readFileSync(new URL("./public/telemetry.js", import.meta.url), "utf8");
+const html = readFileSync(new URL("./public/index.html", import.meta.url), "utf8");
const placements = { "nav-download": "nav", "hero-download": "hero", "closing-download": "closing" };
function load({ url = "https://zeron.sh/", referrer = "", navigator = {}, transport, clock = Date } = {}) {
diff --git a/apps/landing/tests/site.test.ts b/apps/landing/tests/site.test.ts
deleted file mode 100644
index 1ccc8110a..000000000
--- a/apps/landing/tests/site.test.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-// What the built pages must hold whatever a redesign does to them: every
-// download reachable without script, and the ids telemetry.js and
-// downloads.ts look for.
-import { readFileSync } from "node:fs";
-import { describe, expect, test } from "vitest";
-import { ANDROID_APK, APP_STORE, DESKTOP_BUILDS, FALLBACK_VERSION, RELEASES_URL } from "../src/data/releases.ts";
-
-const page = (name: string) => readFileSync(new URL(`../dist/${name}`, import.meta.url), "utf8");
-const home = page("index.html");
-
-describe("the landing page, built", () => {
- test("links every desktop build at the fallback version without script", () => {
- for (const [id, build] of Object.entries(DESKTOP_BUILDS)) {
- const href = `${RELEASES_URL}zeron-${FALLBACK_VERSION}-${build.file}`;
- expect(home, id).toContain(`href="${href}"`);
- expect(home, id).toContain(`data-build="${id}"`);
- }
- });
-
- test("links the mobile apps and the downloads table", () => {
- expect(home).toContain(`href="${ANDROID_APK}"`);
- expect(home).toContain(`href="${APP_STORE}"`);
- expect(home).toContain('id="downloads"');
- expect(home).toMatch(/href="\/?#downloads"/);
- });
-
- test("has the three download buttons telemetry.js counts, pointing at the table", () => {
- for (const id of ["nav-download", "hero-download", "closing-download"]) {
- expect(home, id).toMatch(new RegExp(`id="${id}" href="#downloads"[^>]*data-download=`));
- }
- });
-
- test("loads the tracker once, deferred, and only on the landing page", () => {
- expect(home.match(/"""
-open("fit.html", "w").write(page)
-dom = subprocess.run([CHROME, "--headless=new", "--no-sandbox", "--disable-gpu", "--allow-file-access-from-files", "--virtual-time-budget=4000", "--dump-dom", "file://" + __import__("os").path.abspath("fit.html")], capture_output=True, text=True).stdout
-fits = json.loads(html.unescape(re.search(r'
(.*?)
', dom, re.S).group(1)))
-json.dump(fits, open("fits.json", "w"))
-for n in nodes:
- if n["box"][3] > 24: continue
- a, b = fits[str(n["n"])][0], fits[str(n["n"])][1]
- print(f'{n["text"][:26]:26} box {n["box"][2]}x{n["box"][3]} -> {a[1]} {a[2]} {a[3]}px err {a[0]:.2f} (w {a[4]}) next {b[1]} {b[2]} {b[3]} err {b[0]:.2f}')
diff --git a/apps/landing/tools/recreate/gen.py b/apps/landing/tools/recreate/gen.py
deleted file mode 100644
index e3cd627dd..000000000
--- a/apps/landing/tools/recreate/gen.py
+++ /dev/null
@@ -1,439 +0,0 @@
-"""Build the session window's HTML from the app's layout tree and its two
-native references (dark, light). Everything placed here is placed where the
-app placed it; colours are the app's own pixels."""
-import os, pathlib
-ROOT = pathlib.Path(__file__).resolve().parents[3]
-CHROME = os.environ.get("CHROME", "chromium")
-import io, json, re, sys, html, urllib.parse
-import numpy as np
-import cairosvg
-from PIL import Image
-from lib import *
-
-nodes = json.load(open("nodes.json"))
-fits = json.load(open("fits.json"))
-ICONS = json.load(open("icons.json"))
-LANDING = f"{ROOT}/apps/landing"
-for mark in ("claude", "openai", "grok", "cursor", "opencode"):
- ICONS["mark-" + mark] = open(f"{LANDING}/src/assets/agents/{mark}.svg").read()
-
-STRIP = 40 # the title strip's height
-LEFT_SHIFT = 78 # macOS: the strip's left controls start past the traffic lights
-RIGHT_SHIFT = 104 # and its right controls reach the edge (no caption buttons)
-
-def strip_x(x, y):
- """A strip node's place on macOS, or None for what macOS doesn't draw."""
- if y >= STRIP - 4: return x
- if x >= 1206: return None
- return x + (RIGHT_SHIFT if x >= 1000 else LEFT_SHIFT)
-
-def every(fn):
- """What a function finds in each theme's capture."""
- return [fn(t) for t in THEMES]
-
-def colour_vars(values, prefix="c"):
- """One colour a theme, as custom properties (--c0, --c1, …) the stylesheet picks from by the window's theme."""
- return ";".join(f"--{prefix}{i}:{v if isinstance(v, str) else hexc(v)}" for i, v in enumerate(values))
-
-out = [] # (layer, html)
-import os
-OFFSETS = json.load(open("offsets.json")) if os.path.exists("offsets.json") else {}
-layout = []
-def placed(n, x, y, w, h):
- """Where a node goes: the app's box, moved by what the diff against the reference found (tune.py)."""
- dx, dy = OFFSETS.get(str(n), (0, 0))
- layout.append({"n": n, "box": [x, y, w, h]})
- return x + dx, y + dy
-
-css_icons = {}
-
-# ---------------------------------------------------------------- boxes
-tree = json.load(open("tree.json"))
-by_id = {n["id"]: n["box"] for n in tree if n.get("id")}
-by_n = {n["n"]: n["box"] for n in tree}
-_hidden = {int(m.group(1)) for m in re.finditer(r"@(\d+)[^\n]* hidden\s*$", open("tree.txt").read(), re.M)}
-def box_of(role, text, where=lambda b: True):
- """The box of the visible node with this role and exact text."""
- for n in tree:
- if n.get("role") == role and n.get("text") == text and n["n"] not in _hidden and where(n["box"]):
- return n["box"]
- raise KeyError((role, text))
-OPEN = next(n["text"] for n in tree if n.get("role") == "tab" and str(n.get("id", "")).startswith("session-tab-"))
-
-emitted = []
-ROOT_SEED = [2, 200] # a point of the window that no surface covers
-
-def emit_box(name, r):
- x, y, w, h = r["box"]
- nx = strip_x(x, y)
- if nx is None: return
- sx, sy = r["seed"]
- edge_at = (x + 0.25, y + h / 2)
- if GLASS:
- # Each theme's fill as what must be painted over what lies under it (the box it sits in, else the window).
- under = min((b for b in emitted if b["box"][0] <= sx <= b["box"][0] + b["box"][2] and b["box"][1] <= sy <= b["box"][1] + b["box"][3] and b["box"][2] * b["box"][3] > w * h), key=lambda b: b["box"][2] * b["box"][3], default={"seed": ROOT_SEED})
- fills = [css_rgba(*own(raw_at(t, sx, sy), raw_at(t, *under["seed"]))) for t in THEMES]
- edges = [css_rgba(*own(raw_at(t, *edge_at), raw_at(t, sx, sy))) for t in THEMES]
- else:
- fills = [at(t, sx, sy) for t in THEMES]
- edges = [at(t, *edge_at) for t in THEMES]
- emitted.append({"box": [x, y, w, h], "seed": [sx, sy]})
- style = f"left:{nx:g}px;top:{y:g}px;width:{w:g}px;height:{h:g}px;border-radius:{r['radius']:g}px;{colour_vars(fills, 'f')}"
- if r["edge"] is not None:
- style += ";" + colour_vars(edges, "e")
- out.append((-w * h, f''))
- print(f"{name:13} {x:7.1f},{y:6.1f} {w:6.1f}x{h:5.1f} r{r['radius']:g} fill {hexc(r['fill'])} edge {hexc(r['edge']) if r['edge'] is not None else '-'}", file=sys.stderr)
-
-def known(name, box, radius, seed, edge=True):
- """A box the tree places: its fill from the reference, and its edge if its rim is another colour."""
- x, y, w, h = box
- fill = at(P, *seed).copy()
- ring, outside = at(P, x + 0.25, y + h / 2), at(P, x - 1.5, y + h / 2)
- has_edge = edge and not near(ring, fill, 6) and not near(ring, outside, 3)
- emit_box(name, {"box": list(box), "radius": radius, "fill": fill, "edge": ring.copy() if has_edge else None, "seed": list(seed)})
-
-def found(name, seed, radii=None):
- """A box only the pixels place."""
- r = find_rect(seed)
- if radii: r = refine(r, radii)
- emit_box(name, r)
- return r
-
-composer = by_id["chat-composer"]
-known("sidebar", by_id["sidebar-content"], 12, (9, 400))
-known("page", by_id["shell-page-card"], 12, (286, 300))
-PANEL = any(n.get("id") == "panel-tab-chosen" and n["n"] not in _hidden and n["box"][2] > 0 for n in tree) # the side panel, open
-if PANEL:
- known("panel", by_id["panel"], 12, (804.5, 600))
- known("changes", [809, 131, 497, 584], 12, (815, 650))
- changes = {"box": [809, 131, 497, 584]}
- found("commit-field", (814, 757), (6, 8, 10))
- found("commit", (1240, 806), (5, 6, 7, 8))
-known("tab", by_id["session-tab-chosen"], 8, (340, 21))
-if PANEL: known("panel-tab", by_id["panel-tab-chosen"], 8, (900, 63))
-row = box_of("button", OPEN, lambda b: b[0] < 280)
-known("row", row, 8, (row[0] + 4, row[1] + 3))
-ask = next(n["box"] for n in tree if n.get("role") == "text" and str(n.get("text", "")).startswith("Clients can send"))
-found("bubble", (ask[0] - 8, ask[1] + 12), (12, 14, 16, 18, 20))
-known("composer", [composer[0], composer[1] + 0.5, composer[2], 48], 24, (composer[0] + 190, composer[1] + 5))
-attach = box_of("button", "Attach")
-found("attach", (attach[0] + 3.5, attach[1] + 14), (14,))
-send = box_of("button", "Send message")
-found("send", (send[0] + 3.5, send[1] + 14), (14,))
-if PANEL:
- known("hunk", [810, 276, 495, 24], 0, (1290, 288), edge=False)
- known("minus", [810, 366, 495, 22], 0, (813, 377), edge=False)
- known("plus", [810, 388, 495, 66], 0, (813, 410), edge=False)
- for name, seed in (("check-all", (824, 146)), ("check-1", (824, 255)), ("check-2", (824, 565))):
- r = find_rect(seed); r["radius"] = 4; emit_box(name, r)
- # Hairlines across the panel and its changes card.
- for name, box, seed in (("changes", changes["box"], (815, 650)), ("panel", by_id["panel"], (804.5, 600))):
- for y, h in hlines(box, seed):
- if name == "panel" and changes["box"][1] - 2 <= y <= changes["box"][1] + changes["box"][3] + 2: continue
- x, w = box[0] + 1, box[2] - 2
- out.append((0, f''))
-
-# ---------------------------------------------------------------- icons
-_raster = {}
-def raster(name, w, h):
- key = (name, w, h)
- if key not in _raster:
- svg = ICONS[name].replace("currentColor", "#ffffff")
- try:
- png = cairosvg.svg2png(bytestring=svg.encode(), output_width=w, output_height=h)
- _raster[key] = np.asarray(Image.open(io.BytesIO(png)).convert("RGBA"))[:, :, 3].astype(np.float32) / 255
- except Exception:
- _raster[key] = np.zeros((h, w), np.float32)
- return _raster[key]
-
-ARTWORK = {name: open(f"../artwork/{name}.svg").read() for name in ("api", "web", "uptime", "docs")}
-def artwork(box):
- """The project whose artwork fills this tile, by its ground colour; None for a glyph."""
- c = crop(P, box).reshape(-1, 3)
- vals, counts = np.unique(c, axis=0, return_counts=True)
- ground = vals[counts.argmax()]
- if np.ptp(ground) < 40: return None
- best = min(ARTWORK, key=lambda name: np.abs(np.array([int(re.search(r'fill="#([0-9a-f]{6})"', ARTWORK[name]).group(1)[i:i + 2], 16) for i in (0, 2, 4)]) - ground).sum())
- return best
-
-def match_icon(box):
- c = crop(P, box).astype(np.float32)
- ground, ink = ink_of(P, box)
- span = np.abs(ink - ground).sum() or 1
- shape = np.clip(np.abs(c - ground).sum(axis=2) / span, 0, 1)
- best = (-1, None)
- for name in ICONS:
- r = raster(name, shape.shape[1], shape.shape[0])
- if r.shape != shape.shape or r.sum() == 0: continue
- score = float((r * shape).sum() / (np.sqrt((r * r).sum() * (shape * shape).sum()) + 1e-6))
- if score > best[0]: best = (score, name)
- return best
-
-for n in nodes:
- if n["kind"] != "img": continue
- x, y, w, h = n["box"]
- nx = strip_x(x, y)
- if nx is None: continue
- project = artwork(n["box"])
- if project:
- nx, y = placed(n["n"], nx, y, w, h)
- uri = "data:image/svg+xml," + urllib.parse.quote(ARTWORK[project])
- out.append((1, f''))
- print(f"artwork @{n['n']} {x},{y} {w}x{h} -> {project}", file=sys.stderr)
- continue
- score, name = match_icon(n["box"])
- inks = every(lambda t: ink_of(t, n["box"])[1])
- print(f"icon @{n['n']:5} {x:6},{y:5} {w}x{h} -> {name} ({score:.2f}) {hexc(inks[0])}", file=sys.stderr)
- if score < 0.55: continue
- css_icons[name] = ICONS[name]
- nx, y = placed(n["n"], nx, y, w, h)
- out.append((1, f''))
-
-# ---------------------------------------------------------------- text
-# Each theme's primary text colour (a label that wears it), and the opacities its other tones are.
-PRIMARY = {t: ink_of(t, box_of("text", "New chat"))[1] for t in THEMES}
-ALPHAS = {t: (1, 0.6, 0.42, 0.28) for t in THEMES}
-
-def text_colour(theme, box):
- """A node's ink: one of the theme's four text tones where it is grey, as sampled where it has a hue."""
- ground, ink = ink_of(theme, box)
- d = (ink - ground).astype(float)
- full = (PRIMARY[theme] - ground).astype(float)
- if np.ptp(d / np.where(np.abs(full) < 1, 1, full)) < 0.12 and np.abs(full).sum() > 30:
- est = float((d / np.where(np.abs(full) < 1, 1, full)).mean())
- alpha = min((a for a in ALPHAS[theme] if a >= est - 0.06), default=1)
- return ground + full * alpha
- return ink
-
-from PIL import ImageFont
-_fonts = {}
-def measure(text, fam, weight, size):
- name = {("G", 400): "Geist.ttf", ("G", 500): "Geist-Medium.ttf", ("G", 600): "Geist-SemiBold.ttf", ("M", 400): "GeistMono.ttf", ("M", 500): "GeistMono-Medium.ttf"}[(fam, weight)]
- key = (name, size)
- if key not in _fonts: _fonts[key] = ImageFont.truetype(f"{ROOT}/apps/zgx/fonts/{name}", size * 8)
- return _fonts[key].getlength(text) / 8
-NATURAL = {14: 10, 16: 11, 17: 12, 19: 13, 20: 14, 21: 15, 22: 15, 24: 17}
-FORCE = {"+3": ("M", 400, 11), "+9": ("M", 400, 11), "−0": ("M", 400, 11), "−1": ("M", 400, 11), "+12": ("M", 400, 11),
- "Changes": ("G", 500, 12), "M": ("M", 500, 12), "0/50": ("G", 400, 10)}
-COLUMN = next(n["box"][2] for n in tree if n.get("role") == "article" and n.get("text") == "Reply") # the reply's column
-RICH = {
- "Clients can send": ("bubble", "Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it."),
- "Found it.": ("column", "Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after."),
- "Fixed in": ("column", "Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary."),
- "test/window.test.ts": ("item", "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"),
- "This matches": ("column", "This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet."),
-}
-CODE_X = 886
-ADVANCE = 7.2 # Geist Mono at 12: 0.6 em
-
-def code_line(n, px, py):
- """A line of code: its characters grouped into runs of one ink (the app's syntax colours), sampled cell by cell."""
- x, y, w, h = n["box"]
- text = n["text"]
- def ink(theme, cx):
- cell = crop(theme, [cx, y + 1, ADVANCE, h - 2]).reshape(-1, 3)
- ground = at(theme, cx + 0.1, y + 0.6)
- return ground, cell[np.abs(cell - ground).sum(axis=1).argmax()]
- def kind(c, g):
- """A hue, or for greys how strong: text 0.9, operators 0.66, punctuation and comments about 0.5."""
- v = (c - g).astype(float)
- if np.ptp(v) > 14: return tuple(np.round(v / (np.abs(v).max() or 1) * 5).astype(int))
- strength = float(v.mean()) / float((PRIMARY[P] - g).mean())
- return "text" if strength > 0.76 else "operator" if strength > 0.57 else "quiet"
- spans, gap = [], ""
- for i, ch in enumerate(text):
- cx = x + i * ADVANCE
- if cx + ADVANCE > 1305 + ADVANCE: break
- if ch == " ":
- gap += ch
- continue
- seen = every(lambda t: ink(t, cx)) # (ground, ink) a theme
- k = kind(seen[0][1], seen[0][0])
- if spans and spans[-1]["k"] == k and "`" not in ch:
- s = spans[-1]
- s["t"] += gap + ch
- # (A thin glyph's best pixel is dimmed by coverage: each theme keeps the strongest ink the run shows.)
- s["seen"] = [new if np.abs(new[1] - new[0]).sum() > np.abs(old[1] - old[0]).sum() else old for new, old in zip(seen, s["seen"])]
- else:
- spans.append({"t": gap + ch, "k": k, "seen": seen})
- gap = ""
- body = "".join(f'{html.escape(s["t"])}' for s in spans)
- return f'{body}'
-
-for n in nodes:
- if n["kind"] != "text": continue
- x, y, w, h = n["box"]
- nx = strip_x(x, y)
- if nx is None: continue
- text = n["text"]
- inks = every(lambda t: text_colour(t, n["box"]))
- mac = {"Ctrl+N": "⌘N", "Ctrl+K": "⌘K"}.get(text)
- rich = next((k for k in RICH if text.startswith(k) and h > 24), None)
- if rich:
- kind_, body = RICH[rich]
- # As wide as the app set it: the message in its bubble, a list item a marker in from the column, the rest the column.
- width = {"bubble": w + 2, "item": COLUMN - 24, "column": COLUMN}[kind_]
- x, y = placed(n["n"], x, y, w, h)
- out.append((2, f'
{body}
'))
- continue
- if PANEL and x >= CODE_X and 290 < y < 520 and h == 17:
- out.append((2, code_line(n, *placed(n["n"], x, y, min(w, 1305 - x), h))))
- continue
- err, fam, weight, size, measured = fits[str(n["n"])][0]
- align = "left"
- if text in FORCE:
- fam, weight, size = FORCE[text]
- if err > 2 or (text in FORCE and abs(measured - w) > 2) or len(text) <= 2:
- # A box of a set width: the size its line height gives, the text where its ink lies.
- size = NATURAL.get(h, size)
- first, last = ink_span(P, n["box"])
- if h not in NATURAL or len(text) > 8:
- size = min(range(10, 18), key=lambda s: abs(measure(text, "G", 400, s) - (last - first) - 1))
- if text not in FORCE:
- fam, weight = ("M", 400) if re.fullmatch(r"[\d+\-−]+", text) else ("G", 600 if re.fullmatch(r"[A-Z]", text) else 400)
- first, last = ink_span(P, n["box"])
- if w - (last - first) > 3:
- align = "left" if first < 2.5 else "right" if w - last < 2.5 else "center"
- nx, y = placed(n["n"], nx, y, w, h)
- fixed = err > 2
- first, last = ink_span(P, n["box"], gap=7)
- if align == "left" and not fixed and fam == "G" and (x < 280 or y < STRIP) and measured - last > 5 and len(text) > 12:
- # (FadeText: the row ends before the words do.)
- w = round(last + 1)
- style_fade = f"overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 {w - 20}px,transparent {w}px);mask-image:linear-gradient(90deg,#000 {w - 20}px,transparent {w}px);"
- else:
- style_fade = ""
- if mac: text, align = mac, "right"
- style = style_fade + f"left:{nx:g}px;top:{y:g}px;width:{w:g}px;height:{h}px;line-height:{h}px;font-size:{size}px;font-weight:{weight};text-align:{align};{colour_vars(inks)}"
- out.append((2, f'{html.escape(text)}'))
-
-# ---------------------------------------------------------------- the sidebar's branches, and work under way
-headers = [n for n in tree if n.get("role") == "button" and n["n"] not in _hidden and n["box"][0] == 13 and n["box"][2] == 256 and n["box"][3] == 30 and n["box"][1] > 170]
-groups, current = [], None
-for n in headers:
- # (A project's row holds an 18-point tile; a session's a 14-point mark.)
- i = tree.index(n)
- tile = next((m for m in tree[i + 1:i + 6] if m.get("role") == "img"), None)
- if tile and tile["box"][2] == 18:
- current = []; groups.append(current)
- elif current is not None:
- current.append(n["box"][1] + 15)
-def alpha_ink(theme, x, y, gx, gy):
- """A hairline's ink as white or black at an opacity, from one pixel of it and one of its ground."""
- line, ground = at(theme, x, y).astype(float), at(theme, gx, gy).astype(float)
- target = 255.0 if line.mean() > ground.mean() else 0.0
- return f"rgb({int(target)} {int(target)} {int(target)} / {abs(line.mean() - ground.mean()) / max(abs(target - ground.mean()), 1):.3f})"
-paths = []
-for centres in groups:
- if not centres: continue
- top = centres[0] - 15
- paths.append(f"M28 {top}V{centres[-1] - 5}" + "".join(f"M28 {c - 5}q0 5 5 5h5" for c in centres))
-if paths:
- probe = groups[0][0] + 20 if len(groups[0]) > 1 else groups[0][0] - 12
- inks = every(lambda t: alpha_ink(t, 28, probe, 32, probe))
- out.append((1, f''))
- print("branches", len(paths), inks, file=sys.stderr)
-for n in tree:
- if n.get("role") == "group" and n.get("text") == "Working" and n["n"] not in _hidden and n["box"][2] == 16:
- x, y, w, h = n["box"]
- # (The theme's accent: #9277b0 dark, #7a55c4 light.)
- out.append((1, f''))
-
-# ---------------------------------------------------------------- avatars
-import base64
-PALETTE = {hue: dict(re.findall(r'\["(\d+)"\] = "(#[0-9a-f]{6})"', body)) for hue, body in re.findall(r"^\t(\w+) = \{(.*)\},?$", open(f"{ROOT}/apps/zgx/ui/ds/palette.luau").read(), re.M)}
-WHEEL = ["red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]
-
-def avatar(seed, size, scale=3):
- """ds/avatar.luau's waves for a seed, as a picture."""
- state = 2166136261
- for ch in seed.encode():
- state ^= ch
- state = ((state << 24) + state * 403) % 4294967296
- def nxt():
- nonlocal state
- state = (state * 1664525 + 1013904223) % 4294967296
- return state / 4294967296
- base = int(nxt() * len(WHEEL))
- cols = [np.array([int(PALETTE[WHEEL[(base + off) % len(WHEEL)]][step][i:i + 2], 16) for i in (1, 3, 5)], float) for off, step in ((0, "300"), (1, "500"), (-1, "600"))]
- P = [nxt(), nxt(), nxt(), nxt()]
- n = size * scale
- py, px = (np.mgrid[0:n, 0:n] + 0.5) / scale
- ux, uy = px / size - 0.5, py / size - 0.5
- tau = 2 * np.pi
- ang = P[0] * tau
- rx, ry = np.cos(ang) * ux - np.sin(ang) * uy, np.sin(ang) * ux + np.cos(ang) * uy
- k = 2.2 + P[1] * 2.4
- sm = lambda lo, hi, v: (lambda t: t * t * (3 - 2 * t))(np.clip((v - lo) / (hi - lo), 0, 1))
- t1 = 0.5 + 0.5 * np.sin(rx * k + P[2] * tau + 1.6 * np.sin(ry * k * 1.3 + P[3] * tau))
- t2 = 0.5 + 0.5 * np.sin(ry * k * 0.9 - P[3] * tau + 1.3 * np.sin(rx * k * 1.1 + P[2] * tau))
- m1, m2 = sm(0.15, 0.85, t1)[..., None], (0.65 * sm(0.3, 0.95, t2))[..., None]
- v = cols[0] + (cols[1] - cols[0]) * m1
- rgb = v + (cols[2] - v) * m2
- d = np.hypot(px - size / 2, py - size / 2) - size / 2
- alpha = np.clip(0.5 - d * scale, 0, 1)[..., None] * 255
- buf = io.BytesIO()
- Image.fromarray(np.concatenate([rgb, alpha], axis=2).round().astype(np.uint8), "RGBA").save(buf, "PNG", optimize=True)
- return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode(), rgb.reshape(-1, 3).mean(axis=0)
-
-for box, seeds in [(box_of("group", "Local"), ["Local"])] + ([(box_of("group", "Mara Okafor"), ["git-author-Mara Okafor"])] if PANEL else []):
- x, y, w, h = box
- seen = crop(P, [x + w * 0.25, y + h * 0.25, w * 0.5, h * 0.5]).reshape(-1, 3).mean(axis=0)
- uri, _ = avatar(seeds[0], w)
- out.append((2, f''))
- print("avatar", box, [f"{s}: {float(np.abs(avatar(s, w)[1] - seen).sum()):.0f}" for s in seeds], file=sys.stderr)
-
-# The Commit button's word (the tree names the button, not its text).
-if PANEL:
- cx, cy, cw, ch = box_of("button", "Commit")
- inks = every(lambda t: ink_of(t, [cx + 6, cy + 4, cw - 12, ch - 8])[1])
- out.append((2, f'Commit'))
-
-# ---------------------------------------------------------------- bullets, lights
-for item in (n for n in tree if n.get("role") == "listitem" and n["n"] not in _hidden):
- box = [item["box"][0], item["box"][1], 24, 24] # the marker's place, before the item's words
- c = crop(P, box); ground, ink = ink_of(P, box)
- ys, xs = np.where(np.abs(c - ground).sum(axis=2) > 30)
- bx, by, bw = box[0] + xs.min() / S, box[1] + ys.min() / S, (xs.max() - xs.min() + 1) / S
- out.append((2, f''))
-for i, (fill, edge) in enumerate([("#ff5f57", "#e0443e"), ("#febc2e", "#dea123"), ("#28c840", "#1aab29")]):
- out.append((3, f''))
-
-BAR_INK = every(lambda t: ink_of(t, box_of("button", "Toggle sidebar"))[1]) # the title strip's glyphs
-def side_glyph(x, y, side, opened):
- bar = 1.1667 + (2.5 if opened else 0)
- bx = 4.3333 if side == "left" else 16 - 4.3333 - bar
- svg = f''
- return f'{svg}'
-out.append((3, side_glyph(92, 12, "left", True)))
-out.append((3, side_glyph(1320 - 30, 12, "right", PANEL)))
-out.sort(key=lambda o: o[0])
-masks = "\n".join(f'.zw .i-{name}{{--m:url("data:image/svg+xml,{urllib.parse.quote(re.sub(chr(10), " ", svg).replace("currentColor", "#000"))}")}}' for name, svg in sorted(css_icons.items()))
-fragment = "\n".join(o[1] for o in out)
-open(f"{NAME}.fragment.html", "w").write(fragment)
-json.dump(layout, open("layout.json", "w"))
-open(f"{NAME}.icons.css", "w").write(masks)
-
-# ---------------------------------------------------------------- each theme's own values
-def chip(theme):
- """Inline code in a theme: its wash and its ink, read from the reply's first line."""
- box = next(n["box"] for n in tree if n.get("role") == "text" and str(n.get("text", "")).startswith("Found it."))
- band = crop(theme, [box[0], box[1], box[2], 24])
- vals, counts = np.unique(band.reshape(-1, 3), axis=0, return_counts=True)
- wash = vals[counts.argsort()[::-1][1]]
- on = np.abs(band - wash).sum(axis=2) <= 4
- cols = np.where(on.sum(axis=0) >= 8)[0]
- # (The first chip alone: its columns up to the first gap wider than a glyph.)
- end = next((a for a, b in zip(cols, cols[1:]) if b - a > 14 * S), cols[-1])
- inside = band[:, cols[0]:end + 1].reshape(-1, 3)
- return wash, inside[np.abs(inside - wash).sum(axis=1).argmax()]
-rules = []
-for i, t in enumerate(THEMES):
- window = css_rgba(*raw_at(t, *ROOT_SEED)) if GLASS else hexc(GROUND[t])
- wash, ink = chip(t)
- rules.append(f".zw-{NAME}.t{i}{{--zw-window:{window};--zw-code:{hexc(ink)};--zw-wash:{hexc(wash)};--zw-text:{hexc(PRIMARY[t])}}}")
- print(t, rules[-1], file=sys.stderr)
-open(f"{NAME}.vars.css", "w").write("\n".join(rules) + "\n")
-# What a page needs to offer the themes: each one's name here, and the three colours that stand for it.
-json.dump([{"id": t, "window": hexc(GROUND[t]), "accent": hexc(chip(t)[1]), "text": hexc(PRIMARY[t])} for t in THEMES], open(f"{NAME}.themes.json", "w"), indent=1)
-print(len(out), "elements,", len(css_icons), "icons", file=sys.stderr)
diff --git a/apps/landing/tools/recreate/inspect.py b/apps/landing/tools/recreate/inspect.py
deleted file mode 100644
index d89c4860d..000000000
--- a/apps/landing/tools/recreate/inspect.py
+++ /dev/null
@@ -1,14 +0,0 @@
-"""Send one command to the staged app's inspector: zi.py '' [out-file-for-data]"""
-import glob, json, socket, sys
-path = sorted(glob.glob(f"/tmp/zgx-inspect-{__import__('os').getuid()}/*.sock"))[-1]
-s = socket.socket(socket.AF_UNIX); s.settimeout(60); s.connect(path)
-s.sendall((sys.argv[1] + "\n").encode())
-buf = b""
-while not buf.endswith(b"\n"):
- d = s.recv(1 << 22)
- if not d: break
- buf += d
-r = json.loads(buf)
-if len(sys.argv) > 2:
- json.dump(r.get("data"), open(sys.argv[2], "w"))
-print(r.get("text") if r.get("ok") else r)
diff --git a/apps/landing/tools/recreate/lib.py b/apps/landing/tools/recreate/lib.py
deleted file mode 100644
index 68297ebc9..000000000
--- a/apps/landing/tools/recreate/lib.py
+++ /dev/null
@@ -1,204 +0,0 @@
-"""Shared by the recreation tools: the two native references, sampling,
-and finding the shapes the app drew (filled boxes, their corners and edges)."""
-import io, json, math
-import numpy as np
-from PIL import Image
-
-import os
-W, H, S = 1320, 840, 2
-# The themes captured (ref-.png), the first the one shapes are read from;
-# NAME, what is being built; GLASS, whether its surfaces keep the alpha the app drew.
-THEMES = os.environ.get("THEMES", "dark,light").split(",")
-P = THEMES[0]
-NAME = os.environ.get("NAME", "session")
-GLASS = os.environ.get("GLASS") == "1"
-
-def raw(path):
- """A capture as the app drew it: colour (0..255) and alpha (0..1), un-premultiplied."""
- a = np.asarray(Image.open(path).convert("RGBA")).astype(np.float64)
- return a[:, :, :3], a[:, :, 3] / 255
-
-RAW = {t: raw(f"ref-{t}.png") for t in THEMES}
-# What a capture is laid on to be read: the window's own colour, opaque (the app's opaque look).
-GROUND = {"dark": (14, 14, 16), "light": (238, 238, 240)}
-for t in THEMES:
- GROUND.setdefault(t, tuple(int(round(v)) for v in RAW[t][0][400, 4]))
-
-def load(path, ground):
- im = Image.open(path).convert("RGBA")
- return np.asarray(Image.alpha_composite(Image.new("RGBA", im.size, tuple(ground) + (255,)), im).convert("RGB")).astype(np.int16)
-
-REFS = {t: load(f"ref-{t}.png", GROUND[t]) for t in THEMES}
-
-def raw_at(theme, x, y):
- rgb, alpha = RAW[theme]
- i, j = min(max(int(y * S), 0), rgb.shape[0] - 1), min(max(int(x * S), 0), rgb.shape[1] - 1)
- return rgb[i, j], float(alpha[i, j])
-
-def own(target, parent):
- """The colour and alpha a surface must be painted in to show as `target` over `parent`
- (each a colour and an alpha): source-over, undone. Where the alpha it needs is too
- little to carry the colour, the least alpha that can."""
- (ct, at_), (cp, ap) = target, parent
- if ap >= 0.999: return ct, 1.0
- least = min(max((at_ - ap) / (1 - ap), 0.0), 1.0)
- if least < 0.002 and np.abs(ct * at_ - cp * ap).max() < 1.0: return ct, 0.0
- for a in [least] + [v / 200 for v in range(1, 201)]:
- if a < least or a <= 0: continue
- c = (ct * at_ - cp * ap * (1 - a)) / a
- if (c >= -1.5).all() and (c <= 256.5).all(): return np.clip(c, 0, 255), a
- return ct, 1.0
-
-def css_rgba(colour, alpha):
- r, g, b = (int(round(float(v))) for v in colour)
- return hexc(colour) if alpha >= 0.999 else f"rgb({r} {g} {b} / {alpha:.3f})"
-
-def at(theme, x, y):
- a = REFS[theme]
- return a[min(max(int(y * S), 0), a.shape[0] - 1), min(max(int(x * S), 0), a.shape[1] - 1)]
-
-def crop(theme, box):
- x, y, w, h = box
- return REFS[theme][int(round(y * S)):int(round((y + h) * S)), int(round(x * S)):int(round((x + w) * S))]
-
-def hexc(c):
- return "#%02x%02x%02x" % tuple(int(min(max(round(float(v)), 0), 255)) for v in c)
-
-def near(a, b, tol=7):
- return int(np.abs(np.asarray(a) - np.asarray(b)).sum()) <= tol
-
-def ink_of(theme, box):
- """The ground under a node (the commonest colour of its box) and its ink (the pixel farthest from it)."""
- p = crop(theme, box).reshape(-1, 3)
- vals, counts = np.unique(p, axis=0, return_counts=True)
- ground = vals[counts.argmax()]
- return ground, p[np.abs(p - ground).sum(axis=1).argmax()]
-
-def ink_span(theme, box, gap=None):
- """Where the ink lies across a node's box, in points from its left edge: (first, last). Rows that are
- ink all the way across (a hairline through the box) don't count. With `gap`, the ink ends at the
- first empty stretch that wide (a title cut short before what follows it on its row)."""
- c = crop(theme, box)
- ground, _ = ink_of(theme, box)
- on = np.abs(c - ground).sum(axis=2) > 24
- on = on[on.mean(axis=1) < 0.8]
- cols = np.where(on.any(axis=0))[0]
- if not len(cols): return (0, box[2])
- first, last = cols[0], cols[-1]
- if gap:
- for a, b in zip(cols, cols[1:]):
- if b - a > gap * S:
- last = a
- break
- return (first / S, (last + 1) / S)
-
-def find_rect(seed, theme=P, tol=7):
- """The filled box around a point: its bounds in points, corner radius, fill, and 1-point edge if it has one.
- Text and icons inside block single scan lines, so each side is the farthest any line reaches."""
- a = REFS[theme]
- sx, sy = int(seed[0] * S), int(seed[1] * S)
- fill = a[sy, sx].copy()
- same = np.abs(a - fill).sum(axis=2) <= tol
- def reach(line, start):
- """How far a line of the mask runs each way from a start index (inclusive bounds)."""
- before = np.where(~line[:start][::-1])[0]
- after = np.where(~line[start + 1:])[0]
- return start - (before[0] if len(before) else start), start + (after[0] if len(after) else len(line) - 1 - start)
- t, b = reach(same[:, sx], sy)
- l, r = sx, sx
- for _ in range(3):
- spans = [reach(same[y], sx) for y in range(t, b + 1)]
- l, r = min(s[0] for s in spans), max(s[1] for s in spans)
- cols = [reach(same[:, x], sy) for x in range(l, r + 1)]
- t, b = min(c[0] for c in cols), max(c[1] for c in cols)
- # The corner: the radius whose quarter circle best covers what the top-left block shows.
- n = int(min(26 * S, (r - l + 1) // 2, (b - t + 1) // 2))
- radius = 0.0
- if n >= 2:
- block = same[t:t + n, l:l + n]
- yy, xx = np.mgrid[0:n, 0:n] + 0.5
- best = (1e9, 0.0)
- for R in [v * S for v in (0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24)] + [n]:
- inside = ((xx >= R) | (yy >= R) | ((xx - R) ** 2 + (yy - R) ** 2 <= R * R))
- miss = float((inside != block)[: int(R) + 2, : int(R) + 2].mean()) if R else float((~block[:4, :4]).mean())
- if miss < best[0] - 1e-9: best = (miss, R / S)
- radius = best[1]
- box = [l / S, t / S, (r - l + 1) / S, (b - t + 1) / S]
- # An edge: a ring a point wide of one other colour just outside the fill, on rows that reach the left side.
- edge = None
- rows = [y for y in range(t, b + 1) if same[y, l]][:: max((b - t) // 7, 1)]
- if l - S - 3 >= 0 and len(rows) >= 3:
- rings = [a[y, l - 1] for y in rows]
- beyond = [a[y, l - S - 2] for y in rows]
- if all(near(q, rings[0], 5) for q in rings) and not near(rings[0], fill, tol) and not near(rings[0], beyond[0], 4):
- edge = rings[0].copy()
- box = [box[0] - 1, box[1] - 1, box[2] + 2, box[3] + 2]
- radius = radius + 1 if radius else 0
- return {"box": box, "radius": radius, "fill": fill, "edge": edge, "seed": list(seed)}
-
-def sample_rect(rect, theme):
- """The same box's fill and edge in another reference."""
- fill = at(theme, *rect["seed"])
- edge = None
- if rect["edge"] is not None:
- x, y, w, h = rect["box"]
- edge = at(theme, x + 0.25, y + h / 2)
- return fill, edge
-
-def cover(box, radius, x0, y0, nx, ny):
- """A rounded box's coverage of each device pixel in a patch (the app's antialiasing: half a pixel either side of the edge)."""
- x, y, w, h = (v * S for v in box)
- r = min(radius * S, w / 2, h / 2)
- px, py = x0 + np.arange(nx) + 0.5, y0 + np.arange(ny) + 0.5
- qx = np.abs(px[None, :] - (x + w / 2)) - (w / 2 - r)
- qy = np.abs(py[:, None] - (y + h / 2)) - (h / 2 - r)
- d = np.hypot(np.maximum(qx, 0), np.maximum(qy, 0)) + np.minimum(np.maximum(qx, qy), 0) - r
- return np.clip(0.5 - d, 0, 1)
-
-def refine(rect, radii, theme=P):
- """Settle a small box to the half point and its radius: the shape whose painted rim best matches the reference's."""
- a = REFS[theme]
- box, fill = list(rect["box"]), rect["fill"].astype(float)
- m = 3
- x0, y0 = int((box[0] - m) * S), int((box[1] - m) * S)
- nx, ny = int((box[2] + 2 * m) * S), int((box[3] + 2 * m) * S)
- patch = a[y0:y0 + ny, x0:x0 + nx].astype(float)
- ground = np.median(np.concatenate([patch[0], patch[-1], patch[:, 0], patch[:, -1]]), axis=0)
- def err(b, r):
- c = cover(b, r, x0, y0, nx, ny)
- grown = cover([b[0] - 2, b[1] - 2, b[2] + 4, b[3] + 4], r + 2, x0, y0, nx, ny)
- shrunk = cover([b[0] + 2.5, b[1] + 2.5, max(b[2] - 5, 0), max(b[3] - 5, 0)], max(r - 2.5, 0), x0, y0, nx, ny)
- rim = (grown - shrunk) > 0.5
- pred = ground + (fill - ground) * c[:, :, None]
- return float(np.abs(pred - patch).sum(axis=2)[rim].mean())
- best = (err(box, rect["radius"]), box, rect["radius"])
- for _ in range(2):
- for axis in (0, 1):
- for d0 in (-1, -0.5, 0, 0.5, 1):
- for d1 in (-1, -0.5, 0, 0.5, 1):
- for r in radii:
- b = list(best[1])
- b[axis] += d0; b[axis + 2] += d1 - d0
- e = err(b, r)
- if e < best[0] - 1e-6: best = (e, b, r)
- rect["box"], rect["radius"] = best[1], best[2]
- return rect
-
-def hlines(box, seed, theme=P):
- """Hairlines across a box: rows that are one other colour nearly all the way across, a pixel or two tall."""
- a = REFS[theme]
- x, y, w, h = box
- fill = at(theme, *seed)
- block = a[int(y * S):int((y + h) * S), int((x + 1) * S):int((x + w - 1) * S)]
- off = (np.abs(block - fill).sum(axis=2) > 5).mean(axis=1)
- lines, r = [], 0
- while r < len(off):
- if off[r] > 0.93:
- e = r
- while e + 1 < len(off) and off[e + 1] > 0.93: e += 1
- if e - r + 1 <= 2 and (r < 3 or off[r - 3] < 0.6) and (e + 3 >= len(off) or off[e + 3] < 0.6):
- lines.append((y + r / S, (e - r + 1) / S))
- r = e + 1
- else:
- r += 1
- return lines
diff --git a/apps/landing/tools/recreate/phone_check.py b/apps/landing/tools/recreate/phone_check.py
deleted file mode 100644
index b510b92f9..000000000
--- a/apps/landing/tools/recreate/phone_check.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""Render the phone recreation at 3x and diff it against the iOS app's screenshot.
-phone_check.py [--tune] prints, per element, the shift (in points) that best meets the reference."""
-import os, re, subprocess, sys, pathlib
-import numpy as np
-from PIL import Image
-ROOT = pathlib.Path(__file__).resolve().parents[3]
-CHROME = os.environ.get("CHROME", "chromium")
-here = pathlib.Path(os.environ.get("PHONE_SRC", ROOT / "apps/landing/src/components/app"))
-FONTS = ROOT / "apps/landing/src/assets/fonts"
-css = (here / "phone.css").read_text().replace("../../assets", f"file://{ROOT}/apps/landing/src/assets")
-frag = (here / "phone.fragment.html").read_text()
-page = f"""
{frag}
"""
-open("phone-test.html", "w").write(page)
-subprocess.run([CHROME, "--headless=new", "--no-sandbox", "--disable-gpu", "--disable-lcd-text", "--hide-scrollbars", "--allow-file-access-from-files", "--force-device-scale-factor=3", "--window-size=402,874", "--virtual-time-budget=3000", "--screenshot=" + os.path.abspath("phone-web.png"), "file://" + os.path.abspath("phone-test.html")], capture_output=True)
-web = np.asarray(Image.open("phone-web.png").convert("RGB")).astype(np.int16)
-ref = np.asarray(Image.open(os.environ.get("PHONE_REF", ROOT / "docs/screenshots/message-captions/ios-dark.png")).convert("RGB")).astype(np.int16)
-S = 3
-d = np.abs(web - ref)
-for name, (y0, y1) in {"screen": (0, 874), "header": (56, 112), "conversation": (120, 480), "composer": (776, 838)}.items():
- r = d[y0 * S:y1 * S]
- print(f"{name:13} mae {r.mean():5.2f} >32: {100 * (r.max(axis=2) > 32).mean():4.1f}%")
-Image.fromarray(np.concatenate([ref, web, np.clip(d * 4, 0, 255)], axis=1).astype(np.uint8)).save("phone-side.png")
-if "--tune" in sys.argv:
- for m in re.finditer(r'data-n="([\w-]+)"[^>]*style="left:([\d.]+)px;top:([\d.]+)px(?:;width:([\d.]+)px)?(?:;height:([\d.]+)px)?', frag):
- name, x, y = m.group(1), float(m.group(2)), float(m.group(3))
- w = float(m.group(4) or 300); h = float(m.group(5) or 26)
- x0, y0, x1, y1 = int(x * S) - 3, int(y * S) - 3, min(int((x + w) * S) + 3, 1206 - 12), int((y + h) * S) + 3
- best = (1e18, 0, 0)
- for dy in range(-12, 13):
- for dx in range(-12, 13):
- a = web[y0:y1, x0:x1]; b = ref[y0 + dy:y1 + dy, x0 + dx:x1 + dx]
- if a.shape != b.shape or not a.size: continue
- e = float(np.abs(a - b).sum()) * (1 + 0.003 * (abs(dx) + abs(dy)))
- if e < best[0]: best = (e, dx, dy)
- if best[1] or best[2]: print(f" {name:12} move {best[1] / S:+.2f}, {best[2] / S:+.2f}")
diff --git a/apps/landing/tools/recreate/reference/artwork/api.svg b/apps/landing/tools/recreate/reference/artwork/api.svg
deleted file mode 100644
index a68d60755..000000000
--- a/apps/landing/tools/recreate/reference/artwork/api.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/artwork/docs.svg b/apps/landing/tools/recreate/reference/artwork/docs.svg
deleted file mode 100644
index 8d9ae710e..000000000
--- a/apps/landing/tools/recreate/reference/artwork/docs.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/artwork/uptime.svg b/apps/landing/tools/recreate/reference/artwork/uptime.svg
deleted file mode 100644
index 912ee15a7..000000000
--- a/apps/landing/tools/recreate/reference/artwork/uptime.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/artwork/web.svg b/apps/landing/tools/recreate/reference/artwork/web.svg
deleted file mode 100644
index 9197c657c..000000000
--- a/apps/landing/tools/recreate/reference/artwork/web.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/session/offsets.json b/apps/landing/tools/recreate/reference/session/offsets.json
deleted file mode 100644
index 3db208f6e..000000000
--- a/apps/landing/tools/recreate/reference/session/offsets.json
+++ /dev/null
@@ -1 +0,0 @@
-{"480": [0.0, -0.5], "494": [0.0, -0.5], "695": [0.0, -0.5], "2617": [0.0, -0.5], "2763": [0.0, -0.5], "2766": [0.0, -0.5], "2769": [0.0, -0.5], "2663": [0.0, -0.5], "2772": [0.0, -0.5], "2775": [0.0, -0.5], "2698": [0.0, -0.5], "2778": [0.0, -0.5], "2781": [0.0, -0.5], "2734": [0.0, -0.5], "2784": [0.0, -0.5], "290": [-0.5, -0.5], "717": [-0.5, -0.5], "719": [-0.5, -0.5], "868": [-0.5, 0.0], "782": [-0.5, 0.0], "311": [0.0, -0.5], "486": [0.0, -0.5], "500": [0.0, -0.5], "618": [0.0, -0.5], "1271": [0.0, -0.5], "2627": [0.0, -0.5], "2629": [-0.5, 0.0], "2638": [0.0, -0.5], "2653": [0.0, -0.5], "2328": [0.0, -0.5], "2673": [0.0, -0.5], "2687": [0.0, -0.5], "2445": [0.0, -0.5], "2708": [0.0, -0.5], "2723": [0.0, -0.5], "2562": [0.5, -0.5], "2744": [0.0, -0.5], "531": [0.0, -0.5], "963": [-0.5, 0.5], "962": [0.0, -0.5], "2142": [0.0, 0.5], "2136": [0.0, 0.5], "176": [-0.5, -0.5], "784": [0.5, 0.0], "814": [0.0, -5.5], "1008": [0.5, 0.0], "1007": [0.5, 0.0], "2091": [0.0, -0.5], "2085": [-0.5, 0.0], "2106": [0.0, -0.5], "1001": [0.0, -0.5], "1137": [0.0, -0.5], "1039": [-0.5, 0.0], "1036": [0.5, 0.0], "966": [0.0, -0.5], "992": [-0.5, 0.0], "1156": [0.5, 0.0]}
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/session/ref-dark.png b/apps/landing/tools/recreate/reference/session/ref-dark.png
deleted file mode 100644
index aa84a4daf..000000000
Binary files a/apps/landing/tools/recreate/reference/session/ref-dark.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/session/ref-light.png b/apps/landing/tools/recreate/reference/session/ref-light.png
deleted file mode 100644
index 57a180ac7..000000000
Binary files a/apps/landing/tools/recreate/reference/session/ref-light.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/session/tree.json b/apps/landing/tools/recreate/reference/session/tree.json
deleted file mode 100644
index 149b098c3..000000000
--- a/apps/landing/tools/recreate/reference/session/tree.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"box": [0, 0, 1320, 840], "depth": 5, "n": 6, "role": "dialog", "text": "Zeron"}, {"box": [1304, 824, 0, 0], "depth": 6, "id": "host-toasts", "n": 7}, {"box": [0, 0, 1320, 840], "depth": 3, "id": "shell", "n": 409}, {"box": [0, 0, 1320, 840], "depth": 4, "id": "shell-chats", "n": 410}, {"box": [0, 0, 277, 840], "depth": 8, "id": "shell-sidebar", "n": 468}, {"box": [5, 42, 272, 793], "depth": 12, "id": "sidebar-content", "n": 473}, {"box": [13, 50, 256, 94], "depth": 13, "id": "sidebar-actions", "n": 474}, {"box": [13, 50, 256, 30], "depth": 15, "n": 476, "role": "button", "text": "New chat"}, {"box": [20, 57, 16, 16], "depth": 19, "n": 480, "role": "img"}, {"box": [43, 56, 57, 19], "depth": 21, "n": 486, "role": "text", "text": "New chat"}, {"box": [228, 57, 33, 16], "depth": 19, "n": 487, "role": "text", "text": "Ctrl+N"}, {"box": [13, 82, 256, 30], "depth": 15, "n": 490, "role": "button", "text": "Search"}, {"box": [20, 89, 16, 16], "depth": 19, "n": 494, "role": "img"}, {"box": [43, 88, 42, 19], "depth": 21, "n": 500, "role": "text", "text": "Search"}, {"box": [229, 89, 32, 16], "depth": 19, "n": 501, "role": "text", "text": "Ctrl+K"}, {"box": [13, 114, 256, 30], "depth": 17, "n": 609, "role": "button", "text": "Pull requests"}, {"box": [20, 121, 16, 16], "depth": 23, "n": 695, "role": "img"}, {"box": [43, 120, 77, 19], "depth": 23, "n": 618, "role": "text", "text": "Pull requests"}, {"box": [13, 160, 256, 627], "depth": 13, "id": "sidebar", "n": 507}, {"box": [13, 160, 256, 627], "depth": 17, "n": 1287, "role": "scroll"}, {"box": [13, 160, 256, 24], "depth": 23, "n": 1292, "role": "button", "text": "Projects"}, {"box": [21, 164, 43, 16], "depth": 26, "n": 1289, "role": "text", "text": "Projects"}, {"box": [13, 186, 256, 30], "depth": 25, "n": 1282, "role": "button", "text": "api"}, {"box": [19, 192, 18, 18], "depth": 35, "n": 2617, "role": "img"}, {"box": [43, 192, 18, 19], "depth": 31, "n": 1271, "role": "text", "text": "api"}, {"box": [13, 218, 256, 30], "depth": 26, "n": 1343, "role": "button", "text": "Fix burst at the rate limit boundary"}, {"box": [42, 226, 14, 14], "depth": 37, "n": 2763, "role": "img"}, {"box": [64, 224, 209, 19], "depth": 36, "n": 2627, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [232, 233, 0, 0], "depth": 31, "n": 1244, "role": "group"}, {"box": [240, 225, 21, 16], "depth": 35, "n": 2629, "role": "text", "text": "now"}, {"box": [64, 244, 11, 11], "depth": 34, "n": 2631, "role": "img"}, {"box": [79, 241, 63, 16], "depth": 34, "n": 1231, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 250, 256, 30], "depth": 26, "n": 1218, "role": "button", "text": "Return a real Retry-After"}, {"box": [42, 258, 14, 14], "depth": 37, "n": 2766, "role": "img"}, {"box": [64, 256, 150, 19], "depth": 36, "n": 2638, "role": "text", "text": "Return a real Retry-After"}, {"box": [237, 265, 0, 0], "depth": 31, "n": 1206, "role": "group"}, {"box": [245, 257, 16, 16], "depth": 36, "n": 2641, "role": "group", "text": "Completed"}, {"box": [246, 258, 14, 14], "depth": 38, "n": 2643, "role": "img"}, {"box": [64, 276, 11, 11], "depth": 34, "n": 2646, "role": "img"}, {"box": [79, 273, 63, 16], "depth": 34, "n": 1194, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 282, 256, 30], "depth": 26, "n": 1182, "role": "button", "text": "Sweep idle keys without a timer"}, {"box": [42, 290, 14, 14], "depth": 37, "n": 2769, "role": "img"}, {"box": [64, 288, 193, 19], "depth": 36, "n": 2653, "role": "text", "text": "Sweep idle keys without a timer"}, {"box": [237, 297, 0, 0], "depth": 31, "n": 398, "role": "group"}, {"box": [245, 289, 16, 16], "depth": 36, "n": 2656, "role": "group", "text": "Working"}, {"box": [64, 308, 11, 11], "depth": 34, "n": 2660, "role": "img"}, {"box": [79, 305, 63, 16], "depth": 34, "n": 2300, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 314, 256, 30], "depth": 25, "n": 2313, "role": "button", "text": "web"}, {"box": [19, 320, 18, 18], "depth": 35, "n": 2663, "role": "img"}, {"box": [43, 320, 26, 19], "depth": 31, "n": 2328, "role": "text", "text": "web"}, {"box": [13, 346, 256, 30], "depth": 26, "n": 2345, "role": "button", "text": "Speed up the dashboard's first paint"}, {"box": [42, 354, 14, 14], "depth": 37, "n": 2772, "role": "img"}, {"box": [64, 352, 220, 19], "depth": 36, "n": 2673, "role": "text", "text": "Speed up the dashboard's first paint"}, {"box": [237, 361, 0, 0], "depth": 31, "n": 2361, "role": "group"}, {"box": [245, 353, 16, 16], "depth": 36, "n": 2676, "role": "group", "text": "Working"}, {"box": [64, 372, 11, 11], "depth": 34, "n": 2680, "role": "img"}, {"box": [79, 369, 63, 16], "depth": 34, "n": 2374, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 378, 256, 30], "depth": 26, "n": 2388, "role": "button", "text": "Add dark mode to settings"}, {"box": [42, 386, 14, 14], "depth": 37, "n": 2775, "role": "img"}, {"box": [64, 384, 161, 19], "depth": 36, "n": 2687, "role": "text", "text": "Add dark mode to settings"}, {"box": [237, 393, 0, 0], "depth": 31, "n": 2404, "role": "group"}, {"box": [245, 385, 16, 16], "depth": 36, "n": 2690, "role": "group", "text": "Completed"}, {"box": [246, 386, 14, 14], "depth": 38, "n": 2692, "role": "img"}, {"box": [64, 404, 11, 11], "depth": 34, "n": 2695, "role": "img"}, {"box": [79, 401, 63, 16], "depth": 34, "n": 2417, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 410, 256, 30], "depth": 25, "n": 2430, "role": "button", "text": "uptime"}, {"box": [19, 416, 18, 18], "depth": 35, "n": 2698, "role": "img"}, {"box": [43, 416, 43, 19], "depth": 31, "n": 2445, "role": "text", "text": "uptime"}, {"box": [13, 442, 256, 30], "depth": 26, "n": 2462, "role": "button", "text": "Page only when two regions agree"}, {"box": [42, 450, 14, 14], "depth": 37, "n": 2778, "role": "img"}, {"box": [64, 448, 208, 19], "depth": 36, "n": 2708, "role": "text", "text": "Page only when two regions agree"}, {"box": [237, 457, 0, 0], "depth": 31, "n": 2478, "role": "group"}, {"box": [245, 449, 16, 16], "depth": 36, "n": 2711, "role": "group", "text": "Completed"}, {"box": [246, 450, 14, 14], "depth": 38, "n": 2713, "role": "img"}, {"box": [64, 468, 11, 11], "depth": 34, "n": 2716, "role": "img"}, {"box": [79, 465, 63, 16], "depth": 34, "n": 2491, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 474, 256, 30], "depth": 26, "n": 2505, "role": "button", "text": "Why Frankfurt flapped overnight"}, {"box": [42, 482, 14, 14], "depth": 37, "n": 2781, "role": "img"}, {"box": [64, 480, 197, 19], "depth": 36, "n": 2723, "role": "text", "text": "Why Frankfurt flapped overnight"}, {"box": [237, 489, 0, 0], "depth": 31, "n": 2521, "role": "group"}, {"box": [245, 481, 16, 16], "depth": 36, "n": 2726, "role": "group", "text": "Completed"}, {"box": [246, 482, 14, 14], "depth": 38, "n": 2728, "role": "img"}, {"box": [64, 500, 11, 11], "depth": 34, "n": 2731, "role": "img"}, {"box": [79, 497, 63, 16], "depth": 34, "n": 2534, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 506, 256, 30], "depth": 25, "n": 2547, "role": "button", "text": "docs"}, {"box": [19, 512, 18, 18], "depth": 35, "n": 2734, "role": "img"}, {"box": [43, 512, 29, 19], "depth": 31, "n": 2562, "role": "text", "text": "docs"}, {"box": [13, 538, 256, 30], "depth": 26, "n": 2579, "role": "button", "text": "Write up the October incident"}, {"box": [42, 546, 14, 14], "depth": 37, "n": 2784, "role": "img"}, {"box": [64, 544, 179, 19], "depth": 36, "n": 2744, "role": "text", "text": "Write up the October incident"}, {"box": [237, 553, 0, 0], "depth": 31, "n": 2595, "role": "group"}, {"box": [245, 545, 16, 16], "depth": 36, "n": 2747, "role": "group", "text": "Completed"}, {"box": [246, 546, 14, 14], "depth": 38, "n": 2749, "role": "img"}, {"box": [64, 564, 11, 11], "depth": 34, "n": 2752, "role": "img"}, {"box": [79, 561, 63, 16], "depth": 34, "n": 2608, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 797, 224, 30], "depth": 17, "focused": true, "n": 522, "role": "button", "text": "Local"}, {"box": [18, 802, 20, 20], "depth": 26, "n": 698, "role": "group", "text": "Local"}, {"box": [43, 803, 33, 19], "depth": 23, "n": 531, "role": "text", "text": "Local"}, {"box": [239, 797, 30, 30], "checked": false, "depth": 17, "n": 534, "role": "checkbox", "text": "Settings"}, {"box": [246, 804, 16, 16], "depth": 18, "n": 535, "role": "img"}, {"box": [5, 0, 272, 42], "depth": 11, "id": "sidebar-drag", "n": 537}, {"box": [94, 9, 24, 24], "depth": 14, "n": 541, "role": "button", "text": "Sidebar view options"}, {"box": [98, 13, 16, 16], "depth": 15, "n": 542, "role": "img"}, {"box": [38, -28, 137, 31], "depth": 16, "n": 395, "role": "dialog", "text": "Tooltip"}, {"box": [49, -21, 115, 17], "depth": 19, "n": 762, "role": "text", "text": "Sidebar view options"}, {"box": [94, 37, 232, 642], "depth": 15, "n": 801, "role": "dialog", "text": "Sidebar view options"}, {"box": [99, 42, 222, 28], "checked": false, "depth": 20, "n": 1109, "role": "checkbox", "text": "Activity"}, {"box": [108, 48, 16, 16], "depth": 22, "n": 2151, "role": "img"}, {"box": [133, 47, 45, 19], "depth": 23, "n": 2108, "role": "text", "text": "Activity"}, {"box": [99, 72, 222, 28], "depth": 20, "n": 838, "role": "button", "text": "Activity settings\u2026"}, {"box": [108, 78, 16, 16], "depth": 22, "n": 350, "role": "img"}, {"box": [133, 77, 103, 19], "depth": 23, "n": 949, "role": "text", "text": "Activity settings\u2026"}, {"box": [95, 104, 230, 1], "depth": 19, "n": 184, "role": "group"}, {"box": [95, 105, 230, 118], "depth": 19, "n": 40, "role": "group", "text": "Organize"}, {"box": [99, 109, 222, 20], "depth": 20, "n": 809, "role": "group"}, {"box": [107, 109, 46, 16], "depth": 21, "n": 1103, "role": "text", "text": "Organize"}, {"box": [99, 131, 222, 28], "checked": true, "depth": 22, "n": 797, "role": "checkbox", "text": "By project"}, {"box": [108, 137, 16, 16], "depth": 24, "n": 1323, "role": "img"}, {"box": [133, 136, 60, 19], "depth": 25, "n": 1324, "role": "text", "text": "By project"}, {"box": [299, 138, 14, 14], "depth": 25, "n": 1301, "role": "img"}, {"box": [99, 161, 222, 28], "checked": false, "depth": 22, "n": 1321, "role": "checkbox", "text": "By device"}, {"box": [108, 167, 16, 16], "depth": 24, "n": 1318, "role": "img"}, {"box": [133, 166, 57, 19], "depth": 25, "n": 1314, "role": "text", "text": "By device"}, {"box": [99, 191, 222, 28], "checked": false, "depth": 20, "n": 64, "role": "checkbox", "text": "None"}, {"box": [108, 197, 16, 16], "depth": 22, "n": 833, "role": "img"}, {"box": [133, 196, 32, 19], "depth": 23, "n": 42, "role": "text", "text": "None"}, {"box": [95, 223, 230, 1], "depth": 19, "n": 1102, "role": "group"}, {"box": [95, 224, 230, 88], "depth": 19, "n": 2112, "role": "group", "text": "Sort"}, {"box": [99, 228, 222, 20], "depth": 20, "n": 63, "role": "group"}, {"box": [107, 228, 22, 16], "depth": 21, "n": 2069, "role": "text", "text": "Sort"}, {"box": [99, 250, 222, 28], "checked": true, "depth": 20, "n": 832, "role": "checkbox", "text": "Last updated"}, {"box": [108, 256, 16, 16], "depth": 22, "n": 1015, "role": "img"}, {"box": [133, 255, 78, 19], "depth": 23, "n": 1088, "role": "text", "text": "Last updated"}, {"box": [299, 257, 14, 14], "depth": 23, "n": 1312, "role": "img"}, {"box": [99, 280, 222, 28], "checked": false, "depth": 20, "n": 62, "role": "checkbox", "text": "Created"}, {"box": [108, 286, 16, 16], "depth": 22, "n": 831, "role": "img"}, {"box": [133, 285, 47, 19], "depth": 23, "n": 53, "role": "text", "text": "Created"}, {"box": [95, 312, 230, 1], "depth": 19, "n": 1100, "role": "group"}, {"box": [95, 313, 230, 298], "depth": 19, "n": 2110, "role": "group", "text": "Show"}, {"box": [99, 317, 222, 20], "depth": 20, "n": 61, "role": "group"}, {"box": [107, 317, 29, 16], "depth": 21, "n": 2067, "role": "text", "text": "Show"}, {"box": [99, 339, 222, 28], "checked": true, "depth": 20, "n": 830, "role": "checkbox", "text": "Branch"}, {"box": [108, 345, 16, 16], "depth": 22, "n": 1013, "role": "img"}, {"box": [133, 344, 42, 19], "depth": 23, "n": 624, "role": "text", "text": "Branch"}, {"box": [299, 346, 14, 14], "depth": 23, "n": 1309, "role": "img"}, {"box": [99, 369, 222, 28], "checked": true, "depth": 20, "n": 2205, "role": "checkbox", "text": "Pull request"}, {"box": [108, 375, 16, 16], "depth": 22, "n": 2207, "role": "img"}, {"box": [133, 374, 71, 19], "depth": 23, "n": 2211, "role": "text", "text": "Pull request"}, {"box": [299, 376, 14, 14], "depth": 23, "n": 1311, "role": "img"}, {"box": [99, 399, 222, 28], "checked": true, "depth": 20, "n": 2214, "role": "checkbox", "text": "Harness"}, {"box": [108, 405, 16, 16], "depth": 22, "n": 2216, "role": "img"}, {"box": [133, 404, 49, 19], "depth": 23, "n": 2220, "role": "text", "text": "Harness"}, {"box": [299, 406, 14, 14], "depth": 23, "n": 1307, "role": "img"}, {"box": [99, 429, 222, 28], "checked": true, "depth": 20, "n": 2223, "role": "checkbox", "text": "Project icon"}, {"box": [108, 435, 16, 16], "depth": 22, "n": 2225, "role": "img"}, {"box": [133, 434, 70, 19], "depth": 23, "n": 2229, "role": "text", "text": "Project icon"}, {"box": [299, 436, 14, 14], "depth": 23, "n": 1296, "role": "img"}, {"box": [99, 459, 222, 28], "checked": true, "depth": 20, "n": 2232, "role": "checkbox", "text": "Location"}, {"box": [108, 465, 16, 16], "depth": 22, "n": 2234, "role": "img"}, {"box": [133, 464, 51, 19], "depth": 23, "n": 2238, "role": "text", "text": "Location"}, {"box": [299, 466, 14, 14], "depth": 23, "n": 1304, "role": "img"}, {"box": [99, 489, 222, 28], "checked": true, "depth": 20, "n": 2241, "role": "checkbox", "text": "Active when collapsed"}, {"box": [108, 495, 16, 16], "depth": 22, "n": 2243, "role": "img"}, {"box": [133, 494, 134, 19], "depth": 23, "n": 2247, "role": "text", "text": "Active when collapsed"}, {"box": [299, 496, 14, 14], "depth": 23, "n": 1351, "role": "img"}, {"box": [99, 519, 222, 28], "checked": false, "depth": 20, "n": 2250, "role": "checkbox", "text": "Project filter"}, {"box": [108, 525, 16, 16], "depth": 22, "n": 2252, "role": "img"}, {"box": [133, 524, 73, 19], "depth": 23, "n": 2256, "role": "text", "text": "Project filter"}, {"box": [99, 549, 222, 28], "checked": false, "depth": 20, "n": 2259, "role": "checkbox", "text": "Archived"}, {"box": [108, 555, 16, 16], "depth": 22, "n": 2261, "role": "img"}, {"box": [133, 554, 52, 19], "depth": 23, "n": 2265, "role": "text", "text": "Archived"}, {"box": [99, 579, 222, 28], "checked": false, "depth": 20, "n": 2268, "role": "checkbox", "text": "Empty projects"}, {"box": [108, 585, 16, 16], "depth": 22, "n": 2270, "role": "img"}, {"box": [133, 584, 90, 19], "depth": 23, "n": 2274, "role": "text", "text": "Empty projects"}, {"box": [95, 611, 230, 1], "depth": 19, "n": 2277, "role": "group"}, {"box": [99, 616, 222, 28], "depth": 20, "n": 2279, "role": "group", "text": "Compact"}, {"box": [133, 621, 54, 19], "depth": 23, "n": 2283, "role": "text", "text": "Compact"}, {"box": [273, 618, 40, 24], "checked": true, "depth": 21, "n": 2284, "role": "switch", "text": "Compact"}, {"box": [292, 621, 18, 18], "depth": 22, "id": "switch-knob", "n": 2285}, {"box": [99, 646, 222, 28], "depth": 20, "n": 2286, "role": "menuitem", "text": "Create section"}, {"box": [108, 652, 16, 16], "depth": 22, "n": 2288, "role": "img"}, {"box": [133, 651, 86, 19], "depth": 23, "n": 2292, "role": "text", "text": "Create section"}, {"box": [269, 42, 12, 793], "depth": 10, "n": 545, "role": "group", "text": "Resize sidebar"}, {"box": [277, 0, 1043, 38], "depth": 7, "id": "shell-drag", "n": 221}, {"box": [281, 42, 515, 793], "depth": 8, "id": "shell-page-room", "n": 243}, {"box": [281, 42, 515, 793], "depth": 12, "id": "split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 2198}, {"box": [281, 42, 515, 793], "depth": 9, "id": "shell-page", "n": 408}, {"box": [281, 42, 515, 793], "depth": 10, "id": "shell-page-card", "n": 426}, {"box": [282, 43, 513, 791], "depth": 16, "id": "chat-session", "n": 381}, {"box": [282, 43, 513, 751], "depth": 26, "n": 675, "role": "document"}, {"box": [282, 43, 513, 751], "depth": 27, "id": "transcript", "n": 431, "role": "scroll", "text": "Conversation"}, {"box": [302, 59, 473, 92], "depth": 34, "id": "585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9", "n": 2163, "role": "article", "text": "You"}, {"box": [413, 69, 343, 72], "depth": 45, "n": 963, "role": "text", "text": "Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it."}, {"box": [302, 199, 473, 470], "depth": 33, "n": 740, "role": "article", "text": "Reply"}, {"box": [302, 199, 473, 26], "depth": 37, "n": 88, "role": "button", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [302, 204, 251, 17], "depth": 42, "n": 417, "role": "text", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [302, 237, 459, 120], "depth": 44, "n": 962, "role": "text", "text": "Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after."}, {"box": [302, 369, 473, 26], "depth": 37, "n": 2087, "role": "button", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [302, 374, 166, 17], "depth": 42, "n": 734, "role": "text", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [302, 407, 453, 48], "depth": 44, "n": 1042, "role": "text", "text": "Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary."}, {"box": [302, 471, 473, 78], "depth": 43, "n": 1034, "role": "list"}, {"box": [302, 471, 473, 48], "depth": 44, "n": 1060, "role": "listitem", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [302, 471, 24, 24], "depth": 45, "n": 1133, "role": "group"}, {"box": [326, 471, 410, 48], "depth": 47, "n": 1126, "role": "text", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [302, 525, 473, 24], "depth": 44, "n": 1123, "role": "listitem", "text": "5 of 5 tests pass"}, {"box": [302, 525, 24, 24], "depth": 45, "n": 1119, "role": "group"}, {"box": [326, 525, 115, 24], "depth": 47, "n": 2142, "role": "text", "text": "5 of 5 tests pass"}, {"box": [302, 565, 462, 72], "depth": 44, "n": 2136, "role": "text", "text": "This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet."}, {"box": [785, 43, 10, 751], "depth": 25, "id": "transcript-rail", "n": 885, "role": "group"}, {"box": [790, 47, 3, 0], "depth": 26, "n": 425, "role": "group"}, {"box": [282, 745, 513, 81], "depth": 11, "id": "chat-composer-dock", "n": 242}, {"box": [314, 745, 449, 81], "depth": 12, "id": "chat-composer", "n": 239}, {"box": [314, 745, 0, 0], "depth": 22, "n": 122, "role": "tablist"}, {"box": [314, 745, 0, 0], "depth": 22, "n": 153, "role": "button"}, {"box": [314, 745, 0, 0], "depth": 22, "n": 154, "role": "button", "text": "Fold what's waiting"}, {"box": [314, 745, 0, 0], "depth": 23, "n": 155, "role": "img"}, {"box": [314, 745, 0, 0], "depth": 20, "n": 158, "role": "scroll"}, {"box": [314, 745, 0, 0], "depth": 19, "n": 163, "role": "group"}, {"box": [361, 759, 320, 22], "depth": 20, "n": 172, "role": "textbox", "text": "Message", "value": ""}, {"box": [361, 759, 320, 22], "depth": 22, "n": 176, "text": "Ask anything, @ to mention\u2026"}, {"box": [325, 756, 28, 28], "depth": 22, "n": 289, "role": "button", "text": "Attach"}, {"box": [330, 761, 18, 18], "depth": 23, "n": 290, "role": "img"}, {"box": [689, 756, 28, 28], "depth": 22, "id": "dictation-microphone", "n": 718, "role": "button", "text": "Hold to dictate"}, {"box": [694, 761, 18, 18], "depth": 23, "n": 717, "role": "img"}, {"box": [725, 756, 28, 28], "depth": 24, "disabled": true, "n": 729, "role": "button", "text": "Send message"}, {"box": [732, 763, 14, 14], "depth": 25, "n": 719, "role": "img"}, {"box": [314, 802, 449, 24], "depth": 17, "id": "composer-toolbar", "n": 190}, {"box": [324, 802, 93, 24], "depth": 21, "n": 247, "role": "button", "text": "Access"}, {"box": [330, 808, 12, 12], "depth": 25, "n": 293, "role": "img"}, {"box": [348, 805, 63, 17], "depth": 27, "n": 296, "role": "text", "text": "Full access"}, {"box": [421, 802, 150, 24], "depth": 21, "n": 786, "role": "group", "text": "Branch main"}, {"box": [314, 802, 17, 17], "depth": 22, "n": 787, "role": "group"}, {"box": [314, 802, 17, 17], "depth": 23, "n": 1071, "role": "text", "text": "api"}, {"box": [314, 802, 27, 17], "depth": 22, "n": 1068, "role": "group"}, {"box": [314, 802, 27, 17], "depth": 23, "n": 1064, "role": "text", "text": "main"}, {"box": [314, 802, 35, 17], "depth": 22, "n": 1079, "role": "group"}, {"box": [314, 802, 35, 17], "depth": 23, "n": 1135, "role": "text", "text": "studio"}, {"box": [427, 808, 12, 12], "depth": 22, "id": "composer-place-lead", "n": 1160}, {"box": [427, 808, 12, 12], "depth": 26, "n": 911, "role": "img"}, {"box": [445, 805, 35, 17], "depth": 24, "id": "composer-place-device", "n": 303}, {"box": [445, 805, 35, 17], "depth": 25, "id": "composer-place-device", "n": 322}, {"box": [445, 805, 35, 17], "depth": 28, "id": "composer-place-device", "n": 700, "text": "studio"}, {"box": [484, 809, 10, 10], "depth": 24, "n": 384, "role": "group"}, {"box": [484, 809, 10, 10], "depth": 25, "n": 385, "role": "img"}, {"box": [500, 805, 17, 17], "depth": 23, "id": "composer-place-project", "n": 886}, {"box": [500, 805, 17, 17], "depth": 24, "id": "composer-place-project", "n": 676}, {"box": [500, 805, 17, 17], "depth": 27, "id": "composer-place-project", "n": 701, "text": "api"}, {"box": [523, 809, 10, 10], "depth": 25, "n": 2145, "role": "group"}, {"box": [523, 809, 10, 10], "depth": 26, "n": 2187, "role": "img"}, {"box": [537, 805, 28, 17], "depth": 24, "id": "composer-place-branch", "n": 918}, {"box": [537, 805, 27, 17], "depth": 25, "id": "composer-place-branch", "n": 69}, {"box": [537, 805, 27, 17], "depth": 28, "id": "composer-place-branch", "n": 2174, "text": "main"}, {"box": [641, 802, 112, 24], "depth": 23, "n": 874, "role": "button", "text": "Model"}, {"box": [647, 808, 12, 12], "depth": 28, "n": 285, "role": "img"}, {"box": [665, 805, 50, 17], "depth": 30, "n": 773, "role": "text", "text": "Opus 5.5"}, {"box": [721, 805, 26, 17], "depth": 29, "n": 784, "role": "text", "text": "High"}, {"box": [281, 42, 0, 0], "depth": 13, "n": 821, "role": "img"}, {"box": [298, 43, 329, 40], "depth": 11, "id": "session-header", "n": 1083}, {"box": [298, 43, 0, 0], "depth": 12, "id": "page-title", "n": 1165}, {"box": [298, 43, 0, 0], "depth": 15, "n": 2192, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [800, 42, 515, 793], "depth": 7, "id": "shell-files", "n": 234}, {"box": [800, 42, 515, 793], "depth": 10, "id": "panel", "n": 556}, {"box": [801, 43, 513, 791], "depth": 12, "id": "shell-files-content", "n": 558}, {"box": [801, 43, 513, 40], "depth": 14, "id": "panel-strip", "n": 560, "role": "tablist", "text": "Panel tabs"}, {"box": [807, 49, 501, 28], "depth": 16, "n": 562, "role": "scroll"}, {"box": [807, 49, 110, 28], "depth": 23, "id": "panel-tab-chosen", "n": 1161}, {"box": [807, 49, 110, 28], "depth": 22, "id": "panel-tab-tab1", "n": 2095, "role": "tab", "text": "Changes"}, {"box": [814, 56, 14, 14], "depth": 24, "n": 870, "role": "img"}, {"box": [837, 55, 50, 17], "depth": 25, "n": 83, "role": "text", "text": "Changes"}, {"box": [919, 49, 28, 28], "depth": 22, "n": 2086, "role": "button", "text": "New Tab"}, {"box": [926, 56, 14, 14], "depth": 23, "n": 868, "role": "img"}, {"box": [807, 49, 0, 0], "depth": 16, "id": "panel-tab-lifted", "n": 571}, {"box": [801, 83, 513, 751], "depth": 18, "n": 95, "role": "group"}, {"box": [801, 83, 513, 751], "depth": 19, "id": "git-tab", "n": 118}, {"box": [809, 83, 497, 40], "depth": 21, "id": "git-head", "n": 645}, {"box": [809, 91, 399, 24], "depth": 22, "id": "git-scope-group", "n": 646}, {"box": [809, 91, 102, 24], "depth": 23, "id": "git-scope", "n": 1084}, {"box": [809, 91, 102, 24], "depth": 25, "n": 1065, "role": "button", "text": "What changed"}, {"box": [815, 97, 12, 12], "depth": 26, "n": 1069, "role": "img"}, {"box": [833, 94, 72, 17], "depth": 30, "n": 736, "role": "text", "text": "Working tree"}, {"box": [1212, 91, 85, 24], "depth": 22, "id": "git-head-controls", "n": 959}, {"box": [1212, 91, 57, 24], "depth": 23, "id": "git-branch", "n": 1026}, {"box": [1212, 91, 57, 24], "depth": 25, "n": 785, "role": "button", "text": "Branch"}, {"box": [1218, 97, 12, 12], "depth": 26, "n": 782, "role": "img"}, {"box": [1236, 94, 27, 17], "depth": 30, "n": 739, "role": "text", "text": "main"}, {"box": [1273, 91, 24, 24], "depth": 25, "id": "git-more", "n": 2162, "role": "button", "text": "More"}, {"box": [1277, 95, 16, 16], "depth": 26, "n": 2158, "role": "img"}, {"box": [809, 131, 497, 695], "depth": 23, "id": "git-changes", "n": 2176}, {"box": [822, 144, 16, 16], "checked": false, "depth": 29, "n": 109, "role": "checkbox", "text": "Stage all"}, {"box": [824, 146, 12, 12], "depth": 33, "n": 1900, "role": "img"}, {"box": [846, 144, 100, 17], "depth": 31, "n": 881, "role": "text", "text": "2 files in 2 folders"}, {"box": [1198, 144, 39, 16], "depth": 32, "n": 988, "role": "group", "text": "12 added, 1 removed"}, {"box": [1198, 144, 20, 16], "depth": 33, "n": 1027, "role": "text", "text": "+12"}, {"box": [1224, 144, 13, 16], "depth": 33, "n": 935, "role": "text", "text": "\u22121"}, {"box": [1245, 140, 52, 24], "depth": 29, "id": "diff-view", "n": 269}, {"box": [1245, 140, 24, 24], "checked": false, "depth": 31, "n": 455, "role": "checkbox", "text": "Side by side"}, {"box": [1249, 144, 16, 16], "depth": 32, "n": 916, "role": "img"}, {"box": [1273, 140, 24, 24], "checked": false, "depth": 31, "n": 275, "role": "checkbox", "text": "Wrap long lines"}, {"box": [1277, 144, 16, 16], "depth": 32, "n": 915, "role": "img"}, {"box": [810, 172, 495, 1], "depth": 28, "n": 307, "role": "group"}, {"box": [814, 177, 487, 28], "depth": 30, "n": 2195, "role": "group"}, {"box": [822, 184, 14, 14], "depth": 31, "n": 319, "role": "group"}, {"box": [822, 184, 14, 14], "depth": 32, "n": 311, "role": "img"}, {"box": [844, 177, 453, 28], "depth": 31, "n": 298, "role": "textbox", "text": "Search", "value": ""}, {"box": [844, 183, 455, 28], "depth": 33, "n": 814, "text": "Filter files"}, {"box": [810, 209, 495, 1], "depth": 28, "n": 1024, "role": "group"}, {"box": [810, 210, 495, 504], "depth": 28, "id": "git-changes-list", "n": 361}, {"box": [810, 210, 495, 504], "depth": 30, "n": 970, "role": "scroll"}, {"box": [810, 210, 495, 36], "depth": 34, "n": 1047, "role": "button", "text": "src, 1 files"}, {"box": [822, 221, 14, 14], "depth": 36, "n": 1043, "role": "img"}, {"box": [844, 220, 17, 17], "depth": 37, "n": 1008, "role": "text", "text": "src"}, {"box": [1286, 220, 7, 16], "depth": 35, "n": 1007, "role": "text", "text": "1"}, {"box": [810, 246, 495, 30], "depth": 35, "n": 1124, "role": "button", "text": "src/window.ts"}, {"box": [822, 253, 16, 16], "checked": false, "depth": 42, "n": 2132, "role": "checkbox", "text": "src/window.ts"}, {"box": [824, 255, 12, 12], "depth": 46, "n": 94, "role": "img"}, {"box": [846, 253, 14, 17], "depth": 43, "n": 50, "role": "text", "text": "M"}, {"box": [868, 252, 60, 19], "depth": 44, "n": 2091, "role": "text", "text": "window.ts"}, {"box": [1205, 253, 32, 16], "depth": 42, "n": 2089, "role": "group", "text": "3 added, 1 removed"}, {"box": [1205, 253, 13, 16], "depth": 43, "n": 2085, "role": "text", "text": "+3"}, {"box": [1224, 253, 13, 16], "depth": 43, "n": 2079, "role": "text", "text": "\u22121"}, {"box": [1249, 250, 22, 22], "depth": 42, "n": 864, "role": "button", "text": "Discard changes"}, {"box": [1253, 254, 14, 14], "depth": 43, "n": 859, "role": "img"}, {"box": [1279, 254, 14, 14], "depth": 40, "n": 379, "role": "img"}, {"box": [810, 276, 495, 24], "depth": 34, "n": 2125, "role": "group", "text": "@@ -20,7 +20,9 @@ export class SlidingWindow {"}, {"box": [822, 280, 112, 16], "depth": 35, "n": 2119, "role": "text", "text": "@@ -20,7 +20,9 @@"}, {"box": [946, 280, 185, 16], "depth": 35, "n": 2118, "role": "text", "text": "export class SlidingWindow {"}, {"box": [810, 300, 495, 22], "depth": 34, "n": 67, "role": "group", "text": " estimate(now = Date.now()): number {"}, {"box": [834, 303, 36, 16], "depth": 35, "n": 2076, "role": "text", "text": "20"}, {"box": [886, 303, 274, 17], "depth": 36, "n": 837, "role": "text", "text": " estimate(now = Date.now()): number {"}, {"box": [810, 300, 495, 22], "depth": 35, "n": 836, "role": "group"}, {"box": [810, 322, 495, 22], "depth": 34, "n": 348, "role": "group", "text": " this.roll(now);"}, {"box": [834, 325, 36, 16], "depth": 35, "n": 1019, "role": "text", "text": "21"}, {"box": [886, 325, 137, 17], "depth": 36, "n": 1000, "role": "text", "text": " this.roll(now);"}, {"box": [810, 322, 495, 22], "depth": 35, "n": 1140, "role": "group"}, {"box": [810, 344, 495, 22], "depth": 34, "n": 2117, "role": "group", "text": " const into = (now - this.start) / this.windowMs;"}, {"box": [834, 347, 36, 16], "depth": 35, "n": 2107, "role": "text", "text": "22"}, {"box": [886, 347, 374, 17], "depth": 36, "n": 835, "role": "text", "text": " const into = (now - this.start) / this.windowMs;"}, {"box": [810, 344, 495, 22], "depth": 35, "n": 731, "role": "group"}, {"box": [810, 366, 495, 22], "depth": 34, "n": 1018, "role": "group", "text": "- return this.current + this.previous * Math.floor(1 - into);"}, {"box": [834, 369, 36, 16], "depth": 35, "n": 907, "role": "text", "text": "23"}, {"box": [870, 369, 16, 17], "depth": 35, "n": 803, "role": "text", "text": "-"}, {"box": [886, 369, 454, 17], "depth": 36, "n": 1136, "role": "text", "text": " return this.current + this.previous * Math.floor(1 - into);"}, {"box": [810, 366, 495, 22], "depth": 35, "n": 1106, "role": "group"}, {"box": [810, 388, 495, 22], "depth": 34, "n": 2116, "role": "group", "text": "+ // The previous window counts for the part of it that still overlaps the"}, {"box": [834, 391, 36, 16], "depth": 35, "n": 72, "role": "text", "text": "23"}, {"box": [870, 391, 16, 17], "depth": 35, "n": 2106, "role": "text", "text": "+"}, {"box": [886, 391, 547, 17], "depth": 36, "n": 2073, "role": "text", "text": " // The previous window counts for the part of it that still overlaps the"}, {"box": [810, 388, 495, 22], "depth": 35, "n": 894, "role": "group"}, {"box": [810, 410, 495, 22], "depth": 34, "n": 730, "role": "group", "text": "+ // last `windowMs`. Rounding that share down dropped it at every roll."}, {"box": [834, 413, 36, 16], "depth": 35, "n": 953, "role": "text", "text": "24"}, {"box": [870, 413, 16, 17], "depth": 35, "n": 1001, "role": "text", "text": "+"}, {"box": [886, 413, 533, 17], "depth": 36, "n": 1054, "role": "text", "text": " // last `windowMs`. Rounding that share down dropped it at every roll."}, {"box": [810, 410, 495, 22], "depth": 35, "n": 1051, "role": "group"}, {"box": [810, 432, 495, 22], "depth": 34, "n": 805, "role": "group", "text": "+ return this.current + this.previous * (1 - into);"}, {"box": [834, 435, 36, 16], "depth": 35, "n": 1138, "role": "text", "text": "25"}, {"box": [870, 435, 16, 17], "depth": 35, "n": 1137, "role": "text", "text": "+"}, {"box": [886, 435, 382, 17], "depth": 36, "n": 2152, "role": "text", "text": " return this.current + this.previous * (1 - into);"}, {"box": [810, 432, 495, 22], "depth": 35, "n": 2148, "role": "group"}, {"box": [810, 454, 495, 22], "depth": 34, "n": 145, "role": "group", "text": " }"}, {"box": [834, 457, 36, 16], "depth": 35, "n": 70, "role": "text", "text": "26"}, {"box": [886, 457, 22, 17], "depth": 36, "n": 2104, "role": "text", "text": " }"}, {"box": [810, 454, 495, 22], "depth": 35, "n": 2072, "role": "group"}, {"box": [810, 476, 495, 22], "depth": 34, "n": 892, "role": "group", "text": " "}, {"box": [834, 479, 36, 16], "depth": 35, "n": 727, "role": "text", "text": "27"}, {"box": [810, 476, 495, 22], "depth": 35, "n": 1003, "role": "group"}, {"box": [810, 498, 495, 22], "depth": 34, "n": 1059, "role": "group", "text": " /** Counts one request, or refuses it when the window is full. */"}, {"box": [834, 501, 36, 16], "depth": 35, "n": 944, "role": "text", "text": "28"}, {"box": [886, 501, 482, 17], "depth": 36, "n": 806, "role": "text", "text": " /** Counts one request, or refuses it when the window is full. */"}, {"box": [810, 498, 495, 22], "depth": 35, "n": 1141, "role": "group"}, {"box": [810, 520, 495, 36], "depth": 34, "n": 940, "role": "button", "text": "test, 1 files"}, {"box": [822, 531, 14, 14], "depth": 36, "n": 980, "role": "img"}, {"box": [844, 530, 23, 17], "depth": 37, "n": 1039, "role": "text", "text": "test"}, {"box": [1286, 530, 7, 16], "depth": 35, "n": 1036, "role": "text", "text": "1"}, {"box": [810, 556, 495, 30], "depth": 35, "n": 1130, "role": "button", "text": "test/window.test.ts"}, {"box": [822, 563, 16, 16], "checked": false, "depth": 42, "n": 81, "role": "checkbox", "text": "test/window.test.ts"}, {"box": [824, 565, 12, 12], "depth": 46, "n": 2078, "role": "img"}, {"box": [846, 563, 14, 17], "depth": 43, "n": 404, "role": "text", "text": "M"}, {"box": [868, 562, 86, 19], "depth": 44, "n": 966, "role": "text", "text": "window.test.ts"}, {"box": [1205, 563, 32, 16], "depth": 42, "n": 978, "role": "group", "text": "9 added, 0 removed"}, {"box": [1205, 563, 13, 16], "depth": 43, "n": 992, "role": "text", "text": "+9"}, {"box": [1224, 563, 13, 16], "depth": 43, "n": 1045, "role": "text", "text": "\u22120"}, {"box": [1249, 560, 22, 22], "depth": 42, "n": 1116, "role": "button", "text": "Discard changes"}, {"box": [1253, 564, 14, 14], "depth": 43, "n": 1110, "role": "img"}, {"box": [1279, 564, 14, 14], "depth": 40, "n": 35, "role": "img"}, {"box": [1295, 210, 10, 504], "depth": 29, "id": "git-changes-list-rail", "n": 973, "role": "group"}, {"box": [1300, 214, 3, 0], "depth": 30, "n": 938, "role": "group"}, {"box": [809, 740, 497, 34], "depth": 31, "n": 904, "role": "group"}, {"box": [820, 747, 475, 20], "depth": 32, "n": 2159, "role": "textbox", "text": "Commit message", "value": ""}, {"box": [820, 747, 475, 20], "depth": 34, "n": 297, "text": "What changed, and why"}, {"box": [820, 741, 475, 20], "depth": 32, "n": 2184, "role": "group"}, {"box": [820, 741, 475, 20], "depth": 33, "n": 2177, "role": "text", "text": "\u200b"}, {"box": [1281, 780, 25, 14], "depth": 33, "n": 1156, "role": "text", "text": "0/50"}, {"box": [809, 802, 497, 24], "depth": 30, "id": "git-dock-foot", "n": 1074}, {"box": [809, 805, 18, 18], "depth": 35, "n": 430, "role": "group", "text": "Mara Okafor"}, {"box": [835, 806, 70, 17], "depth": 37, "n": 126, "role": "text", "text": "Mara Okafor"}, {"box": [1225, 802, 81, 24], "depth": 31, "id": "git-commit", "n": 878}, {"box": [1229, 802, 56, 24], "depth": 33, "disabled": true, "n": 818, "role": "button", "text": "Commit"}, {"box": [1286, 802, 20, 24], "depth": 34, "disabled": true, "n": 347, "role": "button", "text": "More options"}, {"box": [1289, 807, 14, 14], "depth": 36, "n": 852, "role": "img"}, {"box": [788, 42, 20, 793], "depth": 7, "n": 236, "role": "slider", "text": "Resize files", "value": "515 points wide"}, {"box": [132, 4, 1188, 34], "depth": 8, "id": "session-tabs", "n": 223, "role": "tablist", "text": "Open chats"}, {"box": [132, 7, 921, 28], "depth": 10, "id": "session-tabs-scroll", "n": 225, "role": "scroll"}, {"box": [132, 7, 220, 28], "depth": 17, "id": "session-tab-chosen", "n": 1078}, {"box": [132, 7, 220, 28], "depth": 16, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 817, "role": "tab", "text": "Fix burst at the rate limit boundary"}, {"box": [136, 11, 20, 20], "depth": 18, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1", "n": 2196}, {"box": [136, 11, 20, 20], "depth": 26, "n": 2175, "role": "img"}, {"box": [162, 13, 193, 17], "depth": 19, "n": 928, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [132, 7, 0, 0], "depth": 10, "id": "session-tab-lifted", "n": 219}, {"box": [1061, 7, 81, 28], "depth": 11, "id": "updates-button", "n": 586, "role": "button", "text": "3 updates"}, {"box": [1095, 11, 20, 20], "depth": 14, "id": "updates-mark-3", "n": 677}, {"box": [1095, 11, 20, 20], "depth": 15, "n": 678, "role": "img"}, {"box": [1095, 11, 20, 20], "depth": 15, "id": "updates-mark-3-glyph", "n": 680}, {"box": [1100, 16, 11, 11], "depth": 18, "n": 703, "role": "img"}, {"box": [1080, 11, 20, 20], "depth": 14, "id": "updates-mark-2", "n": 682}, {"box": [1080, 11, 20, 20], "depth": 15, "n": 683, "role": "img"}, {"box": [1080, 11, 20, 20], "depth": 15, "id": "updates-mark-2-glyph", "n": 685}, {"box": [1085, 16, 11, 11], "depth": 18, "n": 706, "role": "img"}, {"box": [1065, 11, 20, 20], "depth": 14, "id": "updates-mark-1", "n": 687}, {"box": [1065, 11, 20, 20], "depth": 15, "id": "updates-mark-1-glyph", "n": 689}, {"box": [1070, 16, 11, 11], "depth": 18, "n": 709, "role": "img"}, {"box": [1120, 13, 16, 16], "depth": 15, "n": 692, "role": "img"}, {"box": [1150, 9, 24, 24], "depth": 12, "id": "panel-expand", "n": 399, "role": "button", "text": "Expand panel"}, {"box": [1155, 14, 14, 14], "depth": 13, "n": 396, "role": "img"}, {"box": [0, 0, 1320, 0], "depth": 5, "id": "titlebar", "n": 216}, {"box": [6, 7, 90, 28], "depth": 7, "id": "titlebar-island", "n": 218}, {"box": [10, 9, 24, 24], "depth": 9, "n": 200, "role": "button", "text": "Toggle sidebar"}, {"box": [42, 9, 24, 24], "depth": 9, "n": 207, "role": "button", "text": "Back"}, {"box": [44, 11, 21, 21], "depth": 10, "n": 206, "role": "img"}, {"box": [68, 9, 24, 24], "depth": 9, "disabled": true, "n": 196, "role": "button", "text": "Forward"}, {"box": [70, 11, 21, 21], "depth": 10, "n": 193, "role": "img"}, {"box": [1178, 0, 142, 40], "depth": 7, "id": "titlebar-actions-island", "n": 326}, {"box": [1182, 9, 24, 24], "depth": 8, "id": "titlebar-actions", "n": 321}, {"box": [1182, 9, 24, 24], "depth": 11, "n": 595, "role": "button", "text": "Panel"}, {"box": [1147, 39, 94, 31], "depth": 13, "n": 1903, "role": "dialog", "text": "Tooltip"}, {"box": [1158, 46, 72, 17], "depth": 16, "n": 2093, "role": "text", "text": "Panel Ctrl+R"}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-palette", "n": 603}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-add-project", "n": 605}, {"box": [340, 88, 640, 172], "depth": 10, "n": 14, "role": "dialog", "text": "Command palette"}, {"box": [340, 88, 640, 172], "depth": 13, "id": "command-palette", "n": 18}, {"box": [354, 107, 16, 16], "depth": 17, "n": 1011, "role": "img"}, {"box": [379, 103, 98, 24], "depth": 19, "n": 1017, "role": "button", "text": "Back from New project"}, {"box": [385, 109, 12, 12], "depth": 21, "n": 265, "role": "img"}, {"box": [401, 107, 68, 17], "depth": 20, "n": 111, "role": "text", "text": "New project"}, {"box": [481, 103, 65, 24], "depth": 19, "n": 359, "role": "button", "text": "Back from studio"}, {"box": [487, 109, 12, 12], "depth": 21, "n": 113, "role": "img"}, {"box": [503, 107, 35, 17], "depth": 20, "n": 120, "role": "text", "text": "studio"}, {"box": [550, 103, 63, 24], "depth": 19, "n": 819, "role": "button", "text": "Back from Home"}, {"box": [556, 109, 12, 12], "depth": 21, "n": 147, "role": "img"}, {"box": [572, 107, 33, 17], "depth": 20, "n": 873, "role": "text", "text": "Home"}, {"box": [617, 103, 58, 24], "depth": 19, "n": 121, "role": "button", "text": "Back from code"}, {"box": [623, 109, 12, 12], "depth": 21, "n": 97, "role": "img"}, {"box": [639, 107, 28, 17], "depth": 20, "n": 847, "role": "text", "text": "code"}, {"box": [682, 101, 285, 28], "depth": 15, "id": "palette-search", "n": 25, "role": "textbox", "text": "Search", "value": "api"}, {"box": [682, 105, 287, 21], "depth": 17, "n": 29, "text": "api"}, {"box": [341, 141, 638, 1], "depth": 14, "n": 32, "role": "group"}, {"box": [341, 142, 638, 76], "depth": 15, "id": "palette-list", "n": 17, "role": "scroll"}, {"box": [353, 154, 614, 14], "depth": 20, "n": 851, "role": "text", "text": "Folders"}, {"box": [345, 174, 630, 36], "depth": 20, "n": 1037, "role": "option", "text": "api"}, {"box": [354, 184, 16, 16], "depth": 22, "n": 860, "role": "img"}, {"box": [379, 183, 18, 19], "depth": 26, "n": 849, "role": "text", "text": "api"}, {"box": [953, 185, 14, 14], "depth": 22, "n": 1012, "role": "img"}, {"box": [341, 218, 638, 1], "depth": 14, "n": 41, "role": "group"}, {"box": [353, 230, 36, 18], "depth": 17, "n": 267, "role": "img", "text": "Enter"}, {"box": [353, 230, 36, 18], "depth": 18, "n": 1029, "role": "group"}, {"box": [357, 231, 28, 16], "depth": 19, "n": 309, "role": "text", "text": "Enter"}, {"box": [395, 231, 27, 16], "depth": 17, "n": 39, "role": "text", "text": "Open"}, {"box": [438, 230, 65, 18], "depth": 17, "n": 1028, "role": "img", "text": "Ctrl Enter"}, {"box": [438, 230, 27, 18], "depth": 18, "n": 146, "role": "group"}, {"box": [442, 231, 19, 16], "depth": 19, "n": 305, "role": "text", "text": "Ctrl"}, {"box": [467, 230, 36, 18], "depth": 18, "n": 116, "role": "group"}, {"box": [471, 231, 28, 16], "depth": 19, "n": 117, "role": "text", "text": "Enter"}, {"box": [509, 231, 58, 16], "depth": 17, "n": 112, "role": "text", "text": "Add project"}, {"box": [908, 230, 26, 18], "depth": 16, "n": 54, "role": "img", "text": "esc"}, {"box": [908, 230, 26, 18], "depth": 17, "n": 55, "role": "group"}, {"box": [912, 231, 18, 16], "depth": 18, "n": 56, "role": "text", "text": "esc"}, {"box": [940, 231, 27, 16], "depth": 16, "n": 57, "role": "text", "text": "Clear"}]
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/session/tree.txt b/apps/landing/tools/recreate/reference/session/tree.txt
deleted file mode 100644
index 59672d7d5..000000000
--- a/apps/landing/tools/recreate/reference/session/tree.txt
+++ /dev/null
@@ -1,477 +0,0 @@
- @6 dialog "Zeron" 0,0 1320x840
- @7 #host-toasts 1304,824 0x0
- @409 #shell 0,0 1320x840
- @410 #shell-chats 0,0 1320x840
- @468 #shell-sidebar 0,0 277x840
- @473 #sidebar-content 5,42 272x793
- @474 #sidebar-actions 13,50 256x94
- @476 button "New chat" 13,50 256x30
- @480 img 20,57 16x16
- @486 text "New chat" 43,56 57x19
- @487 text "Ctrl+N" 228,57 33x16
- @490 button "Search" 13,82 256x30
- @494 img 20,89 16x16
- @500 text "Search" 43,88 42x19
- @501 text "Ctrl+K" 229,89 32x16
- @609 button "Pull requests" 13,114 256x30
- @695 img 20,121 16x16
- @618 text "Pull requests" 43,120 77x19
- @507 #sidebar 13,160 256x627
- @1287 scroll 13,160 256x627
- @1292 button "Projects" 13,160 256x24
- @1289 text "Projects" 21,164 43x16
- @1282 button "api" 13,186 256x30
- @2617 img 19,192 18x18
- @1271 text "api" 43,192 18x19
- @1343 button "Fix burst at the rate limit boundary" 13,218 256x30
- @2763 img 42,226 14x14
- @2627 text "Fix burst at the rate limit boundary" 64,224 209x19
- @1244 group 232,233 0x0
- @2629 text "now" 240,225 21x16
- @2631 img 64,244 11x11 hidden
- @1231 text "studio · main" 79,241 63x16 hidden
- @1218 button "Return a real Retry-After" 13,250 256x30
- @2766 img 42,258 14x14
- @2638 text "Return a real Retry-After" 64,256 150x19
- @1206 group 237,265 0x0
- @2641 group "Completed" 245,257 16x16
- @2643 img 246,258 14x14
- @2646 img 64,276 11x11 hidden
- @1194 text "studio · main" 79,273 63x16 hidden
- @1182 button "Sweep idle keys without a timer" 13,282 256x30
- @2769 img 42,290 14x14
- @2653 text "Sweep idle keys without a timer" 64,288 193x19
- @398 group 237,297 0x0
- @2656 group "Working" 245,289 16x16
- @2660 img 64,308 11x11 hidden
- @2300 text "studio · main" 79,305 63x16 hidden
- @2313 button "web" 13,314 256x30
- @2663 img 19,320 18x18
- @2328 text "web" 43,320 26x19
- @2345 button "Speed up the dashboard's first paint" 13,346 256x30
- @2772 img 42,354 14x14
- @2673 text "Speed up the dashboard's first paint" 64,352 220x19
- @2361 group 237,361 0x0
- @2676 group "Working" 245,353 16x16
- @2680 img 64,372 11x11 hidden
- @2374 text "studio · main" 79,369 63x16 hidden
- @2388 button "Add dark mode to settings" 13,378 256x30
- @2775 img 42,386 14x14
- @2687 text "Add dark mode to settings" 64,384 161x19
- @2404 group 237,393 0x0
- @2690 group "Completed" 245,385 16x16
- @2692 img 246,386 14x14
- @2695 img 64,404 11x11 hidden
- @2417 text "studio · main" 79,401 63x16 hidden
- @2430 button "uptime" 13,410 256x30
- @2698 img 19,416 18x18
- @2445 text "uptime" 43,416 43x19
- @2462 button "Page only when two regions agree" 13,442 256x30
- @2778 img 42,450 14x14
- @2708 text "Page only when two regions agree" 64,448 208x19
- @2478 group 237,457 0x0
- @2711 group "Completed" 245,449 16x16
- @2713 img 246,450 14x14
- @2716 img 64,468 11x11 hidden
- @2491 text "studio · main" 79,465 63x16 hidden
- @2505 button "Why Frankfurt flapped overnight" 13,474 256x30
- @2781 img 42,482 14x14
- @2723 text "Why Frankfurt flapped overnight" 64,480 197x19
- @2521 group 237,489 0x0
- @2726 group "Completed" 245,481 16x16
- @2728 img 246,482 14x14
- @2731 img 64,500 11x11 hidden
- @2534 text "studio · main" 79,497 63x16 hidden
- @2547 button "docs" 13,506 256x30
- @2734 img 19,512 18x18
- @2562 text "docs" 43,512 29x19
- @2579 button "Write up the October incident" 13,538 256x30
- @2784 img 42,546 14x14
- @2744 text "Write up the October incident" 64,544 179x19
- @2595 group 237,553 0x0
- @2747 group "Completed" 245,545 16x16
- @2749 img 246,546 14x14
- @2752 img 64,564 11x11 hidden
- @2608 text "studio · main" 79,561 63x16 hidden
- @522 button "Local" 13,797 224x30 focused
- @698 group "Local" 18,802 20x20
- @531 text "Local" 43,803 33x19
- @534 checkbox "Settings" 239,797 30x30 unchecked
- @535 img 246,804 16x16
- @537 #sidebar-drag 5,0 272x42
- @541 button "Sidebar view options" 94,9 24x24
- @542 img 98,13 16x16
- @395 dialog "Tooltip" 38,-28 137x31 hidden
- @762 text "Sidebar view options" 49,-21 115x17 hidden
- @801 dialog "Sidebar view options" 94,37 232x642 hidden
- @1109 checkbox "Activity" 99,42 222x28 hidden unchecked
- @2151 img 108,48 16x16 hidden
- @2108 text "Activity" 133,47 45x19 hidden
- @838 button "Activity settings…" 99,72 222x28 hidden
- @350 img 108,78 16x16 hidden
- @949 text "Activity settings…" 133,77 103x19 hidden
- @184 group 95,104 230x1 hidden
- @40 group "Organize" 95,105 230x118 hidden
- @809 group 99,109 222x20 hidden
- @1103 text "Organize" 107,109 46x16 hidden
- @797 checkbox "By project" 99,131 222x28 hidden checked
- @1323 img 108,137 16x16 hidden
- @1324 text "By project" 133,136 60x19 hidden
- @1301 img 299,138 14x14 hidden
- @1321 checkbox "By device" 99,161 222x28 hidden unchecked
- @1318 img 108,167 16x16 hidden
- @1314 text "By device" 133,166 57x19 hidden
- @64 checkbox "None" 99,191 222x28 hidden unchecked
- @833 img 108,197 16x16 hidden
- @42 text "None" 133,196 32x19 hidden
- @1102 group 95,223 230x1 hidden
- @2112 group "Sort" 95,224 230x88 hidden
- @63 group 99,228 222x20 hidden
- @2069 text "Sort" 107,228 22x16 hidden
- @832 checkbox "Last updated" 99,250 222x28 hidden checked
- @1015 img 108,256 16x16 hidden
- @1088 text "Last updated" 133,255 78x19 hidden
- @1312 img 299,257 14x14 hidden
- @62 checkbox "Created" 99,280 222x28 hidden unchecked
- @831 img 108,286 16x16 hidden
- @53 text "Created" 133,285 47x19 hidden
- @1100 group 95,312 230x1 hidden
- @2110 group "Show" 95,313 230x298 hidden
- @61 group 99,317 222x20 hidden
- @2067 text "Show" 107,317 29x16 hidden
- @830 checkbox "Branch" 99,339 222x28 hidden checked
- @1013 img 108,345 16x16 hidden
- @624 text "Branch" 133,344 42x19 hidden
- @1309 img 299,346 14x14 hidden
- @2205 checkbox "Pull request" 99,369 222x28 hidden checked
- @2207 img 108,375 16x16 hidden
- @2211 text "Pull request" 133,374 71x19 hidden
- @1311 img 299,376 14x14 hidden
- @2214 checkbox "Harness" 99,399 222x28 hidden checked
- @2216 img 108,405 16x16 hidden
- @2220 text "Harness" 133,404 49x19 hidden
- @1307 img 299,406 14x14 hidden
- @2223 checkbox "Project icon" 99,429 222x28 hidden checked
- @2225 img 108,435 16x16 hidden
- @2229 text "Project icon" 133,434 70x19 hidden
- @1296 img 299,436 14x14 hidden
- @2232 checkbox "Location" 99,459 222x28 hidden checked
- @2234 img 108,465 16x16 hidden
- @2238 text "Location" 133,464 51x19 hidden
- @1304 img 299,466 14x14 hidden
- @2241 checkbox "Active when collapsed" 99,489 222x28 hidden checked
- @2243 img 108,495 16x16 hidden
- @2247 text "Active when collapsed" 133,494 134x19 hidden
- @1351 img 299,496 14x14 hidden
- @2250 checkbox "Project filter" 99,519 222x28 hidden unchecked
- @2252 img 108,525 16x16 hidden
- @2256 text "Project filter" 133,524 73x19 hidden
- @2259 checkbox "Archived" 99,549 222x28 hidden unchecked
- @2261 img 108,555 16x16 hidden
- @2265 text "Archived" 133,554 52x19 hidden
- @2268 checkbox "Empty projects" 99,579 222x28 hidden unchecked
- @2270 img 108,585 16x16 hidden
- @2274 text "Empty projects" 133,584 90x19 hidden
- @2277 group 95,611 230x1 hidden
- @2279 group "Compact" 99,616 222x28 hidden
- @2283 text "Compact" 133,621 54x19 hidden
- @2284 switch "Compact" 273,618 40x24 hidden checked
- @2285 #switch-knob 292,621 18x18 hidden
- @2286 menuitem "Create section" 99,646 222x28 hidden
- @2288 img 108,652 16x16 hidden
- @2292 text "Create section" 133,651 86x19 hidden
- @545 group "Resize sidebar" 269,42 12x793
- @221 #shell-drag 277,0 1043x38
- @243 #shell-page-room 281,42 515x793
- @2198 #split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8 281,42 515x793
- @408 #shell-page 281,42 515x793
- @426 #shell-page-card 281,42 515x793
- @381 #chat-session 282,43 513x791
- @675 document 282,43 513x751
- @431 #transcript scroll "Conversation" 282,43 513x751
- @2163 #585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9 article "You" 302,59 473x92
- @963 text "Clients can send about twice the limit if they time it aroun…" 413,69 343x72
- @740 article "Reply" 302,199 473x470
- @88 button "Thought process · ran 1 command · read 2 files" 302,199 473x26
- @417 text "Thought process · ran 1 command · read 2 files" 302,204 251x17
- @962 text "Found it. estimate() weights the previous window by Math.flo…" 302,237 459x120
- @2087 button "Ran 1 command · edited 2 files" 302,369 473x26
- @734 text "Ran 1 command · edited 2 files" 302,374 166x17
- @1042 text "Fixed in src/window.ts: the previous window now counts for t…" 302,407 453x48
- @1034 list 302,471 473x78
- @1060 listitem "test/window.test.ts fills a window in its last 10 ms, then c…" 302,471 473x48
- @1133 group 302,471 24x24
- @1126 text "test/window.test.ts fills a window in its last 10 ms, then c…" 326,471 410x48
- @1123 listitem "5 of 5 tests pass" 302,525 473x24
- @1119 group 302,525 24x24
- @2142 text "5 of 5 tests pass" 326,525 115x24
- @2136 text "This matches the October incident: a client at the limit got…" 302,565 462x72
- @885 #transcript-rail group 785,43 10x751 hidden
- @425 group 790,47 3x0 hidden
- @242 #chat-composer-dock 282,745 513x81
- @239 #chat-composer 314,745 449x81
- @122 tablist 314,745 0x0 hidden
- @153 button 314,745 0x0 hidden
- @154 button "Fold what's waiting" 314,745 0x0 hidden
- @155 img 314,745 0x0 hidden
- @158 scroll 314,745 0x0 hidden
- @163 group 314,745 0x0 hidden
- @172 textbox "Message" ="" 361,759 320x22
- @176 "Ask anything, @ to mention…" 361,759 320x22
- @289 button "Attach" 325,756 28x28
- @290 img 330,761 18x18
- @718 #dictation-microphone button "Hold to dictate" 689,756 28x28
- @717 img 694,761 18x18
- @729 button "Send message" 725,756 28x28 disabled
- @719 img 732,763 14x14
- @190 #composer-toolbar 314,802 449x24
- @247 button "Access" 324,802 93x24
- @293 img 330,808 12x12
- @296 text "Full access" 348,805 63x17
- @786 group "Branch main" 421,802 150x24
- @787 group 314,802 17x17 hidden
- @1071 text "api" 314,802 17x17 hidden
- @1068 group 314,802 27x17 hidden
- @1064 text "main" 314,802 27x17 hidden
- @1079 group 314,802 35x17 hidden
- @1135 text "studio" 314,802 35x17 hidden
- @1160 #composer-place-lead 427,808 12x12
- @911 img 427,808 12x12
- @303 #composer-place-device 445,805 35x17
- @322 #composer-place-device 445,805 35x17
- @700 #composer-place-device "studio" 445,805 35x17
- @384 group 484,809 10x10
- @385 img 484,809 10x10
- @886 #composer-place-project 500,805 17x17
- @676 #composer-place-project 500,805 17x17
- @701 #composer-place-project "api" 500,805 17x17
- @2145 group 523,809 10x10
- @2187 img 523,809 10x10
- @918 #composer-place-branch 537,805 28x17
- @69 #composer-place-branch 537,805 27x17
- @2174 #composer-place-branch "main" 537,805 27x17
- @874 button "Model" 641,802 112x24
- @285 img 647,808 12x12
- @773 text "Opus 5.5" 665,805 50x17
- @784 text "High" 721,805 26x17
- @821 img 281,42 0x0 hidden
- @1083 #session-header 298,43 329x40
- @1165 #page-title 298,43 0x0 hidden
- @2192 text "Fix burst at the rate limit boundary" 298,43 0x0 hidden
- @234 #shell-files 800,42 515x793
- @556 #panel 800,42 515x793
- @558 #shell-files-content 801,43 513x791
- @560 #panel-strip tablist "Panel tabs" 801,43 513x40
- @562 scroll 807,49 501x28
- @1161 #panel-tab-chosen 807,49 110x28
- @2095 #panel-tab-tab1 tab "Changes" 807,49 110x28
- @870 img 814,56 14x14
- @83 text "Changes" 837,55 50x17
- @2086 button "New Tab" 919,49 28x28
- @868 img 926,56 14x14
- @571 #panel-tab-lifted 807,49 0x0 hidden
- @95 group 801,83 513x751
- @118 #git-tab 801,83 513x751
- @645 #git-head 809,83 497x40
- @646 #git-scope-group 809,91 399x24
- @1084 #git-scope 809,91 102x24
- @1065 button "What changed" 809,91 102x24
- @1069 img 815,97 12x12
- @736 text "Working tree" 833,94 72x17
- @959 #git-head-controls 1212,91 85x24
- @1026 #git-branch 1212,91 57x24
- @785 button "Branch" 1212,91 57x24
- @782 img 1218,97 12x12
- @739 text "main" 1236,94 27x17
- @2162 #git-more button "More" 1273,91 24x24
- @2158 img 1277,95 16x16
- @2176 #git-changes 809,131 497x695
- @109 checkbox "Stage all" 822,144 16x16 unchecked
- @1900 img 824,146 12x12 hidden
- @881 text "2 files in 2 folders" 846,144 100x17
- @988 group "12 added, 1 removed" 1198,144 39x16
- @1027 text "+12" 1198,144 20x16
- @935 text "−1" 1224,144 13x16
- @269 #diff-view 1245,140 52x24
- @455 checkbox "Side by side" 1245,140 24x24 unchecked
- @916 img 1249,144 16x16
- @275 checkbox "Wrap long lines" 1273,140 24x24 unchecked
- @915 img 1277,144 16x16
- @307 group 810,172 495x1
- @2195 group 814,177 487x28
- @319 group 822,184 14x14
- @311 img 822,184 14x14
- @298 textbox "Search" ="" 844,177 453x28
- @814 "Filter files" 844,183 455x28
- @1024 group 810,209 495x1
- @361 #git-changes-list 810,210 495x504
- @970 scroll 810,210 495x504
- @1047 button "src, 1 files" 810,210 495x36
- @1043 img 822,221 14x14
- @1008 text "src" 844,220 17x17
- @1007 text "1" 1286,220 7x16
- @1124 button "src/window.ts" 810,246 495x30
- @2132 checkbox "src/window.ts" 822,253 16x16 unchecked
- @94 img 824,255 12x12 hidden
- @50 text "M" 846,253 14x17
- @2091 text "window.ts" 868,252 60x19
- @2089 group "3 added, 1 removed" 1205,253 32x16
- @2085 text "+3" 1205,253 13x16
- @2079 text "−1" 1224,253 13x16
- @864 button "Discard changes" 1249,250 22x22 hidden
- @859 img 1253,254 14x14 hidden
- @379 img 1279,254 14x14
- @2125 group "@@ -20,7 +20,9 @@ export class SlidingWindow {" 810,276 495x24
- @2119 text "@@ -20,7 +20,9 @@" 822,280 112x16
- @2118 text "export class SlidingWindow {" 946,280 185x16
- @67 group " estimate(now = Date.now()): number {" 810,300 495x22
- @2076 text "20" 834,303 36x16
- @837 text " estimate(now = Date.now()): number {" 886,303 274x17
- @836 group 810,300 495x22 hidden
- @348 group " this.roll(now);" 810,322 495x22
- @1019 text "21" 834,325 36x16
- @1000 text " this.roll(now);" 886,325 137x17
- @1140 group 810,322 495x22 hidden
- @2117 group " const into = (now - this.start) / this.windowMs;" 810,344 495x22
- @2107 text "22" 834,347 36x16
- @835 text " const into = (now - this.start) / this.windowMs;" 886,347 374x17
- @731 group 810,344 495x22 hidden
- @1018 group "- return this.current + this.previous * Math.floor(1 - in…" 810,366 495x22
- @907 text "23" 834,369 36x16
- @803 text "-" 870,369 16x17
- @1136 text " return this.current + this.previous * Math.floor(1 - int…" 886,369 454x17
- @1106 group 810,366 495x22 hidden
- @2116 group "+ // The previous window counts for the part of it that s…" 810,388 495x22
- @72 text "23" 834,391 36x16
- @2106 text "+" 870,391 16x17
- @2073 text " // The previous window counts for the part of it that st…" 886,391 547x17
- @894 group 810,388 495x22 hidden
- @730 group "+ // last `windowMs`. Rounding that share down dropped it…" 810,410 495x22
- @953 text "24" 834,413 36x16
- @1001 text "+" 870,413 16x17
- @1054 text " // last `windowMs`. Rounding that share down dropped it …" 886,413 533x17
- @1051 group 810,410 495x22 hidden
- @805 group "+ return this.current + this.previous * (1 - into);" 810,432 495x22
- @1138 text "25" 834,435 36x16
- @1137 text "+" 870,435 16x17
- @2152 text " return this.current + this.previous * (1 - into);" 886,435 382x17
- @2148 group 810,432 495x22 hidden
- @145 group " }" 810,454 495x22
- @70 text "26" 834,457 36x16
- @2104 text " }" 886,457 22x17
- @2072 group 810,454 495x22 hidden
- @892 group " " 810,476 495x22
- @727 text "27" 834,479 36x16
- @1003 group 810,476 495x22 hidden
- @1059 group " /** Counts one request, or refuses it when the window is …" 810,498 495x22
- @944 text "28" 834,501 36x16
- @806 text " /** Counts one request, or refuses it when the window is f…" 886,501 482x17
- @1141 group 810,498 495x22 hidden
- @940 button "test, 1 files" 810,520 495x36
- @980 img 822,531 14x14
- @1039 text "test" 844,530 23x17
- @1036 text "1" 1286,530 7x16
- @1130 button "test/window.test.ts" 810,556 495x30
- @81 checkbox "test/window.test.ts" 822,563 16x16 unchecked
- @2078 img 824,565 12x12 hidden
- @404 text "M" 846,563 14x17
- @966 text "window.test.ts" 868,562 86x19
- @978 group "9 added, 0 removed" 1205,563 32x16
- @992 text "+9" 1205,563 13x16
- @1045 text "−0" 1224,563 13x16
- @1116 button "Discard changes" 1249,560 22x22 hidden
- @1110 img 1253,564 14x14 hidden
- @35 img 1279,564 14x14
- @973 #git-changes-list-rail group 1295,210 10x504 hidden
- @938 group 1300,214 3x0 hidden
- @904 group 809,740 497x34
- @2159 textbox "Commit message" ="" 820,747 475x20
- @297 "What changed, and why" 820,747 475x20
- @2184 group 820,741 475x20 hidden
- @2177 text "\u{200b}" 820,741 475x20 hidden
- @1156 text "0/50" 1281,780 25x14
- @1074 #git-dock-foot 809,802 497x24
- @430 group "Mara Okafor" 809,805 18x18
- @126 text "Mara Okafor" 835,806 70x17
- @878 #git-commit 1225,802 81x24
- @818 button "Commit" 1229,802 56x24 disabled
- @347 button "More options" 1286,802 20x24 disabled
- @852 img 1289,807 14x14
- @236 slider "Resize files" ="515 points wide" 788,42 20x793
- @223 #session-tabs tablist "Open chats" 132,4 1188x34
- @225 #session-tabs-scroll scroll 132,7 921x28
- @1078 #session-tab-chosen 132,7 220x28
- @817 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8 tab "Fix burst at the rate limit boundary" 132,7 220x28
- @2196 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1 136,11 20x20
- @2175 img 136,11 20x20
- @928 text "Fix burst at the rate limit boundary" 162,13 193x17
- @219 #session-tab-lifted 132,7 0x0 hidden
- @586 #updates-button button "3 updates" 1061,7 81x28
- @677 #updates-mark-3 1095,11 20x20
- @678 img 1095,11 20x20
- @680 #updates-mark-3-glyph 1095,11 20x20
- @703 img 1100,16 11x11
- @682 #updates-mark-2 1080,11 20x20
- @683 img 1080,11 20x20
- @685 #updates-mark-2-glyph 1080,11 20x20
- @706 img 1085,16 11x11
- @687 #updates-mark-1 1065,11 20x20
- @689 #updates-mark-1-glyph 1065,11 20x20
- @709 img 1070,16 11x11
- @692 img 1120,13 16x16
- @399 #panel-expand button "Expand panel" 1150,9 24x24
- @396 img 1155,14 14x14
- @216 #titlebar 0,0 1320x0
- @218 #titlebar-island 6,7 90x28 hidden
- @200 button "Toggle sidebar" 10,9 24x24
- @207 button "Back" 42,9 24x24
- @206 img 44,11 21x21
- @196 button "Forward" 68,9 24x24 disabled
- @193 img 70,11 21x21
- @326 #titlebar-actions-island 1178,0 142x40 hidden
- @321 #titlebar-actions 1182,9 24x24
- @595 button "Panel" 1182,9 24x24
- @1903 dialog "Tooltip" 1147,39 94x31 hidden
- @2093 text "Panel Ctrl+R" 1158,46 72x17 hidden
- @603 #shell-palette 0,0 0x0
- @605 #shell-add-project 0,0 0x0
- @14 dialog "Command palette" 340,88 640x172 hidden
- @18 #command-palette 340,88 640x172 hidden
- @1011 img 354,107 16x16 hidden
- @1017 button "Back from New project" 379,103 98x24 hidden
- @265 img 385,109 12x12 hidden
- @111 text "New project" 401,107 68x17 hidden
- @359 button "Back from studio" 481,103 65x24 hidden
- @113 img 487,109 12x12 hidden
- @120 text "studio" 503,107 35x17 hidden
- @819 button "Back from Home" 550,103 63x24 hidden
- @147 img 556,109 12x12 hidden
- @873 text "Home" 572,107 33x17 hidden
- @121 button "Back from code" 617,103 58x24 hidden
- @97 img 623,109 12x12 hidden
- @847 text "code" 639,107 28x17 hidden
- @25 #palette-search textbox "Search" ="api" 682,101 285x28 hidden
- @29 "api" 682,105 287x21 hidden
- @32 group 341,141 638x1 hidden
- @17 #palette-list scroll 341,142 638x76 hidden
- @851 text "Folders" 353,154 614x14 hidden
- @1037 option "api" 345,174 630x36 hidden
- @860 img 354,184 16x16 hidden
- @849 text "api" 379,183 18x19 hidden
- @1012 img 953,185 14x14 hidden
- @41 group 341,218 638x1 hidden
- @267 img "Enter" 353,230 36x18 hidden
- @1029 group 353,230 36x18 hidden
- @309 text "Enter" 357,231 28x16 hidden
- @39 text "Open" 395,231 27x16 hidden
- @1028 img "Ctrl Enter" 438,230 65x18 hidden
- @146 group 438,230 27x18 hidden
- @305 text "Ctrl" 442,231 19x16 hidden
- @116 group 467,230 36x18 hidden
- @117 text "Enter" 471,231 28x16 hidden
- @112 text "Add project" 509,231 58x16 hidden
- @54 img "esc" 908,230 26x18 hidden
- @55 group 908,230 26x18 hidden
- @56 text "esc" 912,231 18x16 hidden
- @57 text "Clear" 940,231 27x16 hidden
-
diff --git a/apps/landing/tools/recreate/reference/themes/offsets.json b/apps/landing/tools/recreate/reference/themes/offsets.json
deleted file mode 100644
index 380846cf5..000000000
--- a/apps/landing/tools/recreate/reference/themes/offsets.json
+++ /dev/null
@@ -1 +0,0 @@
-{"1488": [0.0, -0.5], "1502": [0.0, -0.5], "1899": [0.0, -0.5], "2014": [0.0, -0.5], "1102": [0.0, -0.5], "1105": [0.0, -0.5], "746": [0.0, -0.5], "1112": [0.0, -0.5], "1116": [0.0, -0.5], "1123": [0.0, -0.5], "802": [0.0, -0.5], "1149": [0.0, -0.5], "1188": [0.0, -0.5], "864": [0.0, -0.5], "1192": [0.0, -0.5], "1908": [-0.5, -0.5], "1754": [-0.5, -0.5], "1996": [-0.5, -0.5], "1494": [0.0, -0.5], "1508": [0.0, -0.5], "1729": [0.0, -0.5], "302": [0.0, -0.5], "687": [0.0, -0.5], "719": [0.0, -0.5], "109": [0.0, -0.5], "761": [0.0, -0.5], "780": [0.0, -0.5], "782": [-0.5, 0.0], "791": [0.0, -0.5], "335": [0.0, -0.5], "813": [0.0, -0.5], "845": [0.0, -0.5], "491": [0.5, -0.5], "907": [0.0, -0.5], "1539": [0.0, -0.5], "946": [0.0, 0.5], "1214": [0.0, 0.5], "1228": [0.0, 0.5], "1238": [0.0, 0.5], "1243": [0.0, 0.5], "1608": [-0.5, -0.5], "1318": [0.5, 0.0]}
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/themes/ref-catppuccin.png b/apps/landing/tools/recreate/reference/themes/ref-catppuccin.png
deleted file mode 100644
index feae2c951..000000000
Binary files a/apps/landing/tools/recreate/reference/themes/ref-catppuccin.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-dracula.png b/apps/landing/tools/recreate/reference/themes/ref-dracula.png
deleted file mode 100644
index 5213be83e..000000000
Binary files a/apps/landing/tools/recreate/reference/themes/ref-dracula.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-github-light.png b/apps/landing/tools/recreate/reference/themes/ref-github-light.png
deleted file mode 100644
index ec0610633..000000000
Binary files a/apps/landing/tools/recreate/reference/themes/ref-github-light.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-gruvbox.png b/apps/landing/tools/recreate/reference/themes/ref-gruvbox.png
deleted file mode 100644
index db10f29be..000000000
Binary files a/apps/landing/tools/recreate/reference/themes/ref-gruvbox.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-tokyo-night.png b/apps/landing/tools/recreate/reference/themes/ref-tokyo-night.png
deleted file mode 100644
index e4dbabf9a..000000000
Binary files a/apps/landing/tools/recreate/reference/themes/ref-tokyo-night.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/themes/ref-zeron-dark.png b/apps/landing/tools/recreate/reference/themes/ref-zeron-dark.png
deleted file mode 100644
index a8feb668c..000000000
Binary files a/apps/landing/tools/recreate/reference/themes/ref-zeron-dark.png and /dev/null differ
diff --git a/apps/landing/tools/recreate/reference/themes/tree.json b/apps/landing/tools/recreate/reference/themes/tree.json
deleted file mode 100644
index d513fb4c8..000000000
--- a/apps/landing/tools/recreate/reference/themes/tree.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"box": [0, 0, 1320, 840], "depth": 5, "n": 6, "role": "dialog", "text": "Zeron"}, {"box": [1304, 824, 0, 0], "depth": 6, "id": "host-toasts", "n": 7}, {"box": [0, 0, 1320, 840], "depth": 3, "id": "shell", "n": 1385}, {"box": [0, 0, 1320, 840], "depth": 4, "id": "shell-chats", "n": 1386}, {"box": [0, 0, 277, 840], "depth": 8, "id": "shell-sidebar", "n": 1476}, {"box": [5, 42, 272, 793], "depth": 12, "id": "sidebar-content", "n": 1481}, {"box": [13, 50, 256, 94], "depth": 13, "id": "sidebar-actions", "n": 1482}, {"box": [13, 50, 256, 30], "depth": 15, "n": 1484, "role": "button", "text": "New chat"}, {"box": [20, 57, 16, 16], "depth": 19, "n": 1488, "role": "img"}, {"box": [43, 56, 57, 19], "depth": 21, "n": 1494, "role": "text", "text": "New chat"}, {"box": [228, 57, 33, 16], "depth": 19, "n": 1495, "role": "text", "text": "Ctrl+N"}, {"box": [13, 82, 256, 30], "depth": 15, "n": 1498, "role": "button", "text": "Search"}, {"box": [20, 89, 16, 16], "depth": 19, "n": 1502, "role": "img"}, {"box": [43, 88, 42, 19], "depth": 21, "n": 1508, "role": "text", "text": "Search"}, {"box": [229, 89, 32, 16], "depth": 19, "n": 1509, "role": "text", "text": "Ctrl+K"}, {"box": [13, 114, 256, 30], "depth": 17, "n": 1720, "role": "button", "text": "Pull requests"}, {"box": [20, 121, 16, 16], "depth": 23, "n": 1899, "role": "img"}, {"box": [43, 120, 77, 19], "depth": 23, "n": 1729, "role": "text", "text": "Pull requests"}, {"box": [13, 160, 256, 627], "depth": 13, "id": "sidebar", "n": 1515}, {"box": [13, 160, 256, 627], "depth": 17, "n": 1732, "role": "scroll"}, {"box": [13, 160, 256, 24], "depth": 23, "n": 52, "role": "button", "text": "Projects"}, {"box": [21, 164, 43, 16], "depth": 26, "n": 21, "role": "text", "text": "Projects"}, {"box": [13, 186, 256, 30], "depth": 25, "n": 88, "role": "button", "text": "web"}, {"box": [19, 192, 18, 18], "depth": 35, "n": 2014, "role": "img"}, {"box": [43, 192, 26, 19], "depth": 31, "n": 302, "role": "text", "text": "web"}, {"box": [13, 218, 256, 30], "depth": 26, "n": 1137, "role": "button", "text": "Speed up the dashboard's first paint"}, {"box": [42, 226, 14, 14], "depth": 37, "n": 1102, "role": "img"}, {"box": [64, 224, 220, 19], "depth": 36, "n": 687, "role": "text", "text": "Speed up the dashboard's first paint"}, {"box": [237, 233, 0, 0], "depth": 31, "n": 978, "role": "group"}, {"box": [245, 225, 16, 16], "depth": 36, "n": 697, "role": "group", "text": "Completed"}, {"box": [246, 226, 14, 14], "depth": 38, "n": 700, "role": "img"}, {"box": [64, 244, 11, 11], "depth": 34, "n": 709, "role": "img"}, {"box": [79, 241, 63, 16], "depth": 34, "n": 1142, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 250, 256, 30], "depth": 26, "n": 966, "role": "button", "text": "Add dark mode to settings"}, {"box": [42, 258, 14, 14], "depth": 37, "n": 1105, "role": "img"}, {"box": [64, 256, 161, 19], "depth": 36, "n": 719, "role": "text", "text": "Add dark mode to settings"}, {"box": [237, 265, 0, 0], "depth": 31, "n": 141, "role": "group"}, {"box": [245, 257, 16, 16], "depth": 36, "n": 723, "role": "group", "text": "Completed"}, {"box": [246, 258, 14, 14], "depth": 38, "n": 728, "role": "img"}, {"box": [64, 276, 11, 11], "depth": 34, "n": 732, "role": "img"}, {"box": [79, 273, 63, 16], "depth": 34, "n": 137, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 282, 256, 30], "depth": 25, "n": 122, "role": "button", "text": "api"}, {"box": [19, 288, 18, 18], "depth": 35, "n": 746, "role": "img"}, {"box": [43, 288, 18, 19], "depth": 31, "n": 109, "role": "text", "text": "api"}, {"box": [13, 314, 256, 30], "depth": 26, "n": 955, "role": "button", "text": "Sweep idle keys without a timer"}, {"box": [42, 322, 14, 14], "depth": 37, "n": 1112, "role": "img"}, {"box": [64, 320, 193, 19], "depth": 36, "n": 761, "role": "text", "text": "Sweep idle keys without a timer"}, {"box": [237, 329, 0, 0], "depth": 31, "n": 250, "role": "group"}, {"box": [245, 321, 16, 16], "depth": 36, "n": 767, "role": "group", "text": "Completed"}, {"box": [246, 322, 14, 14], "depth": 38, "n": 770, "role": "img"}, {"box": [64, 340, 11, 11], "depth": 34, "n": 773, "role": "img"}, {"box": [79, 337, 63, 16], "depth": 34, "n": 188, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 346, 256, 30], "depth": 26, "n": 206, "role": "button", "text": "Fix burst at the rate limit boundary"}, {"box": [42, 354, 14, 14], "depth": 37, "n": 1116, "role": "img"}, {"box": [64, 352, 209, 19], "depth": 36, "n": 780, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [230, 361, 0, 0], "depth": 31, "n": 224, "role": "group"}, {"box": [238, 353, 23, 16], "depth": 35, "n": 782, "role": "text", "text": "30m"}, {"box": [64, 372, 11, 11], "depth": 34, "n": 784, "role": "img"}, {"box": [79, 369, 63, 16], "depth": 34, "n": 239, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 378, 256, 30], "depth": 26, "n": 273, "role": "button", "text": "Return a real Retry-After"}, {"box": [42, 386, 14, 14], "depth": 37, "n": 1123, "role": "img"}, {"box": [64, 384, 150, 19], "depth": 36, "n": 791, "role": "text", "text": "Return a real Retry-After"}, {"box": [237, 393, 0, 0], "depth": 31, "n": 290, "role": "group"}, {"box": [245, 385, 16, 16], "depth": 36, "n": 794, "role": "group", "text": "Completed"}, {"box": [246, 386, 14, 14], "depth": 38, "n": 796, "role": "img"}, {"box": [64, 404, 11, 11], "depth": 34, "n": 799, "role": "img"}, {"box": [79, 401, 63, 16], "depth": 34, "n": 307, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 410, 256, 30], "depth": 25, "n": 320, "role": "button", "text": "uptime"}, {"box": [19, 416, 18, 18], "depth": 35, "n": 802, "role": "img"}, {"box": [43, 416, 43, 19], "depth": 31, "n": 335, "role": "text", "text": "uptime"}, {"box": [13, 442, 256, 30], "depth": 26, "n": 353, "role": "button", "text": "Page only when two regions agree"}, {"box": [42, 450, 14, 14], "depth": 37, "n": 1149, "role": "img"}, {"box": [64, 448, 208, 19], "depth": 36, "n": 813, "role": "text", "text": "Page only when two regions agree"}, {"box": [237, 457, 0, 0], "depth": 31, "n": 370, "role": "group"}, {"box": [245, 449, 16, 16], "depth": 36, "n": 817, "role": "group", "text": "Completed"}, {"box": [246, 450, 14, 14], "depth": 38, "n": 819, "role": "img"}, {"box": [64, 468, 11, 11], "depth": 34, "n": 828, "role": "img"}, {"box": [79, 465, 63, 16], "depth": 34, "n": 384, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 474, 256, 30], "depth": 26, "n": 399, "role": "button", "text": "Why Frankfurt flapped overnight"}, {"box": [42, 482, 14, 14], "depth": 37, "n": 1188, "role": "img"}, {"box": [64, 480, 197, 19], "depth": 36, "n": 845, "role": "text", "text": "Why Frankfurt flapped overnight"}, {"box": [237, 489, 0, 0], "depth": 31, "n": 423, "role": "group"}, {"box": [245, 481, 16, 16], "depth": 36, "n": 851, "role": "group", "text": "Completed"}, {"box": [246, 482, 14, 14], "depth": 38, "n": 854, "role": "img"}, {"box": [64, 500, 11, 11], "depth": 34, "n": 861, "role": "img"}, {"box": [79, 497, 63, 16], "depth": 34, "n": 450, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 506, 256, 30], "depth": 25, "n": 476, "role": "button", "text": "docs"}, {"box": [19, 512, 18, 18], "depth": 35, "n": 864, "role": "img"}, {"box": [43, 512, 29, 19], "depth": 31, "n": 491, "role": "text", "text": "docs"}, {"box": [13, 538, 256, 30], "depth": 26, "n": 519, "role": "button", "text": "Write up the October incident"}, {"box": [42, 546, 14, 14], "depth": 37, "n": 1192, "role": "img"}, {"box": [64, 544, 179, 19], "depth": 36, "n": 907, "role": "text", "text": "Write up the October incident"}, {"box": [237, 553, 0, 0], "depth": 31, "n": 550, "role": "group"}, {"box": [245, 545, 16, 16], "depth": 36, "n": 923, "role": "group", "text": "Completed"}, {"box": [246, 546, 14, 14], "depth": 38, "n": 936, "role": "img"}, {"box": [64, 564, 11, 11], "depth": 34, "n": 942, "role": "img"}, {"box": [79, 561, 63, 16], "depth": 34, "n": 611, "role": "text", "text": "studio \u00b7 main"}, {"box": [13, 797, 224, 30], "depth": 17, "n": 1530, "role": "button", "text": "Local"}, {"box": [18, 802, 20, 20], "depth": 26, "n": 1902, "role": "group", "text": "Local"}, {"box": [43, 803, 33, 19], "depth": 23, "n": 1539, "role": "text", "text": "Local"}, {"box": [239, 797, 30, 30], "checked": false, "depth": 17, "n": 1542, "role": "checkbox", "text": "Settings"}, {"box": [246, 804, 16, 16], "depth": 18, "n": 1543, "role": "img"}, {"box": [5, 0, 272, 42], "depth": 11, "id": "sidebar-drag", "n": 1545}, {"box": [94, 9, 24, 24], "depth": 14, "n": 1549, "role": "button", "text": "Sidebar view options"}, {"box": [98, 13, 16, 16], "depth": 15, "n": 1550, "role": "img"}, {"box": [269, 42, 12, 793], "depth": 10, "n": 1553, "role": "group", "text": "Resize sidebar"}, {"box": [277, 0, 1043, 38], "depth": 7, "id": "shell-drag", "n": 1391}, {"box": [281, 42, 1034, 793], "depth": 8, "id": "shell-page-room", "n": 1393}, {"box": [281, 42, 1034, 793], "depth": 12, "id": "split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 1561}, {"box": [281, 42, 1034, 793], "depth": 9, "id": "shell-page", "n": 1396}, {"box": [281, 42, 1034, 793], "depth": 10, "id": "shell-page-card", "n": 1397}, {"box": [282, 43, 1032, 791], "depth": 16, "id": "chat-session", "n": 1903}, {"box": [282, 43, 1032, 751], "depth": 26, "n": 1181, "role": "document"}, {"box": [282, 43, 1032, 751], "depth": 27, "id": "transcript", "n": 1176, "role": "scroll", "text": "Conversation"}, {"box": [456, 59, 684, 68], "depth": 34, "id": "585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9", "n": 634, "role": "article", "text": "You"}, {"box": [609, 69, 473, 48], "depth": 45, "n": 946, "role": "text", "text": "Clients can send about twice the limit if they time it around a window boundary. Find out why and fix it."}, {"box": [456, 175, 684, 398], "depth": 33, "n": 661, "role": "article", "text": "Reply"}, {"box": [456, 175, 684, 26], "depth": 37, "n": 1063, "role": "button", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [456, 180, 251, 17], "depth": 42, "n": 1198, "role": "text", "text": "Thought process \u00b7 ran 1 command \u00b7 read 2 files"}, {"box": [456, 213, 674, 72], "depth": 44, "n": 1209, "role": "text", "text": "Found it. estimate() weights the previous window by Math.floor(1 - into), and that is 0 the moment a new window starts. One millisecond after the boundary the last window's requests stop counting, so a client that fills a window right before it ends can fill the next one right after."}, {"box": [456, 297, 684, 26], "depth": 37, "n": 1084, "role": "button", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [456, 302, 166, 17], "depth": 42, "n": 1203, "role": "text", "text": "Ran 1 command \u00b7 edited 2 files"}, {"box": [456, 335, 669, 48], "depth": 44, "n": 1214, "role": "text", "text": "Fixed in src/window.ts: the previous window now counts for the share of it that still overlaps, so the limit holds across a boundary."}, {"box": [456, 399, 684, 78], "depth": 43, "n": 1217, "role": "list"}, {"box": [456, 399, 684, 48], "depth": 44, "n": 1218, "role": "listitem", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [456, 399, 24, 24], "depth": 45, "n": 1221, "role": "group"}, {"box": [480, 399, 647, 48], "depth": 47, "n": 1228, "role": "text", "text": "test/window.test.ts fills a window in its last 10 ms, then checks that only one more request gets through after it rolls"}, {"box": [456, 453, 684, 24], "depth": 44, "n": 1229, "role": "listitem", "text": "5 of 5 tests pass"}, {"box": [456, 453, 24, 24], "depth": 45, "n": 1232, "role": "group"}, {"box": [480, 453, 115, 24], "depth": 47, "n": 1238, "role": "text", "text": "5 of 5 tests pass"}, {"box": [456, 493, 675, 48], "depth": 44, "n": 1243, "role": "text", "text": "This matches the October incident: a client at the limit got about twice its rate for as long as it kept landing on the boundary. Nothing is committed yet."}, {"box": [456, 553, 84, 17], "depth": 39, "n": 1037, "role": "text", "text": "Nov 17, 9:15 AM"}, {"box": [548, 549, 24, 24], "depth": 41, "n": 1098, "role": "button", "text": "Copy message"}, {"box": [553, 554, 14, 14], "depth": 42, "n": 1099, "role": "img"}, {"box": [1304, 43, 10, 751], "depth": 25, "id": "transcript-rail", "n": 1239, "role": "group"}, {"box": [1309, 47, 3, 0], "depth": 26, "n": 685, "role": "group"}, {"box": [282, 745, 1032, 81], "depth": 11, "id": "chat-composer-dock", "n": 1404}, {"box": [468, 745, 660, 81], "depth": 12, "id": "chat-composer", "n": 1405}, {"box": [468, 745, 0, 0], "depth": 22, "n": 1578, "role": "tablist"}, {"box": [468, 745, 0, 0], "depth": 22, "n": 1585, "role": "button"}, {"box": [468, 745, 0, 0], "depth": 22, "n": 1586, "role": "button", "text": "Fold what's waiting"}, {"box": [468, 745, 0, 0], "depth": 23, "n": 1587, "role": "img"}, {"box": [468, 745, 0, 0], "depth": 20, "n": 1590, "role": "scroll"}, {"box": [468, 745, 0, 0], "depth": 19, "n": 1595, "role": "group"}, {"box": [515, 759, 531, 22], "depth": 20, "focused": true, "n": 1604, "role": "textbox", "text": "Message", "value": ""}, {"box": [515, 759, 531, 22], "depth": 22, "n": 1608, "text": "Ask anything, @ to mention\u2026"}, {"box": [479, 756, 28, 28], "depth": 22, "n": 1907, "role": "button", "text": "Attach"}, {"box": [484, 761, 18, 18], "depth": 23, "n": 1908, "role": "img"}, {"box": [1054, 756, 28, 28], "depth": 22, "id": "dictation-microphone", "n": 1753, "role": "button", "text": "Hold to dictate"}, {"box": [1059, 761, 18, 18], "depth": 23, "n": 1754, "role": "img"}, {"box": [1090, 756, 28, 28], "depth": 24, "disabled": true, "n": 1995, "role": "button", "text": "Send message"}, {"box": [1097, 763, 14, 14], "depth": 25, "n": 1996, "role": "img"}, {"box": [468, 802, 660, 24], "depth": 17, "id": "composer-toolbar", "n": 1621}, {"box": [478, 802, 93, 24], "depth": 21, "n": 1626, "role": "button", "text": "Access"}, {"box": [484, 808, 12, 12], "depth": 25, "n": 1911, "role": "img"}, {"box": [502, 805, 63, 17], "depth": 27, "n": 1914, "role": "text", "text": "Full access"}, {"box": [575, 802, 150, 24], "depth": 21, "n": 1764, "role": "group", "text": "Branch main"}, {"box": [468, 802, 17, 17], "depth": 22, "n": 931, "role": "group"}, {"box": [468, 802, 17, 17], "depth": 23, "n": 1138, "role": "text", "text": "api"}, {"box": [468, 802, 27, 17], "depth": 22, "n": 2612, "role": "group"}, {"box": [468, 802, 27, 17], "depth": 23, "n": 928, "role": "text", "text": "main"}, {"box": [468, 802, 35, 17], "depth": 22, "n": 959, "role": "group"}, {"box": [468, 802, 35, 17], "depth": 23, "n": 962, "role": "text", "text": "studio"}, {"box": [581, 808, 12, 12], "depth": 22, "id": "composer-place-lead", "n": 953}, {"box": [581, 808, 12, 12], "depth": 26, "n": 71, "role": "img"}, {"box": [599, 805, 35, 17], "depth": 24, "id": "composer-place-device", "n": 1164}, {"box": [599, 805, 35, 17], "depth": 25, "id": "composer-place-device", "n": 2035}, {"box": [599, 805, 35, 17], "depth": 28, "id": "composer-place-device", "n": 1342, "text": "studio"}, {"box": [638, 809, 10, 10], "depth": 24, "n": 1368, "role": "group"}, {"box": [638, 809, 10, 10], "depth": 25, "n": 1174, "role": "img"}, {"box": [654, 805, 17, 17], "depth": 23, "id": "composer-place-project", "n": 1671}, {"box": [654, 805, 17, 17], "depth": 24, "id": "composer-place-project", "n": 1327}, {"box": [654, 805, 17, 17], "depth": 27, "id": "composer-place-project", "n": 1133, "text": "api"}, {"box": [677, 809, 10, 10], "depth": 25, "n": 1166, "role": "group"}, {"box": [677, 809, 10, 10], "depth": 26, "n": 952, "role": "img"}, {"box": [691, 805, 28, 17], "depth": 24, "id": "composer-place-branch", "n": 1172}, {"box": [691, 805, 27, 17], "depth": 25, "id": "composer-place-branch", "n": 664}, {"box": [691, 805, 27, 17], "depth": 28, "id": "composer-place-branch", "n": 1082, "text": "main"}, {"box": [1006, 802, 112, 24], "depth": 23, "n": 473, "role": "button", "text": "Model"}, {"box": [1012, 808, 12, 12], "depth": 28, "n": 65, "role": "img"}, {"box": [1030, 805, 50, 17], "depth": 30, "n": 150, "role": "text", "text": "Opus 5.5"}, {"box": [1086, 805, 26, 17], "depth": 29, "n": 1318, "role": "text", "text": "High"}, {"box": [281, 42, 0, 0], "depth": 13, "n": 1641, "role": "img"}, {"box": [298, 43, 848, 40], "depth": 11, "id": "session-header", "n": 1643}, {"box": [298, 43, 0, 0], "depth": 12, "id": "page-title", "n": 1644}, {"box": [298, 43, 0, 0], "depth": 15, "n": 1647, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [1315, 42, 0, 793], "depth": 7, "id": "shell-files", "n": 1419}, {"box": [1315, 42, 0, 0], "depth": 10, "id": "panel", "n": 1648}, {"box": [1315, 42, 0, 0], "depth": 12, "id": "shell-files-content", "n": 1650}, {"box": [1315, 42, 0, 0], "depth": 14, "id": "panel-strip", "n": 1652, "role": "tablist", "text": "Panel tabs"}, {"box": [1315, 42, 0, 0], "depth": 16, "n": 1654, "role": "scroll"}, {"box": [1315, 42, 0, 0], "depth": 16, "id": "panel-tab-lifted", "n": 1663}, {"box": [1315, 42, 0, 0], "depth": 17, "id": "panel-empty", "n": 1792, "role": "group", "text": "Session home"}, {"box": [1315, 42, 0, 548], "depth": 21, "id": "panel-home-block", "n": 1796}, {"box": [1331, 74, 0, 94], "depth": 22, "id": "panel-home-info", "n": 1797}, {"box": [1331, 74, 16, 30], "depth": 23, "id": "panel-home-device", "n": 1798, "role": "group", "text": "studio"}, {"box": [1340, 81, 16, 16], "depth": 27, "n": 1938, "role": "img"}, {"box": [1331, 106, 0, 30], "depth": 27, "id": "panel-home-project", "n": 1942, "role": "group", "text": "api"}, {"box": [1340, 113, 16, 16], "depth": 33, "n": 1980, "role": "img"}, {"box": [1331, 138, 0, 30], "depth": 26, "id": "panel-home-branch", "n": 1950, "role": "group", "text": "main"}, {"box": [1339, 144, 18, 18], "depth": 28, "n": 1952, "role": "img"}, {"box": [1381, 141, 0, 24], "depth": 27, "id": "panel-home-branch-slot", "n": 1955}, {"box": [1381, 141, 45, 24], "depth": 32, "id": "git-branch-totals", "n": 739, "role": "button", "text": "12 lines added, 1 removed: open the branch's changes"}, {"box": [1385, 145, 20, 16], "depth": 33, "n": 744, "role": "text", "text": "+12"}, {"box": [1409, 145, 13, 16], "depth": 33, "n": 742, "role": "text", "text": "\u22121"}, {"box": [1331, 168, 0, 0], "depth": 25, "id": "panel-home-details", "n": 1959}, {"box": [1331, 192, 0, 66], "depth": 23, "id": "panel-home-actions", "n": 1963}, {"box": [1339, 198, 0, 16], "depth": 25, "n": 1965, "role": "text", "text": "Actions"}, {"box": [1331, 226, 0, 30], "depth": 24, "id": "panel-home-add-action", "n": 1971, "role": "button", "text": "Add action"}, {"box": [1339, 232, 18, 18], "depth": 26, "n": 1973, "role": "img"}, {"box": [1331, 282, 0, 252], "depth": 22, "id": "panel-home-open", "n": 1807}, {"box": [1339, 288, 0, 16], "depth": 24, "n": 1809, "role": "text", "text": "Open"}, {"box": [1331, 312, 0, 30], "depth": 24, "id": "panel-open-browser", "n": 1811, "role": "button", "text": "Browser"}, {"box": [1339, 318, 18, 18], "depth": 26, "n": 1813, "role": "img"}, {"box": [1381, 317, 20, 20], "depth": 25, "n": 1816, "role": "img", "text": "B"}, {"box": [1381, 317, 20, 20], "depth": 26, "n": 1817, "role": "group"}, {"box": [1387, 319, 8, 17], "depth": 27, "n": 1818, "role": "text", "text": "B"}, {"box": [1331, 344, 0, 30], "depth": 24, "id": "panel-open-files", "n": 1819, "role": "button", "text": "File viewer"}, {"box": [1339, 350, 18, 18], "depth": 26, "n": 1821, "role": "img"}, {"box": [1381, 349, 20, 20], "depth": 25, "n": 1824, "role": "img", "text": "F"}, {"box": [1381, 349, 20, 20], "depth": 26, "n": 1825, "role": "group"}, {"box": [1387, 351, 7, 17], "depth": 27, "n": 1826, "role": "text", "text": "F"}, {"box": [1331, 376, 0, 30], "depth": 24, "id": "panel-open-terminal", "n": 1827, "role": "button", "text": "Terminal"}, {"box": [1339, 382, 18, 18], "depth": 26, "n": 1829, "role": "img"}, {"box": [1381, 381, 20, 20], "depth": 25, "n": 1832, "role": "img", "text": "T"}, {"box": [1381, 381, 20, 20], "depth": 26, "n": 1833, "role": "group"}, {"box": [1388, 383, 7, 17], "depth": 27, "n": 1834, "role": "text", "text": "T"}, {"box": [1331, 408, 0, 30], "depth": 24, "id": "panel-open-side-chat", "n": 1835, "role": "button", "text": "Side chat"}, {"box": [1339, 414, 18, 18], "depth": 26, "n": 1837, "role": "img"}, {"box": [1381, 413, 20, 20], "depth": 25, "n": 1840, "role": "img", "text": "S"}, {"box": [1381, 413, 20, 20], "depth": 26, "n": 1841, "role": "group"}, {"box": [1387, 415, 8, 17], "depth": 27, "n": 1842, "role": "text", "text": "S"}, {"box": [1331, 440, 0, 30], "depth": 24, "id": "panel-open-fork", "n": 1843, "role": "button", "text": "Fork chat"}, {"box": [1339, 446, 18, 18], "depth": 26, "n": 1845, "role": "img"}, {"box": [1381, 445, 20, 20], "depth": 25, "n": 1848, "role": "img", "text": "K"}, {"box": [1381, 445, 20, 20], "depth": 26, "n": 1849, "role": "group"}, {"box": [1387, 447, 8, 17], "depth": 27, "n": 1850, "role": "text", "text": "K"}, {"box": [1331, 472, 0, 62], "depth": 23, "n": 1851, "role": "group"}, {"box": [1331, 472, 0, 62], "depth": 24, "id": "git-empty-rows", "n": 1852}, {"box": [1331, 472, 0, 30], "depth": 25, "id": "git-open-changes", "n": 1853, "role": "button", "text": "Changes"}, {"box": [1339, 478, 18, 18], "depth": 27, "n": 1855, "role": "img"}, {"box": [1381, 477, 20, 20], "depth": 26, "n": 1858, "role": "img", "text": "C"}, {"box": [1381, 477, 20, 20], "depth": 27, "n": 1859, "role": "group"}, {"box": [1387, 479, 9, 17], "depth": 28, "n": 1860, "role": "text", "text": "C"}, {"box": [1331, 504, 0, 30], "depth": 25, "id": "git-open-history", "n": 1861, "role": "button", "text": "History"}, {"box": [1339, 510, 18, 18], "depth": 27, "n": 1863, "role": "img"}, {"box": [1381, 509, 20, 20], "depth": 26, "n": 1866, "role": "img", "text": "H"}, {"box": [1381, 509, 20, 20], "depth": 27, "n": 1867, "role": "group"}, {"box": [1387, 511, 9, 17], "depth": 28, "n": 1868, "role": "text", "text": "H"}, {"box": [1331, 558, 0, 0], "depth": 22, "id": "panel-home-lanes", "n": 1869}, {"box": [277, 0, 0, 0], "depth": 7, "n": 1422, "role": "slider", "text": "Resize files", "value": "0 points wide"}, {"box": [132, 4, 1188, 34], "depth": 8, "id": "session-tabs", "n": 1425, "role": "tablist", "text": "Open chats"}, {"box": [132, 7, 953, 28], "depth": 10, "id": "session-tabs-scroll", "n": 1427, "role": "scroll"}, {"box": [132, 7, 220, 28], "depth": 17, "id": "session-tab-chosen", "n": 53}, {"box": [132, 7, 220, 28], "depth": 16, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8", "n": 1674, "role": "tab", "text": "Fix burst at the rate limit boundary"}, {"box": [136, 11, 20, 20], "depth": 18, "id": "session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1", "n": 1679}, {"box": [136, 11, 20, 20], "depth": 26, "n": 1086, "role": "img"}, {"box": [162, 13, 193, 17], "depth": 19, "n": 1684, "role": "text", "text": "Fix burst at the rate limit boundary"}, {"box": [132, 7, 0, 0], "depth": 10, "id": "session-tab-lifted", "n": 1434}, {"box": [1093, 7, 81, 28], "depth": 11, "id": "updates-button", "n": 1697, "role": "button", "text": "3 updates"}, {"box": [1127, 11, 20, 20], "depth": 14, "id": "updates-mark-3", "n": 1987}, {"box": [1127, 11, 20, 20], "depth": 15, "n": 1988, "role": "img"}, {"box": [1127, 11, 20, 20], "depth": 15, "id": "updates-mark-3-glyph", "n": 1981}, {"box": [1132, 16, 11, 11], "depth": 18, "n": 1985, "role": "img"}, {"box": [1112, 11, 20, 20], "depth": 14, "id": "updates-mark-2", "n": 1984}, {"box": [1112, 11, 20, 20], "depth": 15, "n": 1881, "role": "img"}, {"box": [1112, 11, 20, 20], "depth": 15, "id": "updates-mark-2-glyph", "n": 1886}, {"box": [1117, 16, 11, 11], "depth": 18, "n": 1887, "role": "img"}, {"box": [1097, 11, 20, 20], "depth": 14, "id": "updates-mark-1", "n": 1891}, {"box": [1097, 11, 20, 20], "depth": 15, "id": "updates-mark-1-glyph", "n": 1893}, {"box": [1102, 16, 11, 11], "depth": 18, "n": 1882, "role": "img"}, {"box": [1152, 13, 16, 16], "depth": 15, "n": 1896, "role": "img"}, {"box": [0, 0, 1320, 0], "depth": 5, "id": "titlebar", "n": 1438}, {"box": [6, 7, 90, 28], "depth": 7, "id": "titlebar-island", "n": 1440}, {"box": [10, 9, 24, 24], "depth": 9, "n": 1443, "role": "button", "text": "Toggle sidebar"}, {"box": [42, 9, 24, 24], "depth": 9, "disabled": true, "n": 1451, "role": "button", "text": "Back"}, {"box": [44, 11, 21, 21], "depth": 10, "n": 1452, "role": "img"}, {"box": [68, 9, 24, 24], "depth": 9, "n": 1456, "role": "button", "text": "Forward"}, {"box": [70, 11, 21, 21], "depth": 10, "n": 1457, "role": "img"}, {"box": [1178, 0, 142, 40], "depth": 7, "id": "titlebar-actions-island", "n": 1459}, {"box": [1182, 9, 24, 24], "depth": 8, "id": "titlebar-actions", "n": 1461}, {"box": [1182, 9, 24, 24], "depth": 11, "n": 1706, "role": "button", "text": "Panel"}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-palette", "n": 1714}, {"box": [0, 0, 0, 0], "depth": 6, "id": "shell-add-project", "n": 1716}]
\ No newline at end of file
diff --git a/apps/landing/tools/recreate/reference/themes/tree.txt b/apps/landing/tools/recreate/reference/themes/tree.txt
deleted file mode 100644
index ec49dd0d7..000000000
--- a/apps/landing/tools/recreate/reference/themes/tree.txt
+++ /dev/null
@@ -1,285 +0,0 @@
- @6 dialog "Zeron" 0,0 1320x840
- @7 #host-toasts 1304,824 0x0
- @1385 #shell 0,0 1320x840
- @1386 #shell-chats 0,0 1320x840
- @1476 #shell-sidebar 0,0 277x840
- @1481 #sidebar-content 5,42 272x793
- @1482 #sidebar-actions 13,50 256x94
- @1484 button "New chat" 13,50 256x30
- @1488 img 20,57 16x16
- @1494 text "New chat" 43,56 57x19
- @1495 text "Ctrl+N" 228,57 33x16
- @1498 button "Search" 13,82 256x30
- @1502 img 20,89 16x16
- @1508 text "Search" 43,88 42x19
- @1509 text "Ctrl+K" 229,89 32x16
- @1720 button "Pull requests" 13,114 256x30
- @1899 img 20,121 16x16
- @1729 text "Pull requests" 43,120 77x19
- @1515 #sidebar 13,160 256x627
- @1732 scroll 13,160 256x627
- @52 button "Projects" 13,160 256x24
- @21 text "Projects" 21,164 43x16
- @88 button "web" 13,186 256x30
- @2014 img 19,192 18x18
- @302 text "web" 43,192 26x19
- @1137 button "Speed up the dashboard's first paint" 13,218 256x30
- @1102 img 42,226 14x14
- @687 text "Speed up the dashboard's first paint" 64,224 220x19
- @978 group 237,233 0x0
- @697 group "Completed" 245,225 16x16
- @700 img 246,226 14x14
- @709 img 64,244 11x11 hidden
- @1142 text "studio · main" 79,241 63x16 hidden
- @966 button "Add dark mode to settings" 13,250 256x30
- @1105 img 42,258 14x14
- @719 text "Add dark mode to settings" 64,256 161x19
- @141 group 237,265 0x0
- @723 group "Completed" 245,257 16x16
- @728 img 246,258 14x14
- @732 img 64,276 11x11 hidden
- @137 text "studio · main" 79,273 63x16 hidden
- @122 button "api" 13,282 256x30
- @746 img 19,288 18x18
- @109 text "api" 43,288 18x19
- @955 button "Sweep idle keys without a timer" 13,314 256x30
- @1112 img 42,322 14x14
- @761 text "Sweep idle keys without a timer" 64,320 193x19
- @250 group 237,329 0x0
- @767 group "Completed" 245,321 16x16
- @770 img 246,322 14x14
- @773 img 64,340 11x11 hidden
- @188 text "studio · main" 79,337 63x16 hidden
- @206 button "Fix burst at the rate limit boundary" 13,346 256x30
- @1116 img 42,354 14x14
- @780 text "Fix burst at the rate limit boundary" 64,352 209x19
- @224 group 230,361 0x0
- @782 text "30m" 238,353 23x16
- @784 img 64,372 11x11 hidden
- @239 text "studio · main" 79,369 63x16 hidden
- @273 button "Return a real Retry-After" 13,378 256x30
- @1123 img 42,386 14x14
- @791 text "Return a real Retry-After" 64,384 150x19
- @290 group 237,393 0x0
- @794 group "Completed" 245,385 16x16
- @796 img 246,386 14x14
- @799 img 64,404 11x11 hidden
- @307 text "studio · main" 79,401 63x16 hidden
- @320 button "uptime" 13,410 256x30
- @802 img 19,416 18x18
- @335 text "uptime" 43,416 43x19
- @353 button "Page only when two regions agree" 13,442 256x30
- @1149 img 42,450 14x14
- @813 text "Page only when two regions agree" 64,448 208x19
- @370 group 237,457 0x0
- @817 group "Completed" 245,449 16x16
- @819 img 246,450 14x14
- @828 img 64,468 11x11 hidden
- @384 text "studio · main" 79,465 63x16 hidden
- @399 button "Why Frankfurt flapped overnight" 13,474 256x30
- @1188 img 42,482 14x14
- @845 text "Why Frankfurt flapped overnight" 64,480 197x19
- @423 group 237,489 0x0
- @851 group "Completed" 245,481 16x16
- @854 img 246,482 14x14
- @861 img 64,500 11x11 hidden
- @450 text "studio · main" 79,497 63x16 hidden
- @476 button "docs" 13,506 256x30
- @864 img 19,512 18x18
- @491 text "docs" 43,512 29x19
- @519 button "Write up the October incident" 13,538 256x30
- @1192 img 42,546 14x14
- @907 text "Write up the October incident" 64,544 179x19
- @550 group 237,553 0x0
- @923 group "Completed" 245,545 16x16
- @936 img 246,546 14x14
- @942 img 64,564 11x11 hidden
- @611 text "studio · main" 79,561 63x16 hidden
- @1530 button "Local" 13,797 224x30
- @1902 group "Local" 18,802 20x20
- @1539 text "Local" 43,803 33x19
- @1542 checkbox "Settings" 239,797 30x30 unchecked
- @1543 img 246,804 16x16
- @1545 #sidebar-drag 5,0 272x42
- @1549 button "Sidebar view options" 94,9 24x24
- @1550 img 98,13 16x16
- @1553 group "Resize sidebar" 269,42 12x793
- @1391 #shell-drag 277,0 1043x38
- @1393 #shell-page-room 281,42 1034x793
- @1561 #split-pane-e4d0f441-f736-4272-ad2d-5281c69091e8 281,42 1034x793
- @1396 #shell-page 281,42 1034x793
- @1397 #shell-page-card 281,42 1034x793
- @1903 #chat-session 282,43 1032x791
- @1181 document 282,43 1032x751
- @1176 #transcript scroll "Conversation" 282,43 1032x751
- @634 #585d2c87-d8c5-4ce6-8c8a-ed827c83a3d9 article "You" 456,59 684x68
- @946 text "Clients can send about twice the limit if they time it aroun…" 609,69 473x48
- @661 article "Reply" 456,175 684x398
- @1063 button "Thought process · ran 1 command · read 2 files" 456,175 684x26
- @1198 text "Thought process · ran 1 command · read 2 files" 456,180 251x17
- @1209 text "Found it. estimate() weights the previous window by Math.flo…" 456,213 674x72
- @1084 button "Ran 1 command · edited 2 files" 456,297 684x26
- @1203 text "Ran 1 command · edited 2 files" 456,302 166x17
- @1214 text "Fixed in src/window.ts: the previous window now counts for t…" 456,335 669x48
- @1217 list 456,399 684x78
- @1218 listitem "test/window.test.ts fills a window in its last 10 ms, then c…" 456,399 684x48
- @1221 group 456,399 24x24
- @1228 text "test/window.test.ts fills a window in its last 10 ms, then c…" 480,399 647x48
- @1229 listitem "5 of 5 tests pass" 456,453 684x24
- @1232 group 456,453 24x24
- @1238 text "5 of 5 tests pass" 480,453 115x24
- @1243 text "This matches the October incident: a client at the limit got…" 456,493 675x48
- @1037 text "Nov 17, 9:15 AM" 456,553 84x17
- @1098 button "Copy message" 548,549 24x24
- @1099 img 553,554 14x14
- @1239 #transcript-rail group 1304,43 10x751 hidden
- @685 group 1309,47 3x0 hidden
- @1404 #chat-composer-dock 282,745 1032x81
- @1405 #chat-composer 468,745 660x81
- @1578 tablist 468,745 0x0 hidden
- @1585 button 468,745 0x0 hidden
- @1586 button "Fold what's waiting" 468,745 0x0 hidden
- @1587 img 468,745 0x0 hidden
- @1590 scroll 468,745 0x0 hidden
- @1595 group 468,745 0x0 hidden
- @1604 textbox "Message" ="" 515,759 531x22 focused
- @1608 "Ask anything, @ to mention…" 515,759 531x22
- @1907 button "Attach" 479,756 28x28
- @1908 img 484,761 18x18
- @1753 #dictation-microphone button "Hold to dictate" 1054,756 28x28
- @1754 img 1059,761 18x18
- @1995 button "Send message" 1090,756 28x28 disabled
- @1996 img 1097,763 14x14
- @1621 #composer-toolbar 468,802 660x24
- @1626 button "Access" 478,802 93x24
- @1911 img 484,808 12x12
- @1914 text "Full access" 502,805 63x17
- @1764 group "Branch main" 575,802 150x24
- @931 group 468,802 17x17 hidden
- @1138 text "api" 468,802 17x17 hidden
- @2612 group 468,802 27x17 hidden
- @928 text "main" 468,802 27x17 hidden
- @959 group 468,802 35x17 hidden
- @962 text "studio" 468,802 35x17 hidden
- @953 #composer-place-lead 581,808 12x12
- @71 img 581,808 12x12
- @1164 #composer-place-device 599,805 35x17
- @2035 #composer-place-device 599,805 35x17
- @1342 #composer-place-device "studio" 599,805 35x17
- @1368 group 638,809 10x10
- @1174 img 638,809 10x10
- @1671 #composer-place-project 654,805 17x17
- @1327 #composer-place-project 654,805 17x17
- @1133 #composer-place-project "api" 654,805 17x17
- @1166 group 677,809 10x10
- @952 img 677,809 10x10
- @1172 #composer-place-branch 691,805 28x17
- @664 #composer-place-branch 691,805 27x17
- @1082 #composer-place-branch "main" 691,805 27x17
- @473 button "Model" 1006,802 112x24
- @65 img 1012,808 12x12
- @150 text "Opus 5.5" 1030,805 50x17
- @1318 text "High" 1086,805 26x17
- @1641 img 281,42 0x0 hidden
- @1643 #session-header 298,43 848x40
- @1644 #page-title 298,43 0x0 hidden
- @1647 text "Fix burst at the rate limit boundary" 298,43 0x0 hidden
- @1419 #shell-files 1315,42 0x793 hidden
- @1648 #panel 1315,42 0x0 hidden
- @1650 #shell-files-content 1315,42 0x0 hidden
- @1652 #panel-strip tablist "Panel tabs" 1315,42 0x0 hidden
- @1654 scroll 1315,42 0x0 hidden
- @1663 #panel-tab-lifted 1315,42 0x0 hidden
- @1792 #panel-empty group "Session home" 1315,42 0x0 hidden
- @1796 #panel-home-block 1315,42 0x548 hidden
- @1797 #panel-home-info 1331,74 0x94 hidden
- @1798 #panel-home-device group "studio" 1331,74 16x30 hidden
- @1938 img 1340,81 16x16 hidden
- @1942 #panel-home-project group "api" 1331,106 0x30 hidden
- @1980 img 1340,113 16x16 hidden
- @1950 #panel-home-branch group "main" 1331,138 0x30 hidden
- @1952 img 1339,144 18x18 hidden
- @1955 #panel-home-branch-slot 1381,141 0x24 hidden
- @739 #git-branch-totals button "12 lines added, 1 removed: open the branch's changes" 1381,141 45x24 hidden
- @744 text "+12" 1385,145 20x16 hidden
- @742 text "−1" 1409,145 13x16 hidden
- @1959 #panel-home-details 1331,168 0x0 hidden
- @1963 #panel-home-actions 1331,192 0x66 hidden
- @1965 text "Actions" 1339,198 0x16 hidden
- @1971 #panel-home-add-action button "Add action" 1331,226 0x30 hidden
- @1973 img 1339,232 18x18 hidden
- @1807 #panel-home-open 1331,282 0x252 hidden
- @1809 text "Open" 1339,288 0x16 hidden
- @1811 #panel-open-browser button "Browser" 1331,312 0x30 hidden
- @1813 img 1339,318 18x18 hidden
- @1816 img "B" 1381,317 20x20 hidden
- @1817 group 1381,317 20x20 hidden
- @1818 text "B" 1387,319 8x17 hidden
- @1819 #panel-open-files button "File viewer" 1331,344 0x30 hidden
- @1821 img 1339,350 18x18 hidden
- @1824 img "F" 1381,349 20x20 hidden
- @1825 group 1381,349 20x20 hidden
- @1826 text "F" 1387,351 7x17 hidden
- @1827 #panel-open-terminal button "Terminal" 1331,376 0x30 hidden
- @1829 img 1339,382 18x18 hidden
- @1832 img "T" 1381,381 20x20 hidden
- @1833 group 1381,381 20x20 hidden
- @1834 text "T" 1388,383 7x17 hidden
- @1835 #panel-open-side-chat button "Side chat" 1331,408 0x30 hidden
- @1837 img 1339,414 18x18 hidden
- @1840 img "S" 1381,413 20x20 hidden
- @1841 group 1381,413 20x20 hidden
- @1842 text "S" 1387,415 8x17 hidden
- @1843 #panel-open-fork button "Fork chat" 1331,440 0x30 hidden
- @1845 img 1339,446 18x18 hidden
- @1848 img "K" 1381,445 20x20 hidden
- @1849 group 1381,445 20x20 hidden
- @1850 text "K" 1387,447 8x17 hidden
- @1851 group 1331,472 0x62 hidden
- @1852 #git-empty-rows 1331,472 0x62 hidden
- @1853 #git-open-changes button "Changes" 1331,472 0x30 hidden
- @1855 img 1339,478 18x18 hidden
- @1858 img "C" 1381,477 20x20 hidden
- @1859 group 1381,477 20x20 hidden
- @1860 text "C" 1387,479 9x17 hidden
- @1861 #git-open-history button "History" 1331,504 0x30 hidden
- @1863 img 1339,510 18x18 hidden
- @1866 img "H" 1381,509 20x20 hidden
- @1867 group 1381,509 20x20 hidden
- @1868 text "H" 1387,511 9x17 hidden
- @1869 #panel-home-lanes 1331,558 0x0 hidden
- @1422 slider "Resize files" ="0 points wide" 277,0 0x0 hidden
- @1425 #session-tabs tablist "Open chats" 132,4 1188x34
- @1427 #session-tabs-scroll scroll 132,7 953x28
- @53 #session-tab-chosen 132,7 220x28
- @1674 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8 tab "Fix burst at the rate limit boundary" 132,7 220x28
- @1679 #session-tab-e4d0f441-f736-4272-ad2d-5281c69091e8-tile-1 136,11 20x20
- @1086 img 136,11 20x20
- @1684 text "Fix burst at the rate limit boundary" 162,13 193x17
- @1434 #session-tab-lifted 132,7 0x0 hidden
- @1697 #updates-button button "3 updates" 1093,7 81x28
- @1987 #updates-mark-3 1127,11 20x20
- @1988 img 1127,11 20x20
- @1981 #updates-mark-3-glyph 1127,11 20x20
- @1985 img 1132,16 11x11
- @1984 #updates-mark-2 1112,11 20x20
- @1881 img 1112,11 20x20
- @1886 #updates-mark-2-glyph 1112,11 20x20
- @1887 img 1117,16 11x11
- @1891 #updates-mark-1 1097,11 20x20
- @1893 #updates-mark-1-glyph 1097,11 20x20
- @1882 img 1102,16 11x11
- @1896 img 1152,13 16x16
- @1438 #titlebar 0,0 1320x0
- @1440 #titlebar-island 6,7 90x28 hidden
- @1443 button "Toggle sidebar" 10,9 24x24
- @1451 button "Back" 42,9 24x24 disabled
- @1452 img 44,11 21x21
- @1456 button "Forward" 68,9 24x24
- @1457 img 70,11 21x21
- @1459 #titlebar-actions-island 1178,0 142x40 hidden
- @1461 #titlebar-actions 1182,9 24x24
- @1706 button "Panel" 1182,9 24x24
- @1714 #shell-palette 0,0 0x0
- @1716 #shell-add-project 0,0 0x0
-
diff --git a/apps/landing/tools/recreate/stage_a.py b/apps/landing/tools/recreate/stage_a.py
deleted file mode 100644
index 19e07bb10..000000000
--- a/apps/landing/tools/recreate/stage_a.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Stage A: the text and image nodes of the app's layout tree that the
-reference capture actually shows (a node's box must hold ink)."""
-import json, re, sys
-import numpy as np
-from PIL import Image
-
-from lib import REFS, P
-ref = REFS[P]
-S = ref.shape[1] / 1320
-tree = json.load(open("tree.json"))
-hidden = {int(m.group(1)) for m in re.finditer(r"@(\d+)[^\n]* hidden\s*$", open("tree.txt").read(), re.M)}
-
-def ink(box):
- x, y, w, h = (int(round(v * S)) for v in box)
- patch = ref[max(y, 0):y + h, max(x, 0):x + w].reshape(-1, 3)
- if len(patch) == 0: return 0
- base = np.median(patch, axis=0)
- return int(np.abs(patch - base).sum(axis=1).max())
-
-badge = next((n["box"] for n in tree if n.get("id") == "updates-button" and n["n"] not in hidden), None)
-out = []
-for i, n in enumerate(tree):
- if n["n"] in hidden: continue
- leaf = i + 1 >= len(tree) or tree[i + 1]["depth"] <= n["depth"]
- x, y, w, h = n["box"]
- if w <= 0 or h <= 0: continue
- if x >= 1320 or y >= 840: continue
- if badge and badge[0] - 2 <= x <= badge[0] + badge[2] and y < 40: continue # the agents' updates badge: not part of the picture
- kind = "img" if n.get("role") == "img" else "text" if n.get("text") and (n.get("role") == "text" or (leaf and n.get("role") is None)) else None
- if not kind or ink(n["box"]) < 10: continue
- out.append({"n": n["n"], "kind": kind, "box": n["box"], **({"text": n["text"]} if kind == "text" else {}), **({"id": n["id"]} if n.get("id") else {})})
-json.dump(out, open("nodes.json", "w"), ensure_ascii=False)
-texts = [o for o in out if o["kind"] == "text"]
-print(len(out), "nodes;", len(texts), "texts;", sum(o["kind"] == "img" for o in out), "imgs")
-print(" | ".join(f'{t["text"][:18]}@{t["box"][0]},{t["box"][1]}' for t in texts))
diff --git a/apps/landing/tools/recreate/tune.py b/apps/landing/tools/recreate/tune.py
deleted file mode 100644
index 6c7208f56..000000000
--- a/apps/landing/tools/recreate/tune.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Move each placed node by what makes it meet the reference: for every text
-and icon, the whole-device-pixel shift (a few pixels at most) of the web render that
-best matches the app's pixels in its box. Adds to offsets.json."""
-import json, os, sys
-import numpy as np
-from PIL import Image
-from lib import *
-theme = P
-web = np.asarray(Image.open(f"web-{theme}.png").convert("RGB")).astype(np.int16)
-ref = REFS[theme]
-offsets = json.load(open("offsets.json")) if os.path.exists("offsets.json") else {}
-moved = 0
-for item in json.load(open("layout.json")):
- x, y, w, h = item["box"]
- if y < 40: continue
- dxo, dyo = offsets.get(str(item["n"]), (0, 0))
- x0, y0, x1, y1 = int((x + dxo) * S) - 2, int((y + dyo) * S) - 2, int((x + dxo + w) * S) + 2, int((y + dyo + h) * S) + 2
- x1 = min(x1, 1305 * S)
- best = (1e18, 0, 0)
- for dy in range(-6, 7):
- for dx in range(-4, 5):
- a = web[y0:y1, x0:x1]
- b = ref[y0 + dy:y1 + dy, x0 + dx:x1 + dx]
- if a.shape != b.shape or a.size == 0: continue
- err = float(np.abs(a - b).sum()) * (1 + 0.004 * (abs(dx) + abs(dy)))
- if err < best[0]: best = (err, dx, dy)
- _, dx, dy = best
- if dx or dy:
- moved += 1
- offsets[str(item["n"])] = [dxo + dx / S, dyo + dy / S]
-json.dump(offsets, open("offsets.json", "w"))
-print("moved", moved)
diff --git a/apps/landing/tsconfig.json b/apps/landing/tsconfig.json
deleted file mode 100644
index 89b4a980a..000000000
--- a/apps/landing/tsconfig.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "extends": "astro/tsconfigs/strict",
- "include": [".astro/types.d.ts", "**/*"],
- "exclude": ["dist", "tools", "public"]
-}
diff --git a/apps/landing/vitest.config.ts b/apps/landing/vitest.config.ts
deleted file mode 100644
index 0a75520ec..000000000
--- a/apps/landing/vitest.config.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { defineConfig } from "vitest/config";
-
-export default defineConfig({
- test: { include: ["src/**/*.test.ts", "tests/**/*.test.{ts,js}"] },
-});
diff --git a/apps/landing/wrangler.jsonc b/apps/landing/wrangler.jsonc
index aafb92225..ca68c9731 100644
--- a/apps/landing/wrangler.jsonc
+++ b/apps/landing/wrangler.jsonc
@@ -1,14 +1,10 @@
{
- // Landing page: an Astro site built to static assets, no worker script.
- // `wrangler deploy` builds it first (`build` below): a clean install, the
- // type check, the build into ./dist and the tests, so a deploy from CI
- // (.github/workflows/deploy.yml, on a push to main that touches this
- // folder) or from this directory uploads only a build that passed.
- // The install surface (/install.sh, /releases/*) is served by the edge
- // worker via path routes on the same hostname; path routes beat this
- // custom domain, so this worker only ever sees page traffic. (The worker
- // keeps its historical "comet-landing" name; renaming a worker means a new
- // worker. comet.zeron.sh stays attached for old links.)
+ // Landing page: pure static assets, no worker script. The install surface
+ // (/install.sh, /releases/*) is served by the edge worker via path routes on
+ // the same hostname — path routes beat this custom domain, so this worker
+ // only ever sees page traffic. Deploy with `npx wrangler deploy` from this
+ // dir. (The worker keeps its historical "comet-landing" name; renaming a
+ // worker means a new worker. comet.zeron.sh stays attached for old links.)
"$schema": "https://unpkg.com/wrangler/config-schema.json",
"name": "comet-landing",
"compatibility_date": "2026-07-01",
@@ -17,9 +13,7 @@
{ "pattern": "comet.zeron.sh", "custom_domain": true }
],
"workers_dev": true,
- "build": { "command": "npm ci && npm run check && npm test" },
"assets": {
- "directory": "./dist",
- "not_found_handling": "404-page"
+ "directory": "public"
}
}
diff --git a/apps/landing/wrangler.staging.jsonc b/apps/landing/wrangler.staging.jsonc
deleted file mode 100644
index 6872ae95b..000000000
--- a/apps/landing/wrangler.staging.jsonc
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- // The landing page's staging copy, at https://site-staging.zeron.sh: the
- // same build as wrangler.jsonc deploys, on its own worker
- // (zeron-landing-staging), which holds only that domain and so can never
- // take zeron.sh.
- // Deploy: `npx wrangler deploy -c wrangler.staging.jsonc` (it builds and
- // tests first, as production's does).
- "$schema": "https://unpkg.com/wrangler/config-schema.json",
- "name": "zeron-landing-staging",
- "compatibility_date": "2026-07-01",
- "routes": [{ "pattern": "site-staging.zeron.sh", "custom_domain": true }],
- "workers_dev": true,
- "build": { "command": "npm ci && npm run check && npm test" },
- "assets": {
- "directory": "./dist",
- "not_found_handling": "404-page"
- }
-}
diff --git a/apps/zeron/Cargo.toml b/apps/zeron/Cargo.toml
index a067a3d4d..2fda76d93 100644
--- a/apps/zeron/Cargo.toml
+++ b/apps/zeron/Cargo.toml
@@ -5,7 +5,8 @@ edition.workspace = true
license.workspace = true
publish.workspace = true
-# Shared by both binaries.
+# Shared by both binaries; the UI is referenced only by `zeron`, so the
+# background engine links without it.
[lib]
name = "zeron_app"
path = "src/lib.rs"
@@ -21,11 +22,11 @@ path = "src/bin/zeron-engine.rs"
[dependencies]
zeron-engine.workspace = true
zeron-rpc.workspace = true
+zeron-ui.workspace = true
zeron-update.workspace = true
zeron-cli.workspace = true
zeron-mcp.workspace = true
zeron-notify.workspace = true
-zeron-sync.workspace = true
tokio.workspace = true
clap.workspace = true
anyhow.workspace = true
diff --git a/apps/zeron/src/allocator.rs b/apps/zeron/src/allocator.rs
index abcaad1a4..c037522f8 100644
--- a/apps/zeron/src/allocator.rs
+++ b/apps/zeron/src/allocator.rs
@@ -15,16 +15,6 @@ use std::sync::atomic::{AtomicBool, Ordering};
/// The VM tag mimalloc maps the heap with.
pub const HEAP_VM_TAG: std::ffi::c_long = 254;
-/// mimalloc v2's `mi_option_purge_delay` (`mimalloc.h`; the bindings don't
-/// name it). Freed memory is handed back to the system after this many
-/// milliseconds (10 by default) — but only the next time that thread
-/// allocates or collects, which an engine at rest does rarely: after a burst
-/// (agents streaming), what it freed stayed counted against it until some
-/// later work. 0 hands it back as it's freed. Measured over five agents
-/// streaming: the engine's CPU the same (1.98%), its footprint once they're
-/// done 32 MB instead of 42.
-const MI_OPTION_PURGE_DELAY: libmimalloc_sys::mi_option_t = 15;
-
static TAGGED: AtomicBool = AtomicBool::new(false);
/// [`mimalloc::MiMalloc`], tagging its regions [`HEAP_VM_TAG`] from the first
@@ -37,19 +27,10 @@ fn tag_heap() {
// Only stores the option (no allocation); racing threads store the
// same value.
unsafe { libmimalloc_sys::mi_option_set(libmimalloc_sys::mi_option_os_tag, HEAP_VM_TAG) };
- unsafe { libmimalloc_sys::mi_option_set(MI_OPTION_PURGE_DELAY, 0) };
TAGGED.store(true, Ordering::Relaxed);
}
}
-/// mimalloc's forced collect: what its threads freed (exited threads'
-/// pages too) goes back to the system. The engine calls it after dropping
-/// a large short-lived allocation ([`zeron_engine::heap`]).
-pub fn trim() {
- // SAFETY: mimalloc's collect frees nothing in use.
- unsafe { libmimalloc_sys::mi_collect(true) };
-}
-
unsafe impl GlobalAlloc for Allocator {
#[inline]
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@@ -79,15 +60,6 @@ unsafe impl GlobalAlloc for Allocator {
mod tests {
use super::*;
- /// Freed memory goes back as it's freed (`MI_OPTION_PURGE_DELAY`), from
- /// the first allocation on.
- #[test]
- fn freed_memory_is_handed_back_at_once() {
- let held = vec![0u8; 1 << 20];
- drop(held);
- assert_eq!(unsafe { libmimalloc_sys::mi_option_get(MI_OPTION_PURGE_DELAY) }, 0);
- }
-
/// `struct vm_region_extended_info` (`mach/vm_region.h`).
#[repr(C)]
#[derive(Default)]
diff --git a/apps/zeron/src/background.rs b/apps/zeron/src/background.rs
index fb4cfb71b..b5626acb9 100644
--- a/apps/zeron/src/background.rs
+++ b/apps/zeron/src/background.rs
@@ -55,9 +55,6 @@ fn run_engine(config: zeron_engine::EngineConfig) -> anyhow::Result<()> {
/// are posted on and delivers their clicks.
#[cfg(target_os = "macos")]
fn run_engine(config: zeron_engine::EngineConfig) -> anyhow::Result<()> {
- // Before the engine starts: its sockets then never start the polling
- // wake detector (`zeron_sync::wake`).
- main_loop::watch_power();
let worker = std::thread::Builder::new()
.name("engine".into())
.spawn(move || {
@@ -78,26 +75,9 @@ fn run_engine(config: zeron_engine::EngineConfig) -> anyhow::Result<()> {
#[cfg(target_os = "macos")]
mod main_loop {
use std::ffi::c_void;
- use std::sync::atomic::{AtomicBool, AtomicPtr, AtomicU32, Ordering};
+ use std::sync::atomic::{AtomicBool, Ordering};
static DONE: AtomicBool = AtomicBool::new(false);
- /// The source [`finish`] signals; null until [`run`] makes it.
- static STOP: AtomicPtr = AtomicPtr::new(std::ptr::null_mut());
-
- /// `CFRunLoopSourceContext`, version 0: only `perform` is used.
- #[repr(C)]
- struct SourceContext {
- version: isize,
- info: *mut c_void,
- retain: *const c_void,
- release: *const c_void,
- copy_description: *const c_void,
- equal: *const c_void,
- hash: *const c_void,
- schedule: *const c_void,
- cancel: *const c_void,
- perform: extern "C" fn(*mut c_void),
- }
#[link(name = "CoreFoundation", kind = "framework")]
unsafe extern "C" {
@@ -106,100 +86,39 @@ mod main_loop {
fn CFRunLoopGetMain() -> *mut c_void;
fn CFRunLoopRunInMode(mode: *const c_void, seconds: f64, return_after_source: u8) -> i32;
fn CFRunLoopWakeUp(run_loop: *mut c_void);
- fn CFRunLoopSourceCreate(
+ fn CFAbsoluteTimeGetCurrent() -> f64;
+ fn CFRunLoopTimerCreate(
allocator: *const c_void,
+ fire_date: f64,
+ interval: f64,
+ flags: u64,
order: isize,
- context: *mut SourceContext,
+ callout: extern "C" fn(*mut c_void, *mut c_void),
+ context: *mut c_void,
) -> *mut c_void;
- fn CFRunLoopAddSource(run_loop: *mut c_void, source: *mut c_void, mode: *const c_void);
- fn CFRunLoopSourceSignal(source: *mut c_void);
+ fn CFRunLoopAddTimer(run_loop: *mut c_void, timer: *mut c_void, mode: *const c_void);
}
- #[link(name = "IOKit", kind = "framework")]
- unsafe extern "C" {
- fn IORegisterForSystemPower(
- refcon: *mut c_void,
- port: *mut *mut c_void,
- callback: extern "C" fn(*mut c_void, u32, u32, *mut c_void),
- notifier: *mut u32,
- ) -> u32;
- fn IONotificationPortGetRunLoopSource(port: *mut c_void) -> *mut c_void;
- fn IOAllowPowerChange(kernel_port: u32, notification_id: isize) -> i32;
- }
+ extern "C" fn tick(_timer: *mut c_void, _info: *mut c_void) {}
- // IOKit's power messages (IOKit/IOMessage.h).
- const CAN_SYSTEM_SLEEP: u32 = 0xe000_0270;
- const SYSTEM_WILL_SLEEP: u32 = 0xe000_0280;
- const SYSTEM_HAS_POWERED_ON: u32 = 0xe000_0300;
-
- /// The root power domain's connection, for acknowledging sleep.
- static ROOT_PORT: AtomicU32 = AtomicU32::new(0);
-
- extern "C" fn power(_refcon: *mut c_void, _service: u32, message: u32, argument: *mut c_void) {
- match message {
- // Every registered client must answer these, or the Mac waits
- // up to 30 s before it sleeps.
- CAN_SYSTEM_SLEEP | SYSTEM_WILL_SLEEP => unsafe {
- IOAllowPowerChange(ROOT_PORT.load(Ordering::Acquire), argument as isize);
- },
- SYSTEM_HAS_POWERED_ON => zeron_sync::wake::notify_wake(),
- _ => {}
- }
- }
-
- /// Hear the Mac's sleep and wake from IOKit on the main run loop, so the
- /// engine's sockets redial on wake without a detector waking the
- /// process every second to compare clocks. Falls back to that detector
- /// if registering fails.
- pub(super) fn watch_power() {
- unsafe {
- let mut port = std::ptr::null_mut();
- let mut notifier = 0u32;
- let root =
- IORegisterForSystemPower(std::ptr::null_mut(), &mut port, power, &mut notifier);
- if root == 0 || port.is_null() {
- tracing::warn!(
- "couldn't register for power notifications; polling for wake instead"
- );
- return;
- }
- ROOT_PORT.store(root, Ordering::Release);
- let source = IONotificationPortGetRunLoopSource(port);
- CFRunLoopAddSource(CFRunLoopGetMain(), source, kCFRunLoopCommonModes);
- }
- zeron_sync::wake::use_os_wake_events();
- }
-
- /// The stop source fired: [`run`]'s wait returns and it reads `DONE`.
- extern "C" fn stop(_info: *mut c_void) {}
-
- /// Serve the main run loop until [`finish`]. It sleeps until something
- /// arrives (a banner's click, the stop source) rather than on a timer:
- /// an idle engine's main thread never wakes. The stop source both keeps
- /// the loop from returning at once for want of sources and makes a
- /// `finish` that comes before the wait begins end it at once (a signaled
- /// source is served as soon as the loop runs).
+ /// Serve the main run loop until [`finish`]. A repeating timer keeps the
+ /// loop from returning at once for want of sources and bounds how late
+ /// the exit check runs.
pub(super) fn run() {
unsafe {
let main = CFRunLoopGetMain();
- let mut context = SourceContext {
- version: 0,
- info: std::ptr::null_mut(),
- retain: std::ptr::null(),
- release: std::ptr::null(),
- copy_description: std::ptr::null(),
- equal: std::ptr::null(),
- hash: std::ptr::null(),
- schedule: std::ptr::null(),
- cancel: std::ptr::null(),
- perform: stop,
- };
- let source = CFRunLoopSourceCreate(std::ptr::null(), 0, &mut context);
- CFRunLoopAddSource(main, source, kCFRunLoopCommonModes);
- STOP.store(source, Ordering::SeqCst);
+ let timer = CFRunLoopTimerCreate(
+ std::ptr::null(),
+ CFAbsoluteTimeGetCurrent() + 1.0,
+ 1.0,
+ 0,
+ 0,
+ tick,
+ std::ptr::null_mut(),
+ );
+ CFRunLoopAddTimer(main, timer, kCFRunLoopCommonModes);
while !DONE.load(Ordering::SeqCst) {
- // (Returns after each source served, so `DONE` is read then.)
- CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e10, 1);
+ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0, 0);
}
}
}
@@ -207,12 +126,6 @@ mod main_loop {
/// End [`run`] (any thread).
pub(super) fn finish() {
DONE.store(true, Ordering::SeqCst);
- let source = STOP.load(Ordering::SeqCst);
- unsafe {
- if !source.is_null() {
- CFRunLoopSourceSignal(source);
- }
- CFRunLoopWakeUp(CFRunLoopGetMain());
- }
+ unsafe { CFRunLoopWakeUp(CFRunLoopGetMain()) };
}
}
diff --git a/apps/zeron/src/bin/zeron-engine.rs b/apps/zeron/src/bin/zeron-engine.rs
index 0b6648a1d..76d9bcbc1 100644
--- a/apps/zeron/src/bin/zeron-engine.rs
+++ b/apps/zeron/src/bin/zeron-engine.rs
@@ -2,9 +2,8 @@
//! own ("Zeron Engine" in Activity Monitor): the app starts it and attaches;
//! sessions keep running with the app closed. Without the UI linked in.
//!
-//! It also answers what the engine runs its own executable for: `mcp-proxy`
-//! (an agent's Zeron MCP tools on stdio, served by the engine), `mcp` (the
-//! standalone Zeron MCP server) and `--noop-browser` (browser
+//! It also answers what the engine runs its own executable for: `mcp` (the
+//! Zeron MCP server injected into agents) and `--noop-browser` (browser
//! suppression for agents' sign-in flows). And it is the engine helper of an
//! interface that doesn't link the engine (the zgx app): every `zeron`
//! subcommand that runs the engine's code (`headless`, `login`, `status`,
@@ -18,9 +17,6 @@ use zeron_cli::{Engines, Launch};
fn main() -> anyhow::Result<()> {
match std::env::args().nth(1).as_deref() {
Some("--noop-browser") => Ok(()),
- // An agent's Zeron MCP tools on stdio, forwarded to the engine's own
- // endpoint. First, before any engine setup: it must stay tiny.
- Some("mcp-proxy") => zeron_mcp::proxy::run(),
Some("--version" | "-V") => {
println!("zeron-engine {}", zeron_update::current_version());
Ok(())
diff --git a/apps/zeron/src/lib.rs b/apps/zeron/src/lib.rs
index f65d61475..265c0d7d5 100644
--- a/apps/zeron/src/lib.rs
+++ b/apps/zeron/src/lib.rs
@@ -12,11 +12,11 @@ pub mod engine_commands;
pub mod ipc_cli;
pub mod plugin_cli;
-pub use engine_commands::run_engine_command;
pub use zeron_cli::{
DEFAULT_EDGE_URL, DEFAULT_WORKOS_CLIENT_ID, edge_url_from_env, init_logging,
long_running_setup, open_log_file, paths, workos_client_id_from_env,
};
+pub use engine_commands::run_engine_command;
/// mimalloc, macOS only: libmalloc never returns the streaming churn's
/// high-water pages, so transient allocation became permanent RSS
@@ -33,9 +33,6 @@ static ALLOC: allocator::Allocator = allocator::Allocator;
/// `logout`, and `status` — one resolution so the CLI auth commands always
/// operate on the exact session the daemon will load.
pub fn engine_config_from_env() -> zeron_engine::EngineConfig {
- // (Every way an engine starts here resolves its configuration first.)
- #[cfg(target_os = "macos")]
- zeron_engine::heap::set_trim(allocator::trim);
// Dev-mode bearer (no WorkOS): an explicit token enables sync.
let edge_token = std::env::var("ZERON_EDGE_TOKEN").ok();
zeron_engine::EngineConfig {
diff --git a/apps/zeron/src/main.rs b/apps/zeron/src/main.rs
index 21cbe54d8..0a3d049b8 100644
--- a/apps/zeron/src/main.rs
+++ b/apps/zeron/src/main.rs
@@ -1,27 +1,40 @@
-//! zeron — the command line with the engine linked in: `zeron headless` runs
-//! the engine alone, and the engine's other subcommands run here. It starts
-//! local-only without credentials. `zeron login` and `zeron logout` select
-//! the profile used by the next engine start without mutating a live runtime.
+//! zeron — headed by default; `zeron headless` runs the engine alone. Both start
+//! local-only without credentials. `zeron login` and `zeron logout` select the
+//! profile used by the next engine start without mutating a live runtime.
//!
//! The command line is `zeron_cli`'s (shared with the engine helper and the
-//! zgx interface). The desktop app is the zgx interface (apps/zgx), which
-//! ships its own `zeron`: this one opens no window.
+//! zgx interface). This binary links the engine, so it runs the engine's
+//! subcommands itself; with no subcommand it opens the window.
+#![cfg_attr(windows, windows_subsystem = "windows")]
+
+use zeron_app::{edge_url_from_env, paths, workos_client_id_from_env};
use zeron_cli::{Engines, Launch};
fn main() -> anyhow::Result<()> {
- // The engine runs its own executable as an agent's stdio MCP forwarder
- // (`zeron headless`'s agents): first, before any setup, to stay tiny.
- if std::env::args().nth(1).as_deref() == Some("mcp-proxy") {
- return zeron_mcp::proxy::run();
- }
match zeron_cli::run(zeron_update::current_version(), Engines::InProcess) {
Launch::Done(result) => result,
Launch::Engine(command) => zeron_app::run_engine_command(command),
#[cfg(target_os = "linux")]
- Launch::Appshot => anyhow::bail!("Appshots are the desktop app's: open Zeron and use its shortcut"),
- Launch::Window { .. } => anyhow::bail!(
- "this `zeron` has no window: open the Zeron app, or run `zeron headless` for the engine alone"
- ),
+ Launch::Appshot => {
+ zeron_ui::appshots::request_running_appshot(&zeron_app::engine_config_from_env().data_dir)
+ .map_err(anyhow::Error::msg)
+ }
+ Launch::Window { open_url, .. } => {
+ let edge_token = std::env::var("ZERON_EDGE_TOKEN").ok();
+ // Headed: the UI probes ZERON_IPC_PORT and connects to a running
+ // daemon, or embeds the engine in-process (ARCHITECTURE §1).
+ zeron_ui::run_app(zeron_ui::UiConfig {
+ data_dir: paths::data_dir(),
+ ipc_port: zeron_cli::ipc_port_from_env(),
+ edge_url: edge_url_from_env(),
+ workos_client_id: workos_client_id_from_env(&edge_token),
+ edge_token,
+ org_id: std::env::var("ZERON_ORG_ID").ok(),
+ default_harness: zeron_ui::HarnessId::ClaudeCode,
+ initial_url: open_url,
+ });
+ Ok(())
+ }
}
}
diff --git a/apps/zgx/Cargo.lock b/apps/zgx/Cargo.lock
index b7b2e8e79..1fa07a604 100644
--- a/apps/zgx/Cargo.lock
+++ b/apps/zgx/Cargo.lock
@@ -30,7 +30,7 @@ dependencies = [
[[package]]
name = "accesskit_atspi_common"
version = "0.19.1"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -43,7 +43,7 @@ dependencies = [
[[package]]
name = "accesskit_consumer"
version = "0.38.0"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"accesskit",
"hashbrown 0.16.1",
@@ -66,7 +66,7 @@ dependencies = [
[[package]]
name = "accesskit_macos"
version = "0.26.3"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -79,7 +79,7 @@ dependencies = [
[[package]]
name = "accesskit_unix"
version = "0.22.1"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"accesskit",
"accesskit_atspi_common",
@@ -96,7 +96,7 @@ dependencies = [
[[package]]
name = "accesskit_windows"
version = "0.34.0"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -6450,7 +6450,7 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "29.0.4"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"android_system_properties",
"arrayvec",
@@ -6888,7 +6888,7 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
name = "winit"
version = "0.30.13"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"ahash",
"android-activity",
@@ -7067,7 +7067,7 @@ dependencies = [
[[package]]
name = "zatex"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"ttf-parser",
]
@@ -7233,7 +7233,7 @@ checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
[[package]]
name = "zeron-cli"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"anyhow",
"clap",
@@ -7248,7 +7248,7 @@ dependencies = [
[[package]]
name = "zeron-launch"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"libc",
"windows-sys 0.61.2",
@@ -7256,7 +7256,7 @@ dependencies = [
[[package]]
name = "zeron-notify"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"objc",
"sha2",
@@ -7265,18 +7265,18 @@ dependencies = [
[[package]]
name = "zeron-plugin-guard"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"serde_json",
]
[[package]]
name = "zeron-preview-label"
-version = "0.3.8"
+version = "0.3.4"
[[package]]
name = "zeron-proto"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"chrono",
"pulldown-cmark 0.12.2",
@@ -7287,7 +7287,7 @@ dependencies = [
[[package]]
name = "zeron-theme"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"anyhow",
"clap",
@@ -7301,7 +7301,7 @@ dependencies = [
[[package]]
name = "zeron-update"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"anyhow",
"futures",
@@ -7318,7 +7318,7 @@ dependencies = [
[[package]]
name = "zeron-visual"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"base64 0.22.1",
"gltf",
@@ -7330,7 +7330,7 @@ dependencies = [
[[package]]
name = "zeron-visual-gpu"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"pollster",
"tracing",
@@ -7340,7 +7340,7 @@ dependencies = [
[[package]]
name = "zeron-voice"
-version = "0.3.8"
+version = "0.3.4"
dependencies = [
"anyhow",
"cpal",
@@ -7456,7 +7456,7 @@ dependencies = [
[[package]]
name = "zgx"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"fixed_decimal",
"foldhash 0.2.0",
@@ -7485,7 +7485,7 @@ dependencies = [
[[package]]
name = "zgx-3d"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"bytemuck",
"zgx",
@@ -7495,7 +7495,7 @@ dependencies = [
[[package]]
name = "zgx-alacritty-terminal"
version = "0.26.8"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"base64 0.22.1",
"bitflags 2.13.2",
@@ -7520,7 +7520,7 @@ dependencies = [
[[package]]
name = "zgx-components"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"zgx",
]
@@ -7528,7 +7528,7 @@ dependencies = [
[[package]]
name = "zgx-cosmic-text"
version = "0.19.14"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"bitflags 2.13.2",
"fontdb",
@@ -7552,7 +7552,7 @@ dependencies = [
[[package]]
name = "zgx-desktop"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"accesskit",
"accesskit_consumer",
@@ -7603,12 +7603,12 @@ dependencies = [
[[package]]
name = "zgx-ghostty-sys"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
[[package]]
name = "zgx-gpu"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"ash",
"block2 0.6.2",
@@ -7648,7 +7648,7 @@ dependencies = [
[[package]]
name = "zgx-harfrust"
version = "0.5.4"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"bitflags 2.13.2",
"bytemuck",
@@ -7660,7 +7660,7 @@ dependencies = [
[[package]]
name = "zgx-mlua"
version = "0.12.9"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"bstr",
"either",
@@ -7675,7 +7675,7 @@ dependencies = [
[[package]]
name = "zgx-run"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"serde_json",
"ureq 3.5.0",
@@ -7687,7 +7687,7 @@ dependencies = [
[[package]]
name = "zgx-script"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"icu_locale_core",
"icu_plurals",
@@ -7712,7 +7712,7 @@ dependencies = [
[[package]]
name = "zgx-swash"
version = "0.2.11"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"skrifa",
"yazi",
@@ -7722,7 +7722,7 @@ dependencies = [
[[package]]
name = "zgx-taffy"
version = "0.9.2"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"arrayvec",
"grid",
@@ -7733,7 +7733,7 @@ dependencies = [
[[package]]
name = "zgx-terminal"
version = "0.1.10"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"base64 0.22.1",
"flate2",
@@ -7749,7 +7749,7 @@ dependencies = [
[[package]]
name = "zgx-vte"
version = "0.15.4"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"arrayvec",
"bitflags 2.13.2",
@@ -7761,7 +7761,7 @@ dependencies = [
[[package]]
name = "zgx-zune-jpeg"
version = "0.5.15"
-source = "git+https://github.com/zeronsh/zgx?rev=b80a8af1c1f2079e373ec34a9194d26f2c998cbb#b80a8af1c1f2079e373ec34a9194d26f2c998cbb"
+source = "git+https://github.com/zeronsh/zgx?rev=d391ea7276f0de5cb3d65c191bfd66c02a4c358d#d391ea7276f0de5cb3d65c191bfd66c02a4c358d"
dependencies = [
"zune-core",
]
diff --git a/apps/zgx/Cargo.toml b/apps/zgx/Cargo.toml
index b1c16c719..eae2c0300 100644
--- a/apps/zgx/Cargo.toml
+++ b/apps/zgx/Cargo.toml
@@ -32,7 +32,7 @@ layout_probe = []
[dependencies]
lz4_flex = { version = "0.11", default-features = false, features = ["safe-encode", "safe-decode"] }
-zgx = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+zgx = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
# `mimalloc`: the program's allocator, in place of the system's. It hands
# freed memory back to the system (the system's keeps the most it ever
# held), and zgx measures 1-10% less CPU for script, text and layout work.
@@ -43,7 +43,7 @@ zgx = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9
# none of it, and without it pages are placeholders ("Web view · ").
# zgx-run turns it on by default, but this app takes zgx-run without its
# defaults (below). Nothing on macOS or Windows.
-zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["mimalloc", "terminal", "webkitgtk"] }
+zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["mimalloc", "terminal", "webkitgtk"] }
# `inspect`: devtools for `zgx inspect` (and its MCP server), asked for
# with `--inspect`. `i18n`: `ui.t`'s plurals and numbers by each locale's
# own rules (ICU4X's data, about 90 KB), for ui/locales' translations.
@@ -51,18 +51,18 @@ zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e3
# wgpu this app already links), for plugins that show 3D: the CAD plugin
# hands it its own triangles (`geometry = { positions, indices, … }`). It
# asks no grant; a scene draws a frame only when something in it changes.
-zgx-script = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["inspect", "i18n", "scene3d"] }
+zgx-script = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["inspect", "i18n", "scene3d"] }
# A picture's pixels for the clipboard (src/images.rs): zgx's own decoder,
# the formats `ui.image` shows (no features of its own: the ones zgx-desktop
# turns on).
-zgx-gpu = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", default-features = false }
+zgx-gpu = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", default-features = false }
# Each plugin's own database (`zeron.db`, src/plugins/db.rs): SQLite,
# built in; `limits` to keep one from attaching any other file.
rusqlite = { version = "0.32", features = ["bundled", "limits", "hooks"] }
# `fetch`: zgx's own transport for `ui.fetch` and remote images (HTTP and
# HTTPS, rustls), given to every window (src/main.rs): the app's scripts,
# and plugins granted "network". Nothing else of the runner.
-zgx-run = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", default-features = false, features = ["fetch"] }
+zgx-run = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", default-features = false, features = ["fetch"] }
# `webp`: `ui.image` decodes through this crate, by what its features
# allow, so turning WebP on here is all it takes (the member cards' art).
# `ico`: sites' favicons (the browser tab's: src/favicons.rs), most of
@@ -162,7 +162,7 @@ foreign-types = "0.5"
# elements, box drawing and Powerline glyphs to the cell; zgx's own renderer
# draws them from the font at its text line height, gapped. Builds Ghostty
# with Zig 0.16 (cached in ~/Library/Caches/zgx-ghostty).
-zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["ghostty"] }
+zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["ghostty"] }
# Windows' Transparency effects (src/transparency.rs), read and watched in
# the registry, until zgx reports them (zgx-asks/windows-transparency); a
@@ -172,8 +172,8 @@ zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e3
# DirectComposition tree of the window's own. The runtime ships with Windows
# 11 (and with Edge on Windows 10); without it, pages are placeholders.
[target.'cfg(windows)'.dependencies]
-windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Graphics_Gdi", "Win32_Media_Audio", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Console", "Win32_System_Registry", "Win32_System_Threading", "Win32_System_Time", "Win32_UI_WindowsAndMessaging"] }
-zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb", features = ["webview2"] }
+windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Graphics_Gdi", "Win32_Media_Audio", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Console", "Win32_System_Registry", "Win32_System_Threading", "Win32_UI_WindowsAndMessaging"] }
+zgx-desktop = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d", features = ["webview2"] }
# zgx's D-Bus (menus, portals) linked in rather than loaded: `zeron` is also
# what a headless Linux server and every Cloud machine runs (`zeron
@@ -185,13 +185,13 @@ libdbus-sys = { version = "0.2.7", features = ["vendored"] }
# zgx's own patches (its root Cargo.toml): a git dependency does not bring
# them, so every consumer repeats them.
[patch.crates-io]
-wgpu-hal = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
-winit = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
-accesskit_macos = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
-accesskit_consumer = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
-accesskit_atspi_common = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
-accesskit_unix = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
-accesskit_windows = { git = "https://github.com/zeronsh/zgx", rev = "b80a8af1c1f2079e373ec34a9194d26f2c998cbb" }
+wgpu-hal = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+winit = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+accesskit_macos = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+accesskit_consumer = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+accesskit_atspi_common = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+accesskit_unix = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
+accesskit_windows = { git = "https://github.com/zeronsh/zgx", rev = "d391ea7276f0de5cb3d65c191bfd66c02a4c358d" }
# zgx is slow unoptimized (its own setting): optimize dependencies, keep
# this crate quick to build.
diff --git a/apps/zgx/build.rs b/apps/zgx/build.rs
index cd9e9ec24..fb477fde6 100644
--- a/apps/zgx/build.rs
+++ b/apps/zgx/build.rs
@@ -12,7 +12,7 @@
fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("macos") {
use std::{path::PathBuf, process::Command};
- let source = "native/dictation_permission.m";
+ let source = "../../crates/ui/src/dictation/permission.m";
println!("cargo:rerun-if-changed={source}");
let out = PathBuf::from(std::env::var_os("OUT_DIR").unwrap());
let object = out.join("dictation-permission.o");
diff --git a/apps/zgx/docs/plugins.md b/apps/zgx/docs/plugins.md
index 5ac07018a..6ad2dd6bd 100644
--- a/apps/zgx/docs/plugins.md
+++ b/apps/zgx/docs/plugins.md
@@ -52,8 +52,7 @@ Your own plugins are signed as yours, and re-signed and reloaded each time you s
| `navigate` | open chats and pages (`zeron.open`) |
| `links.open` | open http(s) links (`zeron.open_url`), where you open links (Settings → Links) |
| `notifications` | send you notifications (`zeron.notify`), as Zeron's own: Settings → Notifications decides whether they show, a few a minute at most |
-| `compose` | put text in the message box, after what's there or in place of its words (`zeron.compose`), or a review comment on it (`zeron.compose_comment`); you still send it |
-| `draft` | read the message box's draft as you type it (`zeron.draft`), or any chat's (`zeron.draft_of`), and take it whole, put it back, swap it or let it go (`zeron.take_draft`, `put_draft`, `swap_draft`, `drop_draft`). See [The composer's draft](#the-composers-draft) |
+| `compose` | put text in the message box (`zeron.compose`), or a review comment on it (`zeron.compose_comment`); you still send it |
| `github`, `github.write` | read (and write) GitHub through Zeron's engine (older calls; prefer `commands` with `gh`) |
| `network` | the internet: `ui.fetch`, and remote images (`ui.image { src = "https://…" }`). See [Reaching the network](#reaching-the-network) |
| `clipboard`, `files`, `web`, `windows` | zgx's clipboard, file dialogs, web views, windows |
@@ -214,13 +213,9 @@ Zeron draws that row on your settings page: "Use as wallpaper", and while it's o
| call | what | needs |
|---|---|---|
| `zeron.open("home" \| { session = id } \| { settings = page })` | open a page | `navigate` |
-| `zeron.compose(text, { replace?, session? })` | text into a chat's draft: after what's there (on a line of its own), or in place of its words (`replace = true`, its chips kept); the chat shown's draft, or `session`'s ([below](#the-composers-draft)) | `compose` |
+| `zeron.compose(text)` | text into the message box | `compose` |
| `zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }` | a review comment on a file or a diff, as a chip on a chat's draft (below) | `compose` |
| `zeron.composed()` | in a build: your comments still on a draft, by `key`: `{ session, hovered }` | `compose` |
-| `zeron.draft()` | in a build: the message box's draft, `{ session?, text, attachments = { { kind, name } } }` (below) | `draft` |
-| `zeron.take_draft(key)`, `zeron.put_draft(key)`, `zeron.swap_draft(key)`, `zeron.drop_draft(key)` | the draft taken whole and kept by Zeron under your key; put back; traded with what the key keeps; let go (below) | `draft` |
-| `zeron.drafts()` | in a build: what Zeron keeps for you, by key: `{ session?, text, attachments, at }` | `draft` |
-| `zeron.draft_of(session)` | a promise of chat `session`'s draft as it is now, as `zeron.draft()` says it (`""`: a new chat's) | `draft` |
| `zeron.toast(text)` | a short note at the window's foot | (always) |
| `zeron.need("panel").open_tab { kind, title, icon?, data? }` | a tab of yours in the chat's panel; asked again, the one there is brought forward (found by `data.key` when you give one, else by its title) | `panel.tabs` |
| `zeron.tab(kind, function(tab) return node end)` | how a kind of your tabs draws (`tab` = `{ kind, title, data }`) | `panel.tabs` |
@@ -279,48 +274,6 @@ Comments on the diff (each cites the file and line it belongs to; L = line numbe
Give each a `key` of your own: `zeron.composed()` lists yours still on a draft by it (taken off or sent, gone), and says which one's chip is under the pointer (`hovered`), so the lines it was left on can keep a mark and light up as its chip is pointed at. Zeron's Git plugin does all of this in its Changes (`plugins-builtin/git/changes.luau`): the diff's + (or a drag from it over lines) opens `ds/comment`'s composer under them, using `ds/git_changes`'s `on_comment`, `ranges` and `marks`.
-### The composer's draft
-
-With `draft`, a plugin reads what you're typing and can set it aside and bring it back: a stash for a prompt written in the wrong chat, a counter of its length, a bar that says what it carries.
-
-- **`zeron.draft()`**, read in a build or an effect, is the draft shown as it changes: `session` (the chat it's for; nil on a new chat), `text` (the words as typed) and `attachments`, each chip's `kind` (`"file"`, `"image"`, `"chat"`, `"comment"`, …) and `name`. A file's path is never in it.
-- **`zeron.take_draft(key)`** takes the draft shown whole (its words, its chips, the passages quoted in it) and clears the composer. Zeron keeps it, under your `key` (1 to 64 characters), so your plugin never holds a file's path. An empty draft isn't taken; taking under a key that's kept replaces what it kept. Up to 16 at once.
-- **`zeron.put_draft(key)`** puts what `key` kept back on the draft shown, in whichever chat is open, and lets it go. Onto an empty composer it's as it was taken; onto words already there, its words follow after a blank line and its chips after theirs.
-- **`zeron.swap_draft(key)`** trades the draft shown with what `key` keeps. Either may be empty, so one call sets the draft aside (nothing kept), brings it back (an empty composer), or swaps the two.
-- **`zeron.drop_draft(key)`** lets what `key` kept go.
-- **`zeron.drafts()`**, read in a build, is what Zeron keeps for you, by key: `{ session?, text, attachments, at }` (`at` as `os.time()`). Drafts are kept while Zeron runs, as chats' own drafts are.
-- **`zeron.draft_of(session)`** reads another chat's draft once, shown or not: a promise of `{ session?, text, attachments }`, as `zeron.draft()` says it (`""` for a new chat's, with no session).
-
-With `compose` too, a plugin can change the words in place: **`zeron.compose(text, { replace = true })`** puts `text` in place of the draft's words, leaving its chips where they are, and `session` names another chat's draft. A rewrite or a snippet that expands is a read and a replace:
-
-```lua
--- ("ui.add", "draft", "compose"): /bug alone in the box becomes the template.
-ui.effect(function()
- local d = zeron.draft()
- if d and d.text == "/bug" then
- zeron.compose("## What happened\n\n## What I expected\n\n## Steps\n", { replace = true, session = d.session })
- end
-end)
-```
-
-Nothing is sent: the person sees the new words in the composer, and sends or edits them. `zeron.compose` takes 20,000 characters at most.
-
-Each is done in the order you ask. A prompt stash is one shortcut and one chip:
-
-```lua
--- ⌘⇧S (Ctrl+Shift+S): set the draft aside, bring it back, or swap the two.
-ui.command { id = "stash", title = "Stash prompt", key = "cmd+shift+s", run = function()
- zeron.swap_draft("stash")
-end }
-
--- While one is kept, a chip over the composer: click to bring it back.
-zeron.place { at = "#chat-composer", before = function(): Node
- return ui.show(function(): boolean
- return zeron.drafts().stash ~= nil
- end, ui.button { "Stashed", on_click = function() zeron.swap_draft("stash") end })
-end }
-```
-
## Programs and a database
A plugin can do real work of its own: run the command-line tools you already use, and keep what it learns.
diff --git a/apps/zgx/plugins-builtin/git/zeron.luau b/apps/zgx/plugins-builtin/git/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-builtin/git/zeron.luau
+++ b/apps/zgx/plugins-builtin/git/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-builtin/github/zeron.luau b/apps/zgx/plugins-builtin/github/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-builtin/github/zeron.luau
+++ b/apps/zgx/plugins-builtin/github/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau b/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau
+++ b/apps/zgx/plugins-builtin/parallax-scenes/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/account-pin/zeron.luau b/apps/zgx/plugins-dev/account-pin/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/account-pin/zeron.luau
+++ b/apps/zgx/plugins-dev/account-pin/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/account-rotate/zeron.luau b/apps/zgx/plugins-dev/account-rotate/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/account-rotate/zeron.luau
+++ b/apps/zgx/plugins-dev/account-rotate/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/checkout-status/zeron.luau b/apps/zgx/plugins-dev/checkout-status/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/checkout-status/zeron.luau
+++ b/apps/zgx/plugins-dev/checkout-status/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/compact-sidebar/zeron.luau b/apps/zgx/plugins-dev/compact-sidebar/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/compact-sidebar/zeron.luau
+++ b/apps/zgx/plugins-dev/compact-sidebar/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/composer-cat/zeron.luau b/apps/zgx/plugins-dev/composer-cat/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/composer-cat/zeron.luau
+++ b/apps/zgx/plugins-dev/composer-cat/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/focus/zeron.luau b/apps/zgx/plugins-dev/focus/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/focus/zeron.luau
+++ b/apps/zgx/plugins-dev/focus/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/keep-going/zeron.luau b/apps/zgx/plugins-dev/keep-going/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/keep-going/zeron.luau
+++ b/apps/zgx/plugins-dev/keep-going/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/md-hello/zeron.luau b/apps/zgx/plugins-dev/md-hello/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/md-hello/zeron.luau
+++ b/apps/zgx/plugins-dev/md-hello/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/notes-tool/zeron.luau b/apps/zgx/plugins-dev/notes-tool/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/notes-tool/zeron.luau
+++ b/apps/zgx/plugins-dev/notes-tool/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/ping/zeron.luau b/apps/zgx/plugins-dev/ping/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/ping/zeron.luau
+++ b/apps/zgx/plugins-dev/ping/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/session-status/zeron.luau b/apps/zgx/plugins-dev/session-status/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/session-status/zeron.luau
+++ b/apps/zgx/plugins-dev/session-status/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/session-words/zeron.luau b/apps/zgx/plugins-dev/session-words/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/session-words/zeron.luau
+++ b/apps/zgx/plugins-dev/session-words/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-dev/settings-demo/zeron.luau b/apps/zgx/plugins-dev/settings-demo/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-dev/settings-demo/zeron.luau
+++ b/apps/zgx/plugins-dev/settings-demo/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/plugins-sdk/zeron.luau b/apps/zgx/plugins-sdk/zeron.luau
index 553b6cc16..c5f896393 100644
--- a/apps/zgx/plugins-sdk/zeron.luau
+++ b/apps/zgx/plugins-sdk/zeron.luau
@@ -69,31 +69,13 @@
-- zeron.on_message(function(message) end)
-- what arrives: { from = { id, name }, data, at } ("devices")
-- zeron.open(route) "home", { session = id }, { settings = page } ("navigate")
--- zeron.compose(text, { replace?, session? })
--- text into the message box, for you to send: after
--- what's there, or in place of its words (`replace =
--- true`, its chips kept); the chat shown's draft, or
--- `session`'s ("compose")
+-- zeron.compose(text) text into the message box, for you to send ("compose")
-- zeron.compose_comment { file, line, note, to?, side?, snippet?, key?, session? }
-- a review comment chip on a session's draft, sent as
-- Zeron's review comments block (file:line, the note,
-- the code under it) ("compose")
-- zeron.composed() in a build: your comments still on a draft, by key
-- ({ [key] = { session, hovered } }), reactive ("compose")
--- zeron.draft() the composer's draft as you type it: { session?,
--- text, attachments = { { kind, name } } }, reactive
--- ("draft")
--- zeron.take_draft(key), zeron.put_draft(key), zeron.swap_draft(key),
--- zeron.drop_draft(key)
--- the draft taken whole (words, chips, quotes) and
--- kept by Zeron under your key, the composer
--- cleared; put back on the draft shown; the two
--- traded; let go ("draft")
--- zeron.drafts() what Zeron keeps for you, by key: { session?, text,
--- attachments, at }, reactive ("draft")
--- zeron.draft_of(session)
--- a promise of another chat's draft, as `draft()`
--- says it, read once ("" a new chat's) ("draft")
-- zeron.toast(text) a short note at the window's foot (always)
-- zeron.notify { title, body?, session? } a notification, as Zeron's
-- own (Settings → Notifications) ("notifications")
@@ -1361,16 +1343,8 @@ return function(id: string): any
ui.invoke(`{prefix}.open_url`, url)
end
- -- `text` into a chat's draft, for the person to send ("compose"): after
- -- what's there, on a line of its own; with `replace = true`, in place of
- -- its words (what it carries stays). The chat shown's draft, or
- -- `session`'s ("" a new chat's).
- function M.compose(text: string, opts: { replace: boolean?, session: string? }?)
- if opts and (opts.replace or opts.session) then
- ui.invoke("zeron.compose.insert", { text = text, replace = opts.replace == true, session = opts.session or ui.null })
- else
- ui.invoke("zeron.compose.insert", text)
- end
+ function M.compose(text: string)
+ ui.invoke("zeron.compose.insert", text)
end
-- A review comment on a file or a diff, as a chip on a session's draft
@@ -1400,57 +1374,6 @@ return function(id: string): any
return composed:get() or {}
end
- -- The composer's draft as you type it: the chat it's for (nil, a new
- -- chat), its words, and what it carries, each chip's kind ("file",
- -- "image", "chat", …) and name, never a file's path. Read in a build or
- -- an effect: it changes as the draft does. Nil until Zeron says.
- -- (Reached on first read: only a plugin allowed "draft" may.)
- local draft: any = nil
- function M.draft(): { session: string?, text: string, attachments: { { kind: string, name: string } } }?
- draft = draft or ui.shared("zeron.draft", nil :: any)
- return draft:get()
- end
-
- -- The draft shown, taken whole (its words, its chips, the passages
- -- quoted in it) and kept by Zeron under `key`, yours, the composer
- -- cleared; what that key kept before is replaced. An empty draft isn't
- -- taken. Up to 16 kept at once.
- function M.take_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "take", key = key })
- end
-
- -- What `key` kept, put back on the draft shown as it was taken (after
- -- what's there, if the composer isn't empty), and no longer kept.
- function M.put_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "put", key = key })
- end
-
- -- The draft shown and what `key` keeps, traded: either may be empty, so
- -- one call sets the draft aside, brings it back, or swaps the two.
- function M.swap_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "swap", key = key })
- end
-
- -- What `key` kept, let go of.
- function M.drop_draft(key: string)
- ui.invoke(`{prefix}.draft`, { op = "drop", key = key })
- end
-
- -- What Zeron keeps for you, by key: the chat each was taken from, its
- -- words, what it carries (as `draft()` says it) and when (os.time).
- -- Read in a build: it changes as you take and put back.
- local drafts = ui.shared(`{prefix}.drafts`, {} :: { [string]: any })
- function M.drafts(): { [string]: { session: string?, text: string, attachments: { { kind: string, name: string } }, at: number } }
- return drafts:get() or {}
- end
-
- -- Chat `session`'s draft as it is now, unsent: shown or not (`draft()`
- -- follows the one shown). A promise of { session?, text, attachments }
- -- as `draft()` says it ("" a new chat's draft, with no session).
- function M.draft_of(session: string): any
- return ui.call(`{prefix}.draft_of`, session)
- end
-
function M.toast(text: string)
ui.invoke(`{prefix}.toast`, text)
end
diff --git a/apps/zgx/src/access_mode_tests.rs b/apps/zgx/src/access_mode_tests.rs
deleted file mode 100644
index 0950b7f83..000000000
--- a/apps/zgx/src/access_mode_tests.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-//! Changing agents must not leave an unsupported Auto mode looking usable.
-use zgx_script::{ScriptHost, Value, testing::TestApp};
-
-#[test]
-fn unsupported_auto_is_labelled_unavailable_and_sends_nothing_until_changed() {
- let path =
- std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("ui/auto_access_fixture.luau");
- let mut app = TestApp::new(|runtime| ScriptHost::new(runtime, path));
- app.ui.scene.borrow_mut().resize(900., 600.);
- app.frames(30);
- assert!(app.texts().iter().any(|text| text == "Auto"));
- let offered = app.host.shared("test_composer_auto", Value::Bool(true));
- let access = app.host.shared("test_composer_access", Value::from("auto"));
- offered.set(Value::Bool(false));
- app.frames(30);
- // The animated label renders changing letters as separate text nodes.
- assert!(app.texts().concat().contains("Auto unavailable"));
- assert_eq!(
- access.get(),
- Value::from("auto"),
- "never silently grant full access"
- );
- // Nothing is sent in it: the engine would refuse the run.
- let draft = app.host.shared("test_composer_draft", Value::from(""));
- let sent = app.host.shared("test_composer_sent", Value::from(""));
- draft.set(Value::from("hello"));
- app.frames(10);
- app.click("role:button \"Send message\"");
- app.frames(10);
- assert_eq!(sent.get(), Value::from(""), "sent in an unavailable Auto");
- assert_eq!(draft.get(), Value::from("hello"), "the draft stays");
- // Rested on, it says why. (A press puts a tooltip away until the
- // pointer leaves: off it first.)
- app.hover("role:button \"Access\"");
- app.frames(10);
- app.hover("role:button \"Send message\"");
- assert!(app.wait_until(|app| app.texts().concat().contains("Choose another access mode to send.")));
- app.click("role:button \"Access\"");
- app.frames(30);
- assert!(
- app.texts()
- .iter()
- .any(|text| text.contains("Choose another access mode or agent."))
- );
- app.click("role:option \"Full access Run commands and edits without asking.\"");
- app.frames(30);
- assert_eq!(access.get(), Value::from("full"));
- assert!(app.wait_until(|app| !app.texts().concat().contains("Auto unavailable")));
- // Another mode chosen, it goes.
- app.click("role:button \"Send message\"");
- app.frames(10);
- assert_eq!(sent.get(), Value::from("hello"));
- assert_eq!(app.error(), None);
-}
diff --git a/apps/zgx/src/activity_cost_tests.rs b/apps/zgx/src/activity_cost_tests.rs
index ead383afb..9386b8cda 100644
--- a/apps/zgx/src/activity_cost_tests.rs
+++ b/apps/zgx/src/activity_cost_tests.rs
@@ -50,7 +50,7 @@ fn thread_cpu() -> Duration {
}
/// One call row's scene (kinds and boxes, no text) and every node above it to
-/// the root, for zgx's layout work to reproduce alone (`ACTIVITY_TREE=1`).
+/// the root, for zgx's layout work to reproduce alone (`DEBUG_TREE=1`).
fn dump_row(bench: &mut Bench) {
let Some(button) = bench.app.find("role:button ~\"package part8 --\"") else {
eprintln!("TREE no row in view");
@@ -88,9 +88,9 @@ fn dump_row(bench: &mut Bench) {
}
thread_local! {
- /// Whether `ACTIVITY_NODE` has shown its node.
+ /// Whether `DEBUG_NODE` has shown its node.
static NODE_SHOWN: std::cell::Cell = const { std::cell::Cell::new(false) };
- /// Whether frames show their damage now (`ACTIVITY_DAMAGE`: the scroll's).
+ /// Whether frames show their damage now (`DEBUG_DAMAGE`: the scroll's).
static DAMAGE_SHOWN: std::cell::Cell = const { std::cell::Cell::new(false) };
}
@@ -125,7 +125,7 @@ fn show_damage(scene: &zgx::scene::Scene, damage: &[zgx::scene::Rect]) {
}
}
}
- if std::env::var_os("ACTIVITY_DAMAGE_AT").is_some() {
+ if std::env::var_os("DEBUG_DAMAGE_AT").is_some() {
for (rect, radius) in scene.backdrop_filters() {
eprintln!("DAMAGE backdrop filter {:.1},{:.1} {:.1}x{:.1} radius {radius}", rect.x, rect.y, rect.width, rect.height);
}
@@ -496,9 +496,9 @@ impl Bench {
let gpu = draw.then(|| {
let mut gpu = GpuRenderer::new((W * SCALE) as u32, (H * SCALE) as u32).expect("a GPU");
gpu.set_scale_factor(SCALE);
- // (`ACTIVITY_SCROLL_COPY`: copying scrolls as a window does; offscreen
+ // (`DEBUG_SCROLL_COPY`: copying scrolls as a window does; offscreen
// on macOS the renderer repaints them instead.)
- if std::env::var_os("ACTIVITY_SCROLL_COPY").is_some() {
+ if std::env::var_os("DEBUG_SCROLL_COPY").is_some() {
gpu.debug_allow_scroll_copies();
}
for font in crate::fonts() {
@@ -579,7 +579,7 @@ impl Bench {
// ahead), then the frame's own work.
let (mut spare, mut spare_calls) = (0, 0);
let process_from = process_cpu();
- let debug = std::env::var_os("ACTIVITY_FRAMES").is_some();
+ let debug = std::env::var_os("DEBUG_FRAMES").is_some();
if debug {
eprintln!("@SPARE");
}
@@ -603,10 +603,10 @@ impl Bench {
let drawn = !report.damage.is_empty();
if drawn && let Some(gpu) = &mut self.gpu {
let stats = gpu.render(&self.app.ui.scene.borrow(), &report.damage).expect("a frame drawn");
- if std::env::var_os("ACTIVITY_GPU").is_some() && zgx::trace::enabled() {
+ if std::env::var_os("DEBUG_GPU").is_some() && zgx::trace::enabled() {
eprintln!("GPU {stats:?}");
}
- if std::env::var_os("ACTIVITY_DAMAGE").is_some() && DAMAGE_SHOWN.get() {
+ if std::env::var_os("DEBUG_DAMAGE").is_some() && DAMAGE_SHOWN.get() {
eprintln!("DAMAGE frame: {} rects, {} px repainted, {} scroll copies, {} layer repaints, {} backdrop copies", report.damage.len(), stats.damaged_pixels, stats.scroll_copies, stats.layer_repaints, stats.backdrop_copies);
show_damage(&self.app.ui.scene.borrow(), &report.damage);
}
@@ -730,7 +730,7 @@ fn scenarios(n: usize, think: usize, open: bool) {
}
bench.settle(30);
let ticks = bench.frames(60);
- if std::env::var_os("ACTIVITY_TREE").is_some() && open {
+ if std::env::var_os("DEBUG_TREE").is_some() && open {
dump_row(&mut bench);
}
row(n, think, label, "ticks", &ticks, 60, bench.nodes());
@@ -774,10 +774,10 @@ fn scenarios(n: usize, think: usize, open: bool) {
let new = call(calls, 4);
let id = new["id"].as_str().unwrap().to_owned();
entry["parts"].as_array_mut().unwrap().push(new);
- if std::env::var_os("ACTIVITY_FRAMES").is_some() {
+ if std::env::var_os("DEBUG_FRAMES").is_some() {
eprintln!("@CALL {calls}");
}
- let tracing = std::env::var_os("ACTIVITY_TRACE").is_some() && calls == n + 2;
+ let tracing = std::env::var_os("DEBUG_TRACE").is_some() && calls == n + 2;
if tracing {
zgx::trace::set_enabled(true);
}
@@ -787,8 +787,8 @@ fn scenarios(n: usize, think: usize, open: bool) {
call_cost.add(&cost);
if tracing {
// (A few frames into the arrival's animations.)
- // (`ACTIVITY_TRACE_FRAMES`: how many of the arrival's frames, 7 unless set.)
- let traced: usize = std::env::var("ACTIVITY_TRACE_FRAMES").ok().and_then(|n| n.parse().ok()).unwrap_or(7);
+ // (`DEBUG_TRACE_FRAMES`: how many of the arrival's frames, 7 unless set.)
+ let traced: usize = std::env::var("DEBUG_TRACE_FRAMES").ok().and_then(|n| n.parse().ok()).unwrap_or(7);
bench.frames(traced - 1);
for frame in zgx::trace::frames(2 * traced) {
let mut runs = frame.runs.clone();
@@ -819,10 +819,10 @@ fn scenarios(n: usize, think: usize, open: bool) {
let k = format!("{:?}", scene.kind(id));
k.split(|c: char| c == '(' || c == '{' || c == ' ').next().unwrap_or("").to_owned()
};
- // (`ACTIVITY_NODE=`: that node's kind, what's above it, and the
+ // (`DEBUG_NODE=`: that node's kind, what's above it, and the
// texts under the box above it.)
// (A number: that node, as the frame's runs name it.)
- let asked = std::env::var("ACTIVITY_NODE").ok();
+ let asked = std::env::var("DEBUG_NODE").ok();
let numbered = asked.as_deref().and_then(|n| n.parse::().ok());
let pick = match numbered {
Some(n) => Some(n),
@@ -872,7 +872,7 @@ fn scenarios(n: usize, think: usize, open: bool) {
let mut after = cost;
for f in 0..60 {
let frame = bench.frame();
- if std::env::var_os("ACTIVITY_ARRIVAL").is_some() && calls == n + 2 {
+ if std::env::var_os("DEBUG_ARRIVAL").is_some() && calls == n + 2 {
let k = |phase: Phase| frame.phase(phase) / 1000;
eprintln!(
"ARRIVAL f{f:02} {}k | script {}k update {}k layout {}k paint {}k encode {}k | calls {} | proc {} µs",
@@ -929,10 +929,10 @@ fn scenarios(n: usize, think: usize, open: bool) {
row(n, think, label, "rest", &rest, 60, bench.nodes());
// From there on down past the turn, a wheel's step a frame.
let mut scroll = Cost::default();
- // (`ACTIVITY_DAMAGE`: each scroll frame's damage, `ACTIVITY_SCROLL_STEP` points a step.)
- let step: f32 = std::env::var("ACTIVITY_SCROLL_STEP").ok().and_then(|s| s.parse().ok()).unwrap_or(120.);
+ // (`DEBUG_DAMAGE`: each scroll frame's damage, `DEBUG_SCROLL_STEP` points a step.)
+ let step: f32 = std::env::var("DEBUG_SCROLL_STEP").ok().and_then(|s| s.parse().ok()).unwrap_or(120.);
DAMAGE_SHOWN.set(true);
- let noting = std::env::var_os("ACTIVITY_DAMAGE").is_some();
+ let noting = std::env::var_os("DEBUG_DAMAGE").is_some();
if noting {
zgx::trace::set_enabled(true);
}
@@ -999,7 +999,7 @@ fn activity_cost() {
fn activity_goal() {
profiled();
// SAFETY: set before the renderer reads it, on this test's thread alone.
- unsafe { std::env::set_var("ACTIVITY_SCROLL_COPY", "1") };
+ unsafe { std::env::set_var("DEBUG_SCROLL_COPY", "1") };
let n: usize = std::env::var("ACTIVITY_GOAL_CALLS").ok().and_then(|v| v.parse().ok()).unwrap_or(1000);
let seconds: f64 = std::env::var("ACTIVITY_GOAL_SECONDS").ok().and_then(|v| v.parse().ok()).unwrap_or(20.);
let report = |what: &str, cost: &Cost, frames: usize, ticks: usize, seconds: f64| {
@@ -1100,7 +1100,7 @@ fn activity_goal() {
fn activity_goal_thinking() {
profiled();
// SAFETY: set before the renderer reads it, on this test's thread alone.
- unsafe { std::env::set_var("ACTIVITY_SCROLL_COPY", "1") };
+ unsafe { std::env::set_var("DEBUG_SCROLL_COPY", "1") };
let seconds: f64 = std::env::var("ACTIVITY_GOAL_SECONDS").ok().and_then(|v| v.parse().ok()).unwrap_or(120.);
let think_kb: usize = std::env::var("ACTIVITY_GOAL_THINK").ok().and_then(|v| v.parse().ok()).unwrap_or(50);
let report = |what: &str, cost: &Cost, frames: usize, ticks: usize, seconds: f64| {
@@ -1178,7 +1178,7 @@ fn activity_goal_thinking() {
bench.settle(240);
let mut cost = Cost::default();
let ticks = 10 * 120;
- let traced = std::env::var_os("ACTIVITY_GOAL_TRACE").is_some();
+ let traced = std::env::var_os("DEBUG_GOAL_TRACE").is_some();
for tick in 0..ticks {
let dy = if tick < ticks / 2 { 8. } else { -8. };
if traced && tick == 300 {
@@ -1187,7 +1187,7 @@ fn activity_goal_thinking() {
bench.app.scroll("transcript", dy);
cost.add(&bench.frame());
if traced && tick == 303 {
- // (`ACTIVITY_GOAL_TRACE`: a few scroll frames' runs and what they laid out.)
+ // (`DEBUG_GOAL_TRACE`: a few scroll frames' runs and what they laid out.)
for frame in zgx::trace::frames(8) {
let mut runs = frame.runs.clone();
runs.sort_by(|a, b| b.micros.total_cmp(&a.micros));
@@ -1386,8 +1386,8 @@ fn activity_row_cost() {
}
println!();
assert_eq!(app.error(), None);
- // (`ACTIVITY_ROW_TREE`: one row's nodes, kinds and boxes.)
- if std::env::var_os("ACTIVITY_ROW_TREE").is_some() {
+ // (`DEBUG_ROW_TREE`: one row's nodes, kinds and boxes.)
+ if std::env::var_os("DEBUG_ROW_TREE").is_some() {
let scene = app.ui.scene.borrow();
let mut stack = vec![scene.root()];
let mut verb = None;
diff --git a/apps/zgx/src/agents.rs b/apps/zgx/src/agents.rs
index 00506865c..af62053ae 100644
--- a/apps/zgx/src/agents.rs
+++ b/apps/zgx/src/agents.rs
@@ -411,24 +411,6 @@ pub fn install(host: &ScriptHost) {
a.add_key(id, provider, key, name).await
}
});
- // An API key for Cloud's agents (Settings → Providers with Cloud
- // shown): kept by the vault, authorized for the account's Cloud device
- // (`device`), the key every Cloud machine uses from its next turn.
- // Rejects with the engine's words, which never hold the key.
- let a = agents.clone();
- host.async_action("agents.cloud_key", move |args| {
- let a = a.clone();
- let provider = args.field("provider").map(text).unwrap_or_default();
- let key = args.field("key").map(text).unwrap_or_default().trim().to_string();
- let device = args.field("device").map(text).unwrap_or_default();
- async move {
- crate::plugins::preview::refuse("agents.cloud_key")?;
- let params = cloud_key_params(&provider, &key, &device)?;
- engine::get().call("VaultPutApiKey", params).await.map_err(|error| engine::outcome(&error).to_string())?;
- a.load_accounts(true).await;
- Ok(Value::Nil)
- }
- });
// An API key's name (no secret: on whichever device shows it), rejecting
// with the engine's words.
let a = agents.clone();
@@ -1966,20 +1948,6 @@ fn epoch_secs(s: &str) -> Option {
mod tests {
use super::*;
- /// A Cloud API key goes to the vault for the account's Cloud device:
- /// Anthropic's or OpenAI's only, a real key, Cloud on.
- #[test]
- fn a_cloud_key_is_one_cloud_runs_for_its_device() {
- let ok = cloud_key_params("anthropic-key", "sk-ant-123", "cloud-acct").unwrap();
- assert_eq!(ok, json!({ "provider": "anthropic-key", "key": "sk-ant-123", "authorizedDevices": ["cloud-acct"] }));
- assert!(cloud_key_params("openai-key", "sk-1", "d").is_ok());
- assert!(cloud_key_params("claude", "sk", "d").is_err(), "a login isn't a key");
- assert!(cloud_key_params("anthropic-key", "", "d").is_err());
- assert!(cloud_key_params("anthropic-key", "a\nb", "d").is_err());
- assert!(cloud_key_params("anthropic-key", &"k".repeat(5000), "d").is_err());
- assert!(cloud_key_params("anthropic-key", "sk", "").is_err(), "Cloud off");
- }
-
/// Pi signed in to Claude, or another login put in use: Pi's models are
/// looked up again. Usage moving, or another agent's, isn't Pi's change.
#[test]
@@ -2260,22 +2228,6 @@ pub(crate) fn shown_target() -> Option {
}
/// `params` addressed to the device Providers shows.
-/// `VaultPutApiKey`'s params for a Cloud API key: Anthropic's or OpenAI's
-/// alone, a key that's there and no longer than any key is, for the
-/// account's Cloud device. Else why not.
-pub(crate) fn cloud_key_params(provider: &str, key: &str, device: &str) -> Result {
- if !matches!(provider, "anthropic-key" | "openai-key") {
- return Err("Cloud takes Anthropic and OpenAI keys".into());
- }
- if key.is_empty() || key.len() > 4096 || key.chars().any(char::is_control) {
- return Err("That isn't an API key".into());
- }
- if device.is_empty() {
- return Err("Turn Cloud on in Settings → Cloud first".into());
- }
- Ok(json!({ "provider": provider, "key": key, "authorizedDevices": [device] }))
-}
-
pub(crate) fn addressed_to_shown(params: Json) -> Json {
addressed_to(shown_target().as_deref(), params)
}
diff --git a/apps/zgx/src/appshots/mod.rs b/apps/zgx/src/appshots/mod.rs
index a9f2719dc..a7a1211ac 100644
--- a/apps/zgx/src/appshots/mod.rs
+++ b/apps/zgx/src/appshots/mod.rs
@@ -535,7 +535,7 @@ impl Appshots {
}
}
-pub(crate) static SOUND: &[u8] = include_bytes!("../../../../assets/sounds/appshot.wav");
+pub(crate) static SOUND: &[u8] = include_bytes!("../../../../crates/ui/assets/sounds/appshot.wav");
fn play_sound() {
std::thread::spawn(|| crate::settings::play(SOUND));
diff --git a/apps/zgx/src/auth.rs b/apps/zgx/src/auth.rs
index 570ec53ed..09fa21260 100644
--- a/apps/zgx/src/auth.rs
+++ b/apps/zgx/src/auth.rs
@@ -341,14 +341,6 @@ pub fn install(cx: &mut WindowContext, host: &ScriptHost) {
Ok(Value::Nil)
}
});
- host.async_action("account.keeps_chats_local", move |_| async move {
- Ok(Value::Bool(engine::get().keeps_chats_local()))
- });
- host.async_action("account.keep_chats_local", move |on| async move {
- crate::plugins::preview::refuse("account.keep_chats_local")?;
- engine::get().keep_chats_local(matches!(on, Value::Bool(true)))?;
- Ok(Value::Nil)
- });
let a = auth.clone();
host.async_action("account.username", move |_| {
let a = a.clone();
diff --git a/apps/zgx/src/chat.rs b/apps/zgx/src/chat.rs
index fae3929e7..7dad220fa 100644
--- a/apps/zgx/src/chat.rs
+++ b/apps/zgx/src/chat.rs
@@ -149,53 +149,16 @@ struct Entry {
/// by a part patch): the rest are as they were built. None: not known
/// (it came whole, or grew a text).
patched: Option>,
- /// Its json's sum and its size as JSON, each worked out once and kept
- /// until it changes (`json_mut`): a chat opened again says what it holds
- /// by its sums, and one let go of is weighed (`let_go_weight`), on every
- /// switch, and a long reply's json is hundreds of kilobytes.
- kept_sum: std::cell::Cell