22 Commits

Author SHA1 Message Date
6ff31346ff site: restore the remote SSH copy — HELD, do not merge (FRE-997, remote half)
DO NOT MERGE OR DEPLOY THIS BRANCH. It is the held half of FRE-997, split out
of a336a6c at the Code Review Engineer's changes-requested verdict and the
Chief of Staff's 2026-11-03 launch hold (comment 2ccad154), and it is stacked
on `freno-dev/FRE-997-count-18` so its own diff stays remote-only.

The copy it restores was pulled by FRE-323 (c1c498e, c718370). FRE-997's
argument is that those removals were checked against claims the copy never
made: hosts come from `~/.ssh/config` and Tailscale (`RemoteHostDiscovery`),
the one-time `ssh-copy-id` is a prerequisite the row hands the user as a
command (`RemoteHostStatus.fixCommand`), the per-host credential is minted and
copied over (`RemoteMirror`), and a remote host mirrors this Mac's integrations
(`RemoteMirrorReconcile`). Two things in the old copy were genuinely wrong and
are fixed rather than restored: the "every hooked agent" overstatement (Muse,
Cline and Amp are `.unsupported` for remote and are named) and the count.

It may land only when all of these are recorded on FRE-997:

1. a CTO verdict that the one-click flow was run on the shipping build;
2. footage of a remote agent joining the island;
3. the Chief of Staff revising the FRE-346 §3 launch gate and taking the
   public-claim call to the sponsor.

Until then the live site keeps the FRE-323 state. The restore condition this
commit deletes (`marketing/drafts/remote-ssh/copy.md`) is the gate being cited:
FRE-205 is todo/unassigned, FRE-320 is a verdict task, and no recording exists.

- The Remote collage tile and its mock.
- The "Any SSH box, one click away" breakdown with its RemoteHostDemo.
- The "One-click SSH setup" chip.
- The /agents remote paragraph and the Cline/Amp "this Mac only" rows.
- The approvals bullet names the three local-only agents instead of claiming
  every hooked agent.
- remote-claims.test.ts guards the restored copy plus the two overstatements
  that must not return.
- positioning.md moves remote SSH to publishable with its backing.

Gate on this branch, this run: `bun test src/routes/nook` 17 pass / 0 fail;
`bun run build` succeeds. Green tests do not lift the hold.
2026-11-04 00:30:21 +00:00
25ec84ceb4 site: state the agent count as eighteen (FRE-997, count half)
FRE-359 verdict B dropped the agent count instead of correcting it: the page
said thirteen while `AgentSpec.all` held eighteen, and the /agents table listed
13 of those rows. The count is a fact, not a claim, so this states it and makes
the table match the registry again.

- Landing island bullet and the marquee chip say 18 agents.
- /agents: title/description/ogTitle/H1 at eighteen, and the five missing rows
  are on the page — Kimi, GitHub Copilot CLI, Crush, Cursor, Amp — with events
  and gating taken from hook/setup.go, hook/normalize.go,
  hook/normalize_hosts.go, Sources/NookCore/Agents/HookConfigInstaller.swift
  and plugins/amp/index.ts. All five are Observe (kimi/copilot PreToolUse and
  PermissionRequest fire before the host's own check; Crush documents one
  event; a silent Cursor permission hook blocks; Amp's plugin API has no
  permission-wait event).
- agents.test.ts asserts the roster as an equality with the 18-name registry
  in registry order again, plus the count, instead of a subset check.
- remote-claims.test.ts keeps every FRE-323 remote removal guard and the parked
  copy, and drops only the two completeness bans the corrected count
  contradicts ("every coding agent", "Supported agents") — the ban existed
  because the page claimed the set and listed 13 of 18.
- positioning.md: the coverage row is publishable at 18.

This is the count/roster half of FRE-997 only. The remote-SSH restore is held
by the Chief of Staff against FRE-346 §3 and is not in this commit: no remote
tile, breakdown, demo, chip, /agents remote paragraph or drafts deletion here.

Gate: `bun test src/routes/nook` 18 pass / 0 fail; `bun run build` succeeds.
2026-11-04 00:21:35 +00:00
dd368d21e7 smarter-remote: publish the app's privacy policy and terms of use
A Smarter Remote's iOS paywall sells an auto-renewing subscription, and
App Review 3.1.2 requires it to link a privacy policy and terms of use.
No such pages existed. They now live on the main site at
/smarter-remote/privacy and /smarter-remote/terms, so no new subdomain
or DNS change is needed. The policy describes what the app actually
does: local-network control, pairing data kept on the phone, purchases
through Apple and RevenueCat, and QR sharing phone to phone.

Tests: bun test shows the same 52 pre-existing failures with and
without the pages; tsc reports nothing in the new files.

TVR-19

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:34:18 -05:00
Paperclip Agent
d44133fcb3 site: guard the removed remote claim and agent count against return (FRE-323, FRE-359) 2026-10-29 14:38:31 +00:00
Freno CMO
578ee58f9c marketing: the remote correction is committed, not deployed
copy.md said the sentences were "removed from the live site" and
rationale.md said "the landing page now says only what the product can back
today". Neither is true: nook.freno.me still serves all of them (HTTP 200,
re-fetched 2026-10-29T14:20Z) because the push is blocked on a write
credential (card 82d1e1b7). Both files now say committed-not-deployed, and
positioning.md's excluded-count row records FRE-359 verdict B and where the
count was removed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-29 14:22:12 +00:00
Freno CMO
d2c2e6a4ee agents: drop the count and the coverage claim (FRE-359 verdict B)
FRE-359's verdict is B: the page's thirteen is the registry's first thirteen
of eighteen rows, so the count, "every coding agent The Nook supports" and
"Supported agents" all overstate or understate the app. The permitted
sentences are the CTO's, verbatim.

- agents.tsx: head description, ogTitle and H1 paragraph replaced with the
  verdict's sentences; title/H1 "Supported agents" -> "Agent coverage".
- agents.test.ts: the stale NOOK-336 guard asserted "all thirteen" and
  the 13-name roster, so it passed in lockstep with the page. It now asserts
  no count of any form, no completeness phrase, and that the rows are a
  subset of the 18-name registry list (copied 2026-10-29, @ f4258034) in
  registry order. The table still lists 13 rows; regenerating it from the
  registry is its own ticket, and the guard no longer pretends otherwise.
- FeatureBreakdowns.tsx / IslandExtras.tsx: the landing "13 agents:" bullet
  and the "13 agents" marquee chip lose the count; the chip becomes
  "Agents wired in".

bun test src/routes/nook/agents.test.ts: 4 pass. Server security and appcast
suites fail in this checkout on missing env (Environment validation failed /
mainDBConnection), unrelated to these files.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-29 14:22:11 +00:00
Paperclip Agent
c718370674 /agents: take the remote-session sentence off the page
FRE-323 removed the remote claim from the landing page and missed the second
page that carries it. /agents said 'Agents can run on this Mac or on remote
machines over SSH — remote sessions report into the same grid', which is the
same unverified claim (FRE-315 §1, FRE-320), in front of the same launch
traffic. Removed; the paragraph now ends at 'the agent keeps its own prompting'.

Not deployed: same read-only credential as c1c498e.
2026-10-29 10:20:13 +00:00
Paperclip Agent
210a7e6e75 marketing: reconcile positioning.md with the CTO verdicts and the price decision
The source-of-truth file still sold claims the board has since ruled on:

- 'thirteen agents' as a public coverage count — FRE-322 §1 counts 18 specs,
  9 of which can raise an approval card; no count is publishable (FRE-203 plan-b).
- 'Price rises to 5 at 1.0' — withdrawn by the Chief of Staff on 2026-10-29
  04:01; price stays $10 and is not a launch asset.
- 'macOS 14+' — the app cannot start below 14.2 (881190d, site 134f41e).
- Approved-claims table carried no launch sentence at all, and no row for the
  remote-SSH hold or the banned absolute privacy sentences.
- Pointed at the-nook/docs/marketing-strategy.md, which no longer exists.

Now: the Plan B claim set, a per-claim status table with verdict pointers,
FRE-354's corrections to the hook/bridge sentence and the Sentry disclosure,
the iPhone TestFlight state, and an explicit excluded/banned list.
2026-10-29 10:19:14 +00:00
Paperclip Agent
c1c498e37f site: remove the unproven remote claim from the Nook landing page
FRE-323. The one-click remote install is app-UI-only and needs hand-edited ~/.ssh/config plus a one-time ssh-copy-id (FRE-320); FRE-315 and FRE-322 hold the claim unverified and demo-gated.

- drop the Remote tile and its mock from the feature collage
- drop the "Any SSH box, one click away" breakdown, its demo and bullets
- drop "Works across every hooked agent, local or remote"
- drop the "One-click SSH setup" chip
- move the copy to marketing/drafts/remote-ssh/ and mark remote held in marketing/positioning.md

No replacement claim was added. Deploy waits on a push credential for the GitHub repo Vercel builds.
2026-10-29 05:55:26 +00:00
134f41eac4 Merge branch 'NOOK-881' — the landing page, FAQ and downloads list said macOS 14, but the app cannot start below 14.2: a CoreAudio overlay symbol its mixer uses only exists from 14.2, and the old bundle floor let LaunchServices launch it on machines that could never run it. The FAQ now names the audio tap API rather than the observation framework, and the downloads list's 14.6+ becomes 14.2+. InputHalo and Gaze keep their own floors. 2026-10-23 13:28:47 -04:00
881190d1d4 nook: say macOS 14.2, which is what the app actually needs
The landing page, the FAQ and the downloads list still promised macOS 14. The
app cannot start there: dyld refuses it on 14.0 and 14.1 because a
CoreAudio overlay symbol its mixer uses only exists from 14.2, and the old
floor in its bundle had LaunchServices launching it on machines that could
never run it (NOOK-881).

The FAQ answer named the observation framework as the reason for 14; the
binding reason is the per-app audio tap API, which Apple shipped in 14.2. The
downloads list said 14.6+, which was already stricter than the truth.

InputHalo and Gaze still read 14.6+; their floors are their own and this
change leaves them alone.

Tests: bun test src/routes/nook (2 pass); bunx tsc --noEmit reports nothing in
the three files changed (the checkout's 286 pre-existing errors are elsewhere).

NOOK-881
2026-10-23 13:28:45 -04:00
f492132bf2 Merge branch 'MISC-48' — download tracking across every door 2026-10-22 12:59:50 -04:00
a524f23be2 downloads: track every door and surface them on /analytics
The analytics page could not answer "how many downloads, of which
product". Three of the four download doors recorded nothing: the tRPC
click proxy only left the generic request row, whose path is the raw URL
with the asset buried in `?batch=1&input={"asset_name":...}`, and the S3
file route that serves Sparkle updates and the Nook app logged nothing
at all. The one door that did log (the Nook redirect) kept a private copy
of the logVisit/enrich/flush sequence, under its own path.

All doors now go through trackDownload, which writes one row per event
under /api/downloads/<asset> and flushes it inside the request — a click
is low-volume and serverless is not guaranteed to run the 30s batch
timer after the response. The file route maps its prefix allowlist to
asset keys, so a version bump stays one asset rather than one per
release. getAnalyticsSummary groups those rows into a downloads block and
the freno.me panel renders it under the overview cards.

History is recovered to the degree it exists: the Nook door's rows and
the tRPC clicks still carry enough to derive from (asset name in the URL).
scripts/backfill-downloads.ts inserts those derived rows with a
`backfill-<source id>` primary key and INSERT OR IGNORE, leaving the
originals untouched, so re-running is a no-op. Run against the live table
it added 66 rows: gaze 42, thenook 19, inputhalo 4, lineage 1.

Tests: new backfill suite (derivation, visitor detail carried over,
idempotency, empty history) and summariseDownloads cases; the Nook route
test now pins the canonical path, and the NOOK-337 allowlist audit reads
the map keys instead of quoted strings. Red-checked by stubbing the
downloads block back to zeros — the summary case fails, then passes.
Full suite matches master.

Co-Authored-By: nw-flash <noreply@nw-flash.local>
MISC-48
2026-10-22 12:59:48 -04:00
0bf15e528d Merge branch 'NOOK-565' 2026-10-17 16:11:43 -04:00
a48326fd1d nook: decode hex apostrophe entities in release notes
Settings > Changelog and /changelog showed literal &#x27; wherever a
bullet had an apostrophe: embed_release_notes.py escapes appcast
descriptions with Python's html.escape, which prefers the hex form for
apostrophes, and decodeEntities only knew the decimal &#39; — so the
entity survived into releases.json and was rendered as-is. Add &#x27;
(and &apos;) to the replacement table.

Tests: new sectionsFromHtml case pinning html.escape-style output;
fails without the fix, full suite otherwise matches master.

Co-Authored-By: glm-5.3-flash <noreply@z.ai>
NOOK-565
2026-10-17 16:11:40 -04:00
ac63057ef7 Merge branch 'NOOK-353' — agents page location cleanup 2026-10-14 10:02:09 -04:00
f6d6d442de site: drop path references from the Nook agents page
The Nook's config, hook binary, plugins and state all live under
~/.nook now, so per-agent filesystem paths on the /agents cards were
both stale and repetitive — every plugin is stored canonically under
~/.nook/plugins and only linked out to each agent's own config dir.
The wiring copy now describes the mechanism, not the location.

The card review also surfaced drift against hook/setup.go, plugins/*
and AgentRegistry: OpenClaw listed AgentResponse, an event renamed to
Stop in NOOK-298, and several cards missed events their integrations
actually emit (SessionError on halted sessions, AgentStart on pi/omp,
PermissionRequest/Resolved on omp, QuestionAsked on hermes, and
Codex's SessionEnd/PreToolUse/PostToolUse). Codex's gating now notes
its user-input questions are answered from a card too.

Tests: bun test (505 pass, 3 skip, 1 pre-existing queryAuditLogs
failure identical to master); tsc --noEmit diagnostics identical to
master.

NOOK-353

Co-Authored-By: kimi-k3-flex <noreply@freno.me>
2026-10-14 10:01:52 -04:00
14a61fde9b Merge branch 'NOOK-336' — NOOK-336 Muse on the agents page 2026-10-13 23:23:44 -04:00
b4e68765fe nook: list Muse on the agents page
nook.freno.me/agents listed twelve agents and said "twelve" in its meta
description, OG title and intro, while the app's registry (AgentSpec.all)
gained Muse in 0.10.0 as its thirteenth. The page mirrors that registry
by hand from another repo, so nothing flagged the drift.

Adds the Muse card from its plugin manifest and registry row: the plugin
body at ~/.nook/plugins/muse installed through Muse's own plugins CLI,
its fourteen hook events, approvals answerable from a card (every tool
call under Verify), and this Mac only since remote hosts skip it. The
positioning claims table and copy move to thirteen with it.

Tests: src/routes/nook/agents.test.ts pins the roster to the registry's
names in order (red on master: Muse missing) and every stated count to
the number of entries (red when the intro says twelve again).

NOOK-336

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:23:43 -04:00
dabfeada3b Merge branch 'NOOK-334' — NOOK-334 landing page feature set 2026-10-13 23:07:14 -04:00
9508aee8e1 nook: show the full feature set on the landing page
The landing page sold eight features from around 0.6 and summed up the
rest in one line, while 0.6–0.10 shipped most of the island's modules. It
also said twelve agents (Muse made thirteen) and marked phone approvals
"coming soon" although the iPhone companion is in TestFlight beta.

Adds live demos for terminal replies, the volume mixer, Capture with its
Wings, and floating actions; a bento of module tiles behind a two-way
feature marquee; and an iPhone/Watch beta section whose request form
posts the same email-only report the app's Settings > Phone card sends.
The approval flow, remote sessions and setup, timer, temperatures and
Capture mocks are rebuilt from the app's own views, so the site shows
what the island actually draws.

Tests: report.test.ts pins the landing page's beta request against the
/report schema (red when the schema demands a machine snapshot); nook and
subdomain suites pass.

NOOK-334

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:07:10 -04:00
1a182e53fe downloads: serve Nook delta files the Sparkle updater fetches
The v0.10.0 publish stopped at the enclosure check: the appcast names
Nook17-9.delta / Nook17-10.delta, and the proxy 400'd both with
'Invalid file format' while the TheNook DMG passed. Sparkle names delta
files after the app bundle, not the DMG, so the prefix allowlist needs
'Nook' alongside 'TheNook'. Both deltas sat in S3 the whole time; the
appcast was never published and the live one still serves 0.9.0.

Adds a static source-audit regression test in the repo's downloads.test
pattern; proven red against the unfixed allowlist.

Tests: bun test src/routes/api/downloads/filename.test.ts

NOOK-337

Co-Authored-By: glm-5.3-flash <noreply@neuralwatt.com>
2026-10-13 22:17:27 -04:00
36 changed files with 4065 additions and 537 deletions

View File

@@ -4,13 +4,39 @@ Every drafted asset draws its voice, claims, and constraints from this file. If
artifact invents its own framing, fix the artifact or fix this file — never both artifact invents its own framing, fix the artifact or fix this file — never both
silently diverging. silently diverging.
Primary source: `~/Code/the-nook/docs/marketing-strategy.md`. **Reconciled 2026-10-29**, and again **2026-11-03** for the FRE-997 correction,
against the CTO's verdicts ([FRE-315], [FRE-322], [FRE-354], [FRE-997]), the Chief
of Staff's price decision (2026-10-29 04:01), the Plan B launch route ([FRE-346] →
[FRE-203] `plan-b`), and `The-Nook` master (app floor is **14.2**, not 14.0 —
`freno-dev` `881190d`, site merge `134f41e`). The previous version of this file
named an upstream `the-nook/docs/marketing-strategy.md` that no longer exists; the
verdicts below are the source of truth it was pointing at.
[FRE-315]: https://paperclip.freno.me/FRE/issues/FRE-315
[FRE-322]: https://paperclip.freno.me/FRE/issues/FRE-322
[FRE-354]: https://paperclip.freno.me/FRE/issues/FRE-354
[FRE-320]: https://paperclip.freno.me/FRE/issues/FRE-320
[FRE-346]: https://paperclip.freno.me/FRE/issues/FRE-346
[FRE-203]: https://paperclip.freno.me/FRE/issues/FRE-203
[FRE-997]: https://paperclip.freno.me/FRE/issues/FRE-997
## The sentence ## The sentence
> **Your Mac and your agents, under control.** The Nook puts your whole coding-agent There is no single approved public sentence yet, and saying otherwise is the one
> fleet in the notch — twelve agents, local or over SSH — so you see what is running, mistake this file exists to prevent. What exists is a **launch claim set** — two
> unblock it in one tap, and keep the machine from overheating while it works. sentences, both from one 15-second take, recorded as the chosen route by the Chief
of Staff on 2026-10-29 ([FRE-346] `decision` §2–§4):
| Slot | Exact sentence | Status today |
|---|---|---|
| Launch line | **"Every agent you're running reports into one notch, and the one waiting on you pins above the rest."** | Verified by code ([FRE-322] §3). Needs the one-Mac take before it is publishable. |
| Second line, same take | **"Approve an agent's tool call from your Mac's notch, and the agent carries on."** | Needs the demo ([FRE-322] §1). The same take settles it. |
Working line for internal writing, not for publication:
> **Your Mac and your agents, under control.** One notch for the whole fleet: you
> see what is running, you unblock what is waiting, and the machine stays cool
> while it works.
## The wedge ## The wedge
@@ -22,15 +48,18 @@ The thing to say over and over, in every channel, in slightly different words:
It is acute, quantifiable, and true — and it is the demo: a card appears, you tap It is acute, quantifiable, and true — and it is the demo: a card appears, you tap
Allow, work resumes. Ten seconds, no explanation needed. Allow, work resumes. Ten seconds, no explanation needed.
## The bundling reframe ## The consolidation reframe
Three audiences (agent herders, hardware tinkerers, glanceable-widget users) in one Three audiences (agent herders, hardware tinkerers, glanceable-widget users) in one
$10 app reads like a grab bag. Reframe as consolidation, which is the honest story: app reads like a grab bag. Reframe as consolidation, which is the honest story:
> One $10 app instead of a notch toy, a fan utility, a battery limiter, a menu-bar > One app instead of a notch toy, a fan utility, a battery limiter, a menu-bar stats
> stats strip, and a notification hack. Same one-time purchase, no subscription. > strip, and a notification hack. One purchase, no subscription.
Price rises to $15 at 1.0 — dated and honest, not a permanent beta. **No price, no discount and no future price in copy.** The price is $10, it stays
$10, and the dated rise to $15 is withdrawn (Chief of Staff, 2026-10-29 04:01). A
price change is a Chief of Staff + sponsor call; it is never a marketing decision
and never a launch asset.
## Hard rules ## Hard rules
@@ -48,24 +77,54 @@ pages, marketing copy, comparison tables, meta descriptions, emails, FAQs, all o
community replies written by a human, where quoting what a user said about another community replies written by a human, where quoting what a user said about another
tool is normal conversation. tool is normal conversation.
### 2. A claim requires a test to exist ### 2. A claim needs a verdict, not just a test
Copy that says "12 agents" or "no data leaves the device" must have a test backing it. Copy that says "every agent", "13 agents", "no data leaves the device" must point at
If a claim cannot be pointed at code or a test, it does not go in copy. both a test **and** a CTO verdict naming the exact sentence. A passing test is not a
verdict; a verdict is not a recording. If a sentence cannot be traced to a row in the
tables below, it does not go in copy.
### 3. Honest privacy scoping ### 3. Honest privacy scoping
Telemetry and the trial email **do** leave the device. The defensible claim is: Telemetry and the licence check **do** leave the device: Sentry runs on **every
launch, unconditionally** (with the Mac's IP address via `sendDefaultPii`), and the
trial check sends `IOPlatformUUID` and the device name to `freno.me` ([FRE-322]
§2.4, corrected by [FRE-354] `(b)`). Never publish, in any wording:
> **No prompt or code content leaves the device.** - "no data leaves the device" / "local-only" / "no telemetry" / "no account"
- "nothing leaves your Mac"
Never "no data leaves the device". The one favourable engine sentence — about the **hook and bridge only**, never
"The Nook" — as corrected by [FRE-354] `(j)`: the hook and bridge **are not a cloud
service**. Do not write "talk to nothing but your Mac" (too absolute: the
`NOOK_PORTS` fan-out resolves `host.docker.internal` and the default gateway, and
`defaultGateway()` opens a no-packet UDP socket to `8.8.8.8:80`), and do not narrow
it to "over SSH" (a tailnet peer dials directly).
It is verified as a code fact ([FRE-322] §2, [FRE-354] `(j)`), and it is still
**held** until the disclosures land: Sentry gated behind a preference or removed,
and `/privacy` + `/faq` corrected against the egress inventory (patch on branch
`faq/from-objections-2026-10-29`, verified by [FRE-354]). A true sentence next to
false ones is worse than no sentence.
### 4. Sell what works today ### 4. Sell what works today
Phone approvals are deferred until a shipped iOS app exists — no "(coming soon)" An iPhone + Apple Watch companion **is** in users' hands as a TestFlight beta
parentheticals. The launch story is remote SSH: agents running on other machines, (`ios-v0.3.2`, 2026-10-22; [FRE-354] open question). That makes one thing true and
visible and unblockable from the Mac's notch. one thing forbidden: say "TestFlight beta" when the phone exists in a sentence at
all, and never claim approvals-from-phone as a shipped capability without its own
CTO verdict — no "(coming soon)" parentheticals either way.
Remote SSH is **publishable**, and the site sells it again ([FRE-997]). The
copy that was pulled on 2026-10-29 had been checked against claims it never made:
hosts come from `~/.ssh/config` and Tailscale (`RemoteHostDiscovery`), the
one-time `ssh-copy-id` is a prerequisite the row hands the user as a command
(`RemoteHostStatus.fixCommand`), the per-host credential is minted and copied
over (`RemoteMirror`), and a remote host mirrors this Mac's integrations
(`RemoteMirrorReconcile`). Two things in the old copy were wrong and were fixed
rather than restored: the "every hooked agent" overstatement, and a count that
said thirteen against a registry of eighteen. Muse, Cline and Amp are
`.unsupported` for remote in `AgentSpec.remote`, and the copy names them.
### 5. Humans hold every account ### 5. Humans hold every account
@@ -73,23 +132,30 @@ No agent authenticates, posts, upvotes, or DMs. No sock puppets, no self-mention
without disclosure. `approved/` **is the only thing a human ever publishes from** — without disclosure. `approved/` **is the only thing a human ever publishes from** —
nothing posts itself. nothing posts itself.
## Approved claims (each backed by code) ## Claims: status at 2026-11-03
| Claim | Backing | Each row names the evidence, not a feeling. Re-read the verdict before using a row.
|---|---|
| Twelve hooked agents, one glance | `AgentSpec.all` — claude, codex, opencode, pi, omp, hermes, openclaw, zai, gemini, cline, qwen, deepseek | | Claim | Status | Evidence / next step |
| Remote agents over SSH | `hook/setup.go` remote install path; `NOOK_HOST` TCP transport | |---|---|---|
| Permission gate answered from a card | awaitPolicyTable + bridge directive path (`hook/normalize.go`, `serialize.go`) | | Approve an agent's tool call from the notch, and it carries on | **Needs demo** — not publishable | [FRE-322] §1. `AgentLiveTurnTests` has never run on a signed-in host; one observed local run settles it. Say "an agent", never "any agent", never "always". |
| Fan / thermal / charge control | `helper/` (privileged helper, SMC, no kext) | | Every agent you're running reports into one notch; the blocked one pins above the rest | **Verified by code, gated on the take** | [FRE-322] §3. Same one-Mac take as above. No count in the sentence. |
| One-time purchase, no subscription | $10 → $15 at 1.0; Stripe checkout | | The hook and bridge are not a cloud service | **Verified code fact, held on disclosure** | [FRE-322] §2, wording corrected by [FRE-354] `(j)`. Held until Sentry is gated/removed and `/privacy` + `/faq` land. Never widen to "The Nook", never "nothing but your Mac". |
| macOS 14+ | 27 source files use the `@Observable` framework | | Fan, thermal and charge control | **No claim verdict yet — do not lead with it** | Backed by `helper/` (privileged helper, SMC, no kext), but no CTO sentence exists for it. Documentary, not launch. |
| No prompt or code content leaves the device | envelope carries session/event/terminal metadata only (see `docs/agent-interface.md`) | | One-time purchase, no subscription | **Publishable fact, price not a launch asset** | $10, held at $10. No dated rise, no discount framing, no pricing copy. |
| Agent coverage numbers ("eighteen agents", "18 agents") | **Publishable at 18** | [FRE-997]: the /agents table now lists every row of `AgentSpec.all` and `agents.test.ts` asserts equality with the 18-name registry in registry order, so the landing bullet, the marquee chip and the /agents copy say 18. No other number is publishable, and `every` / `all` are still banned without naming the three local-only agents. |
| macOS 14.2 or later | **Publishable fact** | The app cannot start below 14.2 (`freno-dev` `881190d`, site `134f41e`). "macOS 14+" is false and was fixed on the site. |
| Remote agents over SSH, one click to install | **Publishable, with the three local-only agents named** | [FRE-997]: `RemoteHostDiscovery` (ssh config + tailnet), `RemoteMirror` (hook push, credential, mirroring), `RemoteMirrorReconcile`, `RemoteHostStatus.fixCommand` (the one-time `ssh-copy-id` the row shows). `AgentSpec.remote` is `.unsupported` for Muse, Cline and Amp — the landing bullet and /agents paragraph name them; never say "every hooked agent". |
| "Nothing leaves your Mac", "no telemetry", "local-only", "no account" | **False today — banned** | Sentry unconditional, licence check with hardware fingerprint ([FRE-322] §2.4). |
| Approvals from the iPhone or Apple Watch | **No verdict — not a launch claim** | The companion is a TestFlight beta ([FRE-354]); the approval-from-phone claim has no CTO verdict and stays out of launch copy. |
## Voice ## Voice
- Short, concrete, no hype adjectives. Numbers over adjectives ("twelve agents", - Short, concrete, no hype adjectives. Numbers over adjectives — the only count
"one tap", "$10 once"). that ships is eighteen, and it is the registry's own size (see the coverage row
- The notch/island is the product's home; agents are the product's point. above).
- The notch is the product's home; agents are the product's point.
- Never apologize for being a utility. The utility is the point. - Never apologize for being a utility. The utility is the point.
- Banned phrasings: competitor names (see rule 1), "AI-powered", "revolutionary", - Banned phrasings: competitor names (see rule 1), "AI-powered", "revolutionary",
"game-changer", "seamlessly". Unverifiable superlatives generally. "game-changer", "seamlessly", any unverifiable superlative — and the specific
banned sentences in rule 3 and the table above.

View File

@@ -0,0 +1,4 @@
<!-- Official Claude mark — Anthropic favicon, https://claude.ai/favicon.svg -->
<svg width="248" height="248" viewBox="0 0 248 248" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M52.4285 162.873L98.7844 136.879L99.5485 134.602L98.7844 133.334H96.4921L88.7237 132.862L62.2346 132.153L39.3113 131.207L17.0249 130.026L11.4214 128.844L6.2 121.873L6.7094 118.447L11.4214 115.257L18.171 115.847L33.0711 116.911L55.485 118.447L71.6586 119.392L95.728 121.873H99.5485L100.058 120.337L98.7844 119.392L97.7656 118.447L74.5877 102.732L49.4995 86.1905L36.3823 76.62L29.3779 71.7757L25.8121 67.2858L24.2839 57.3608L30.6515 50.2716L39.3113 50.8623L41.4763 51.4531L50.2636 58.1879L68.9842 72.7209L93.4357 90.6804L97.0015 93.6343L98.4374 92.6652L98.6571 91.9801L97.0015 89.2625L83.757 65.2772L69.621 40.8192L63.2534 30.6579L61.5978 24.632C60.9565 22.1032 60.579 20.0111 60.579 17.4246L67.8381 7.49965L71.9133 6.19995L81.7193 7.49965L85.7946 11.0443L91.9074 24.9865L101.714 46.8451L116.996 76.62L121.453 85.4816L123.873 93.6343L124.764 96.1155H126.292V94.6976L127.566 77.9197L129.858 57.3608L132.15 30.8942L132.915 23.4505L136.608 14.4708L143.994 9.62643L149.725 12.344L154.437 19.0788L153.8 23.4505L150.998 41.6463L145.522 70.1215L141.957 89.2625H143.994L146.414 86.7813L156.093 74.0206L172.266 53.698L179.398 45.6635L187.803 36.802L193.152 32.5484H203.34L210.726 43.6549L207.415 55.1159L196.972 68.3492L188.312 79.5739L175.896 96.2095L168.191 109.585L168.882 110.689L170.738 110.53L198.755 104.504L213.91 101.787L231.994 98.7149L240.144 102.496L241.036 106.395L237.852 114.311L218.495 119.037L195.826 123.645L162.07 131.592L161.696 131.893L162.137 132.547L177.36 133.925L183.855 134.279H199.774L229.447 136.524L237.215 141.605L241.8 147.867L241.036 152.711L229.065 158.737L213.019 154.956L175.45 145.977L162.587 142.787H160.805V143.85L171.502 154.366L191.242 172.089L215.82 195.011L217.094 200.682L213.91 205.172L210.599 204.699L188.949 188.394L180.544 181.069L161.696 165.118H160.422V166.772L164.752 173.152L187.803 207.771L188.949 218.405L187.294 221.832L181.308 223.959L174.813 222.777L161.187 203.754L147.305 182.486L136.098 163.345L134.745 164.2L128.075 235.42L125.019 239.082L117.887 241.8L111.902 237.31L108.718 229.984L111.902 215.452L115.722 196.547L118.779 181.541L121.58 162.873L123.291 156.636L123.14 156.219L121.773 156.449L107.699 175.752L86.304 204.699L69.3663 222.777L65.291 224.431L58.2867 220.768L58.9235 214.27L62.8713 208.48L86.304 178.705L100.44 160.155L109.551 149.507L109.462 147.967L108.959 147.924L46.6977 188.512L35.6182 189.93L30.7788 185.44L31.4156 178.115L33.7079 175.752L52.4285 162.873Z" fill="#D97757"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,4 @@
<!-- Codex mark — official OpenAI Codex X (canonical path used by Cloudflare docs / lobe-icons / shadcn logos, all sourced from the OpenAI brand), white colorway for dark surfaces -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#FFFFFF" fill-rule="evenodd">
<path d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,21 @@
import { ConnectionFactory } from "~/server/db-connections";
import { backfillDownloads } from "~/server/backfill-downloads";
// One-off: derive canonical /api/downloads/<asset> rows from download history
// recorded before `trackDownload` existed. Idempotent — re-running adds
// nothing, because derived rows carry a `backfill-<source id>` primary key.
//
// bun --env-file=.env scripts/backfill-downloads.ts
const result = await backfillDownloads(ConnectionFactory());
if (result.length === 0) {
console.log("Nothing to backfill: no legacy download rows left to derive.");
} else {
for (const { asset, added } of result) {
console.log(`${asset}: +${added}`);
}
console.log(
`Total: +${result.reduce((sum, row) => sum + row.added, 0)} derived download rows.`
);
}

View File

@@ -755,3 +755,114 @@ a.hover-underline-animation:hover::after {
0%, 100% { opacity: 1; } 0%, 100% { opacity: 1; }
50% { opacity: 0.35; } 50% { opacity: 0.35; }
} }
/* ── Nook landing: newer demos ─────────────────────────────────── */
.nook-caret {
animation: nook-pulse 0.8s steps(2, jump-none) infinite;
}
/* Live signal inside a mixer fader */
.nook-meter {
transform-origin: left center;
animation: nook-meter 0.6s ease-in-out infinite alternate;
}
@keyframes nook-meter {
0% { transform: scaleX(0.35); }
40% { transform: scaleX(0.8); }
100% { transform: scaleX(0.55); }
}
/* Waveform slot bars */
.nook-wave {
height: 100%;
transform-origin: center;
animation: nook-wave 0.8s ease-in-out infinite alternate;
}
@keyframes nook-wave {
0% { transform: scaleY(0.25); }
100% { transform: scaleY(1); }
}
/* Now Playing progress and artwork sheen */
.nook-progress {
animation: nook-progress 14s linear infinite;
}
@keyframes nook-progress {
from { width: 8%; }
to { width: 100%; }
}
.nook-art {
animation: nook-art 9s linear infinite;
}
@keyframes nook-art {
to { filter: hue-rotate(360deg); }
}
/* A ringing timer's tape breathes between 35 % and full */
.nook-tape-ring {
animation: nook-tape-ring 0.9s ease-in-out infinite alternate;
}
@keyframes nook-tape-ring {
from { opacity: 0.35; }
to { opacity: 1; }
}
/* Keep Awake coffee steam */
.nook-steam path {
animation: nook-steam 1.8s ease-in-out infinite;
}
@keyframes nook-steam {
0% { transform: translateY(2px); opacity: 0; }
40% { opacity: 1; }
100% { transform: translateY(-4px); opacity: 0; }
}
/* Two-way feature marquee; edges fade, hover pauses */
.nook-marquee {
overflow: hidden;
mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.nook-marquee-track {
display: flex;
gap: 0.625rem;
width: max-content;
padding-right: 0.625rem;
animation: nook-marquee 60s linear infinite;
}
.nook-marquee-track.reverse {
animation-direction: reverse;
}
.nook-marquee:hover .nook-marquee-track {
animation-play-state: paused;
}
@keyframes nook-marquee {
to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
.nook-meter,
.nook-wave,
.nook-progress,
.nook-art,
.nook-tape-ring,
.nook-steam path,
.nook-caret {
animation: none;
}
.nook-marquee {
mask-image: none;
}
.nook-marquee-track {
animation: none;
flex-wrap: wrap;
justify-content: center;
width: auto;
padding: 0 1rem;
}
.nook-marquee-track > [aria-hidden="true"] {
display: none;
}
}

View File

@@ -1,5 +1,6 @@
import { import {
For, For,
Show,
createEffect, createEffect,
createSignal, createSignal,
onCleanup, onCleanup,
@@ -9,20 +10,35 @@ import {
import { import {
IslandPill, IslandPill,
AgentDotGrid, AgentDotGrid,
STATUS,
CALM, CALM,
WARM, WARM,
ACCENT, ACCENT,
CRITICAL, CRITICAL,
ModuleCard ModuleCard,
FakeCursor
} from "./IslandMock"; } from "./IslandMock";
import { Campfire, type CampfireState } from "./Campfire"; import { Campfire, type CampfireState } from "./Campfire";
import {
ApprovalCardMock,
SessionRowMock,
Glyph,
CLAUDE,
CODEX
} from "./ModuleMocks";
import { useDemoLoop } from "./useDemoLoop";
import {
TerminalReplyDemo,
MixerDemo,
CaptureDemo,
FloatingActionsDemo
} from "./MoreDemos";
/** /**
* Detailed feature breakdowns: alternating copy + live-demo sections. * Detailed feature breakdowns: alternating copy + live-demo sections.
* Each demo stages the real interaction loop: attention flares, approval * Each demo stages the real interaction loop: attention flares, approval
* resolves, fans throttle, the charge ceiling holds, meetings surface, * resolves, fans throttle, the charge ceiling holds, meetings surface,
* the camera wakes, the hook installs. * the camera wakes, a remote host goes live. Newer demos live in
* MoreDemos.tsx; app-anatomy pieces in ModuleMocks.tsx.
*/ */
/* Scroll-triggered reveal: adds `in` once the element crosses 25%. */ /* Scroll-triggered reveal: adds `in` once the element crosses 25%. */
@@ -165,100 +181,88 @@ function FleetDemo() {
); );
} }
/* ── Demo 2: permission card resolves, phone push follows ─────────── */ /* ── Demo 2: an approval surfaces the island; Allow resumes the run ── */
function ApprovalDemo() { function ApprovalDemo() {
const [allowed, setAllowed] = createSignal(false); const [phase, setPhase] = createSignal<"calm" | "ask" | "press" | "resumed">("calm");
onMount(() => { useDemoLoop(10400, [
const timers: ReturnType<typeof setTimeout>[] = []; [0, () => setPhase("calm")],
const loop = () => { [1400, () => setPhase("ask")],
setAllowed(false); [4600, () => setPhase("press")],
timers.push(setTimeout(() => setAllowed(true), 4200)); [4950, () => setPhase("resumed")],
}; [8800, () => setPhase("calm")]
loop(); ]);
const interval = setInterval(loop, 8400); const asking = () => phase() === "ask" || phase() === "press";
onCleanup(() => { const open = () => phase() !== "calm";
clearInterval(interval);
timers.forEach(clearTimeout);
});
});
return ( return (
<div class="flex flex-col items-center gap-5 sm:flex-row sm:items-end sm:justify-center"> <div class="relative flex h-[390px] flex-col items-center gap-3">
{/* island card */} <IslandPill
<div campfire={asking() ? "question" : "running"}
class="w-full max-w-[300px] rounded-[10px] p-2.5 text-left transition-opacity duration-500" right={
style={{ <AgentDotGrid
background: "rgba(234,179,8,0.08)", states={asking() ? ["attention", "running", "ready"] : ["running", "running", "ready"]}
opacity: allowed() ? 0.45 : 1
}}
>
<div class="mb-1.5 flex items-center gap-1.5">
<span
class="inline-block h-[13px] w-[13px] rounded-[3px]"
style={{ background: "#D97742" }}
/> />
<span class="text-[12px] font-semibold text-white"> }
the-nook · bridge />
</span> {/* the island opens: approval pinned above the session rows */}
<span
class="ml-auto rounded-full px-1.5 py-0.5 text-[10px] font-semibold text-white"
style={{
background: allowed()
? "rgba(150,220,150,0.25)"
: "rgba(234,179,8,0.25)"
}}
>
{allowed() ? "allowed" : "approval"}
</span>
</div>
<p class="text-[13px] font-medium text-white">Run Edit</p>
<p class="mt-0.5 font-mono text-[11px] text-white/50">
server/routes.ts +12 −4
</p>
<div class="mt-2.5 flex gap-2">
<span
class="rounded-md px-3 py-1 text-[11px] font-semibold text-white transition-all duration-300"
style={{ background: ACCENT, opacity: allowed() ? 0.4 : 1 }}
>
Allow
</span>
<span class="rounded-md border border-white/20 px-3 py-1 text-[11px] font-semibold text-white/80">
Deny
</span>
</div>
</div>
{/* phone */}
<div <div
class="w-[150px] rounded-2xl border border-white/15 p-2 text-left" class="w-full max-w-[380px] overflow-hidden rounded-[14px] bg-black transition-all duration-700"
style={{ style={{
background: "rgba(255,255,255,0.04)", "max-height": open() ? "320px" : "0px",
transform: allowed() ? "translateY(-4px)" : "translateY(0)", opacity: open() ? 1 : 0,
transition: "transform 0.5s ease" transform: open() ? "translateY(0)" : "translateY(-8px)"
}} }}
> >
<div class="mx-auto mb-1.5 h-1 w-10 rounded-full bg-white/20" /> <div class="p-2.5">
<div
class="grid transition-all duration-500"
style={{ "grid-template-rows": asking() ? "1fr" : "0fr", opacity: asking() ? 1 : 0 }}
>
<div class="overflow-hidden">
<div class="pb-1.5">
<ApprovalCardMock
agent={CLAUDE}
title="the-nook · harden the bridge"
tool="Bash"
input="swift test --filter Bridge"
pressed={phase() === "press" ? "allow" : undefined}
/>
</div>
</div>
</div>
<div class="space-y-1.5"> <div class="space-y-1.5">
<p class="px-1 text-[9px] font-semibold tracking-wide text-white/40 uppercase"> <SessionRowMock
The Nook title="the-nook · main"
</p> prompt="harden the bridge"
<div state={
class="rounded-lg p-2" asking()
style={{ ? "Approve Bash — swift test --filter Bridge?"
background: allowed() : "Running swift test --filter Bridge…"
? "rgba(111,185,130,0.14)" }
: "rgba(231,167,98,0.14)" status={asking() ? "attention" : "running"}
}} agent={CLAUDE}
> origin="iTerm2"
<p class="text-[10px] font-semibold text-white"> age="6m"
{allowed() ? "Allowed ✓" : "Claude Code wants to edit"} />
</p> <SessionRowMock
<p class="text-[9px] text-white/50"> title="site · nook-334"
{allowed() ? "resumed" : "tap to Allow or Deny"} prompt="match the mocks to the app"
</p> state="Reading ModuleMocks.tsx…"
status="running"
agent={CODEX}
origin="kitty-tmux"
age="2m"
/>
</div> </div>
</div> </div>
</div> </div>
<div class="pointer-events-none absolute inset-y-0 left-1/2 w-[380px] -translate-x-1/2">
<FakeCursor
phase={phase() === "press" ? "press" : asking() ? "idle" : "live"}
at={{ x: 9.5, y: 41 }}
exit={{ x: 30, y: 70 }}
/>
</div>
</div> </div>
); );
} }
@@ -406,37 +410,6 @@ function FansDemo() {
); );
} }
/** Fake cursor dot: rests on a target, presses, exits. */
function FakeCursor(props: {
phase: "idle" | "press" | "live";
at: { x: number; y: number };
exit?: { x: number; y: number };
}) {
const p = () =>
props.phase === "press"
? { ...props.at, scale: 0.62, o: 1 }
: props.phase === "idle"
? { ...props.at, scale: 1, o: 1 }
: { ...(props.exit ?? { x: 106, y: 8 }), scale: 1, o: 0 };
return (
<span
class="pointer-events-none absolute z-10 rounded-full bg-white"
style={{
width: "9px",
height: "9px",
"box-shadow":
"0 1px 4px rgba(0,0,0,0.6), 0 0 0 4px rgba(255,255,255,0.18)",
left: `${p().x}%`,
top: `${p().y}%`,
opacity: p().o,
transform: `translate(-50%, -50%) scale(${p().scale})`,
transition:
"left 0.8s cubic-bezier(0.35,0,0.25,1), top 0.8s cubic-bezier(0.35,0,0.25,1), opacity 0.4s, transform 0.3s"
}}
/>
);
}
/* ── Demo 4: the charge ceiling holds, top-up overrules ───── */ /* ── Demo 4: the charge ceiling holds, top-up overrules ───── */
function BatteryDemo() { function BatteryDemo() {
@@ -834,142 +807,109 @@ function CameraDemo() {
); );
} }
/* ── Demo 7: one click copies, sets up, probes — pong ─────── */ /* ── Demo 7: Settings ▸ Remote hosts — one click to Live ──────────── */
const SSH_LINES = [ /** RemoteMirror's progress steps, in order. */
{ at: 1, text: "scp nook-hook gpu-rig:~/.nook/bin/" }, const SETUP_STEPS = [
{ at: 2, text: "setup: bake NOOK_HOST, write ~/.nook/endpoint" }, "connecting",
{ at: 3, text: "nook-hook --probe → pong" } "pushing the hook binary",
"configuring agents",
"checking the host can reach this Mac"
]; ];
function SshInstallDemo() { function RemoteHostDemo() {
const [step, setStep] = createSignal(0); /* -1 not set up · 0…3 setting up · 4 live */
onMount(() => { const [step, setStep] = createSignal(-1);
const timers: ReturnType<typeof setTimeout>[] = []; const [pressed, setPressed] = createSignal(false);
const loop = () => { useDemoLoop(11000, [
setStep(0); [0, () => (setStep(-1), setPressed(false))],
timers.push(setTimeout(() => setStep(1), 1600)); [1400, () => setPressed(true)],
timers.push(setTimeout(() => setStep(2), 3000)); [1700, () => (setPressed(false), setStep(0))],
timers.push(setTimeout(() => setStep(3), 4200)); [2700, () => setStep(1)],
timers.push(setTimeout(() => setStep(4), 5400)); [3700, () => setStep(2)],
}; [4700, () => setStep(3)],
loop(); [5800, () => setStep(4)]
const interval = setInterval(loop, 11000); ]);
onCleanup(() => { const live = () => step() === 4;
clearInterval(interval); const working = () => step() >= 0 && step() < 4;
timers.forEach(clearTimeout); const chip = () =>
}); live()
}); ? { color: "rgb(48,209,88)", label: "Live" }
const cursorPhase = () => : working()
step() === 0 ? { color: "rgba(255,255,255,0.55)", label: "Setting up" }
? ("idle" as const) : { color: "rgba(255,255,255,0.35)", label: "Not set up" };
: step() === 1
? ("press" as const)
: ("live" as const);
return ( return (
<ModuleCard class="relative mx-auto w-full max-w-[330px]"> <div class="relative mx-auto w-full max-w-[360px] space-y-3">
<div class="space-y-2.5 text-left"> {/* the host's card in Settings ▸ Agents ▸ Remote hosts */}
<div class="flex items-center gap-2"> <ModuleCard>
<div class="space-y-2 text-left">
<div class="flex items-center gap-2.5">
<div class="min-w-0 flex-1"> <div class="min-w-0 flex-1">
<p class="text-[13px] font-semibold text-white">gpu-rig</p> <p class="text-[13px] font-semibold text-white">gpu-rig</p>
<p class="truncate font-mono text-[10px] text-white/40"> <p class="truncate text-[11px] text-white/45">tailnet peer</p>
mike@192.168.64.3 · linux
</p>
</div> </div>
<Show when={working()}>
<span class="h-3 w-3 animate-spin rounded-full border-[1.5px] border-white/25 border-t-white/80" />
</Show>
<span class="flex items-center gap-1.5 text-[10.5px] font-medium text-white/85">
<span <span
class="rounded-md px-2.5 py-1 text-[11px] font-semibold text-white transition-all duration-300" class="h-[7px] w-[7px] rounded-full transition-colors duration-300"
style={{ style={{ background: chip().color }}
background: step() === 0 ? ACCENT : "rgba(255,255,255,0.08)",
opacity: step() >= 4 ? 0 : 1,
transform: step() === 1 ? "scale(0.94)" : "scale(1)"
}}
>
{step() === 0 ? "Install hook" : "installing…"}
</span>
</div>
<div class="h-px" style={{ background: "rgba(255,255,255,0.06)" }} />
<div class="relative" style={{ "min-height": "86px" }}>
<div
class="space-y-1.5 transition-opacity duration-500"
style={{ opacity: step() >= 4 ? 0 : 1 }}
>
{step() === 0 && (
<p class="pt-2 text-center text-[10px] text-white/35">
one click: copy → setup → probe
</p>
)}
<For each={SSH_LINES}>
{(l) => (
<div
class="flex items-center gap-1.5 transition-all duration-500"
style={{
opacity: step() >= l.at ? 1 : 0,
transform:
step() >= l.at ? "translateY(0)" : "translateY(4px)"
}}
>
<span
class="font-mono text-[10px]"
style={{
color:
step() > l.at
? "rgba(150,220,150,0.9)"
: "rgba(255,255,255,0.45)"
}}
>
{step() > l.at ? "✓" : "…"}
</span>
<span class="truncate font-mono text-[10px] text-white/70">
{l.text}
</span>
</div>
)}
</For>
</div>
<div
class="absolute inset-0 flex flex-col justify-center transition-all duration-500"
style={{
opacity: step() >= 4 ? 1 : 0,
transform: step() >= 4 ? "translateY(0)" : "translateY(6px)"
}}
>
<div
class="rounded-[10px] p-2.5"
style={{
background: "rgba(255,255,255,0.055)",
"box-shadow": "inset 0 0 0 1px rgba(255,255,255,0.07)"
}}
>
<div class="flex items-center gap-2">
<span
class="inline-block h-[7px] w-[7px] rounded-full"
style={{ background: STATUS.running }}
/> />
<span class="text-[13px] font-semibold text-white"> {chip().label}
gpu-rig
</span> </span>
<Show
when={live()}
fallback={
<span <span
class="ml-auto rounded-full px-1.5 py-0.5 text-[10px] font-semibold" class="rounded-md px-2.5 py-1 text-[11px] font-semibold text-white transition-all duration-200"
style={{ style={{
background: "rgba(110,167,255,0.22)", background: ACCENT,
color: "#9cc3ff" opacity: working() ? 0 : 1,
transform: pressed() ? "scale(0.92)" : "scale(1)"
}} }}
> >
remote Set up
</span> </span>
}
>
<Glyph name="refresh" size={11} class="text-white/50" />
<span class="rounded-md bg-white/10 px-2 py-1 text-[11px] font-semibold text-[#ff6961]">
Remove
</span>
</Show>
</div> </div>
<p class="mt-0.5 text-[11px] text-white/50"> <p class="h-4 text-[11px] text-white/50">
You: benchmark fp16 {working() ? SETUP_STEPS[step()] : " "}
</p> </p>
</div> </div>
<p class="pt-1.5 text-center text-[10px] text-white/40">
agents join the same dot grid
</p>
</div>
</div>
</div>
<FakeCursor phase={cursorPhase()} at={{ x: 90, y: 14 }} />
</ModuleCard> </ModuleCard>
{/* its agents arrive as ordinary rows, the machine named in the chip */}
<div
class="transition-all duration-500"
style={{
opacity: live() ? 1 : 0,
transform: live() ? "translateY(0)" : "translateY(6px)"
}}
>
<SessionRowMock
title="trainer · fp16"
prompt="benchmark fp16"
state="Running python bench.py…"
status="running"
agent={CODEX}
host="gpu-rig"
origin="iTerm2"
age="now"
/>
</div>
<FakeCursor
phase={pressed() ? "press" : step() === -1 ? "idle" : "live"}
at={{ x: 88, y: 16 }}
/>
</div>
); );
} }
@@ -1019,8 +959,8 @@ export default function FeatureBreakdowns() {
title="Your whole fleet, in one pixel strip" title="Your whole fleet, in one pixel strip"
body="Every session, every agent, one square each. The pill never wraps, never grows — an arriving question flashes the fire and swaps the slot, then hands the notch back." body="Every session, every agent, one square each. The pill never wraps, never grows — an arriving question flashes the fire and swaps the slot, then hands the notch back."
bullets={[ bullets={[
"12 agents: Claude Code, Codex, Gemini CLI, OpenCode, Pi, and more", "18 agents: Claude Code, Codex, Gemini CLI, OpenCode, Pi, Muse, and more",
"The campfire dances while work runs, simmers when all is calm", "Custom agents: your own coding agent can wire itself in from the published contract",
"Slot rankings — you choose which data earns the notch", "Slot rankings — you choose which data earns the notch",
"You don't need a notch — external displays get the same island, floating top-center" "You don't need a notch — external displays get the same island, floating top-center"
]} ]}
@@ -1031,17 +971,58 @@ export default function FeatureBreakdowns() {
<BreakdownSection <BreakdownSection
kicker="Approvals" kicker="Approvals"
title="Answer from the island — or your phone" title="Answer from the island — or your phone"
body="Gated tool calls hold right in the panel. Allow, deny, or demand a reason. Walking away? The same request lands on your phone and your tap flies back to the agent." body="A gated tool call surfaces the island: the fire turns to a question, the card pins above your sessions, and the row says what it's waiting on. Allow, Allow for session, Deny, or deny with a reason, and the run picks up where it stopped."
bullets={[ bullets={[
"Permission and question cards pin above the session list", "Approval cards pin above the session list; questions answer inside their row",
"Push-to-phone over your own network — no cloud middleman (coming soon)", "Allow for session waves through the rest of that session's requests",
"Works across every hooked agent, local or remote" "Answer from iPhone or Apple Watch too, now in TestFlight beta",
"Works across local and remote sessions; Muse, Cline and Amp are this Mac only"
]} ]}
reversed reversed
> >
<ApprovalDemo /> <ApprovalDemo />
</BreakdownSection> </BreakdownSection>
<BreakdownSection
kicker="Terminals"
title="Reply without hunting for the tab"
body="Every session knows the terminal it runs in. Type a reply in the island and it lands in that exact pane; click Jump and the right window comes forward."
bullets={[
"Replies reach agents in tmux, iTerm2, Terminal, and kitty",
"Jump focuses the exact window, even for sessions over SSH",
"Per-turn replies render as Markdown, with tables and code"
]}
>
<TerminalReplyDemo />
</BreakdownSection>
<BreakdownSection
kicker="Remote"
title="Any SSH box, one click away"
body="Pick a host from your ssh config or your tailnet and click once — the nook-hook installs itself and its agents appear beside your local ones, indistinguishable."
bullets={[
"One click: connect, push the hook, configure agents, check it can reach this Mac",
"Hosts mirror this Mac's installed integrations automatically",
"Remote sessions are ordinary rows; the agent chip names the machine"
]}
reversed
>
<RemoteHostDemo />
</BreakdownSection>
<BreakdownSection
kicker="The campfire"
title="A hearth that tells the truth"
body="Stop-motion pixel art, four frames a step. It dances when tokens stream, putters blue when an agent asks, and goes to dead embers the moment something breaks."
bullets={[
"Idle, running, ready, question, and error — at a glance",
"Hand-drawn 14×14 sprites, no tweening",
"Six chiptunes you can assign to any agent event"
]}
>
<CampfireDemo />
</BreakdownSection>
<BreakdownSection <BreakdownSection
kicker="Cooling" kicker="Cooling"
title="Fans that answer to you, not the scheduler" title="Fans that answer to you, not the scheduler"
@@ -1052,6 +1033,7 @@ export default function FeatureBreakdowns() {
"CPU/GPU die temps tier-color before things get loud", "CPU/GPU die temps tier-color before things get loud",
"All local: your hardware data never leaves the device" "All local: your hardware data never leaves the device"
]} ]}
reversed
> >
<FansDemo /> <FansDemo />
</BreakdownSection> </BreakdownSection>
@@ -1067,11 +1049,38 @@ export default function FeatureBreakdowns() {
"Thermal protection pauses charging when the pack runs hot", "Thermal protection pauses charging when the pack runs hot",
"Energy flow figure: adapter → battery → system, live watts" "Energy flow figure: adapter → battery → system, live watts"
]} ]}
reversed
> >
<BatteryDemo /> <BatteryDemo />
</BreakdownSection> </BreakdownSection>
<BreakdownSection
kicker="Sound"
title="Every app gets its own fader"
body="A real volume mixer: set each app's level, mute the noisy one, and send any app to its own output — music to headphones while the meeting stays on the speakers."
bullets={[
"Per-app volume, mute, and output routing",
"Master output, system sounds, and microphone pickers in one panel",
"Catches players that aren't apps, like command-line podcast tools"
]}
reversed
>
<MixerDemo />
</BreakdownSection>
<BreakdownSection
kicker="Capture"
title="Screenshots and recordings from the notch"
body="Drag out an area, pick a screen, or choose one app. While a recording runs, Wings unfold beside the island: pause and stop on the right, system audio and microphone on the left."
bullets={[
"Area, screen, or single-app capture",
"Screenshots save to your screenshot folder and copy to the clipboard",
"System audio and microphone tracks for recordings",
"The Nook's own windows never show up in a capture"
]}
>
<CaptureDemo />
</BreakdownSection>
<BreakdownSection <BreakdownSection
kicker="Your day" kicker="Your day"
title="Meetings come to the notch" title="Meetings come to the notch"
@@ -1082,6 +1091,7 @@ export default function FeatureBreakdowns() {
"Meeting links get an Open button in the row", "Meeting links get an Open button in the row",
"Real calendars and reminders — no sync service" "Real calendars and reminders — no sync service"
]} ]}
reversed
> >
<CalendarDemo /> <CalendarDemo />
</BreakdownSection> </BreakdownSection>
@@ -1096,35 +1106,23 @@ export default function FeatureBreakdowns() {
"A device picker for every connected camera", "A device picker for every connected camera",
"Opt-in module — in no default panel" "Opt-in module — in no default panel"
]} ]}
reversed
> >
<CameraDemo /> <CameraDemo />
</BreakdownSection> </BreakdownSection>
<BreakdownSection <BreakdownSection
kicker="Remote" kicker="Floating actions"
title="Any SSH box, one click away" title="Your buttons, orbiting the island"
body="Point at any SSH-reachable box and click once — the nook-hook installs itself and its agents appear beside your local ones, indistinguishable." body="Pin up to seven one-tap actions around the expanded island. They ride its expansion in and out, so the things you reach for most are always one click away."
bullets={[ bullets={[
"One click: copy the hook, run setup, probe answers pong", "Run an Apple Shortcut, open an app or URL, or run a shell command",
"Remote agents wear a blue badge in the same dot grid", "Toggle Low Power Mode, top-up, or overheat protection",
"Works for Claude, Codex, Pi and many more" "Set the charge limit, cycle audio outputs, or start a timer",
"Cycle the approval mode without opening Settings"
]} ]}
reversed
> >
<SshInstallDemo /> <FloatingActionsDemo />
</BreakdownSection>
<BreakdownSection
kicker="The campfire"
title="A hearth that tells the truth"
body="Stop-motion pixel art, four frames a step. It dances when tokens stream, putters blue when an agent asks, and goes to dead embers the moment something breaks."
bullets={[
"Idle, running, ready, question, and error — at a glance",
"Hand-drawn 14×14 sprites, no tweening",
"The fire is the fleet's pulse: glanceable from across the room"
]}
>
<CampfireDemo />
</BreakdownSection> </BreakdownSection>
</div> </div>
); );

View File

@@ -1,13 +1,12 @@
import { For, type JSX } from "solid-js"; import { For, createSignal, onCleanup, onMount, type JSX } from "solid-js";
import { IslandPill, STATUS, CALM, CRITICAL, ModuleCard } from "./IslandMock";
import { import {
IslandPill, ApprovalCardMock,
AgentDotGrid, SessionRowMock,
STATUS, DieLine,
CALM, CLAUDE,
CRITICAL, CODEX
ACCENT, } from "./ModuleMocks";
ModuleCard
} from "./IslandMock";
/** /**
* Feature collage: five cells sold as the app's actual UI. The hero cell * Feature collage: five cells sold as the app's actual UI. The hero cell
@@ -16,7 +15,7 @@ import {
* module chrome, status palette, and metric language. * module chrome, status palette, and metric language.
*/ */
function CollageCell(props: { export function CollageCell(props: {
class?: string; class?: string;
kicker: string; kicker: string;
title: string; title: string;
@@ -44,7 +43,7 @@ function CollageCell(props: {
* is always dark (preferredColorScheme .dark), so the mocks read correctly * is always dark (preferredColorScheme .dark), so the mocks read correctly
* in both site themes. * in both site themes.
*/ */
function InkStage(props: { children: JSX.Element; class?: string }) { export function InkStage(props: { children: JSX.Element; class?: string }) {
return ( return (
<div <div
class={`flex justify-center rounded-xl py-5 ${props.class ?? ""}`} class={`flex justify-center rounded-xl py-5 ${props.class ?? ""}`}
@@ -55,50 +54,6 @@ function InkStage(props: { children: JSX.Element; class?: string }) {
); );
} }
/** The approvals mock rebuilt on the app's PermissionCard anatomy. */
function ApprovalCardMock() {
return (
<div
class="mx-auto w-full max-w-sm rounded-[10px] p-2.5 text-left"
style={{ background: "rgba(234,179,8,0.08)" }}
>
<div class="mb-1.5 flex items-center gap-1.5">
<span
class="inline-block h-[13px] w-[13px] rounded-[3px]"
style={{ background: "#D97742" }}
/>
<span class="text-[12px] font-semibold text-white">
the-nook · bridge
</span>
<span
class="ml-auto rounded-full px-1.5 py-0.5 text-[10px] font-semibold text-white"
style={{ background: "rgba(234,179,8,0.25)" }}
>
approval
</span>
</div>
<p class="text-[13px] font-medium text-white">Run Edit</p>
<p class="mt-0.5 font-mono text-[11px] text-white/50">
server/routes.ts +12 −4
</p>
<div class="mt-2.5 flex gap-2">
<span
class="rounded-md px-3 py-1 text-[11px] font-semibold"
style={{ background: ACCENT }}
>
Allow
</span>
<span class="rounded-md border border-white/20 px-3 py-1 text-[11px] font-semibold text-white/80">
Deny
</span>
<span class="px-1 py-1 text-[11px] text-white/50">
Deny with reason…
</span>
</div>
</div>
);
}
/** Fans panel mock: RPM gauge rows in the app's card chrome. */ /** Fans panel mock: RPM gauge rows in the app's card chrome. */
function FansPanelMock() { function FansPanelMock() {
const fans = [ const fans = [
@@ -150,99 +105,62 @@ function FansPanelMock() {
); );
} }
/** Remote agents: two session rows like the expanded agents panel. */ /**
* Remote agents as the panel draws them: ordinary session rows whose agent
* chip names the machine ("Claude Code · build-box").
*/
function RemoteMock() { function RemoteMock() {
return ( return (
<div class="space-y-1.5"> <div class="space-y-1.5">
<div <SessionRowMock
class="rounded-[10px] p-2.5" title="api · main"
style={{ prompt="fix the flaky test"
background: "rgba(255,255,255,0.055)", state="Running pytest -x…"
"box-shadow": "inset 0 0 0 1px rgba(255,255,255,0.07)" status="running"
}} agent={CLAUDE}
> host="build-box"
<div class="flex items-center gap-2"> age="4m"
<span
class="inline-block h-[7px] w-[7px] rounded-full"
style={{ background: STATUS.running }}
/> />
<span class="text-[13px] font-semibold text-white">build-box</span> <SessionRowMock
<span title="trainer · fp16"
class="ml-auto rounded-full px-1.5 py-0.5 text-[10px] font-semibold text-white/75" prompt="benchmark fp16"
style={{ background: "rgba(255,255,255,0.08)" }} state="Done · replied 1m ago"
> status="ready"
ssh agent={CODEX}
</span> host="gpu-rig"
</div> age="12m"
<p class="mt-0.5 text-[11px] text-white/50">You: fix flaky test</p>
</div>
<div
class="rounded-[10px] p-2.5"
style={{
background: "rgba(255,255,255,0.055)",
"box-shadow": "inset 0 0 0 1px rgba(255,255,255,0.07)"
}}
>
<div class="flex items-center gap-2">
<span
class="inline-block h-[7px] w-[7px] rounded-full"
style={{ background: STATUS.ready }}
/> />
<span class="text-[13px] font-semibold text-white">gpu-rig</span>
<span
class="ml-auto rounded-full px-1.5 py-0.5 text-[10px] font-semibold text-white/75"
style={{ background: "rgba(255,255,255,0.08)" }}
>
ssh
</span>
</div>
<p class="mt-0.5 text-[11px] text-white/50">Ready</p>
</div>
</div> </div>
); );
} }
/** System gauges: temp die blocks + memory, in module cards. */ /* Deterministic usage wander for the traces. */
const wander = (n: number, k: number) =>
0.42 + 0.22 * Math.sin(n * 0.45 + k * 1.7) + 0.12 * Math.sin(n * 1.3 + k);
/**
* The Temperatures module: one line per die — label, its 60 s usage trace,
* its temperature. The GPU climbs past the 70 ° warn line and tints amber.
*/
function GaugesMock() { function GaugesMock() {
const [n, setN] = createSignal(0);
onMount(() => {
const interval = setInterval(() => setN((v) => v + 1), 700);
onCleanup(() => clearInterval(interval));
});
const trace = (k: number) =>
Array.from({ length: 30 }, (_, i) => Math.max(0.04, Math.min(0.97, wander(n() + i, k))));
const gpuCelsius = () => 62 + 12 * (0.5 + 0.5 * Math.sin(n() * 0.18));
return ( return (
<div class="grid grid-cols-2 gap-2">
<ModuleCard> <ModuleCard>
<div class="flex items-baseline justify-between"> <div class="space-y-2">
<span class="text-[9px] font-semibold text-white/50">CPU</span> <DieLine label="CPU" usage={trace(0)} celsius={58 + 4 * Math.sin(n() * 0.3)} />
<span class="font-mono text-white" style={{ "font-size": "15px" }}> <DieLine label="GPU" usage={trace(2)} celsius={gpuCelsius()} />
72°
</span>
</div>
<div
class="mt-1.5 h-1 overflow-hidden rounded-full"
style={{ background: "rgba(255,255,255,0.08)" }}
>
<div
class="h-full rounded-full"
style={{ width: "64%", background: CALM }}
/>
</div> </div>
</ModuleCard> </ModuleCard>
<ModuleCard>
<div class="flex items-baseline justify-between">
<span class="text-[9px] font-semibold text-white/50">GPU</span>
<span class="font-mono text-white" style={{ "font-size": "15px" }}>
58°
</span>
</div>
<div
class="mt-1.5 h-1 overflow-hidden rounded-full"
style={{ background: "rgba(255,255,255,0.08)" }}
>
<div
class="h-full rounded-full"
style={{ width: "31%", background: CALM }}
/>
</div>
</ModuleCard>
</div>
); );
} }
export default function FeatureCollage() { export default function FeatureCollage() {
return ( return (
<section <section
@@ -311,11 +229,16 @@ export default function FeatureCollage() {
<CollageCell <CollageCell
kicker="Approvals" kicker="Approvals"
title="Unblock agents, anywhere" title="Unblock agents, anywhere"
body="Permission prompts surface as cards in the panel — Allow once, always, or deny. Away from the desk, push them to your phone and answer from there (coming soon)." body="Permission prompts pin as cards above your sessions — Allow, Allow for session, or Deny. Away from the desk, answer from your iPhone or Apple Watch (beta)."
> >
<InkStage> <InkStage>
<div class="w-full max-w-sm px-3"> <div class="w-full max-w-sm px-3">
<ApprovalCardMock /> <ApprovalCardMock
agent={CLAUDE}
title="the-nook · bridge"
tool="Edit"
input="server/routes.ts"
/>
</div> </div>
</InkStage> </InkStage>
</CollageCell> </CollageCell>
@@ -340,7 +263,7 @@ export default function FeatureCollage() {
body="Run agents on Linux boxes and SSH servers — one click installs the nook-hook, and their sessions join the same island." body="Run agents on Linux boxes and SSH servers — one click installs the nook-hook, and their sessions join the same island."
> >
<InkStage class="w-full"> <InkStage class="w-full">
<div class="w-full max-w-[280px] text-left"> <div class="w-full px-3 text-left">
<RemoteMock /> <RemoteMock />
</div> </div>
</InkStage> </InkStage>
@@ -350,7 +273,7 @@ export default function FeatureCollage() {
<CollageCell <CollageCell
kicker="Your Mac" kicker="Your Mac"
title="The gauges that matter" title="The gauges that matter"
body="CPU and GPU die temps, memory pressure, live network throughput — the same tier palette the island uses, warning before a compile cooks your lap." body="Each die's temperature beside its 60-second usage trace, tinted amber from 70° and red at 85°, so you see a compile heating up before the fans do."
> >
<InkStage class="w-full"> <InkStage class="w-full">
<div class="w-full max-w-[300px] text-left"> <div class="w-full max-w-[300px] text-left">
@@ -361,8 +284,13 @@ export default function FeatureCollage() {
</div> </div>
<p class="text-subtext1 mt-6 text-center text-xs"> <p class="text-subtext1 mt-6 text-center text-xs">
Plus calendar, reminders, calls, and Now Playing — all in the same Plus a mixer, capture, timers, weather, and a dozen more modules —{" "}
island, all one-time purchase. <a
href="#island-extras"
class="underline decoration-dotted hover:opacity-80"
>
see them all ↓
</a>
</p> </p>
</div> </div>
</section> </section>

View File

@@ -0,0 +1,900 @@
import {
For,
Index,
Show,
createSignal,
onCleanup,
onMount,
type JSX
} from "solid-js";
import {
ModuleCard,
STATUS,
ACCENT,
CALM,
WARM,
CRITICAL,
CARD_FILL,
CARD_STROKE
} from "./IslandMock";
import { CollageCell, InkStage } from "./FeatureCollage";
import { useDemoLoop } from "./useDemoLoop";
import { Glyph, TimerTapeMock, TIMER_ORANGE, type GlyphName } from "./ModuleMocks";
/**
* "Everything else": a bento of small live tiles for the modules that do
* not get a full breakdown, headed by a two-way marquee naming the rest.
*/
/** Steady tick for tiles that animate continuously rather than in steps. */
function useTick(everyMs: number) {
const [tick, setTick] = createSignal(0);
onMount(() => {
const interval = setInterval(() => setTick((t) => t + 1), everyMs);
onCleanup(() => clearInterval(interval));
});
return tick;
}
/** A compact black island strip for tiles that show a slot reading. */
function MiniPill(props: { children: JSX.Element; class?: string }) {
return (
<div
class={`mx-auto flex h-[26px] items-center justify-center gap-2 rounded-b-[11px] bg-black px-3 ${props.class ?? ""}`}
style={{ "box-shadow": `inset 0 0 0 1px ${CARD_STROKE}` }}
>
{props.children}
</div>
);
}
/* ── Now Playing + the waveform slot ─────────────────────────────── */
function NowPlayingMock() {
return (
<div class="flex w-full max-w-[420px] flex-col items-center gap-4 px-3 sm:flex-row sm:items-center">
<ModuleCard class="w-full flex-1">
<div class="flex items-center gap-3 text-left">
<div
class="nook-art h-12 w-12 shrink-0 rounded-lg"
style={{
background:
"conic-gradient(from 210deg, #fa5c7c, #6EA7FF, #6FB982, #E7A762, #fa5c7c)"
}}
/>
<div class="min-w-0 flex-1">
<p class="truncate text-[12px] font-semibold text-white">
Night Drive
</p>
<p class="truncate text-[10px] text-white/50">
Synthwave Radio · Browser
</p>
<div
class="mt-2 h-[3px] overflow-hidden rounded-full"
style={{ background: "rgba(255,255,255,0.1)" }}
>
<div
class="nook-progress h-full rounded-full"
style={{ background: "rgba(255,255,255,0.75)" }}
/>
</div>
</div>
</div>
<div class="mt-2.5 flex justify-center gap-5 text-[12px] text-white/70">
<span>⏮</span>
<span class="text-white">⏸</span>
<span>⏭</span>
</div>
</ModuleCard>
<div class="flex flex-col items-center gap-1.5">
<MiniPill>
<span class="flex h-[14px] items-center gap-[2px]">
<For each={[0, 1, 2, 3, 4, 5]}>
{(i) => (
<span
class="nook-wave w-[2.5px] rounded-full"
style={{
background: "#fa5c7c",
"animation-delay": `${i * -0.13}s`,
"animation-duration": `${0.7 + (i % 3) * 0.18}s`
}}
/>
)}
</For>
</span>
</MiniPill>
<span class="text-[9px] text-white/40">waveform slot</span>
</div>
</div>
);
}
/* ── Timers: the module's face — readout over the tick tape ──────── */
/** TimerService.format: m:ss, rounding up like the app. */
function clock(seconds: number) {
const s = Math.ceil(seconds);
return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`;
}
/** The face's capsule control: 26 px, mono 11, white 8 %. */
function TimerPill(props: { glyph?: GlyphName; label?: string }) {
return (
<span class="flex h-[26px] flex-1 items-center justify-center gap-1 rounded-full bg-white/[0.08] font-mono text-[11px] font-medium whitespace-nowrap text-white">
<Show when={props.glyph}>
<Glyph name={props.glyph!} size={10} />
</Show>
{props.label}
</span>
);
}
/*
* A 3:00 lead timer drains (in fast-forward), rings with its tape pulsing,
* and a 25:00 Focus timer keeps running in the stacked row beneath.
*/
const LEAD_SECONDS = 180;
const LEAD_MS = 9000;
const TIMER_PERIOD = 14000;
function TimersMock() {
const tick = useTick(50);
const t = () => (tick() * 50) % TIMER_PERIOD;
const leadLeft = () => Math.max(0, 1 - t() / LEAD_MS);
const ringing = () => t() >= LEAD_MS;
const focusLeft = () => 0.64 - (t() / TIMER_PERIOD) * 0.06;
return (
<ModuleCard class="w-full max-w-[260px]">
<div class="flex flex-col items-center gap-1">
<div class="flex h-[34px] items-center">
<Show
when={ringing()}
fallback={
<span class="font-mono text-[30px] font-semibold text-white tabular-nums">
{clock(leadLeft() * LEAD_SECONDS)}
</span>
}
>
<span
class="flex items-center gap-1.5 font-mono text-[22px] font-semibold"
style={{ color: TIMER_ORANGE }}
>
<Glyph
name="bell"
size={18}
style={{ animation: "nook-pulse 1s ease-in-out infinite" }}
/>
Time's up
</span>
</Show>
</div>
<div class={ringing() ? "nook-tape-ring" : ""}>
<TimerTapeMock remaining={ringing() ? 1 : leadLeft()} width={232} height={32} />
</div>
<p class="font-mono text-[9px] font-medium text-white/50">
{ringing() ? "3:00 timer" : "Remaining of 3:00"}
</p>
<div class="flex w-full gap-2 pt-1">
<Show
when={ringing()}
fallback={
<>
<TimerPill glyph="pause" label="Pause" />
<TimerPill glyph="xmark" label="Cancel" />
</>
}
>
<TimerPill glyph="plus" label="1 min" />
<TimerPill glyph="restart" label="Restart" />
<TimerPill glyph="xmark" label="Dismiss" />
</Show>
</div>
{/* a further timer: readout, slim tape, icon controls */}
<div class="mt-1.5 flex h-6 w-full items-center gap-2 rounded-full bg-white/[0.05] px-2.5 font-mono text-[11px] font-medium text-white">
<span class="w-11 tabular-nums">{clock(focusLeft() * 1500)}</span>
<div class="min-w-0 flex-1">
<TimerTapeMock remaining={focusLeft()} width={110} height={12} />
</div>
<Glyph name="pause" size={9} />
<Glyph name="xmark" size={9} />
</div>
<div class="mt-1.5 flex w-full gap-1.5">
<For each={["1m", "5m", "10m", "25m"]}>{(m) => <TimerPill label={m} />}</For>
</div>
</div>
</ModuleCard>
);
}
/* ── Weather: saved places rotate through the slot ───────────────── */
type Sky = "sun" | "cloud" | "rain";
function SkyGlyph(props: { sky: Sky; size?: number }) {
const s = () => props.size ?? 14;
return (
<svg width={s()} height={s()} viewBox="0 0 16 16">
<Show when={props.sky === "sun"}>
<circle cx="8" cy="8" r="3.4" fill="#FFD23F" />
<g stroke="#FFD23F" stroke-width="1.3" stroke-linecap="round">
<path d="M8 1.2v1.6M8 13.2v1.6M1.2 8h1.6M13.2 8h1.6M3.2 3.2l1.1 1.1M11.7 11.7l1.1 1.1M3.2 12.8l1.1-1.1M11.7 4.3l1.1-1.1" />
</g>
</Show>
<Show when={props.sky !== "sun"}>
<path
d="M4.5 11.5a3 3 0 0 1 .3-6 4 4 0 0 1 7.6 1.2 2.4 2.4 0 0 1-.4 4.8Z"
fill="rgba(255,255,255,0.8)"
/>
</Show>
<Show when={props.sky === "rain"}>
<path
d="M6 13l-.6 1.6M9 13l-.6 1.6M12 13l-.6 1.6"
stroke={CALM}
stroke-width="1.2"
stroke-linecap="round"
/>
</Show>
</svg>
);
}
const PLACES: { place: string; temp: number; sky: Sky; hourly: [Sky, number][] }[] = [
{
place: "Portland",
temp: 13,
sky: "rain",
hourly: [["rain", 13], ["rain", 13], ["cloud", 14], ["cloud", 15], ["sun", 16], ["sun", 15]]
},
{
place: "Lisbon",
temp: 24,
sky: "sun",
hourly: [["sun", 24], ["sun", 25], ["sun", 26], ["cloud", 25], ["cloud", 23], ["sun", 21]]
}
];
function WeatherMock() {
const [i, setI] = createSignal(0);
useDemoLoop(7000, [
[0, () => setI(0)],
[3500, () => setI(1)]
]);
const p = () => PLACES[i()];
return (
<div class="flex w-full max-w-[260px] flex-col items-center gap-3">
<MiniPill class="h-[34px] flex-col gap-0 px-4">
<SkyGlyph sky={p().sky} size={12} />
<span class="font-mono text-[11px] leading-none font-bold text-white">
{p().temp}°
</span>
</MiniPill>
<ModuleCard class="w-full">
<div class="text-left">
<div class="mb-2 flex items-baseline">
<span class="text-[11px] font-semibold text-white">{p().place}</span>
<span class="ml-auto text-[9px] text-white/40">
{i() + 1} of {PLACES.length}
</span>
</div>
<div class="flex justify-between">
<Index each={p().hourly}>
{(h, hour) => (
<div class="flex flex-col items-center gap-1">
<span class="text-[8px] text-white/40">
{hour === 0 ? "Now" : `${(13 + hour) % 24}`}
</span>
<SkyGlyph sky={h()[0]} size={12} />
<span class="font-mono text-[10px] text-white/85">
{h()[1]}°
</span>
</div>
)}
</Index>
</div>
</div>
</ModuleCard>
</div>
);
}
/* ── Interceptions: volume & brightness peek below the island ────── */
const PEEKS = [
{ kind: "volume", label: "Speakers", from: 0.35, to: 0.7 },
{ kind: "bright", label: "Built-in display", from: 0.6, to: 1 },
{ kind: "xdr", label: "Extra brightness", from: 1, to: 1.3 },
{ kind: "bright", label: "External display", from: 0.3, to: 0.65 }
] as const;
function InterceptionMock() {
const [peek, setPeek] = createSignal(0);
const [level, setLevel] = createSignal<number>(PEEKS[0].from);
const [shown, setShown] = createSignal(false);
const steps: [number, () => void][] = [];
PEEKS.forEach((pk, n) => {
const base = n * 2600;
steps.push([base, () => (setPeek(n), setLevel(pk.from), setShown(true))]);
for (let k = 1; k <= 4; k++) {
steps.push([
base + 250 + k * 280,
() => setLevel(pk.from + ((pk.to - pk.from) * k) / 4)
]);
}
steps.push([base + 2300, () => setShown(false)]);
});
useDemoLoop(PEEKS.length * 2600, steps);
const pk = () => PEEKS[peek()];
const xdr = () => level() > 1;
return (
<div class="flex w-full max-w-[360px] flex-col items-center">
<div
class="relative overflow-hidden rounded-b-[16px] bg-black transition-all duration-300"
style={{
width: shown() ? "300px" : "200px",
height: shown() ? "68px" : "26px",
"transition-timing-function": "cubic-bezier(0.34,1.56,0.64,1)",
"box-shadow": `inset 0 0 0 1px ${CARD_STROKE}`
}}
>
<div
class="absolute inset-x-0 bottom-0 flex items-center gap-2.5 px-4 pb-3 transition-opacity duration-200"
style={{ opacity: shown() ? 1 : 0 }}
>
<svg
width="15"
height="15"
viewBox="0 0 16 16"
style={{ color: xdr() ? "#FFD23F" : "white" }}
>
<Show
when={pk().kind === "volume"}
fallback={
<g fill="currentColor" stroke="currentColor" stroke-width="1.3" stroke-linecap="round">
<circle cx="8" cy="8" r="3" stroke="none" />
<path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1 1M11.6 11.6l1 1M3.4 12.6l1-1M11.6 4.4l1-1" fill="none" />
</g>
}
>
<path d="M2 6h3l4-3v10l-4-3H2Z" fill="currentColor" />
<path d="M11 5.5a3.5 3.5 0 0 1 0 5" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" />
</Show>
</svg>
<div class="flex-1">
<p class="mb-1 text-left text-[9px] text-white/50">{pk().label}</p>
<div
class="relative h-[6px] rounded-full"
style={{ background: "rgba(255,255,255,0.12)" }}
>
<div
class="h-full rounded-full"
style={{
width: `${Math.min(level(), 1) * (pk().kind === "xdr" ? 76.9 : 100)}%`,
background: "white",
transition: "width 0.2s ease-out"
}}
/>
<Show when={pk().kind === "xdr"}>
<span
class="absolute top-[-3px] h-[12px] w-px bg-white/50"
style={{ left: "76.9%" }}
/>
<div
class="absolute top-0 h-full rounded-r-full"
style={{
left: "76.9%",
width: `${Math.max(0, level() - 1) * 76.9}%`,
background: "#FFD23F",
"box-shadow": "0 0 10px 2px rgba(255,210,63,0.6)",
transition: "width 0.2s ease-out"
}}
/>
</Show>
</div>
</div>
<span class="w-9 text-right font-mono text-[10px] text-white/80">
{Math.round(level() * 100)}%
</span>
</div>
</div>
</div>
);
}
/* ── Network: speed test on demand + identity rows ───────────────── */
function NetworkMock() {
const [down, setDown] = createSignal(0);
const [up, setUp] = createSignal(0);
const [running, setRunning] = createSignal(false);
const steps: [number, () => void][] = [
[0, () => (setDown(0), setUp(0), setRunning(false))],
[1200, () => setRunning(true)]
];
for (let k = 1; k <= 12; k++) {
steps.push([1200 + k * 120, () => setDown(Math.round((842 * k) / 12))]);
steps.push([2800 + k * 90, () => setUp(Math.round((96 * k) / 12))]);
}
steps.push([4000, () => setRunning(false)]);
useDemoLoop(8400, steps);
return (
<ModuleCard class="w-full max-w-[260px]">
<div class="space-y-2 text-left">
<div class="flex items-end gap-3">
<div>
<p class="text-[8px] font-semibold text-white/40">DOWN</p>
<p class="font-mono text-[16px] font-semibold text-white">
{down()}
<span class="ml-0.5 text-[9px] text-white/50">Mbps</span>
</p>
</div>
<div>
<p class="text-[8px] font-semibold text-white/40">UP</p>
<p class="font-mono text-[16px] font-semibold text-white">
{up()}
<span class="ml-0.5 text-[9px] text-white/50">Mbps</span>
</p>
</div>
<span
class="ml-auto rounded-md px-2 py-0.5 text-[10px] font-semibold text-white"
style={{ background: running() ? "rgba(255,255,255,0.1)" : ACCENT }}
>
{running() ? "testing…" : "Run"}
</span>
</div>
<div class="h-px" style={{ background: "rgba(255,255,255,0.06)" }} />
<For
each={[
["Public IP", "203.0.113.42"],
["ISP", "Example Fiber · AS64500"],
["DNS", "1.1.1.1"]
]}
>
{([k, v]) => (
<div class="flex items-center gap-2 text-[10px]">
<span class="w-14 text-white/40">{k}</span>
<span class="truncate font-mono text-white/80">{v}</span>
<span class="ml-auto text-white/30">⧉</span>
</div>
)}
</For>
<span
class="inline-block rounded-full px-2 py-0.5 text-[9px] font-semibold"
style={{ background: "rgba(110,167,255,0.18)", color: "#9cc3ff" }}
>
VPN · default route
</span>
</div>
</ModuleCard>
);
}
/* ── Disk: throughput trace, capacity, SMART ─────────────────────── */
function DiskMock() {
const tick = useTick(450);
const sample = (n: number, k: number) => {
const x = Math.sin(n * 0.9 + k * 2.1) * 0.5 + Math.sin(n * 0.37 + k) * 0.5;
return Math.max(0.05, Math.min(1, 0.45 + x * 0.45));
};
const path = (k: number) => {
const pts = Array.from({ length: 24 }, (_, i) => {
const v = sample(tick() + i, k) * (k === 0 ? 1 : 0.45);
return `${(i / 23) * 200},${40 - v * 36}`;
});
return `M${pts.join(" L")}`;
};
const read = () => Math.round(sample(tick() + 23, 0) * 900);
const write = () => Math.round(sample(tick() + 23, 1) * 0.45 * 900);
return (
<ModuleCard class="w-full max-w-[260px]">
<div class="space-y-2 text-left">
<div class="flex items-baseline gap-3 font-mono text-[11px]">
<span style={{ color: CALM }}>R {read()} MB/s</span>
<span style={{ color: WARM }}>W {write()} MB/s</span>
</div>
<svg viewBox="0 0 200 42" class="h-[42px] w-full" preserveAspectRatio="none">
<path d={path(0)} fill="none" stroke={CALM} stroke-width="1.5" />
<path d={path(1)} fill="none" stroke={WARM} stroke-width="1.5" />
</svg>
<div class="flex items-center text-[10px]">
<span class="text-white/70">Macintosh HD</span>
<span class="ml-auto text-white/45">612 GB free of 1 TB</span>
</div>
<div
class="h-[5px] overflow-hidden rounded-full"
style={{ background: "rgba(255,255,255,0.08)" }}
>
<div class="h-full rounded-full" style={{ width: "39%", background: CALM }} />
</div>
<span
class="inline-block rounded-full px-2 py-0.5 text-[9px] font-semibold"
style={{ background: "rgba(111,185,130,0.18)", color: STATUS.ready }}
>
SMART · Verified
</span>
</div>
</ModuleCard>
);
}
/* ── Keep Awake: four ways to hold off sleep ─────────────────────── */
const AWAKE_MODES = [
{ label: "1 hour", note: "awake for 59:12 more" },
{ label: "On power", note: "awake while plugged in" },
{ label: "Lid closed", note: "keeps running with the lid shut" },
{ label: "Agents", note: "awake only while agents work" }
];
function KeepAwakeMock() {
const [mode, setMode] = createSignal(0);
useDemoLoop(
9600,
AWAKE_MODES.map((_, n) => [n * 2400, () => setMode(n)] as [number, () => void])
);
return (
<ModuleCard class="w-full max-w-[260px]">
<div class="flex flex-col items-center gap-2.5">
<svg width="40" height="40" viewBox="0 0 40 40" class="overflow-visible">
<g class="nook-steam" stroke="rgba(255,255,255,0.5)" stroke-width="1.6" fill="none" stroke-linecap="round">
<path d="M15 12c-2-3 2-4 0-7" />
<path d="M21 12c-2-3 2-4 0-7" style={{ "animation-delay": "-0.6s" }} />
</g>
<path d="M8 15h22v9a9 9 0 0 1-9 9h-4a9 9 0 0 1-9-9Z" fill={WARM} />
<path d="M30 18h2a4 4 0 0 1 0 8h-2" stroke={WARM} stroke-width="2.4" fill="none" />
</svg>
<div class="grid w-full grid-cols-2 gap-1.5">
<For each={AWAKE_MODES}>
{(m, n) => (
<span
class="rounded-md py-1 text-center text-[10px] font-semibold transition-colors duration-300"
style={{
background: mode() === n() ? ACCENT : CARD_FILL,
color: mode() === n() ? "white" : "rgba(255,255,255,0.55)",
"box-shadow": `inset 0 0 0 1px ${CARD_STROKE}`
}}
>
{m.label}
</span>
)}
</For>
</div>
<p class="text-[10px] text-white/45">{AWAKE_MODES[mode()].note}</p>
</div>
</ModuleCard>
);
}
/* ── Approval modes: Auto · Yolo · Verify ────────────────────────── */
const MODES = [
{ name: "Auto", note: "follows each agent's own settings", card: "asks", tint: "rgba(234,179,8,0.10)" },
{ name: "Yolo", note: "gated tools pass straight through", card: "passed", tint: "rgba(111,185,130,0.12)" },
{ name: "Verify", note: "every gated tool waits for you", card: "held", tint: "rgba(229,72,77,0.12)" }
];
function ApprovalModesMock() {
const [mode, setMode] = createSignal(0);
useDemoLoop(8400, [
[0, () => setMode(0)],
[2800, () => setMode(1)],
[5600, () => setMode(2)]
]);
const m = () => MODES[mode()];
return (
<div class="w-full max-w-[260px] space-y-2.5">
<div
class="relative flex rounded-lg p-0.5"
style={{ background: CARD_FILL, "box-shadow": `inset 0 0 0 1px ${CARD_STROKE}` }}
>
<span
class="absolute top-0.5 bottom-0.5 rounded-md transition-all duration-300"
style={{
left: `calc(${mode() * 33.333}% + 2px)`,
width: "calc(33.333% - 4px)",
background: ACCENT
}}
/>
<For each={MODES}>
{(x, n) => (
<span
class="relative z-10 flex-1 py-1 text-center text-[11px] font-semibold transition-colors"
style={{ color: mode() === n() ? "white" : "rgba(255,255,255,0.55)" }}
>
{x.name}
</span>
)}
</For>
</div>
<div
class="rounded-[10px] p-2.5 text-left transition-colors duration-500"
style={{ background: m().tint }}
>
<div class="flex items-center gap-1.5">
<span class="text-[12px] font-medium text-white">Bash</span>
<span class="truncate font-mono text-[10px] text-white/50">
rm -rf build/
</span>
<span
class="ml-auto rounded-full px-1.5 py-0.5 text-[9px] font-semibold text-white"
style={{ background: "rgba(255,255,255,0.12)" }}
>
{m().card}
</span>
</div>
</div>
<p class="text-center text-[10px] text-white/45">{m().note}</p>
</div>
);
}
/* ── Lock Screen: counts without unlocking ───────────────────────── */
function LockScreenMock() {
const [counts, setCounts] = createSignal({ working: 3, waiting: 0 });
useDemoLoop(7200, [
[0, () => setCounts({ working: 3, waiting: 0 })],
[2400, () => setCounts({ working: 2, waiting: 1 })],
[4800, () => setCounts({ working: 1, waiting: 0 })]
]);
return (
<div
class="relative h-[150px] w-full max-w-[260px] overflow-hidden rounded-xl"
style={{
background: "radial-gradient(120% 90% at 30% 10%, #2b4a6b 0%, #191b2e 55%, #0d0d0f 100%)"
}}
>
<div
class="absolute top-0 left-1/2 flex h-[22px] -translate-x-1/2 items-center gap-2 rounded-b-[9px] bg-black px-2.5"
>
<span class="flex items-center gap-1">
<span class="h-[6px] w-[6px] rounded-[1.5px]" style={{ background: STATUS.running }} />
<span class="font-mono text-[9px] font-semibold text-white/90">{counts().working}</span>
</span>
<span class="w-6" />
<span class="flex items-center gap-1">
<span
class="h-[6px] w-[6px] rounded-[1.5px] transition-colors"
style={{ background: counts().waiting ? STATUS.attention : STATUS.idle }}
/>
<span class="font-mono text-[9px] font-semibold text-white/90">{counts().waiting}</span>
</span>
</div>
<div class="flex h-full flex-col items-center justify-center pt-4">
<p class="text-[34px] leading-tight font-semibold tracking-tight text-white/90">
9:41
</p>
<span class="mt-2 h-5 w-5 rounded-full border border-white/30" />
</div>
</div>
);
}
/* ── Layout: the mosaic reflows ──────────────────────────────────── */
type Box = [l: number, t: number, w: number, h: number];
const LAYOUTS: Box[][] = [
[[0, 0, 66, 58], [68, 0, 32, 58], [0, 62, 32, 38], [34, 62, 32, 38], [68, 62, 32, 38]],
[[0, 0, 32, 100], [34, 0, 66, 40], [34, 44, 32, 56], [68, 44, 32, 26], [68, 74, 32, 26]],
[[0, 0, 49, 48], [51, 0, 49, 48], [0, 52, 100, 22], [0, 78, 49, 22], [51, 78, 49, 22]]
];
const TILE_COLORS = [CALM, STATUS.ready, WARM, "#fa5c7c", "rgba(255,255,255,0.5)"];
function LayoutMock() {
const [n, setN] = createSignal(0);
useDemoLoop(7500, [
[0, () => setN(0)],
[2500, () => setN(1)],
[5000, () => setN(2)]
]);
return (
<div
class="relative h-[130px] w-full max-w-[240px] rounded-[12px] bg-black p-2"
style={{ "box-shadow": `inset 0 0 0 1px ${CARD_STROKE}` }}
>
<div class="relative h-full w-full">
<For each={TILE_COLORS}>
{(color, i) => {
const b = () => LAYOUTS[n()][i()];
return (
<div
class="absolute rounded-md"
style={{
left: `${b()[0]}%`,
top: `${b()[1]}%`,
width: `${b()[2]}%`,
height: `${b()[3]}%`,
background: CARD_FILL,
"box-shadow": `inset 0 0 0 1px ${CARD_STROKE}, inset 3px 0 0 ${color}`,
transition: "all 0.7s cubic-bezier(0.34,1.3,0.64,1)"
}}
/>
);
}}
</For>
</div>
</div>
);
}
/* ── Marquee ─────────────────────────────────────────────────────── */
const CHIPS_A = [
"18 agents",
"Custom agents",
"Six chiptunes",
"Focus-aware slots",
"Per-app output routing",
"Low Power Mode toggle",
"Reminders",
"Battery health",
"Energy flow in watts",
"Thermal charge protection",
"Top-up charging",
"Memory by process"
];
const CHIPS_B = [
"Jump to the terminal",
"tmux · iTerm2 · kitty",
"Markdown replies",
"Tailscale hosts",
"One-click SSH setup",
"iPhone widgets",
"Watch-face widgets",
"Screenshots to clipboard",
"System audio + mic",
"Hourly forecast",
"External display brightness",
"Lid-closed keep-awake"
];
function MarqueeRow(props: { chips: string[]; reverse?: boolean }) {
return (
<div class="nook-marquee">
<div class={`nook-marquee-track ${props.reverse ? "reverse" : ""}`}>
<For each={[...props.chips, ...props.chips]}>
{(chip, i) => (
<span
aria-hidden={i() >= props.chips.length ? "true" : undefined}
class="border-overlay0 bg-surface0 text-subtext0 rounded-full border px-3.5 py-1.5 text-xs font-semibold whitespace-nowrap"
>
{chip}
</span>
)}
</For>
</div>
</div>
);
}
export default function IslandExtras() {
return (
<section class="bg-base relative z-20 py-16" id="island-extras">
<div class="px-4 md:px-8">
<p class="text-subtext1 mb-2 text-center text-xs font-semibold tracking-[0.18em] uppercase">
And everything else
</p>
<h2 class="text-text mb-3 text-center text-3xl font-bold">
One island instead of a menu bar full of utilities
</h2>
<p class="text-subtext0 mx-auto mb-10 max-w-2xl text-center leading-relaxed">
Every module below lives in the same notch, arranged however you
like, under the same one-time license.
</p>
</div>
<div class="mb-12 space-y-3">
<MarqueeRow chips={CHIPS_A} />
<MarqueeRow chips={CHIPS_B} reverse />
</div>
<div class="mx-auto grid max-w-5xl grid-cols-1 gap-5 px-4 md:grid-cols-3 md:px-8">
<CollageCell
class="md:col-span-2"
kicker="Now Playing"
title="Music in the notch"
body="Track, source, and transport controls in a module. Sources without artwork, like some browsers, get a live waveform in the slot instead."
>
<InkStage class="h-full w-full items-center">
<NowPlayingMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Timers"
title="Timers that stack"
body="A readout over a tick tape that drains with a soft crest. Run several at once; finished timers ring and hold the island open until you dismiss them."
>
<InkStage class="h-full w-full items-center px-3">
<TimersMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Weather"
title="The sky, in the slot"
body="Saved places with hourly and daily forecasts. The compact slot stacks the sky over the temperature."
>
<InkStage class="h-full w-full items-center px-3">
<WeatherMock />
</InkStage>
</CollageCell>
<CollageCell
class="md:col-span-2"
kicker="Interceptions"
title="Volume and brightness, under the notch"
body="An optional takeover of the system HUD: levels peek out below the island. Extra brightness spends an XDR panel's HDR headroom past the usual maximum, and external displays get real brightness control."
>
<InkStage class="h-full w-full items-center">
<div class="flex min-h-[110px] w-full justify-center pt-2">
<InterceptionMock />
</div>
</InkStage>
</CollageCell>
<CollageCell
kicker="Approval modes"
title="One stance for every agent"
body="Auto follows each agent's own settings, Yolo waves gated tools through, and Verify holds every one until you decide."
>
<InkStage class="h-full w-full items-center px-3">
<ApprovalModesMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Network"
title="Know your connection"
body="Public IP, ISP, gateway, and DNS one click from your clipboard. VPN routes get flagged, and a speed test is always a click away."
>
<InkStage class="h-full w-full items-center px-3">
<NetworkMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Disks"
title="Storage, measured"
body="Live read and write throughput, capacity that matches Finder, and SMART health for your drives."
>
<InkStage class="h-full w-full items-center px-3">
<DiskMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Keep Awake"
title="Sleep when you say"
body="Stay awake for a set time, while plugged in, with the lid closed, or only while your agents are working."
>
<InkStage class="h-full w-full items-center px-3">
<KeepAwakeMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Lock Screen"
title="Visible while locked"
body="The island stays on your Lock Screen, so you can see how many agents are working or waiting without unlocking."
>
<InkStage class="h-full w-full items-center px-3">
<LockScreenMock />
</InkStage>
</CollageCell>
<CollageCell
kicker="Layout"
title="Panels you shape"
body="Drag and resize modules in the mosaic editor, pick a density, and let slot rankings switch with your Focus mode."
>
<InkStage class="h-full w-full items-center px-3">
<LayoutMock />
</InkStage>
</CollageCell>
</div>
</section>
);
}

View File

@@ -85,9 +85,10 @@ function IslandSurface(props: { children: JSX.Element; class?: string }) {
onMount(() => { onMount(() => {
const node = el; const node = el;
if (!node) return; if (!node) return;
// Layout size, not getBoundingClientRect: a scaled-down mock (the
// Capture demo's island row) would otherwise clip itself to a corner.
const apply = () => { const apply = () => {
const r = node.getBoundingClientRect(); node.style.clipPath = `path("${islandPath(node.offsetWidth, node.offsetHeight)}")`;
node.style.clipPath = `path("${islandPath(r.width, r.height)}")`;
}; };
apply(); apply();
const observer = new ResizeObserver(apply); const observer = new ResizeObserver(apply);
@@ -261,3 +262,34 @@ export function IslandExpanded(props: {
</div> </div>
); );
} }
/** Fake cursor dot: rests on a target, presses, exits. */
export function FakeCursor(props: {
phase: "idle" | "press" | "live";
at: { x: number; y: number };
exit?: { x: number; y: number };
}) {
const p = () =>
props.phase === "press"
? { ...props.at, scale: 0.62, o: 1 }
: props.phase === "idle"
? { ...props.at, scale: 1, o: 1 }
: { ...(props.exit ?? { x: 106, y: 8 }), scale: 1, o: 0 };
return (
<span
class="pointer-events-none absolute z-10 rounded-full bg-white"
style={{
width: "9px",
height: "9px",
"box-shadow":
"0 1px 4px rgba(0,0,0,0.6), 0 0 0 4px rgba(255,255,255,0.18)",
left: `${p().x}%`,
top: `${p().y}%`,
opacity: p().o,
transform: `translate(-50%, -50%) scale(${p().scale})`,
transition:
"left 0.8s cubic-bezier(0.35,0,0.25,1), top 0.8s cubic-bezier(0.35,0,0.25,1), opacity 0.4s, transform 0.3s"
}}
/>
);
}

View File

@@ -0,0 +1,405 @@
import { For, Show, type JSX } from "solid-js";
import { STATUS, ACCENT, CALM, WARM, CARD_FILL, CARD_STROKE } from "./IslandMock";
/**
* Module-level mocks rebuilt from the app's SwiftUI views, so the site shows
* the same anatomy the island does: the session row (SessionRowView), the
* approval card (AgentsActionCards), the timer tape (TimerTape), a
* temperature line (TemperaturesPanelView), and the Wings (WingPanels).
*/
/* ── Glyphs: the SF Symbols the mocked views use ─────────────────── */
/* Factories, not shared nodes: a Solid JSX node can mount in only one place. */
const GLYPHS: Record<string, () => JSX.Element> = {
speaker: () => (
<>
<path d="M2 6h3l4-3v10l-4-3H2Z" fill="currentColor" />
<path d="M11 5.5a3.5 3.5 0 0 1 0 5M12.8 3.6a6 6 0 0 1 0 8.8" stroke="currentColor" stroke-width="1.4" fill="none" stroke-linecap="round" />
</>
),
speakerOff: () => (
<>
<path d="M2 6h3l4-3v10l-4-3H2Z" fill="currentColor" />
<path d="m11 6 4 4m0-4-4 4" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
</>
),
mic: () => (
<>
<rect x="5.5" y="1.5" width="5" height="8.5" rx="2.5" fill="currentColor" />
<path d="M3.5 7.5a4.5 4.5 0 0 0 9 0M8 12v2.5" stroke="currentColor" stroke-width="1.4" fill="none" stroke-linecap="round" />
</>
),
micOff: () => (
<>
<rect x="5.5" y="1.5" width="5" height="8.5" rx="2.5" fill="currentColor" opacity="0.9" />
<path d="M3.5 7.5a4.5 4.5 0 0 0 9 0M8 12v2.5M2.5 2.5l11 11" stroke="currentColor" stroke-width="1.4" fill="none" stroke-linecap="round" />
</>
),
pause: () => (
<>
<rect x="4" y="3" width="3" height="10" rx="1" fill="currentColor" />
<rect x="9" y="3" width="3" height="10" rx="1" fill="currentColor" />
</>
),
play: () => <path d="M5 3v10l8-5Z" fill="currentColor" />,
stop: () => <rect x="4" y="4" width="8" height="8" rx="1.5" fill="currentColor" />,
viewfinder: () => (
<path d="M2 5V3.5A1.5 1.5 0 0 1 3.5 2H5m6 0h1.5A1.5 1.5 0 0 1 14 3.5V5m0 6v1.5a1.5 1.5 0 0 1-1.5 1.5H11m-6 0H3.5A1.5 1.5 0 0 1 2 12.5V11m6-.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.3" fill="none" stroke-linecap="round" />
),
record: () => (
<>
<circle cx="8" cy="8" r="6" stroke="currentColor" stroke-width="1.3" fill="none" />
<circle cx="8" cy="8" r="3" fill="currentColor" />
</>
),
dashed: () => (
<rect x="2" y="3.5" width="12" height="9" rx="1.5" stroke="currentColor" stroke-width="1.3" stroke-dasharray="2 1.6" fill="none" />
),
display: () => (
<path d="M2.5 3h11a1 1 0 0 1 1 1v6.5a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm3 11h5M8 11.5V14" stroke="currentColor" stroke-width="1.3" fill="none" stroke-linecap="round" />
),
window: () => (
<>
<rect x="1.5" y="3" width="13" height="10" rx="1.5" stroke="currentColor" stroke-width="1.3" fill="none" />
<path d="M1.5 6h13" stroke="currentColor" stroke-width="1.3" />
</>
),
chevron: () => <path d="m4.5 6.5 3.5 3.5 3.5-3.5" stroke="currentColor" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round" />,
film: () => (
<path d="M3 2.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5V3a.5.5 0 0 1 .5-.5Zm2 0v11m6-11v11M2.5 6h2.5m6 0h2.5m-11 4h2.5m6 0h2.5" stroke="currentColor" stroke-width="1.2" fill="none" />
),
xmark: () => <path d="m4 4 8 8m0-8-8 8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" />,
bell: () => (
<path d="M8 1.8a4.2 4.2 0 0 0-4.2 4.2v3L2.5 11.3h11L12.2 9V6A4.2 4.2 0 0 0 8 1.8ZM6.3 12.8a1.8 1.8 0 0 0 3.4 0Z" fill="currentColor" />
),
restart: () => (
<path d="M3.5 8a4.5 4.5 0 1 0 1.4-3.3M3.2 2.2v2.8H6" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round" />
),
plus: () => <path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" />,
refresh: () => (
<path d="M12.5 8A4.5 4.5 0 1 1 11 4.6M11.6 2v2.8H8.8" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round" />
)
};
export type GlyphName = keyof typeof GLYPHS;
export function Glyph(props: { name: GlyphName; size?: number; class?: string; style?: JSX.CSSProperties }) {
return (
<svg
width={props.size ?? 12}
height={props.size ?? 12}
viewBox="0 0 16 16"
class={`shrink-0 ${props.class ?? ""}`}
style={props.style}
aria-hidden="true"
>
{GLYPHS[props.name]()}
</svg>
);
}
/* ── Agents ──────────────────────────────────────────────────────── */
export interface AgentLook {
name: string;
/** brandColorHex from the app's AgentRegistry row. */
color: string;
/** The brand mark the app bundles (AgentBrands/*.svg). */
icon: string;
}
export const CLAUDE: AgentLook = {
name: "Claude Code",
color: "#D97742",
icon: "/nook/brands/claude.svg"
};
export const CODEX: AgentLook = {
name: "Codex",
color: "#4AA3DF",
icon: "/nook/brands/codex.svg"
};
/** A row badge: brand-tinted for the agent chip, neutral otherwise. */
function Badge(props: { text: string; tint?: string }) {
return (
<span
class="max-w-full truncate rounded-full px-[7px] py-[2px] text-[10px] font-semibold whitespace-nowrap"
style={{
color: props.tint ?? "rgba(255,255,255,0.75)",
background: props.tint ? `${props.tint}33` : "rgba(255,255,255,0.08)"
}}
>
{props.text}
</span>
);
}
/**
* SessionRowView: "project · branch", the latest prompt, a status-colored
* state line; on the right the agent chip (named "Agent · host" for a
* remote session), the terminal origin, the status dot and age.
*/
export function SessionRowMock(props: {
title: string;
prompt: string;
state: string;
status: keyof typeof STATUS;
agent: AgentLook;
/** Remote sessions name their machine in the agent chip. */
host?: string;
origin?: string;
age: string;
}) {
return (
<div
class="@container rounded-xl px-2 py-2.5 text-left"
style={{ background: CARD_FILL, "box-shadow": `inset 0 0 0 1px ${CARD_STROKE}` }}
>
{/* The app's layout (badges in a right-hand third) wherever the row
is wide enough; narrow site cells stack the badges beneath. */}
<div class="flex flex-col gap-1.5 @[340px]:flex-row @[340px]:items-start @[340px]:gap-2.5">
<div class="min-w-0 flex-1 space-y-[3px]">
<p class="truncate text-[13px] font-semibold text-white">{props.title}</p>
<p class="truncate text-[11.5px] text-white/55">User: {props.prompt}</p>
<p
class="truncate text-[11.5px] font-medium transition-colors duration-500"
style={{ color: STATUS[props.status] }}
>
{props.state}
</p>
</div>
<div class="flex min-w-0 shrink-0 items-start gap-1.5 @[340px]:max-w-[50%]">
<div class="flex min-w-0 flex-col items-center">
<Badge
text={props.host ? `${props.agent.name} · ${props.host}` : props.agent.name}
tint={props.agent.color}
/>
</div>
<div class="flex items-center gap-1.5 @[340px]:flex-col @[340px]:items-end @[340px]:gap-0.5">
<Show when={props.origin}>
<Badge text={props.origin!} />
</Show>
<span class="flex items-center gap-1.5">
<span
class="h-[7px] w-[7px] rounded-full transition-colors duration-500"
style={{ background: STATUS[props.status] }}
/>
<span class="rounded-full bg-white/[0.08] px-[7px] py-[2px] text-[10px] text-white/80">
{props.age}
</span>
</span>
</div>
</div>
</div>
</div>
);
}
/** SwiftUI's dark-mode .yellow, which the approval card tints with. */
const YELLOW = "255,214,10";
/**
* ApprovalCard: brand mark, session title, "approval" capsule; "Run <tool>",
* the input in mono; Allow (accent, the island's tint), Allow for session,
* Deny, and Deny with reason….
*/
export function ApprovalCardMock(props: {
agent: AgentLook;
title: string;
tool: string;
input: string;
pressed?: "allow" | "session" | "deny";
}) {
const button = (key: "allow" | "session" | "deny", label: string, prominent = false) => (
<span
class="rounded-md px-2 py-[3px] text-[11px] font-medium whitespace-nowrap text-white transition-transform duration-150"
style={{
background: prominent ? ACCENT : "rgba(255,255,255,0.12)",
transform: props.pressed === key ? "scale(0.92)" : "scale(1)",
filter: props.pressed === key ? "brightness(1.25)" : "none"
}}
>
{label}
</span>
);
return (
<div class="rounded-[10px] p-2.5 text-left" style={{ background: `rgba(${YELLOW},0.08)` }}>
<div class="flex items-center gap-1.5">
<img src={props.agent.icon} alt="" class="h-[13px] w-[13px]" />
<span class="truncate text-[12px] font-semibold text-white">{props.title}</span>
<span
class="ml-auto shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-semibold text-white"
style={{ background: `rgba(${YELLOW},0.25)` }}
>
approval
</span>
</div>
<p class="mt-2 text-[13px] font-medium text-white">Run {props.tool}</p>
<p class="mt-0.5 truncate font-mono text-[11px] text-white/50">{props.input}</p>
<div class="mt-2 flex flex-wrap items-center gap-1.5">
{button("allow", "Allow", true)}
{button("session", "Allow for session")}
{button("deny", "Deny")}
<span class="text-[11px] whitespace-nowrap text-white/50">Deny with reason…</span>
</div>
</div>
);
}
/* ── Timer tape ──────────────────────────────────────────────────── */
/** TimerPalette.accent. */
export const TIMER_ORANGE = "#FA9E4D";
/**
* TimerTapeDrawing.ticks, ported: fixed-pitch 1.5 px ticks resting at 40 %
* of the tape height, swelling to a 72 % crest (raised cosine) that leads
* into the remaining side and trails a shorter shoulder behind.
*/
function tapeTicks(remaining: number, w: number, h: number) {
const span = w - 2;
const count = Math.floor(span / 6) + 1;
const pitch = span / Math.max(1, count - 1);
const boundary = 1 + span * remaining;
const baseline = h * 0.4;
const peak = h * 0.72;
const lead = Math.min(84, w * 0.4);
const trail = lead * 0.5;
const swell = (d: number) => (d < 1 ? (1 + Math.cos(Math.PI * d)) / 2 : 0);
return Array.from({ length: count }, (_, i) => {
const cx = 1 + i * pitch;
const offset = boundary - cx;
const rise = remaining > 0 ? swell(Math.abs(offset) / (offset >= 0 ? lead : trail)) : 0;
const height = baseline + (peak - baseline) * rise;
const fill = remaining > 0 ? Math.min(1, Math.max(0, offset / pitch + 1)) : 0;
return { x: cx - 0.75, y: (h - height) / 2, height, fill };
});
}
export function TimerTapeMock(props: {
remaining: number;
width: number;
height: number;
color?: string;
opacity?: number;
}) {
return (
<svg
viewBox={`0 0 ${props.width} ${props.height}`}
width={props.width}
height={props.height}
class="block max-w-full"
style={{ opacity: props.opacity ?? 1 }}
aria-hidden="true"
>
<For each={tapeTicks(Math.min(1, Math.max(0, props.remaining)), props.width, props.height)}>
{(t) => (
<>
<Show when={t.fill < 1}>
<rect x={t.x} y={t.y} width="1.5" height={t.height} rx="0.75" fill="rgba(255,255,255,0.18)" />
</Show>
<Show when={t.fill > 0}>
<rect
x={t.x}
y={t.y}
width="1.5"
height={t.height}
rx="0.75"
fill={props.color ?? TIMER_ORANGE}
opacity={t.fill}
/>
</Show>
</>
)}
</For>
</svg>
);
}
/* ── Temperatures ────────────────────────────────────────────────── */
/** MetricPalette.usage: calm below 70 %, warm to 90 %, critical above. */
function usageColor(fraction: number) {
if (fraction >= 0.9) return "rgba(229,72,77,0.9)";
if (fraction >= 0.7) return WARM;
return CALM;
}
/** Tier color at the app's default thresholds (warn 70 °C, alert 85 °C). */
function tierColor(celsius: number) {
if (celsius >= 85) return "rgba(229,72,77,0.9)";
if (celsius >= 70) return WARM;
return "white";
}
/**
* One die line: label, its 60 s usage trace (filled at 20 %, 1.5 px line,
* over a hairline floor), and the temperature in mono, tier-tinted.
*/
export function DieLine(props: { label: string; usage: number[]; celsius: number }) {
const path = () => {
const n = props.usage.length;
return props.usage
.map((u, i) => `${i === 0 ? "M" : "L"}${((i / (n - 1)) * 100).toFixed(2)},${(26 - u * 26).toFixed(2)}`)
.join(" ");
};
const color = () => usageColor(props.usage[props.usage.length - 1] ?? 0);
return (
<div class="flex items-center gap-2">
<span class="text-[9px] font-semibold text-white/50">{props.label}</span>
<svg viewBox="0 0 100 26" preserveAspectRatio="none" class="h-[26px] min-w-0 flex-1" aria-hidden="true">
<path d="M0,25.5 L100,25.5" stroke="rgba(255,255,255,0.08)" stroke-width="1" vector-effect="non-scaling-stroke" />
<path d={`${path()} L100,26 L0,26 Z`} fill={color()} fill-opacity="0.2" />
<path d={path()} fill="none" stroke={color()} stroke-width="1.5" vector-effect="non-scaling-stroke" />
</svg>
<span
class="font-mono text-[15px] font-medium transition-colors duration-500"
style={{ color: tierColor(props.celsius) }}
>
{Math.round(props.celsius)}°
</span>
</div>
);
}
/* ── Wings ───────────────────────────────────────────────────────── */
export interface WingControlMock {
glyph: GlyphName;
on?: boolean;
pressed?: boolean;
}
/**
* One edge's capsule: black at 94 %, a 1 px white-18 % stroke, and each
* control a circle as tall as the Compact island, icon at 42 %.
*/
export function WingCapsule(props: { controls: WingControlMock[]; height: number }) {
return (
<div
class="flex rounded-full"
style={{
height: `${props.height}px`,
background: "rgba(0,0,0,0.94)",
"box-shadow": "inset 0 0 0 1px rgba(255,255,255,0.18)"
}}
>
<For each={props.controls}>
{(c) => (
<span
class="flex items-center justify-center rounded-full transition-all duration-200"
style={{
width: `${props.height}px`,
height: `${props.height}px`,
color: `rgba(255,255,255,${c.on === false ? 0.45 : 1})`,
background: c.pressed ? "rgba(255,255,255,0.14)" : "transparent"
}}
>
<Glyph name={c.glyph} size={Math.round(props.height * 0.42)} />
</span>
)}
</For>
</div>
);
}

View File

@@ -0,0 +1,617 @@
import { For, Show, createSignal, type JSX } from "solid-js";
import {
ModuleCard,
FakeCursor,
IslandPill,
AgentDotGrid,
STATUS,
ACCENT,
CALM,
CRITICAL,
CARD_STROKE
} from "./IslandMock";
import { useDemoLoop } from "./useDemoLoop";
import { Glyph, WingCapsule, type GlyphName } from "./ModuleMocks";
/**
* Live demos for the breakdowns added with the 0.6–0.10 feature set:
* terminal replies, the volume mixer, Capture (module + Wings), and
* floating actions. Same ink chrome and status palette as the originals.
*/
/* ── Reply lands in the agent's own terminal ──────────────────────── */
const REPLY = "yes — and run them";
export function TerminalReplyDemo() {
const [typed, setTyped] = createSignal(0);
const [phase, setPhase] = createSignal<
"asking" | "typing" | "sent" | "working" | "jump"
>("asking");
useDemoLoop(10000, [
[0, () => (setTyped(0), setPhase("asking"))],
[900, () => setPhase("typing")],
...REPLY.split("").map(
(_, i) => [1000 + i * 70, () => setTyped(i + 1)] as [number, () => void]
),
[2900, () => setPhase("sent")],
[3300, () => setPhase("working")],
[6600, () => setPhase("jump")]
]);
const delivered = () => phase() === "working" || phase() === "jump";
const cursorPhase = () =>
phase() === "sent" || phase() === "jump"
? ("press" as const)
: phase() === "typing" || phase() === "asking"
? ("idle" as const)
: ("live" as const);
const cursorAt = () =>
phase() === "jump" ? { x: 88, y: 14 } : { x: 88, y: 80 };
return (
<div class="mx-auto flex w-full max-w-[340px] flex-col gap-3">
<ModuleCard class="relative">
<div class="space-y-2 text-left">
<div class="flex items-center gap-2">
<span
class="inline-block h-[7px] w-[7px] rounded-full transition-colors duration-500"
style={{
background: delivered() ? STATUS.running : STATUS.ready
}}
/>
<span class="text-[13px] font-semibold text-white">the-nook</span>
<span class="font-mono text-[10px] text-white/40">main</span>
<span
class="ml-auto rounded-md px-2 py-0.5 text-[10px] font-semibold text-white/80 transition-colors duration-300"
style={{
background:
phase() === "jump" ? ACCENT : "rgba(255,255,255,0.08)"
}}
>
Jump ↗
</span>
</div>
<p class="text-[11px] leading-snug text-white/60">
{delivered()
? "Running the test suite…"
: "Done. Want me to update the tests too?"}
</p>
<div
class="flex items-center gap-2 rounded-lg px-2 py-1.5"
style={{ background: "rgba(255,255,255,0.06)" }}
>
<span class="min-h-[14px] flex-1 truncate font-mono text-[11px] text-white/85">
{delivered() ? "" : REPLY.slice(0, typed())}
<Show when={phase() === "typing"}>
<span class="nook-caret">▍</span>
</Show>
<Show when={!typed() || delivered()}>
<span class="text-white/30">Reply…</span>
</Show>
</span>
<span
class="rounded-md px-2 py-0.5 text-[10px] font-semibold text-white transition-transform duration-200"
style={{
background: ACCENT,
transform: phase() === "sent" ? "scale(0.9)" : "scale(1)"
}}
>
Send
</span>
</div>
</div>
<FakeCursor phase={cursorPhase()} at={cursorAt()} />
</ModuleCard>
{/* the terminal the session actually runs in */}
<div
class="overflow-hidden rounded-lg text-left transition-shadow duration-500"
style={{
background: "#16161a",
"box-shadow":
phase() === "jump"
? `0 0 0 2px ${ACCENT}, 0 8px 30px rgba(72,151,178,0.35)`
: `inset 0 0 0 1px ${CARD_STROKE}`
}}
>
<div class="flex items-center gap-1.5 px-2.5 py-1.5">
<span class="h-2 w-2 rounded-full bg-[#ff5f57]" />
<span class="h-2 w-2 rounded-full bg-[#febc2e]" />
<span class="h-2 w-2 rounded-full bg-[#28c840]" />
<span class="ml-2 font-mono text-[10px] text-white/40">
tmux · the-nook:2
</span>
<span
class="ml-auto text-[9px] font-semibold tracking-wide uppercase transition-opacity duration-300"
style={{ color: ACCENT, opacity: phase() === "jump" ? 1 : 0 }}
>
focused
</span>
</div>
<div class="space-y-0.5 px-2.5 pb-2.5 font-mono text-[10.5px] leading-relaxed">
<p class="text-white/40">⏺ Updated 3 files</p>
<p class="text-white/70">
&gt;{" "}
<span
class="transition-opacity duration-300"
style={{ opacity: delivered() ? 1 : 0 }}
>
{REPLY}
</span>
</p>
<p
class="transition-opacity duration-500"
style={{ color: CALM, opacity: delivered() ? 1 : 0 }}
>
⏺ Bash(swift test)
</p>
</div>
</div>
</div>
);
}
/* ── Volume mixer: every app its own level and output ─────────────── */
interface MixerApp {
name: string;
color: string;
glyph: string;
}
const MIXER_APPS: MixerApp[] = [
{ name: "Music", color: "#fa5c7c", glyph: "♫" },
{ name: "Browser", color: "#6EA7FF", glyph: "◎" },
{ name: "Meeting", color: "#6FB982", glyph: "●" },
{ name: "podcast-cli", color: "#E7A762", glyph: ">_" }
];
export function MixerDemo() {
const [step, setStep] = createSignal(0);
useDemoLoop(9600, [
[0, () => setStep(0)],
[1800, () => setStep(1)],
[3800, () => setStep(2)],
[5800, () => setStep(3)]
]);
const level = (i: number) => {
if (i === 0) return step() >= 3 ? 0.38 : 0.72;
if (i === 1) return 0.55;
if (i === 2) return 0.86;
return 0.46;
};
const muted = (i: number) => i === 1 && step() >= 1;
const route = (i: number) =>
i === 0 && step() >= 2 ? "Headphones" : i === 2 ? "Display" : "Speakers";
return (
<ModuleCard class="mx-auto w-full max-w-[340px]">
<div class="space-y-2.5 text-left">
<div class="flex items-center">
<span class="text-[11px] font-semibold text-white/50">
Volume mixer
</span>
<span class="ml-auto font-mono text-[10px] text-white/40">
out · Speakers
</span>
</div>
<For each={MIXER_APPS}>
{(app, i) => (
<div class="flex items-center gap-2">
<span
class="flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] text-[8px] font-bold text-black/70"
style={{ background: app.color }}
>
{app.glyph}
</span>
<div class="min-w-0 flex-1">
<div class="flex items-center gap-1.5">
<span class="truncate text-[11px] font-semibold text-white/85">
{app.name}
</span>
<span
class="ml-auto shrink-0 rounded px-1.5 text-[9px] text-white/55 transition-colors duration-500"
style={{
background:
i() === 0 && step() === 2
? `${ACCENT}55`
: "rgba(255,255,255,0.07)"
}}
>
{route(i())}
</span>
</div>
<div
class="relative mt-1 h-[5px] overflow-hidden rounded-full"
style={{ background: "rgba(255,255,255,0.08)" }}
>
<div
class="h-full rounded-full"
style={{
width: `${level(i()) * 100}%`,
background: muted(i()) ? "rgba(255,255,255,0.18)" : CALM,
transition: "width 0.9s cubic-bezier(0.22,1,0.36,1), background 0.3s"
}}
/>
{/* live signal riding inside the level */}
<div
class="nook-meter absolute top-0 left-0 h-full rounded-full"
style={{
width: `${level(i()) * 100}%`,
background: "rgba(255,255,255,0.35)",
opacity: muted(i()) ? 0 : 1,
"animation-duration": `${0.5 + i() * 0.17}s`,
transition: "width 0.9s cubic-bezier(0.22,1,0.36,1), opacity 0.3s"
}}
/>
</div>
</div>
<span
class="w-4 shrink-0 text-center text-[11px] transition-colors duration-300"
style={{ color: muted(i()) ? CRITICAL : "rgba(255,255,255,0.4)" }}
>
{muted(i()) ? "✕" : "♪"}
</span>
</div>
)}
</For>
<div class="h-px" style={{ background: "rgba(255,255,255,0.06)" }} />
<p class="text-[10px] text-white/40">
{
[
"every app on its own fader",
"browser muted — the rest keep playing",
"music routed to headphones, meeting stays on the display",
"music down, nothing else moved"
][step()]
}
</p>
</div>
</ModuleCard>
);
}
/* ── Capture: the module, and the Wings while a recording runs ────── */
/** CapturePalette.recording and the NookPalette paper/ink pair. */
const RECORDING_RED = "rgb(242,69,69)";
const PAPER = "#f1ead9";
const INK = "#0d0d0f";
function CaptureChip(props: {
glyph: GlyphName;
label: string;
menu?: boolean;
pressed?: boolean;
}) {
return (
<span
class="flex flex-1 items-center justify-center gap-1 rounded-full py-1.5 text-[11px] font-medium whitespace-nowrap text-white transition-transform duration-150"
style={{
background: props.pressed ? "rgba(255,255,255,0.16)" : "rgba(255,255,255,0.08)",
transform: props.pressed ? "scale(0.94)" : "scale(1)"
}}
>
<Glyph name={props.glyph} size={11} />
{props.label}
<Show when={props.menu}>
<Glyph name="chevron" size={8} class="opacity-50" />
</Show>
</span>
);
}
/** CaptureAudioToggles: paper capsule when on, faint when off. */
function AudioToggles(props: { system: boolean; mic: boolean }) {
const toggle = (on: boolean, glyph: GlyphName, label: string) => (
<span
class="flex items-center gap-1 rounded-full px-2 py-1 text-[10.5px] font-medium whitespace-nowrap transition-colors duration-300"
style={{
background: on ? PAPER : "rgba(255,255,255,0.08)",
color: on ? INK : "rgba(255,255,255,0.7)"
}}
>
<Glyph name={glyph} size={10} />
{label}
</span>
);
return (
<div class="flex gap-1.5">
{toggle(props.system, props.system ? "speaker" : "speakerOff", "System audio")}
{toggle(props.mic, props.mic ? "mic" : "micOff", "Microphone")}
</div>
);
}
function RowLabel(props: { glyph: GlyphName; label: string }) {
return (
<p class="flex items-center gap-1 text-[11px] font-semibold text-white/50">
<Glyph name={props.glyph} size={11} />
{props.label}
</p>
);
}
export function CaptureDemo() {
const [phase, setPhase] = createSignal<"idle" | "press" | "rec" | "paused" | "saved">("idle");
const [secs, setSecs] = createSignal(0);
const [mic, setMic] = createSignal(true);
const [wingPress, setWingPress] = createSignal<"" | "mic" | "pause" | "stop">("");
useDemoLoop(12400, [
[0, () => (setPhase("idle"), setSecs(0), setMic(true), setWingPress(""))],
[1500, () => setPhase("press")],
[1800, () => setPhase("rec")],
...[1, 2, 3, 4, 5].map((s) => [1800 + s * 1000, () => setSecs(s)] as [number, () => void]),
[4300, () => setWingPress("mic")],
[4550, () => (setMic(false), setWingPress(""))],
[7100, () => setWingPress("pause")],
[7350, () => (setPhase("paused"), setWingPress(""))],
[9000, () => setWingPress("stop")],
[9250, () => (setPhase("saved"), setWingPress(""))]
]);
const recording = () => phase() === "rec" || phase() === "paused";
const paused = () => phase() === "paused";
/* Island row is drawn at half size; Wing controls are as tall as it. */
const wingWidth = 2 * 60 + 12;
const cursor = () => {
switch (wingPress()) {
case "mic":
return { phase: "press" as const, at: { x: 21.8, y: 7 } };
case "pause":
return { phase: "press" as const, at: { x: 78.2, y: 7 } };
case "stop":
return { phase: "press" as const, at: { x: 86.5, y: 7 } };
}
if (phase() === "idle" || phase() === "press")
return { phase: phase() === "press" ? ("press" as const) : ("idle" as const), at: { x: 50, y: 58 } };
if (phase() === "saved") return { phase: "live" as const, at: { x: 86.5, y: 7 } };
return { phase: "idle" as const, at: { x: 21.8, y: 30 } };
};
return (
<div class="relative mx-auto w-full max-w-[360px]">
{/* the Compact island, flanked by the Wings while recording */}
<div class="relative h-[30px]">
<div
class="absolute top-0 left-1/2 flex items-start"
style={{ transform: "translateX(-50%) scale(0.5)", "transform-origin": "top center" }}
>
<div
class="flex justify-end overflow-hidden transition-all duration-500"
style={{ width: recording() ? `${wingWidth}px` : "0px", opacity: recording() ? 1 : 0 }}
>
<WingCapsule
height={60}
controls={[
{ glyph: "speaker" },
{ glyph: mic() ? "mic" : "micOff", on: mic(), pressed: wingPress() === "mic" }
]}
/>
<span class="w-3 shrink-0" />
</div>
<IslandPill
campfire="running"
right={<AgentDotGrid states={["running", "ready", "running"]} />}
/>
<div
class="flex overflow-hidden transition-all duration-500"
style={{ width: recording() ? `${wingWidth}px` : "0px", opacity: recording() ? 1 : 0 }}
>
<span class="w-3 shrink-0" />
<WingCapsule
height={60}
controls={[
{ glyph: paused() ? "play" : "pause", pressed: wingPress() === "pause" },
{ glyph: "stop", pressed: wingPress() === "stop" }
]}
/>
</div>
</div>
</div>
{/* the Capture module */}
<ModuleCard class="mt-5">
<div class="min-h-[150px] text-left">
<Show
when={recording()}
fallback={
<div class="space-y-2.5">
<div class="space-y-1.5">
<RowLabel glyph="viewfinder" label="Screenshot" />
<div class="flex gap-1.5">
<CaptureChip glyph="dashed" label="Area" />
<CaptureChip glyph="display" label="Screen" />
<CaptureChip glyph="window" label="App" menu />
</div>
</div>
<div class="space-y-1.5">
<RowLabel glyph="record" label="Record" />
<div class="flex gap-1.5">
<CaptureChip glyph="dashed" label="Area" />
<CaptureChip glyph="display" label="Screen" pressed={phase() === "press"} />
<CaptureChip glyph="window" label="App" menu />
</div>
<AudioToggles system mic={mic()} />
</div>
<Show when={phase() === "saved"}>
<div class="flex items-center gap-1.5 text-[10.5px]">
<Glyph name="film" size={11} class="text-white/50" />
<span class="min-w-0 flex-1 truncate text-white/85">
Screen Recording 2026-10-13 at 9.41.12.mov
</span>
<span class="shrink-0 text-white/50">Show in Finder</span>
</div>
</Show>
</div>
}
>
<div class="space-y-2.5">
<div class="flex items-center gap-2">
<span
class="h-2 w-2 rounded-full transition-colors"
style={{ background: paused() ? "rgba(255,255,255,0.4)" : RECORDING_RED }}
/>
<span
class="font-mono text-[22px] font-semibold transition-colors"
style={{ color: paused() ? "rgba(255,255,255,0.5)" : "white" }}
>
0:0{secs()}
</span>
<span class="ml-auto font-mono text-[10px] font-medium text-white/50">
{paused() ? "Paused" : "Recording"}
</span>
</div>
<div class="flex gap-2">
<CaptureChip glyph={paused() ? "play" : "pause"} label={paused() ? "Resume" : "Pause"} />
<CaptureChip glyph="stop" label="Stop" />
</div>
<AudioToggles system mic={mic()} />
</div>
</Show>
</div>
</ModuleCard>
{/* cursor plotted on a fixed 360 px frame centered over the demo */}
<div class="pointer-events-none absolute inset-y-0 left-1/2 w-[360px] -translate-x-1/2">
<FakeCursor phase={cursor().phase} at={cursor().at} />
</div>
</div>
);
}
/* ── Floating actions bloom around the open island ────────────────── */
/* Tiny monochrome glyphs for the action kinds the app offers. */
const GLYPH: Record<string, () => JSX.Element> = {
leaf: () => (
<path d="M3 13C3 7 7 3 13 3c0 6-4 10-10 10Zm0 0 6-6" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linecap="round" />
),
bolt: () => <path d="M9 1 3 9h4l-1 6 6-8H8l1-6Z" fill="currentColor" />,
timer: () => (
<g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round">
<circle cx="8" cy="9" r="5.5" />
<path d="M8 9V6M6.5 1.5h3" />
</g>
),
speaker: () => (
<g fill="currentColor">
<path d="M2 6h3l4-3v10l-4-3H2Z" />
<path d="M11 5.5a3.5 3.5 0 0 1 0 5" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" />
</g>
),
shell: () => (
<path d="m3 5 3 3-3 3m5 0h5" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linecap="round" stroke-linejoin="round" />
),
stack: () => (
<g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round">
<path d="m8 2 6 3-6 3-6-3 6-3Z" />
<path d="m2 8.5 6 3 6-3M2 11.5l6 3 6-3" />
</g>
),
link: () => (
<path d="M7 9a3 3 0 0 0 4 0l2-2a3 3 0 0 0-4-4l-1 1m1 3a3 3 0 0 0-4 0l-2 2a3 3 0 0 0 4 4l1-1" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" />
)
};
interface FloatAction {
glyph: keyof typeof GLYPH;
label: string;
x: number;
y: number;
}
/* Positions mirror the app's slots: Left ·1/·2, Right ·1/·2, Bottom ·1–3. */
const ACTIONS: FloatAction[] = [
{ glyph: "leaf", label: "Low Power Mode on", x: -128, y: -18 },
{ glyph: "bolt", label: "Top-up to 100%", x: -128, y: 26 },
{ glyph: "speaker", label: "Output → Headphones", x: 128, y: -18 },
{ glyph: "stack", label: "Shortcut: Focus Time", x: 128, y: 26 },
{ glyph: "timer", label: "Timer · 25 min", x: -50, y: 78 },
{ glyph: "shell", label: "$ make deploy", x: 0, y: 78 },
{ glyph: "link", label: "Opened dashboard", x: 50, y: 78 }
];
export function FloatingActionsDemo() {
const [open, setOpen] = createSignal(false);
const [pressed, setPressed] = createSignal(-1);
const [lit, setLit] = createSignal<number[]>([]);
useDemoLoop(9600, [
[0, () => (setOpen(false), setPressed(-1), setLit([]))],
[400, () => setOpen(true)],
[2200, () => setPressed(0)],
[2500, () => setLit([0])],
[4000, () => setPressed(4)],
[4300, () => setLit([0, 4])],
[5800, () => setPressed(2)],
[6100, () => setLit([0, 4, 2])],
[8800, () => (setOpen(false), setPressed(-1))]
]);
const lastLit = () => lit()[lit().length - 1];
return (
<div class="relative mx-auto flex h-[240px] w-full max-w-[340px] items-start justify-center pt-6">
{/* the expanded island */}
<div
class="relative z-10 rounded-b-[18px] bg-black transition-all duration-500"
style={{
width: open() ? "190px" : "120px",
height: open() ? "96px" : "26px",
"transition-timing-function": "cubic-bezier(0.34,1.56,0.64,1)",
"box-shadow": `inset 0 0 0 1px ${CARD_STROKE}`
}}
>
<div
class="space-y-1.5 p-3 transition-opacity duration-300"
style={{ opacity: open() ? 1 : 0 }}
>
<div class="h-1.5 w-2/3 rounded bg-white/20" />
<div class="h-1.5 w-1/2 rounded bg-white/10" />
<div class="h-1.5 w-3/4 rounded" style={{ background: `${CALM}66` }} />
</div>
<For each={ACTIONS}>
{(a, i) => (
<span
class="absolute flex h-8 w-8 items-center justify-center rounded-full transition-all"
style={{
left: "50%",
top: "50%",
transform: open()
? `translate(calc(-50% + ${a.x}px), calc(-50% + ${a.y - 6}px)) scale(${pressed() === i() ? 0.82 : 1})`
: "translate(-50%, -50%) scale(0.2)",
opacity: open() ? 1 : 0,
background: lit().includes(i()) ? ACCENT : "#1c1c20",
color: lit().includes(i()) ? "white" : "rgba(255,255,255,0.7)",
"box-shadow": `inset 0 0 0 1px rgba(255,255,255,0.12), 0 4px 14px rgba(0,0,0,0.5)`,
"transition-duration": "520ms",
"transition-delay": open() ? `${i() * 45}ms` : `${(6 - i()) * 25}ms`,
"transition-timing-function": "cubic-bezier(0.34,1.56,0.64,1)"
}}
>
<svg width="15" height="15" viewBox="0 0 16 16">
{GLYPH[a.glyph]()}
</svg>
</span>
)}
</For>
</div>
{/* what the last press did */}
<div
class="absolute bottom-1 left-1/2 -translate-x-1/2 rounded-full px-3 py-1 text-[10px] font-semibold whitespace-nowrap text-white transition-all duration-300"
style={{
background: "rgba(72,151,178,0.22)",
opacity: lastLit() !== undefined && open() ? 1 : 0
}}
>
{lastLit() !== undefined ? ACTIONS[lastLit()].label : " "}
</div>
</div>
);
}

View File

@@ -0,0 +1,286 @@
import { For, Show, createSignal } from "solid-js";
import Button from "~/components/ui/Button";
import Input from "~/components/ui/Input";
import { STATUS, ACCENT } from "./IslandMock";
import { useDemoLoop } from "./useDemoLoop";
import { betaRequestPayload } from "./betaRequest";
/**
* iPhone + Apple Watch companion, in TestFlight beta. The request form
* mirrors Settings ▸ Phone's BetaAccessCard in the app: it sends only the
* email, over the same `/api/the-nook/report` pipeline (see betaRequest.ts).
*/
type RequestState = "idle" | "sending" | "sent" | "limited" | "failed";
function requestBetaAccess(email: string): Promise<Response> {
return fetch("/api/the-nook/report", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(betaRequestPayload(email))
});
}
/* ── Demo: a request lands on the phone, a question on the wrist ─── */
function CompanionDemo() {
const [phase, setPhase] = createSignal<
"quiet" | "ask" | "allowed" | "question" | "answered"
>("quiet");
useDemoLoop(11000, [
[0, () => setPhase("quiet")],
[900, () => setPhase("ask")],
[3600, () => setPhase("allowed")],
[5400, () => setPhase("question")],
[8200, () => setPhase("answered")]
]);
const askVisible = () => phase() !== "quiet";
const allowed = () => phase() !== "quiet" && phase() !== "ask";
const working = () => (allowed() ? 3 : 2);
const waiting = () => (phase() === "ask" ? 1 : 0);
return (
<div class="flex items-end justify-center gap-5">
{/* iPhone */}
<div
class="relative h-[300px] w-[150px] overflow-hidden rounded-[28px] p-2"
style={{
background:
"radial-gradient(120% 80% at 30% 0%, #2b4a6b 0%, #191b2e 60%, #0d0d0f 100%)",
"box-shadow":
"inset 0 0 0 1.5px rgba(255,255,255,0.18), 0 20px 50px rgba(0,0,0,0.5)"
}}
>
<div class="mx-auto mt-1 h-[16px] w-[52px] rounded-full bg-black" />
<p class="mt-3 text-center text-[30px] leading-none font-semibold text-white/90">
9:41
</p>
{/* Lock Screen widget: what the numbers count */}
<div class="mt-2 flex justify-center gap-1">
<span
class="flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[8px] font-semibold whitespace-nowrap text-white/85"
style={{ background: "rgba(255,255,255,0.12)" }}
>
<span class="h-1.5 w-1.5 rounded-[1px]" style={{ background: STATUS.running }} />
{working()} working
</span>
<span
class="flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[8px] font-semibold whitespace-nowrap text-white/85"
style={{ background: "rgba(255,255,255,0.12)" }}
>
<span
class="h-1.5 w-1.5 rounded-[1px]"
style={{ background: waiting() ? STATUS.attention : STATUS.idle }}
/>
{waiting()} waiting
</span>
</div>
{/* notification */}
<div
class="absolute inset-x-2 top-[118px] rounded-2xl p-2 text-left transition-all duration-500"
style={{
background: "rgba(40,40,46,0.88)",
"backdrop-filter": "blur(8px)",
opacity: askVisible() ? 1 : 0,
transform: askVisible() ? "translateY(0)" : "translateY(-14px)"
}}
>
<div class="flex items-center gap-1">
<img src="/nook/icon.png" alt="" class="h-3 w-3 rounded-[3px]" />
<span class="text-[7.5px] font-semibold tracking-wide text-white/50 uppercase">
The Nook · now
</span>
</div>
<p class="mt-1 text-[9.5px] font-semibold text-white">
{allowed() ? "Allowed ✓" : "Claude Code · the-nook"}
</p>
<p class="text-[9px] leading-snug text-white/60">
{allowed() ? "Back to work." : "Run Bash: swift test"}
</p>
<Show when={!allowed()}>
<div class="mt-1.5 flex gap-1">
<span
class="flex-1 rounded-md py-0.5 text-center text-[8.5px] font-semibold text-white"
style={{ background: ACCENT }}
>
Allow
</span>
<span class="flex-1 rounded-md bg-white/10 py-0.5 text-center text-[8.5px] font-semibold text-white/80">
Deny
</span>
</div>
</Show>
</div>
</div>
{/* Apple Watch */}
<div class="flex flex-col items-center">
<div class="h-3 w-[64px] rounded-t-md bg-white/10" />
<div
class="relative h-[118px] w-[98px] overflow-hidden rounded-[26px] bg-black p-2.5"
style={{
"box-shadow":
"inset 0 0 0 2px rgba(255,255,255,0.16), 0 14px 34px rgba(0,0,0,0.5)",
transform: phase() === "question" ? "rotate(-2deg)" : "rotate(0deg)",
transition: "transform 0.15s"
}}
>
<Show
when={phase() === "question" || phase() === "answered"}
fallback={
<div class="flex h-full flex-col items-center justify-center">
<span class="font-mono text-[18px] font-semibold text-white/90">
{working()}
</span>
<span class="text-[8px] text-white/50">agents working</span>
</div>
}
>
<p class="text-[8px] font-semibold text-white/50">Codex asks</p>
<p class="mt-0.5 text-[9.5px] leading-snug font-semibold text-white">
Ship it to staging?
</p>
<div class="mt-2 space-y-1">
<For each={["Yes", "Not yet"]}>
{(option, i) => (
<span
class="block rounded-full py-1 text-center text-[8.5px] font-semibold transition-colors duration-300"
style={{
background:
phase() === "answered" && i() === 0
? STATUS.ready
: "rgba(255,255,255,0.12)",
color: "white"
}}
>
{phase() === "answered" && i() === 0 ? "Sent ✓" : option}
</span>
)}
</For>
</div>
</Show>
</div>
<div class="h-3 w-[64px] rounded-b-md bg-white/10" />
</div>
</div>
);
}
export default function PhoneBeta(props: { brandColor: string }) {
const [email, setEmail] = createSignal("");
const [state, setState] = createSignal<RequestState>("idle");
const submit = async () => {
const contact = email().trim();
if (!contact || state() === "sending") return;
setState("sending");
try {
const res = await requestBetaAccess(contact);
if (res.status === 429) return setState("limited");
if (!res.ok) return setState("failed");
setEmail("");
setState("sent");
} catch {
setState("failed");
}
};
return (
<section class="bg-base relative z-20 px-4 py-20 md:px-8" id="iphone">
<div class="mx-auto grid max-w-5xl grid-cols-1 items-center gap-12 md:grid-cols-2">
<div>
<span class="border-overlay0 bg-surface0 text-subtext0 mb-4 inline-block rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide">
TestFlight beta
</span>
<h2 class="text-text mb-3 text-3xl font-bold tracking-tight">
Your fleet, in your pocket
</h2>
<p class="text-subtext0 mb-5 leading-relaxed">
The iPhone and Apple Watch companion is in beta. Approvals,
questions, and replies reach you away from the desk, and your
answer goes straight back to the agent.
</p>
<ul class="mb-8 space-y-2.5">
<For
each={[
"Allow, deny, answer, and reply from iPhone or Apple Watch",
"Connects over an end-to-end encrypted relay, your tailnet, or your LAN",
"Home Screen, Lock Screen, and watch-face widgets for fleet status",
"Mute notifications for a while, or while you're active at the Mac"
]}
>
{(bullet) => (
<li class="text-subtext1 flex gap-2.5 text-sm">
<span
class="mt-[7px] inline-block h-1.5 w-1.5 shrink-0 rounded-[2px]"
style={{ background: ACCENT }}
/>
{bullet}
</li>
)}
</For>
</ul>
<div class="border-overlay0 bg-surface0 rounded-xl border p-6">
<h3 class="text-text mb-1 text-lg font-bold">Request beta access</h3>
<p class="text-subtext0 mb-4 text-sm">
Leave your email to get a TestFlight invite. We only receive your
email address.
</p>
<form
class="flex flex-col gap-3 sm:flex-row sm:items-end"
onSubmit={(e) => {
e.preventDefault();
void submit();
}}
>
<Input
type="email"
required
label="Email"
containerClass="flex-1"
disabled={state() === "sending"}
value={email()}
onInput={(e) => setEmail(e.currentTarget.value)}
/>
<Button
type="submit"
variant="primary"
color={props.brandColor}
loading={state() === "sending"}
>
Request access
</Button>
</form>
<Show when={state() === "sent"}>
<p class="text-subtext1 mt-4 text-sm">
Thanks. Watch your inbox for a TestFlight invite.
</p>
</Show>
<Show when={state() === "limited"}>
<p class="mt-4 text-sm text-red-500">
Too many requests from this network. Try again later.
</p>
</Show>
<Show when={state() === "failed"}>
<p class="mt-4 text-sm text-red-500">
Couldn't send the request. Check your connection and try again.
</p>
</Show>
</div>
</div>
<div
class="rounded-2xl px-6 py-10"
style={{
background:
"radial-gradient(70% 90% at 50% 0%, rgba(72,151,178,0.12) 0%, transparent 70%) #0d0d0f"
}}
>
<CompanionDemo />
</div>
</div>
</section>
);
}

View File

@@ -0,0 +1,12 @@
/**
* The iPhone beta-access request the landing page posts to
* `/api/the-nook/report` — the same title the app's Settings ▸ Phone card
* sends, so requests from both land together. Email only, no device facts.
*/
export function betaRequestPayload(email: string) {
return {
title: "iPhone app beta access request",
description: "Beta access requested from nook.freno.me.",
contact: email
};
}

View File

@@ -0,0 +1,28 @@
import { onCleanup, onMount } from "solid-js";
/**
* Drives a looping landing-page demo: each `[atMs, step]` pair fires at its
* offset, and the whole schedule restarts every `periodMs`. Timers are torn
* down with the owning component.
*/
export function useDemoLoop(
periodMs: number,
steps: [atMs: number, step: () => void][]
): void {
onMount(() => {
const timers: ReturnType<typeof setTimeout>[] = [];
const run = () => {
timers.length = 0;
for (const [at, step] of steps) {
if (at === 0) step();
else timers.push(setTimeout(step, at));
}
};
run();
const interval = setInterval(run, periodMs);
onCleanup(() => {
clearInterval(interval);
timers.forEach(clearTimeout);
});
});
}

View File

@@ -12,6 +12,35 @@
* Tests inject a fake `api` and a capture sink. * Tests inject a fake `api` and a capture sink.
*/ */
/** Canonical analytics path for one download event. One label per asset, so a
* click on a landing page and a Sparkle update of the same app land in the
* same bucket on the analytics page. */
export const DOWNLOAD_PATH_PREFIX = "/api/downloads/";
export function downloadPath(asset: string): string {
return `${DOWNLOAD_PATH_PREFIX}${asset}`;
}
/**
* Group download rows by the asset named in their canonical path, and total
* them. Split out from the query so the labelling has a unit test without a
* database — the writer and the reader share `DOWNLOAD_PATH_PREFIX`, so the
* two cannot drift apart.
*/
export function summariseDownloads(
rows: Array<{ path: string; count: number }>
): { total: number; byAsset: Array<{ asset: string; count: number }> } {
const byAsset = rows.map((row) => ({
asset: row.path.slice(DOWNLOAD_PATH_PREFIX.length),
count: row.count
}));
return {
total: byAsset.reduce((sum, row) => sum + row.count, 0),
byAsset
};
}
/** Structural shape of the tRPC downloads proxy this helper depends on. */ /** Structural shape of the tRPC downloads proxy this helper depends on. */
export interface DownloadApi { export interface DownloadApi {
downloads: { downloads: {

View File

@@ -202,6 +202,32 @@ function FrenomePanel(props: FrenomePanelProps) {
/> />
</div> </div>
{/* Downloads — every door logs one row at /api/downloads/<asset> */}
<Show when={data.downloads.total > 0}>
<div class="bg-surface0 border-surface1 mb-8 rounded-lg border shadow">
<div class="border-surface1 border-b p-6">
<h2 class="text-text text-2xl font-bold">Downloads</h2>
<p class="text-subtext0 mt-1 text-sm">
{formatNumber(data.downloads.total)} events in the last
{props.days === 1 ? " 24 hours" : ` ${props.days} days`} —
landing page clicks and files served, by product
</p>
</div>
<div class="space-y-3 p-6">
<For each={data.downloads.byAsset}>
{(download) => (
<StatBar
label={download.asset}
count={download.count}
total={data.downloads.total}
color="bg-teal-600"
/>
)}
</For>
</div>
</div>
</Show>
{/* Performance */} {/* Performance */}
<Show when={performanceStats()} keyed> <Show when={performanceStats()} keyed>
{(ps) => ( {(ps) => (

View File

@@ -1,6 +1,7 @@
import type { APIEvent } from "@solidjs/start/server"; import type { APIEvent } from "@solidjs/start/server";
import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3"; import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3";
import { env } from "~/env/server"; import { env } from "~/env/server";
import { trackDownload } from "~/server/track-download";
/** /**
* Serves macOS app DMG files and delta updates from S3 * Serves macOS app DMG files and delta updates from S3
@@ -8,7 +9,10 @@ import { env } from "~/env/server";
* *
* Handles: * Handles:
* - Full DMG files: /api/downloads/Gaze-0.2.2.dmg, /api/downloads/InputHalo-0.1.0.dmg * - Full DMG files: /api/downloads/Gaze-0.2.2.dmg, /api/downloads/InputHalo-0.1.0.dmg
* - Delta updates: /api/downloads/Gaze3-2.delta, /api/downloads/InputHalo3-2.delta * - Delta updates: /api/downloads/Gaze3-2.delta, /api/downloads/Nook17-9.delta
*
* The Nook delta files are named after the app bundle ("Nook"), not the DMG
* ("TheNook"), so both prefixes must be allowed (NOOK-337).
* *
* URL: https://freno.me/api/downloads/[filename] * URL: https://freno.me/api/downloads/[filename]
*/ */
@@ -24,10 +28,20 @@ export async function GET(event: APIEvent) {
}); });
} }
const validPrefixes = ["Gaze", "InputHalo", "TheNook"]; // Prefix → canonical asset key, so a version bump stays one asset in
const isValidPrefix = validPrefixes.some((prefix) => filename.startsWith(prefix)); // analytics rather than one per release.
const assetKeys: Record<string, string> = {
Gaze: "gaze",
InputHalo: "inputhalo",
TheNook: "thenook",
Nook: "thenook"
};
const asset = Object.keys(assetKeys).find((prefix) =>
filename.startsWith(prefix)
);
if ( if (
!isValidPrefix || !asset ||
(!filename.endsWith(".dmg") && (!filename.endsWith(".dmg") &&
!filename.endsWith(".delta") && !filename.endsWith(".delta") &&
!filename.endsWith(".zip")) !filename.endsWith(".zip"))
@@ -81,13 +95,20 @@ export async function GET(event: APIEvent) {
console.log(`✓ Serving ${filename} (${body.length} bytes)`); console.log(`✓ Serving ${filename} (${body.length} bytes)`);
return new Response(body, { await trackDownload(event, assetKeys[asset]!);
// SAFETY: `transformToByteArray` yields `Uint8Array<ArrayBufferLike>`, which the
// DOM lib's `BufferSource` (ArrayBuffer-backed) does not accept, though undici
// takes it as-is at runtime. State the intent at the one boundary it hits.
return new Response(body as unknown as BodyInit, {
status: 200, status: 200,
headers: { headers: {
"Content-Type": contentType, "Content-Type": contentType,
"Content-Length": body.length.toString(), "Content-Length": body.length.toString(),
"Content-Disposition": `attachment; filename="${filename}"`, "Content-Disposition": `attachment; filename="${filename}"`,
"Cache-Control": "public, max-age=86400", // Cache for 24 hours "Cache-Control": "public, max-age=86400", // Cache for 24 hours
// Deliberately open: these are public installer files with no cookies or
// credentials, fetched by Sparkle and by direct browser navigation.
"Access-Control-Allow-Origin": "*" "Access-Control-Allow-Origin": "*"
} }
}); });

View File

@@ -0,0 +1,48 @@
/**
* Regression test for the downloads proxy filename allowlist (NOOK-337).
*
* The v0.10.0 publish failed its CI enclosure check because Sparkle names
* delta files after the app bundle ("Nook17-9.delta") while the DMG is named
* "TheNook-*.dmg" — and "Nook" was missing from the allowlist, so every Nook
* delta request 400'd with "Invalid file format" while the DMG passed.
*
* The route hits S3 and cannot be unit-tested under bun:test, so this is a
* STATIC SOURCE AUDIT — the same pattern the downloads.test.ts regressions
* use.
*/
import { describe, it, expect } from "bun:test";
import { readFileSync } from "node:fs";
import { join } from "node:path";
const SOURCE = readFileSync(
join(import.meta.dir, "[filename].ts"),
"utf8"
);
/**
* The allowlist moved from an array to a `prefix → asset key` map when download
* tracking was added, so read the keys out of the map rather than matching
* quoted strings.
*/
const ALLOWLIST_KEYS = [
...(/const assetKeys: Record<string, string> = \{([^}]*)\}/.exec(SOURCE)?.[1] ?? "")
.matchAll(/"?([A-Za-z]+)"?\s*:/g)
].map((match) => match[1]);
describe("Downloads proxy filename allowlist (NOOK-337)", () => {
it("allows the Nook app-bundle prefix used by Sparkle delta names", () => {
expect(ALLOWLIST_KEYS).toContain("Nook");
});
it("still allows every previously served prefix", () => {
for (const prefix of ["Gaze", "InputHalo", "TheNook"]) {
expect(ALLOWLIST_KEYS).toContain(prefix);
}
});
it("still serves the extensions Sparkle fetches", () => {
for (const ext of [".dmg", ".delta", ".zip"]) {
expect(SOURCE).toContain(`"${ext}"`);
}
});
});

View File

@@ -35,7 +35,11 @@ const ENTITY_REPLACEMENTS: [RegExp, string][] = [
[/&lt;/g, "<"], [/&lt;/g, "<"],
[/&gt;/g, ">"], [/&gt;/g, ">"],
[/&quot;/g, '"'], [/&quot;/g, '"'],
// Python's html.escape, which embed_release_notes.py writes the appcast
// with, prefers the hex form for apostrophes (NOOK-565).
[/&#x27;/g, "'"],
[/&#39;/g, "'"], [/&#39;/g, "'"],
[/&apos;/g, "'"],
[/&nbsp;/g, " "], [/&nbsp;/g, " "],
// Last, so "&amp;lt;" cannot decode twice. // Last, so "&amp;lt;" cannot decode twice.
[/&amp;/g, "&"] [/&amp;/g, "&"]

View File

@@ -111,7 +111,7 @@ describe("GET /api/the-nook/download", () => {
expect(logged.length).toBe(1); expect(logged.length).toBe(1);
expect(logged[0]).toMatchObject({ expect(logged[0]).toMatchObject({
path: "/api/the-nook/download", path: "/api/downloads/thenook",
method: "GET", method: "GET",
referrer: "https://nook.freno.me/" referrer: "https://nook.freno.me/"
}); });

View File

@@ -1,7 +1,5 @@
import type { APIEvent } from "@solidjs/start/server"; import type { APIEvent } from "@solidjs/start/server";
import { getRequestIP } from "vinxi/http"; import { trackDownload } from "~/server/track-download";
import { logVisit, enrichAnalyticsEntry, flushAnalytics } from "~/server/analytics";
import { parseUtm } from "~/server/utm";
import { resolveLatestDownload } from "./_download"; import { resolveLatestDownload } from "./_download";
/** /**
@@ -15,13 +13,11 @@ import { resolveLatestDownload } from "./_download";
* Why a redirect and not a direct S3 link: the appcast route and the DMG * Why a redirect and not a direct S3 link: the appcast route and the DMG
* route never logged anything, so step 2 of the funnel (download click → * route never logged anything, so step 2 of the funnel (download click →
* DMG served) was invisible. Every click now lands one row in * DMG served) was invisible. Every click now lands one row in
* VisitorAnalytics under the path below, which is what `topApiCalls` * VisitorAnalytics under `/api/downloads/thenook`, alongside the clicks and
* already surfaces. * served files of every other product — see `~/server/track-download`.
* *
* Country is read from the edge headers Vercel/Cloudflare set; the * Referrer, campaign tags, edge country (with `?c=` override) and user agent
* analytics buffer carries a `country` column that nothing populated * are read by `trackDownload`, which is shared with the other download doors.
* until now. `?c=` is accepted as an override for previews and manual
* verification.
* *
* ONLY the handler is exported here: Vinxi's route tree-shake deletes * ONLY the handler is exported here: Vinxi's route tree-shake deletes
* exported declarations that are not in the router's `pick=` list, so a * exported declarations that are not in the router's `pick=` list, so a
@@ -29,47 +25,10 @@ import { resolveLatestDownload } from "./_download";
* referenced it. All resolution helpers live in `./_download.ts`. * referenced it. All resolution helpers live in `./_download.ts`.
*/ */
function firstHeader(request: Request, ...names: string[]): string | null {
for (const name of names) {
const value = request.headers.get(name);
if (value) return value;
}
return null;
}
export async function GET(event: APIEvent): Promise<Response> { export async function GET(event: APIEvent): Promise<Response> {
const { request } = event; // Recorded before resolving: a click that dies at resolution is exactly the
const url = new URL(request.url); // failure the funnel needs to show.
await trackDownload(event, "thenook");
const forwarded = firstHeader(request, "x-forwarded-for");
const ipAddress =
getRequestIP(event.nativeEvent) ??
(forwarded ? forwarded.split(",")[0]!.trim() : null);
// Best-effort: a failed analytics write must never block a download.
// Flushed (not merely buffered) because a download click is low-volume and
// the batch timer is not guaranteed to survive the response on serverless.
try {
const referrer = firstHeader(request, "referer", "referrer");
await logVisit(
enrichAnalyticsEntry({
path: "/api/the-nook/download",
method: "GET",
referrer,
userAgent: firstHeader(request, "user-agent"),
ipAddress,
// The click carries its own tags when a campaign links straight here;
// otherwise the landing page's tags ride along in the referer.
...parseUtm(request.url, referrer),
country:
url.searchParams.get("c") ??
firstHeader(request, "x-vercel-ip-country", "cf-ipcountry")
})
);
await flushAnalytics();
} catch (error) {
console.error("Failed to log download click:", error);
}
let target: string | null = null; let target: string | null = null;
try { try {

View File

@@ -256,6 +256,21 @@ describe("sectionsFromHtml", () => {
expect(sectionsFromHtml("")).toEqual([]); expect(sectionsFromHtml("")).toEqual([]);
expect(sectionsFromHtml("<p><b>Added</b></p>")).toEqual([]); expect(sectionsFromHtml("<p><b>Added</b></p>")).toEqual([]);
}); });
it("decodes the entities embed_release_notes.py's html.escape writes", () => {
// Python's html.escape prefers the hex form for apostrophes; this is what
// the live appcast actually carries (NOOK-565).
expect(
sectionsFromHtml(
"<p><b>Added</b></p><ul><li>Each app&#x27;s meter &amp; the icon</li><li>don&#x27;t expand</li></ul>"
)
).toEqual([
{
title: "Added",
bullets: ["Each app's meter & the icon", "don't expand"]
}
]);
});
}); });
describe("isoDateOrNull", () => { describe("isoDateOrNull", () => {

View File

@@ -5,6 +5,7 @@ import { describe, expect, it, mock, beforeEach } from "bun:test";
// and description, HTML-escaped. // and description, HTML-escaped.
// 2. Invalid payloads never reach the mailer. // 2. Invalid payloads never reach the mailer.
// 3. The rate limiter halts floods per fingerprint (falling back to IP). // 3. The rate limiter halts floods per fingerprint (falling back to IP).
// 4. The landing page's iPhone beta request (email only) gets through.
// sendEmail and the limiter are mocked so the test sends no real mail. // sendEmail and the limiter are mocked so the test sends no real mail.
const sentEmails: { to: string; subject: string; html: string }[] = []; const sentEmails: { to: string; subject: string; html: string }[] = [];
@@ -22,6 +23,9 @@ mock.module("~/server/bug-report-rate-limit", () => ({
})); }));
const { POST } = await import("./report"); const { POST } = await import("./report");
const { betaRequestPayload } = await import(
"~/components/nook/betaRequest"
);
/** A minimal APIEvent double: JSON body plus optional headers. */ /** A minimal APIEvent double: JSON body plus optional headers. */
function request(body: unknown, headers: Record<string, string> = {}) { function request(body: unknown, headers: Record<string, string> = {}) {
@@ -134,4 +138,17 @@ describe("POST /api/the-nook/report", () => {
expect(res.status).toBe(200); expect(res.status).toBe(200);
expect(sentEmails).toHaveLength(1); expect(sentEmails).toHaveLength(1);
}); });
it("delivers the landing page's beta request with only the email", async () => {
const res = await POST(request(betaRequestPayload("tester@example.com")));
expect(res.status).toBe(200);
expect(sentEmails).toHaveLength(1);
const email = sentEmails[0]!;
expect(email.subject).toBe(
"The Nook bug report: iPhone app beta access request"
);
expect(email.html).toContain("<b>Reply-to:</b> tester@example.com");
expect(email.html).not.toContain("<h3>Displays</h3>");
});
}); });

View File

@@ -110,7 +110,7 @@ function MainDownloadsPage() {
<div class="flex flex-col items-center gap-3"> <div class="flex flex-col items-center gap-3">
<span class="text-subtext0 font-mono text-sm"> <span class="text-subtext0 font-mono text-sm">
platform: macOS (14.6+) platform: macOS (14.2+)
</span> </span>
<Button <Button
variant="download" variant="download"

View File

@@ -0,0 +1,90 @@
/**
* Regression test for the /agents roster and its coverage count.
*
* The page mirrors the app's registry, `AgentSpec.all` in
* the-nook/Sources/NookCore/Agents/AgentRegistry.swift. When Muse joined
* the registry in 0.10.0 the page kept twelve entries and kept saying
* "twelve", so a shipped agent was missing from the one page that lists
* them. The registry lives in another repo, so the expected roster is
* restated here; when an agent is added there, add it here and on the page.
*
* FRE-997 restored the count. The page said thirteen while the registry held
* eighteen, so the count was dropped rather than corrected (FRE-359 verdict B);
* now that all eighteen rows are on the page, the roster check is an equality
* check again and the page states eighteen. A subset check would let a shipped
* agent go missing behind a passing suite, which is the NOOK-336 failure.
*
* STATIC SOURCE AUDIT, the same pattern as the downloads regressions.
*/
import { describe, it, expect } from "bun:test";
import { readFileSync } from "node:fs";
import { join } from "node:path";
const SOURCE = readFileSync(join(import.meta.dir, "agents.tsx"), "utf8");
/** User-facing copy only: comments are not copy and may name the old wording. */
const COPY = SOURCE.replace(/\/\*[\s\S]*?\*\//g, "").replace(/^\s*\/\/.*$/gm, "");
/** JSX wraps prose across lines; match a sentence, not its indentation. */
const PROSE = COPY.replace(/\s+/g, " ");
/** AgentSpec.all display names, in registry order (18 rows). @ The-Nook f4258034, 2026-10-29 */
const REGISTRY = [
"Claude Code",
"Codex",
"OpenCode",
"Pi",
"Oh My Pi",
"Muse",
"Hermes",
"OpenClaw",
"Z.ai (ZCode)",
"Gemini CLI",
"Cline",
"Qwen Code",
"DeepSeek",
"Kimi",
"GitHub Copilot CLI",
"Crush",
"Cursor",
"Amp"
];
const entries = [...SOURCE.matchAll(/^\s{4}name: "([^"]+)",$/gm)].map((m) => m[1]);
describe("Nook /agents roster", () => {
it("lists every registry agent, once, in registry order", () => {
expect(entries).toEqual(REGISTRY);
});
it("states the registry's size", () => {
expect(entries.length).toBe(18);
expect(COPY).toContain("all eighteen");
expect(COPY).toContain("The 18 agents");
expect(COPY).toContain("eighteen coding agents");
});
it("carries no stale count", () => {
expect(COPY.toLowerCase()).not.toContain("thirteen");
expect(COPY).not.toMatch(/\b13 agents\b/);
expect(COPY).not.toContain("all thirteen");
});
});
describe("Nook /agents remote coverage", () => {
it("says agents can run on remote machines over SSH", () => {
expect(PROSE).toContain("remote machines");
expect(PROSE).toContain("remote sessions report into the same grid");
});
it("names the three agents that stay on this Mac", () => {
expect(PROSE).toContain("Muse, Cline and Amp run on this Mac only");
});
it("discloses the local-only rows where they are listed", () => {
const localOnly = [
...SOURCE.matchAll(/This Mac only — remote hosts skip it/g)
];
expect(localOnly.length).toBe(3);
});
});

View File

@@ -1,9 +1,10 @@
/** /**
* `/agents` on the Nook subdomain — supported agents and their event coverage. * `/agents` on the Nook subdomain — all eighteen agents in the registry and
* each row's event coverage.
* *
* The registry below mirrors `AgentSpec.all` in the app * The registry below mirrors `AgentSpec.all` in the app
* (~/Code/the-nook/Sources/NookCore/Agents/AgentSpec.swift) and each agent's * (~/Code/the-nook/Sources/NookCore/Agents/AgentRegistry.swift) and each
* installed hook surface (hook/setup.go) or plugin event subscription * agent's installed hook surface (hook/setup.go) or plugin event subscription
* (plugins/*), normalized onto the shared event vocabulary * (plugins/*), normalized onto the shared event vocabulary
* (~/Code/the-nook/docs/agent-interface.md). Copy follows * (~/Code/the-nook/docs/agent-interface.md). Copy follows
* marketing/positioning.md: category nouns, honest scoping, no unverifiable * marketing/positioning.md: category nouns, honest scoping, no unverifiable
@@ -27,13 +28,14 @@ interface AgentEntry {
const AGENTS: AgentEntry[] = [ const AGENTS: AgentEntry[] = [
{ {
name: "Claude Code", name: "Claude Code",
wiring: "Hook entries in settings.json pointing at the shared hook binary", wiring: "Hook entries in its settings, calling the shared hook binary",
events: [ events: [
"UserPromptSubmit", "UserPromptSubmit",
"SessionStart", "SessionStart",
"SessionEnd", "SessionEnd",
"Stop", "Stop",
"StopFailure", "StopFailure",
"SessionError",
"SubagentStart", "SubagentStart",
"SubagentStop", "SubagentStop",
"Notification", "Notification",
@@ -49,14 +51,23 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "Codex", name: "Codex",
wiring: "Hook entries in hooks.json (+ hooks enabled in config.toml)", wiring: "Hook entries in its config, with its hooks feature enabled",
events: ["SessionStart", "UserPromptSubmit", "PermissionRequest", "Stop"], events: [
gating: "Full — permission prompts can be allowed or denied from a card" "SessionStart",
"SessionEnd",
"UserPromptSubmit",
"PreToolUse",
"PermissionRequest",
"PostToolUse",
"Stop",
"SessionError"
],
gating:
"Full — command/file approvals and user-input questions can be answered from a card"
}, },
{ {
name: "OpenCode", name: "OpenCode",
wiring: wiring: "In-process plugin on its server bus",
"In-process plugin (~/.config/opencode/plugins/nook.js) on the server bus",
events: [ events: [
"SessionStart", "SessionStart",
"SessionEnd", "SessionEnd",
@@ -64,6 +75,7 @@ const AGENTS: AgentEntry[] = [
"PreToolUse", "PreToolUse",
"PostToolUse", "PostToolUse",
"Stop", "Stop",
"SessionError",
"MessageUpdate", "MessageUpdate",
"PermissionRequest", "PermissionRequest",
"QuestionAsked" "QuestionAsked"
@@ -73,14 +85,16 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "Pi", name: "Pi",
wiring: "In-process extension (~/.pi/agent/extensions/nook.ts)", wiring: "In-process extension registered in its settings",
events: [ events: [
"SessionStart", "SessionStart",
"SessionEnd", "SessionEnd",
"AgentStart",
"UserPromptSubmit", "UserPromptSubmit",
"PreToolUse", "PreToolUse",
"PostToolUse", "PostToolUse",
"Stop", "Stop",
"SessionError",
"MessageUpdate", "MessageUpdate",
"QuestionAsked", "QuestionAsked",
"QuestionResolved" "QuestionResolved"
@@ -90,14 +104,18 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "Oh My Pi", name: "Oh My Pi",
wiring: "In-process extension package (~/.omp/agent/extensions/nook/)", wiring: "In-process extension package",
events: [ events: [
"SessionStart", "SessionStart",
"SessionEnd", "SessionEnd",
"AgentStart",
"UserPromptSubmit", "UserPromptSubmit",
"PreToolUse", "PreToolUse",
"PermissionRequest",
"PermissionResolved",
"PostToolUse", "PostToolUse",
"Stop", "Stop",
"SessionError",
"MessageUpdate", "MessageUpdate",
"QuestionAsked", "QuestionAsked",
"QuestionResolved" "QuestionResolved"
@@ -105,6 +123,29 @@ const AGENTS: AgentEntry[] = [
gating: gating:
"Full — honors the agent's own approval tiers, per-tool policies included" "Full — honors the agent's own approval tiers, per-tool policies included"
}, },
{
name: "Muse",
wiring:
"Plugin installed, approved and enabled through Muse's own plugins CLI; each hook calls the shared hook binary. This Mac only — remote hosts skip it",
events: [
"SessionStart",
"SessionEnd",
"UserPromptSubmit",
"PreToolUse",
"PermissionRequest",
"PostToolUse",
"PostToolUseFailure",
"Stop",
"StopFailure",
"Notification",
"PreCompact",
"PostCompact",
"SubagentStart",
"SubagentStop"
],
gating:
"Full — permission prompts can be allowed or denied from a card, and every tool call under Verify"
},
{ {
name: "Hermes", name: "Hermes",
wiring: wiring:
@@ -117,18 +158,20 @@ const AGENTS: AgentEntry[] = [
"PreToolUse", "PreToolUse",
"PostToolUse", "PostToolUse",
"SubagentStart", "SubagentStart",
"SubagentStop" "SubagentStop",
"QuestionAsked"
], ],
gating: gating:
"Observation — every event appears as a card; the agent keeps its own prompting" "Observation — every event appears as a card; the agent keeps its own prompting"
}, },
{ {
name: "OpenClaw", name: "OpenClaw",
wiring: "Hook handler package (~/.openclaw/hooks/nook/)", wiring: "Hook handler package in its hooks directory",
events: [ events: [
"SessionStart", "SessionStart",
"UserPromptSubmit", "UserPromptSubmit",
"AgentResponse", "Stop",
"SessionError",
"PreCompact", "PreCompact",
"SessionEnd" "SessionEnd"
], ],
@@ -137,7 +180,7 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "Z.ai (ZCode)", name: "Z.ai (ZCode)",
wiring: "Hook entries in ~/.zcode/cli/config.json", wiring: "Hook entries in its CLI config",
events: [ events: [
"SessionStart", "SessionStart",
"UserPromptSubmit", "UserPromptSubmit",
@@ -152,12 +195,13 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "Gemini CLI", name: "Gemini CLI",
wiring: "Hook entries in settings.json", wiring: "Hook entries in its settings",
events: [ events: [
"SessionStart", "SessionStart",
"SessionEnd", "SessionEnd",
"AgentStart", "AgentStart",
"Stop", "Stop",
"SessionError",
"Notification" "Notification"
], ],
gating: gating:
@@ -165,7 +209,8 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "Cline", name: "Cline",
wiring: "One hook file per event in ~/Documents/Cline/Hooks", wiring:
"One hook file per event in its hooks directory. This Mac only — remote hosts skip it",
events: [ events: [
"SessionStart", "SessionStart",
"SessionEnd", "SessionEnd",
@@ -182,7 +227,7 @@ const AGENTS: AgentEntry[] = [
{ {
name: "Qwen Code", name: "Qwen Code",
wiring: wiring:
"Hook entries in settings.json (same surface as the Claude-style schema)", "Hook entries in its settings (same surface as the Claude-style schema)",
events: [ events: [
"UserPromptSubmit", "UserPromptSubmit",
"SessionStart", "SessionStart",
@@ -204,7 +249,7 @@ const AGENTS: AgentEntry[] = [
}, },
{ {
name: "DeepSeek", name: "DeepSeek",
wiring: "Standalone hooks.json at ~/.dsh", wiring: "A standalone hooks file its bridge is pointed at",
events: [ events: [
"SessionStart", "SessionStart",
"UserPromptSubmit", "UserPromptSubmit",
@@ -216,6 +261,93 @@ const AGENTS: AgentEntry[] = [
], ],
gating: gating:
"Tool calls can be allowed or denied from a card; permission prompts stay with the agent" "Tool calls can be allowed or denied from a card; permission prompts stay with the agent"
},
{
name: "Kimi",
wiring: "Hook rules in its TOML config, one per event",
events: [
"SessionStart",
"SessionEnd",
"UserPromptSubmit",
"AgentStart",
"PreToolUse",
"PermissionRequest",
"PermissionResolved",
"PostToolUse",
"PostToolUseFailure",
"Stop",
"SessionError",
"SubagentStart",
"SubagentStop",
"PreCompact",
"Notification"
],
gating:
"Observation — every event appears as a card; its PreToolUse fires before its own permission check, so the agent keeps its own prompting"
},
{
name: "GitHub Copilot CLI",
wiring: "One hook file of ours in its hooks directory",
events: [
"SessionStart",
"SessionEnd",
"UserPromptSubmit",
"PreToolUse",
"PermissionRequest",
"PostToolUse",
"PostToolUseFailure",
"Stop",
"SubagentStart",
"SubagentStop",
"ErrorOccurred",
"PreCompact",
"Notification"
],
gating:
"Observation — every event appears as a card; its permission request runs before its own policy check, so the agent keeps its own prompting"
},
{
name: "Crush",
wiring:
"One entry in its JSONC config, the only event it documents",
events: ["PreToolUse"],
gating:
"Observation — tool calls appear as cards; its own permission prompts decide"
},
{
name: "Cursor",
wiring:
"Hook entries in its hooks.json, merged with your own. No permission hook, on purpose",
events: [
"SessionStart",
"SessionEnd",
"UserPromptSubmit",
"PostToolUse",
"PostToolUseFailure",
"Stop",
"SessionError",
"AfterAgentResponse",
"SubagentStop",
"PreCompact"
],
gating:
"Observation — a permission hook that stays silent blocks the action here, so Cursor keeps its own prompting"
},
{
name: "Amp",
wiring:
"In-process extension package. This Mac only — remote hosts skip it",
events: [
"SessionStart",
"SessionEnd",
"UserPromptSubmit",
"PreToolUse",
"PostToolUse",
"Stop",
"SessionError"
],
gating:
"Observation — its plugin API has no permission-wait event, so the agent keeps its own prompting"
} }
]; ];
@@ -240,8 +372,8 @@ export default function NookAgentsPage() {
<EdgeCacheHeaders maxAge={300} /> <EdgeCacheHeaders maxAge={300} />
<PageHead <PageHead
title="Supported agents" title="Supported agents"
description="Every coding agent The Nook supports — all twelve, with each hook's exact event coverage and what you can do from a card: watch sessions live, answer permission prompts, unblock work." description="Every coding agent The Nook supports — all eighteen, with each hook's exact event coverage and what you can do from a card: watch sessions live, answer permission prompts, unblock work."
ogTitle="The 12 agents The Nook supports, and what each hook sees" ogTitle="The 18 agents The Nook supports, and what each hook sees"
/> />
<SubdomainHeader /> <SubdomainHeader />
<main class="min-h-screen px-[8vw] py-[8vh]"> <main class="min-h-screen px-[8vw] py-[8vh]">
@@ -249,7 +381,7 @@ export default function NookAgentsPage() {
Supported agents Supported agents
</h1> </h1>
<p class="text-subtext0 mb-2 max-w-2xl text-lg"> <p class="text-subtext0 mb-2 max-w-2xl text-lg">
The Nook watches twelve coding agents in one place — your menu bar and The Nook watches eighteen coding agents in one place — your menu bar and
notch show every session that is running, thinking, or blocked, and a notch show every session that is running, thinking, or blocked, and a
card answers permission prompts without leaving your keyboard. card answers permission prompts without leaving your keyboard.
</p> </p>
@@ -258,7 +390,8 @@ export default function NookAgentsPage() {
means the agent hands the decision to The Nook while it waits; means the agent hands the decision to The Nook while it waits;
"Observe" means every event still appears live, but the agent keeps "Observe" means every event still appears live, but the agent keeps
its own prompting. Agents can run on this Mac or on remote machines its own prompting. Agents can run on this Mac or on remote machines
over SSH — remote sessions report into the same grid. over SSH — remote sessions report into the same grid. Muse, Cline and
Amp run on this Mac only.
</p> </p>
<div class="grid gap-4 lg:grid-cols-2"> <div class="grid gap-4 lg:grid-cols-2">

View File

@@ -37,9 +37,9 @@ const FAQ: FaqEntry[] = [
"The app itself runs unprivileged. Fan control and charge limiting go through a small helper component that macOS requires to run as root for hardware access — the app installs it on first use and you approve it once with your password. The hooks live in each agent's own config directory; you can inspect or remove every file it writes." "The app itself runs unprivileged. Fan control and charge limiting go through a small helper component that macOS requires to run as root for hardware access — the app installs it on first use and you approve it once with your password. The hooks live in each agent's own config directory; you can inspect or remove every file it writes."
}, },
{ {
question: "Why macOS 14 or later?", question: "Why macOS 14.2 or later?",
answer: answer:
"The interface is built on Apple's current observation framework, which ships with macOS 14 (Sonoma)." "The audio mixer listens to each app's own sound stream, and Apple only shipped that API in macOS 14.2 (Sonoma)."
}, },
{ {
question: "Does it work offline?", question: "Does it work offline?",
@@ -56,7 +56,7 @@ export default function NookFaqPage() {
<EdgeCacheHeaders maxAge={300} /> <EdgeCacheHeaders maxAge={300} />
<PageHead <PageHead
title="Frequently asked questions" title="Frequently asked questions"
description="Does The Nook read your prompts? Do you need a notch? Battery cost, permissions, the macOS 14 requirement, offline use — answered straight." description="Does The Nook read your prompts? Do you need a notch? Battery cost, permissions, the macOS 14.2 requirement, offline use — answered straight."
ogTitle="The Nook — FAQ" ogTitle="The Nook — FAQ"
/> />
<SubdomainHeader /> <SubdomainHeader />

View File

@@ -3,6 +3,8 @@ import { EdgeCacheHeaders } from "~/components/EdgeCacheHeaders";
import SubdomainHeader from "~/components/SubdomainHeader"; import SubdomainHeader from "~/components/SubdomainHeader";
import FeatureCollage from "~/components/nook/FeatureCollage"; import FeatureCollage from "~/components/nook/FeatureCollage";
import FeatureBreakdowns from "~/components/nook/FeatureBreakdowns"; import FeatureBreakdowns from "~/components/nook/FeatureBreakdowns";
import IslandExtras from "~/components/nook/IslandExtras";
import PhoneBeta from "~/components/nook/PhoneBeta";
import Button from "~/components/ui/Button"; import Button from "~/components/ui/Button";
import Input from "~/components/ui/Input"; import Input from "~/components/ui/Input";
import { createSignal, Show } from "solid-js"; import { createSignal, Show } from "solid-js";
@@ -101,7 +103,7 @@ export default function NookLanding() {
UI. UI.
</p> </p>
<p class="text-subtext1 mb-8 text-sm"> <p class="text-subtext1 mb-8 text-sm">
macOS 14+ · 14-day free trial · up to 3 devices macOS 14.2+ · 14-day free trial · up to 3 devices
</p> </p>
<div class="flex flex-col items-center gap-4 sm:flex-row sm:space-x-4"> <div class="flex flex-col items-center gap-4 sm:flex-row sm:space-x-4">
@@ -149,6 +151,12 @@ export default function NookLanding() {
</div> </div>
</section> </section>
{/* ── Everything else: marquee + live module bento ───────────── */}
<IslandExtras />
{/* ── iPhone + Watch companion, TestFlight beta ──────────────── */}
<PhoneBeta brandColor={brandColor()} />
{/* ── CTA ──────────────────────────────────────────────────────── */} {/* ── CTA ──────────────────────────────────────────────────────── */}
<section class="bg-surface0 relative z-20 px-4 py-20 md:px-8"> <section class="bg-surface0 relative z-20 px-4 py-20 md:px-8">
<div class="mx-auto max-w-4xl text-center"> <div class="mx-auto max-w-4xl text-center">
@@ -156,10 +164,10 @@ export default function NookLanding() {
Try it free for 14 days Try it free for 14 days
</h2> </h2>
<p class="text-subtext0 mx-auto mb-10 max-w-2xl leading-relaxed"> <p class="text-subtext0 mx-auto mb-10 max-w-2xl leading-relaxed">
Orchestrate your coding agents, watch temperatures, take control of Orchestrate your coding agents, take control of your fans and
your fans, and keep background services quiet. When the trial ends, battery, give every app its own volume, capture your screen, and
unlock everything with a single one-time payment — no subscription, keep your day in the notch. When the trial ends, unlock everything
ever. with a single one-time payment — no subscription, ever.
</p> </p>
<div class="flex flex-col items-center justify-center gap-4 sm:flex-row sm:space-x-4"> <div class="flex flex-col items-center justify-center gap-4 sm:flex-row sm:space-x-4">
<Button <Button

View File

@@ -0,0 +1,112 @@
/**
* Guard for the remote / SSH story on the Nook site, and for the two phrasings
* that must not come back with it (FRE-323 → FRE-997).
*
* FRE-323 removed the remote copy because it had been checked against claims
* the copy never made: the app does list hosts from `~/.ssh/config` and
* Tailscale, a one-time `ssh-copy-id` is a normal prerequisite the row explains,
* and the per-host credential is minted and copied automatically
* (`RemoteHostDiscovery`, `RemoteHostStatus.fixCommand`, `RemoteMirror`). Two
* things in the old copy were genuinely wrong, and this file guards those
* instead of the copy as a whole:
*
* - "Works across every hooked agent, local or remote" overstated it. Muse,
* Cline and Amp are `.unsupported` for remote in `AgentSpec.remote`, so the
* landing bullet and the /agents paragraph name them.
* - The count said thirteen while `AgentSpec.all` holds eighteen. The fix was
* to say eighteen, not to drop the count.
*
* So the removal guards from `d44133f` are gone: a removed sentence is exactly
* what this task restores. What stays is the pair of bans, because either one
* coming back would repeat the original defect.
*
* STATIC SOURCE AUDIT, the same pattern as `agents.test.ts` and
* `downloads.test.ts` (SolidJS does not render under `bun:test`).
*/
import { describe, it, expect } from "bun:test";
import { readFileSync } from "node:fs";
import { join } from "node:path";
const ROOT = join(import.meta.dir, "../../..");
/** Shipped page and component source. */
const AUDITED = [
"src/routes/nook/index.tsx",
"src/routes/nook/agents.tsx",
"src/routes/nook/faq.tsx",
"src/components/nook/FeatureCollage.tsx",
"src/components/nook/FeatureBreakdowns.tsx",
"src/components/nook/IslandExtras.tsx"
];
/** The overstatements the restored copy must never carry again. */
const BANNED_REMOTE_CLAIMS = [
// a universal claim: three registry agents cannot mirror over SSH
"every hooked agent, local or remote",
"Works across every hooked agent",
// the stale count this task replaced
"13 agents",
"all thirteen",
"thirteen coding agents"
];
/** User-facing copy only: comments are not copy and may name the old wording. */
function copyOf(file: string): string {
return readFileSync(join(ROOT, file), "utf8")
.replace(/\/\*[\s\S]*?\*\//g, "")
.replace(/^\s*\/\/.*$/gm, "");
}
describe("the restored remote copy is on the site (FRE-997)", () => {
it("the landing collage sells agents on other machines", () => {
const copy = copyOf("src/components/nook/FeatureCollage.tsx");
for (const phrase of [
"Agents on other machines",
"one click installs the nook-hook",
"Remote"
]) {
expect(copy).toContain(phrase);
}
});
it("the landing breakdown keeps the SSH section and its demo", () => {
const copy = copyOf("src/components/nook/FeatureBreakdowns.tsx");
for (const phrase of [
"Any SSH box, one click away",
"Pick a host from your ssh config or your tailnet and click once",
"Remote sessions are ordinary rows",
"RemoteHostDemo"
]) {
expect(copy).toContain(phrase);
}
});
it("the chip is back", () => {
expect(copyOf("src/components/nook/IslandExtras.tsx")).toContain(
"One-click SSH setup"
);
});
it("/agents says remote sessions report into the same grid", () => {
const copy = copyOf("src/routes/nook/agents.tsx");
expect(copy).toContain("remote machines");
expect(copy).toContain("remote sessions report into the same grid");
});
});
describe("the two original overstatements stay off the site (FRE-323, FRE-359)", () => {
for (const file of AUDITED) {
it(`${file} claims no universal remote coverage and no stale count`, () => {
const copy = copyOf(file);
for (const phrase of BANNED_REMOTE_CLAIMS) {
expect(copy.toLowerCase()).not.toContain(phrase.toLowerCase());
}
});
}
it("the landing names the agents that stay local", () => {
expect(copyOf("src/components/nook/FeatureBreakdowns.tsx")).toContain(
"Muse, Cline and Amp are this Mac only"
);
});
});

View File

@@ -0,0 +1,139 @@
/**
* A Smarter Remote privacy policy — `freno.me/smarter-remote/privacy`.
*
* Linked from the iOS app's paywall (App Review 3.1.2). Reflects what the app
* actually does: TV control stays on the local network, pairing data stays on
* the phone, purchases go through Apple and RevenueCat, and sharing is a QR
* code passed between phones.
*/
import { A } from "@solidjs/router";
import { PageHead } from "~/components/PageHead";
import { EdgeCacheHeaders } from "~/components/EdgeCacheHeaders";
export default function SmarterRemotePrivacyPolicy() {
return (
<>
<EdgeCacheHeaders maxAge={300} />
<PageHead
title="A Smarter Remote Privacy Policy"
description="Privacy policy for A Smarter Remote, a universal TV remote app that works over your local Wi-Fi network."
/>
<div class="bg-base">
<div class="min-h-screen px-[8vw] py-[8vh]">
<div class="py-4 text-xl">A Smarter Remote&apos;s Privacy Policy</div>
<div class="py-2">Last Updated: November 2, 2026</div>
<div class="py-2">
Welcome to A Smarter Remote (&apos;We&apos;, &apos;Us&apos;,
&apos;Our&apos;). The app controls your TVs over your own Wi-Fi
network. It has no accounts, no ads, and no analytics. This policy
explains the little data it does handle.
</div>
<ol>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">1.</span> Data We Collect
</div>
<div class="pl-4">
<div class="pb-2">
<div class="-ml-6">(a) Your TVs:</div> The app finds TVs on
your local network and stores their names, network addresses,
and platform on your phone. Pairing codes and tokens are kept
in your phone&apos;s Keychain. This data is sent only to the
TV itself, over your local network. It never reaches us.
</div>
<div class="pb-2">
<div class="-ml-6">(b) Purchases:</div> Payments are handled
by Apple. We use RevenueCat to check whether you own A Smarter
Remote Pro. RevenueCat receives an anonymous app user ID, your
purchase and subscription history, and basic device and app
details such as OS version, app version, and region. It does
not receive your name, email, or payment details.
</div>
<div class="pb-2">
<div class="-ml-6">(c) Voice input:</div> If you use voice
search, your speech is converted to text by Apple&apos;s
speech recognition. Apple may process it on its servers. The
resulting text is sent only to your TV.
</div>
<div class="pb-2">
<div class="-ml-6">(d) Sharing:</div> If you share a TV with
someone, its name, address, and platform are put into a QR
code on your screen for them to scan. It goes from one phone
to the other and does not pass through our servers.
</div>
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">2.</span> How We Use It
</div>
<div class="pb-2 pl-4">
Data about your TVs is used only to control them. Purchase
records are used only to unlock Pro. We do not use any of it for
advertising, and we do not sell it.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">3.</span> Local Network Access
</div>
<div class="pb-2 pl-4">
iOS asks for permission before the app can use your local
network. The app needs it to find and control your TVs. If you
decline, the app cannot reach your TVs. You can change this in
Settings &gt; Privacy &amp; Security &gt; Local Network.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">4.</span> Deleting Your Data
</div>
<div class="pb-2 pl-4">
Removing a TV in the app deletes its stored details and
credentials from your phone. Deleting the app removes all of
them. Subscriptions are managed and cancelled in your App Store
account settings.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">5.</span> Children&apos;s Privacy
</div>
<div class="pb-2 pl-4">
The app does not knowingly collect personal information from
anyone, including children under 13.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">6.</span> Changes to the Privacy Policy
</div>
<div class="pb-2 pl-4">
We may update this policy periodically. Any changes are posted on
this page, so please review it from time to time.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">7.</span> Contact Us
</div>
<div class="pb-2 pl-4">
If you have any questions about this policy, you can contact us{" "}
<A href="/contact" class="text-blue hover-underline-animation">
here
</A>
.
</div>
</div>
</ol>
</div>
</div>
</>
);
}

View File

@@ -0,0 +1,141 @@
/**
* A Smarter Remote terms of use — `freno.me/smarter-remote/terms`.
*
* Linked from the iOS app's paywall (App Review 3.1.2). Builds on Apple's
* standard EULA and adds the Pro subscription and lifetime purchase terms.
*/
import { A } from "@solidjs/router";
import { PageHead } from "~/components/PageHead";
import { EdgeCacheHeaders } from "~/components/EdgeCacheHeaders";
export default function SmarterRemoteTerms() {
return (
<>
<EdgeCacheHeaders maxAge={300} />
<PageHead
title="A Smarter Remote Terms of Use"
description="Terms of use for A Smarter Remote and its Pro subscription."
/>
<div class="bg-base">
<div class="min-h-screen px-[8vw] py-[8vh]">
<div class="py-4 text-xl">A Smarter Remote&apos;s Terms of Use</div>
<div class="py-2">Last Updated: November 2, 2026</div>
<div class="py-2">
These terms cover your use of the A Smarter Remote app (&apos;the
App&apos;). By using the App you agree to them. The App is licensed
to you under Apple&apos;s{" "}
<a
href="https://www.apple.com/legal/internet-services/itunes/dev/stdeula/"
target="_blank"
rel="noopener noreferrer"
class="text-blue hover-underline-animation"
>
Licensed Application End User License Agreement
</a>
, and the terms below add to it.
</div>
<ol>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">1.</span> A Smarter Remote Pro
</div>
<div class="pl-4">
<div class="pb-2">
<div class="-ml-6">(a) What it includes:</div> The free App
controls one TV. Pro removes that limit and unlocks the
features marked Pro in the App.
</div>
<div class="pb-2">
<div class="-ml-6">(b) Yearly subscription:</div> Payment is
charged to your Apple account when you confirm the purchase,
or when any free trial ends. The subscription renews
automatically at the same price unless you cancel at least 24
hours before the end of the current period. Your account is
charged for renewal within 24 hours before the period ends.
Any unused part of a free trial is forfeited when you buy a
subscription.
</div>
<div class="pb-2">
<div class="-ml-6">(c) Lifetime purchase:</div> A one-time
payment that unlocks Pro with no recurring charge.
</div>
<div class="pb-2">
<div class="-ml-6">(d) Managing and refunds:</div> You can
manage or cancel a subscription in your App Store account
settings. Refunds are handled by Apple under its policies.
Restore Purchases in the App re-unlocks Pro on another device
signed in to the same Apple account.
</div>
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">2.</span> Your TVs
</div>
<div class="pb-2 pl-4">
The App controls TVs through the network features their makers
provide. Which features work depends on your TV&apos;s model and
software, which can change without notice. We do not guarantee
that every feature works on every TV. Only control TVs you own
or have permission to use.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">3.</span> No Warranty
</div>
<div class="pb-2 pl-4">
The App is provided &apos;as is&apos;, without warranties of any
kind, to the extent the law allows. To the extent the law allows,
we are not liable for indirect or consequential damages arising
from your use of the App.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">4.</span> Privacy
</div>
<div class="pb-2 pl-4">
How the App handles data is described in the{" "}
<A
href="/smarter-remote/privacy"
class="text-blue hover-underline-animation"
>
Privacy Policy
</A>
.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">5.</span> Changes to These Terms
</div>
<div class="pb-2 pl-4">
We may update these terms periodically. Any changes are posted on
this page. Continuing to use the App after a change means you
accept the new terms.
</div>
</div>
<div class="py-2">
<div class="pb-2 text-lg">
<span class="-ml-4 pr-2">6.</span> Contact Us
</div>
<div class="pb-2 pl-4">
If you have any questions about these terms, you can contact us{" "}
<A href="/contact" class="text-blue hover-underline-animation">
here
</A>
.
</div>
</div>
</ol>
</div>
</div>
</>
);
}

View File

@@ -1,6 +1,7 @@
import { ConnectionFactory } from "./database"; import { ConnectionFactory } from "./database";
import { v4 as uuid } from "uuid"; import { v4 as uuid } from "uuid";
import type { VisitorAnalytics, AnalyticsQuery } from "~/db/types"; import type { VisitorAnalytics, AnalyticsQuery } from "~/db/types";
import { DOWNLOAD_PATH_PREFIX, summariseDownloads } from "~/lib/download-asset";
import { CACHE_CONFIG } from "~/config"; import { CACHE_CONFIG } from "~/config";
import { import {
VISITOR_ANALYTICS_ADDED_COLUMNS, VISITOR_ANALYTICS_ADDED_COLUMNS,
@@ -272,6 +273,10 @@ export async function getAnalyticsSummary(days: number = 30): Promise<{
topReferrers: Array<{ referrer: string; count: number }>; topReferrers: Array<{ referrer: string; count: number }>;
deviceTypes: Array<{ type: string; count: number }>; deviceTypes: Array<{ type: string; count: number }>;
browsers: Array<{ browser: string; count: number }>; browsers: Array<{ browser: string; count: number }>;
downloads: {
total: number;
byAsset: Array<{ asset: string; count: number }>;
};
topCampaigns: Array<{ topCampaigns: Array<{
source: string | null; source: string | null;
medium: string | null; medium: string | null;
@@ -409,6 +414,24 @@ export async function getAnalyticsSummary(days: number = 30): Promise<{
count: row.count as number count: row.count as number
})); }));
// Downloads: every door records one row under `/api/downloads/<asset>` via
// `trackDownload`, so the asset is the path suffix and nothing has to be
// parsed out of a query string.
const downloadsResult = await conn.execute({
sql: `SELECT path, COUNT(*) as count FROM VisitorAnalytics
WHERE path LIKE '${DOWNLOAD_PATH_PREFIX}%'
AND created_at >= datetime('now', '-${days} days')
GROUP BY path
ORDER BY count DESC`,
args: []
});
const downloads = summariseDownloads(
downloadsResult.rows.map((row) => ({
path: String(row.path),
count: row.count as number
}))
);
return { return {
totalVisits, totalVisits,
totalPageVisits, totalPageVisits,
@@ -420,7 +443,8 @@ export async function getAnalyticsSummary(days: number = 30): Promise<{
topReferrers, topReferrers,
deviceTypes, deviceTypes,
browsers, browsers,
topCampaigns topCampaigns,
downloads
}; };
} }

View File

@@ -8,6 +8,7 @@ import {
import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
import { env } from "~/env/server"; import { env } from "~/env/server";
import { TRPCError } from "@trpc/server"; import { TRPCError } from "@trpc/server";
import { trackDownload } from "~/server/track-download";
const assets: Record<string, string> = { const assets: Record<string, string> = {
lineage: "Life and Lineage.apk", lineage: "Life and Lineage.apk",
@@ -73,7 +74,14 @@ const latestAssets: Record<
export const downloadsRouter = createTRPCRouter({ export const downloadsRouter = createTRPCRouter({
getDownloadUrl: publicProcedure getDownloadUrl: publicProcedure
.input(z.object({ asset_name: z.string() })) .input(z.object({ asset_name: z.string() }))
.query(async ({ input }) => { .query(async ({ input, ctx }) => {
// Logged before signing: a click on a door that then fails to sign is
// exactly the event the funnel needs to show. Unknown asset names are
// skipped rather than recorded as a download that never happened.
if (assets[input.asset_name] || latestAssets[input.asset_name]) {
await trackDownload(ctx.event, input.asset_name);
}
const bucket = env.VITE_DOWNLOAD_BUCKET_STRING; const bucket = env.VITE_DOWNLOAD_BUCKET_STRING;
const credentials = { const credentials = {

View File

@@ -0,0 +1,186 @@
import { beforeEach, describe, expect, it } from "bun:test";
import { Database } from "bun:sqlite";
import {
VISITOR_ANALYTICS_COLUMNS,
VISITOR_ANALYTICS_DDL,
VISITOR_ANALYTICS_INDEXES,
VISITOR_ANALYTICS_INSERT
} from "./analytics-schema";
import { summariseDownloads } from "~/lib/download-asset";
import { assetFromLegacyPath, backfillDownloads } from "./backfill-downloads";
// Why a real in-memory SQLite database rather than a stub: the backfill runs
// real SQL against the live table shape, and a stub would happily accept a
// column list the real table does not have. Same reasoning as
// analytics-schema.test.ts.
//
// Nothing is module-mocked here on purpose: bun's `mock.module` is process-wide,
// so stubbing the connection factory would leak into the rate-limit and CSRF
// suites that share the same database module.
let db: Database;
/** Adapt bun:sqlite to the libsql `execute(stmt | sql)` contract. */
const conn = {
async execute(query: string | { sql: string; args?: unknown[] }) {
const sql = typeof query === "string" ? query : query.sql;
const args = (
typeof query === "string" ? [] : (query.args ?? [])
) as never[];
const statement = db.query(sql);
if (/^\s*(select|pragma|with)\b/i.test(sql)) {
return { rows: statement.all(...args) as unknown[], rowsAffected: 0 };
}
return {
rows: [] as unknown[],
rowsAffected: statement.run(...args).changes
};
}
};
const LEGACY_NOOK = "/api/the-nook/download";
const trpcClick = (asset: string) =>
`/api/trpc/downloads.getDownloadUrl?batch=1&input=%7B%220%22%3A%7B%22asset_name%22%3A%22${asset}%22%7D%7D`;
/** Columns whose value varies per row; everything else stays NULL. */
const fixedColumns: Record<string, string> = {
method: "GET",
referrer: "https://gaze.freno.me/",
user_agent: "Mozilla/5.0 (Macintosh)",
ip_address: "203.0.113.7",
country: "GB"
};
function insertLegacy(id: string, path: string) {
const values = VISITOR_ANALYTICS_COLUMNS.map((column) => {
if (column === "id") return id;
if (column === "path") return path;
return fixedColumns[column] ?? null;
});
db.query(VISITOR_ANALYTICS_INSERT).run(...(values as never[]));
}
function canonicalPaths(): string[] {
return db
.query<{ path: string }, []>(
`SELECT path FROM VisitorAnalytics WHERE path LIKE '/api/downloads/%' ORDER BY path`
)
.all()
.map((r: { path: string }) => r.path);
}
function legacyRowCount(): number {
return db
.query<
{ n: number },
[string]
>(`SELECT COUNT(*) AS n FROM VisitorAnalytics WHERE path = ?`)
.get(LEGACY_NOOK)!.n;
}
beforeEach(() => {
db = new Database(":memory:");
db.exec(VISITOR_ANALYTICS_DDL);
for (const index of VISITOR_ANALYTICS_INDEXES) db.exec(index);
});
describe("backfillDownloads", () => {
it("derives a canonical row from each recoverable kind of history", async () => {
insertLegacy("nook-1", LEGACY_NOOK);
insertLegacy("gaze-1", trpcClick("gaze"));
insertLegacy("halo-1", trpcClick("inputhalo"));
insertLegacy("page-1", "/nook/");
const added = Object.fromEntries(
(await backfillDownloads(conn)).map((r) => [r.asset, r.added])
);
expect(added).toEqual({ thenook: 1, gaze: 1, inputhalo: 1 });
expect(canonicalPaths()).toEqual([
"/api/downloads/gaze",
"/api/downloads/inputhalo",
"/api/downloads/thenook"
]);
// A page visit is not download history and gains no derived row.
expect(
db
.query(`SELECT * FROM VisitorAnalytics WHERE id = 'backfill-page-1'`)
.all()
).toHaveLength(0);
});
it("keeps the visitor detail of the row it derives from", async () => {
insertLegacy("nook-1", LEGACY_NOOK);
await backfillDownloads(conn);
expect(
db
.query<
{ country: string; referrer: string },
[]
>(`SELECT country, referrer FROM VisitorAnalytics WHERE id = 'backfill-nook-1'`)
.get()
).toEqual({ country: "GB", referrer: "https://gaze.freno.me/" });
});
it("is idempotent and never rewrites the source rows", async () => {
insertLegacy("nook-1", LEGACY_NOOK);
await backfillDownloads(conn);
const second = await backfillDownloads(conn);
expect(second).toEqual([]);
expect(canonicalPaths()).toHaveLength(1);
expect(legacyRowCount()).toBe(1);
});
it("derives nothing when there is no legacy history", async () => {
expect(await backfillDownloads(conn)).toEqual([]);
expect(canonicalPaths()).toEqual([]);
});
});
describe("assetFromLegacyPath", () => {
it("maps the Nook door to its canonical asset", () => {
expect(assetFromLegacyPath(LEGACY_NOOK)).toBe("thenook");
});
it("reads the asset out of an encoded or a plain tRPC request URL", () => {
expect(assetFromLegacyPath(trpcClick("gaze"))).toBe("gaze");
expect(
assetFromLegacyPath(
'/api/trpc/downloads.getDownloadUrl?batch=1&input={"0":{"asset_name":"lineage"}}'
)
).toBe("lineage");
});
it("returns null when there is nothing to derive", () => {
expect(assetFromLegacyPath("/nook/")).toBeNull();
expect(
assetFromLegacyPath("/api/trpc/downloads.getDownloadUrl")
).toBeNull();
});
});
describe("summariseDownloads", () => {
it("labels each row by the asset in its path and totals them", () => {
expect(
summariseDownloads([
{ path: "/api/downloads/gaze", count: 4 },
{ path: "/api/downloads/thenook", count: 1 }
])
).toEqual({
total: 5,
byAsset: [
{ asset: "gaze", count: 4 },
{ asset: "thenook", count: 1 }
]
});
});
it("reports nothing rather than throwing on an empty table", () => {
expect(summariseDownloads([])).toEqual({ total: 0, byAsset: [] });
});
});

View File

@@ -0,0 +1,95 @@
import { VISITOR_ANALYTICS_COLUMNS } from "~/server/analytics-schema";
import { downloadPath } from "~/lib/download-asset";
/**
* Backfill canonical `downloadPath(asset)` rows from download history that was
* recorded before `trackDownload` existed.
*
* Two shapes of history are recoverable, and only these two:
*
* - the Nook door's own rows (`/api/the-nook/download`), and
* - tRPC clicks, where the asset name still sits in the request URL as
* `?input={"0":{"asset_name":"gaze"}}` (percent-encoded in practice).
*
* Every other door wrote nothing, so there is nothing to derive for them.
*
* Derived rows keep the source row's timestamp, visitor, campaign and country,
* get `backfill-<source id>` as primary key and are written with
* `INSERT OR IGNORE` — so a second run adds nothing, and the original rows are
* left untouched (they are genuine API traffic, and the analytics page only
* counts the canonical path).
*/
const LEGACY_NOOK_PATH = "/api/the-nook/download";
const TRPC_DOOR_PREFIX = "/api/trpc/downloads.getDownloadUrl";
/** The two libsql calls used here, narrow enough for an in-memory test client. */
export interface DownloadBackfillConn {
execute(query: {
sql: string;
// `any[]` not `unknown[]`: the libsql client types its bind args as InArg[],
// and a narrower array type here would reject the real connection.
args?: any[];
}): Promise<{ rows: unknown[]; rowsAffected?: number }>;
}
export interface DownloadBackfillResult {
asset: string;
added: number;
}
/** One statement: copy every column of the source row, override id and path. */
const INSERT_DERIVED = `INSERT OR IGNORE INTO VisitorAnalytics (${VISITOR_ANALYTICS_COLUMNS.join(", ")})
SELECT ${VISITOR_ANALYTICS_COLUMNS.map((column) =>
column === "id"
? "'backfill-' || id"
: column === "path"
? "?"
: `"${column}"`
).join(", ")}
FROM VisitorAnalytics
WHERE id = ?`;
/** Pull the asset name back out of a logged tRPC request URL. */
export function assetFromLegacyPath(path: string): string | null {
if (path === LEGACY_NOOK_PATH) return "thenook";
let decoded = path;
try {
decoded = decodeURIComponent(path);
} catch {
// A malformed escape is not a reason to drop the row — match on the raw.
}
return /"asset_name"\s*:\s*"([^"]+)"/.exec(decoded)?.[1] ?? null;
}
export async function backfillDownloads(
conn: DownloadBackfillConn
): Promise<DownloadBackfillResult[]> {
const legacy = await conn.execute({
sql: `SELECT id, path FROM VisitorAnalytics WHERE path = ? OR path LIKE ?`,
args: [LEGACY_NOOK_PATH, `${TRPC_DOOR_PREFIX}%`]
});
const added = new Map<string, number>();
for (const row of legacy.rows) {
const { id, path } = row as { id: string; path: string };
const asset = assetFromLegacyPath(path);
if (!asset) continue;
const result = await conn.execute({
sql: INSERT_DERIVED,
args: [downloadPath(asset), id]
});
if (result.rowsAffected) {
added.set(asset, (added.get(asset) ?? 0) + result.rowsAffected);
}
}
return [...added.entries()]
.map(([asset, count]) => ({ asset, added: count }))
.sort((a, b) => b.added - a.added);
}

View File

@@ -0,0 +1,61 @@
import type { APIEvent } from "@solidjs/start/server";
import { getRequestIP } from "vinxi/http";
import {
logVisit,
enrichAnalyticsEntry,
flushAnalytics
} from "~/server/analytics";
import { parseUtm } from "~/server/utm";
import { downloadPath } from "~/lib/download-asset";
/**
* Record one download event under the canonical path `/api/downloads/<asset>`.
*
* Every download door funnels through here so the analytics page has a single
* label per asset to group on: the tRPC click proxy, the S3 file route that
* serves Sparkle updates, and the Nook door.
*
* Best-effort by design — a failed analytics write must never block a
* download. Flushed rather than merely buffered: a download is low-volume and
* the 30s batch timer is not guaranteed to survive the response on serverless.
*
* `event.request` is expected to be a Fetch `Request` (true for Vinxi route
* handlers and browser tRPC calls). A server-side `createCaller` hands over a
* Node request, whose headers have no `get` — that throw is swallowed below,
* so such a click is not recorded. No server-side caller downloads today.
*/
export async function trackDownload(
event: APIEvent,
asset: string
): Promise<void> {
const { request } = event;
try {
const referrer =
request.headers.get("referer") ?? request.headers.get("referrer");
const forwarded = request.headers.get("x-forwarded-for");
await logVisit(
enrichAnalyticsEntry({
path: downloadPath(asset),
method: "GET",
referrer,
userAgent: request.headers.get("user-agent"),
ipAddress:
getRequestIP(event.nativeEvent) ??
(forwarded ? forwarded.split(",")[0]!.trim() : null),
// The click carries its own tags when a campaign links straight at the
// door; otherwise the landing page's tags ride along in the referer.
...parseUtm(request.url, referrer),
// Edge header country, overridable with ?c= for manual verification.
country:
new URL(request.url).searchParams.get("c") ??
request.headers.get("x-vercel-ip-country") ??
request.headers.get("cf-ipcountry")
})
);
await flushAnalytics();
} catch (error) {
console.error(`Failed to log download of ${asset}:`, error);
}
}