Compare commits
2 Commits
faq/from-o
...
641d3ed0ed
| Author | SHA1 | Date | |
|---|---|---|---|
| 641d3ed0ed | |||
| b6b2bc8ef6 |
25
.env.example
@@ -55,8 +55,15 @@ TURSO_DB_TOKEN="<rotate-in-turso-dashboard>" # eyJ...
|
|||||||
TURSO_DB_API_TOKEN="<rotate-in-turso-dashboard>" # org-level API token
|
TURSO_DB_API_TOKEN="<rotate-in-turso-dashboard>" # org-level API token
|
||||||
TURSO_LINEAGE_URL="libsql://<lineage-db>.turso.io"
|
TURSO_LINEAGE_URL="libsql://<lineage-db>.turso.io"
|
||||||
TURSO_LINEAGE_TOKEN="<rotate-in-turso-dashboard>"
|
TURSO_LINEAGE_TOKEN="<rotate-in-turso-dashboard>"
|
||||||
|
NESSA_DB_URL="libsql://<nessa-db>.turso.io"
|
||||||
|
NESSA_DB_TOKEN="<rotate-in-turso-dashboard>"
|
||||||
|
# Clerk authentication — rotate via Clerk Dashboard or `clerk api .../rotate_secret_keys`
|
||||||
|
NESSA_CLERK_SECRET="sk_test/live_<rotate-in-clerk-dashboard>" # secret key (sk_test_... for dev, sk_live_... for prod)
|
||||||
|
NESSA_CLERK_JWT_ISSUER="https://<your-app>.clerk.accounts.dev" # JWT issuer from Clerk Dashboard
|
||||||
|
NESSA_CLERK_WEBHOOK_SECRET="whsec_<rotate-in-clerk-dashboard>" # Svix signing secret from Clerk Dashboard → Webhooks → Signing Secret
|
||||||
|
|
||||||
APPLE_CLIENT_ID_LINEAGE=com...
|
APPLE_CLIENT_ID_LINEAGE=com...
|
||||||
|
APPLE_CLIENT_ID_NESSA=com...
|
||||||
|
|
||||||
# ── Infra / integration tokens ──
|
# ── Infra / integration tokens ──
|
||||||
INFILL_BEARER_TOKEN="<rotate-at-infill-service>"
|
INFILL_BEARER_TOKEN="<rotate-at-infill-service>"
|
||||||
@@ -68,21 +75,3 @@ GITHUB_API_TOKEN="<rotate-in-github-settings>" # ghp_... / g
|
|||||||
# Source maps upload — create a token at: Settings > Projects > freno-dev > Client Keys (DSN) > Auth Token
|
# Source maps upload — create a token at: Settings > Projects > freno-dev > Client Keys (DSN) > Auth Token
|
||||||
# or generate an internal auth token at: https://sentry.io/settings/account/api/keys/
|
# or generate an internal auth token at: https://sentry.io/settings/account/api/keys/
|
||||||
SENTRY_AUTH_TOKEN="sntrys_<generate-in-sentry-dashboard>"
|
SENTRY_AUTH_TOKEN="sntrys_<generate-in-sentry-dashboard>"
|
||||||
|
|
||||||
# ── The Nook licensing ──
|
|
||||||
NOOK_DB_URL="libsql://<nook-db>.turso.io"
|
|
||||||
NOOK_DB_TOKEN="<rotate-in-turso-dashboard>" # eyJ...
|
|
||||||
NOOK_LICENSE_PRIVATE_KEY="<generate-license-keypair>" # base64 PKCS8 Ed25519 private key (scripts/generate-license-keys.ts)
|
|
||||||
NOOK_STRIPE_SK="sk_live_<rotate-in-stripe-dashboard>"
|
|
||||||
NOOK_STRIPE_WEBHOOK_SECRET="whsec_<rotate-in-stripe-dashboard>"
|
|
||||||
NOOK_STRIPE_PRICE_ID="price_<from-stripe-dashboard>"
|
|
||||||
|
|
||||||
# ── The Nook lifecycle emails ──
|
|
||||||
# Daily cron (vercel.json → /api/the-nook/lifecycle) requires a Bearer secret.
|
|
||||||
# Set CRON_SECRET and Vercel attaches it automatically to scheduled runs.
|
|
||||||
# Generate: openssl rand -base64 64 | tr -d '\n'
|
|
||||||
CRON_SECRET="<openssl-rand-base64>"
|
|
||||||
# Optional override for the secret the endpoint accepts (falls back to CRON_SECRET).
|
|
||||||
NOOK_LIFECYCLE_SECRET=""
|
|
||||||
# Optional Brevo list id trial-start emails are added to (the lifecycle audience).
|
|
||||||
NOOK_TRIAL_LIST_ID=""
|
|
||||||
|
|||||||
4
.gitignore
vendored
@@ -31,7 +31,3 @@ perf-results-*.json
|
|||||||
# System Files
|
# System Files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
# pygienium run-state and check artifacts
|
|
||||||
.pygienium/
|
|
||||||
scripts/
|
|
||||||
.cache
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
This project serves four product subdomains (`nessa.freno.me`, `lineage.freno.me`, `gaze.freno.me`, `inputhalo.freno.me`) plus the personal site on `freno.me`. See `docs/subdomain-setup.md` for DNS/Vercel configuration.
|
This project serves four product subdomains (`nessa.freno.me`, `lineage.freno.me`, `gaze.freno.me`, `inputhalo.freno.me`) plus the personal site on `freno.me`. See `docs/subdomain-setup.md` for DNS/Vercel configuration.
|
||||||
|
|
||||||
- **Route placement:** Subdomain pages live under `src/routes/<prefix>/*` (e.g. `src/routes/nessa/...`) as the source-of-truth content components. The public browser path on each subdomain (e.g. `lineage.freno.me/privacy` → `/privacy`) is served by **host-aware root route dispatch**: the root route file (`src/routes/privacy.tsx`, `deletion.tsx`, `contact.tsx`, `downloads.tsx`, `index.tsx`) resolves on the public path on BOTH server and client, then selects the matching subdomain component via `useSite()`. Do **not** rewrite the request path server-side — SolidStart's client `Router` matches on `window.location.pathname`, so a server-only rewrite diverges SSR from hydration and causes hydration mismatches. (The `vercel.json` host `rewrites` are declared but **not applied** by Vercel — the Nitro `vercel` preset emits a Build Output API `config.json` whose `routes` array fully replaces `vercel.json` rewrites/redirects/headers — so the host-aware root dispatch is what actually serves subdomain pages.) **Every subdomain surface requires both files:** the `src/routes/<prefix>/<name>.tsx` content component AND a matching top-level dispatch file (`src/routes/<name>.tsx` or `src/routes/<name>/index.tsx`) that imports and dispatches to it — without the dispatch file, the page is unreachable on the subdomain. The `src/routes/subdomain-dispatch.test.ts` suite enforces this automatically on every `bun test` run.
|
- **Route placement:** Subdomain pages live under `src/routes/<prefix>/*` (e.g. `src/routes/nessa/...`). The `vercel.json` host-based rewrites map each subdomain to its prefix.
|
||||||
- **Site context:** Use `useSite()` (SolidJS) or `getSiteFromEvent`/`getSiteFromRequest` (server) from `src/lib/site-context.ts` to detect the current site. Never host-snoop in route files — SolidStart's router can't match on host.
|
- **Site context:** Use `useSite()` (SolidJS) or `getSiteFromEvent`/`getSiteFromRequest` (server) from `src/lib/site-context.ts` to detect the current site. Never host-snoop in route files — SolidStart's router can't match on host.
|
||||||
- **API routes:** `/api/*` is a shared pool — subdomain API requests pass through to existing routes via vercel.json pass-through rewrites (ordering matters).
|
- **API routes:** `/api/*` is a shared pool — subdomain API requests pass through to existing routes via vercel.json pass-through rewrites (ordering matters).
|
||||||
- **Auth:** Host-scoped only — no cookie domain broadening.
|
- **Auth:** Host-scoped only — no cookie domain broadening.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import tailwindcss from "@tailwindcss/vite";
|
|||||||
import { sentryVitePlugin as sentryPlugin } from "@sentry/vite-plugin";
|
import { sentryVitePlugin as sentryPlugin } from "@sentry/vite-plugin";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
middleware: "./src/middleware.ts",
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
tailwindcss(),
|
tailwindcss(),
|
||||||
@@ -10,7 +11,21 @@ export default defineConfig({
|
|||||||
org: "mikefreno",
|
org: "mikefreno",
|
||||||
project: "freno-dev",
|
project: "freno-dev",
|
||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||||
telemetry: false
|
telemetry: false,
|
||||||
|
sourcemaps: {
|
||||||
|
assets: [
|
||||||
|
{
|
||||||
|
type: "bundle",
|
||||||
|
path: "dist/client/assets/",
|
||||||
|
urlPrefix: "~/assets/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "sourcemap",
|
||||||
|
path: "dist/client/assets/",
|
||||||
|
urlPrefix: "~/assets/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
build: {
|
build: {
|
||||||
@@ -38,6 +53,6 @@ export default defineConfig({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
preset: "vercel"
|
preset: "node-server"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
# Marketing tree
|
|
||||||
|
|
||||||
One voice, one place. Every later artifact draws on `positioning.md` — do not
|
|
||||||
invent framing per-asset.
|
|
||||||
|
|
||||||
```
|
|
||||||
positioning.md # source of truth: wedge, voice, banned phrasings, approved claims
|
|
||||||
calendar.json # scheduled pushes: date, channel, status
|
|
||||||
briefs/<channel>.md # per-channel rules, format, limits, what "good" looks like
|
|
||||||
drafts/<id>/ # agent output: copy.md, assets/, rationale.md
|
|
||||||
pending/ approved/ posted/ # human gate by directory move
|
|
||||||
metrics/weekly.md # funnel snapshot, generated
|
|
||||||
listening.md # buying-intent threads + drafted replies
|
|
||||||
```
|
|
||||||
|
|
||||||
## Hard rule
|
|
||||||
|
|
||||||
**`approved/` is the only thing a human ever publishes from. Nothing posts itself.**
|
|
||||||
|
|
||||||
Workflow: agent drafts into `drafts/<id>/` → moves to `pending/` when complete →
|
|
||||||
a human reviews and moves it to `approved/` → the human publishes from `approved/`
|
|
||||||
under their own account → the artifact (or a pointer) lands in `posted/`.
|
|
||||||
|
|
||||||
Nothing in `drafts/` or `pending/` is ever publishable, by anyone, by any means.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# approved
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# briefs
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"$comment": "Scheduled pushes: date, channel, status. Statuses: draft | pending | approved | posted. Move nothing to posted without the artifact living in approved/ first — see positioning.md rule 5.",
|
|
||||||
"pushes": []
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# drafts
|
|
||||||
@@ -1,478 +0,0 @@
|
|||||||
# `/faq` from the objections we already have
|
|
||||||
|
|
||||||
**Date:** 2026-10-29 · **Owner:** CMO · **Status:** CTO-verified (FRE-329) and CoS-decided (FRE-334, option A: withdraw both) on 2026-10-29; **awaiting the sponsor's publish approval** — not approved, not published · **Source issue:** FRE-326
|
|
||||||
**Page:** `nook.freno.me/faq` · **Page source:** `freno-dev/src/routes/nook/faq.tsx` · **Site commit read:** `c1c498e` (branch `faq/from-objections-2026-10-29`, unmerged)
|
|
||||||
**Product commit read:** The-Nook `f9cbd879` — the exact revision the CTO verified against (0.13.4, build 37)
|
|
||||||
|
|
||||||
Every entry below is traceable to a real question or a real report. Nothing is invented to fill a
|
|
||||||
category. No testimonial is used. No price, refund term, or umbrella/cross-promotion answer appears
|
|
||||||
here — those stay with FRE-204, the Chief of Staff and the sponsor.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 1. What I could read, and what I could not
|
|
||||||
|
|
||||||
| Source | What it is | Read on | What it yielded |
|
|
||||||
|---|---|---|---|
|
|
||||||
| `nook.freno.me/faq` | The live page | 2026-10-29 | Six questions already published: privacy, notch, battery, permissions, macOS 14.2, offline. |
|
|
||||||
| FRE-326 description | This board issue | 2026-10-29 | Two purchase-blocking questions named verbatim: *"does it work with Cursor?"* and *"what happens when my agent is idle?"* |
|
|
||||||
| NOOK issue corpus | 948 issues imported from Plane, plus the 324-issue Paperclip board | 2026-10-08 → 2026-10-28 | User-observable defect reports. These are reports, not captured asks; they prove an objection is live. |
|
|
||||||
| `freno-dev/marketing/positioning.md` | Voice, approved claims, competitor ban | 2026-10-29 | The register and the "never name a competitor" rule. |
|
|
||||||
| The-Nook code | `AgentRegistry.swift`, `SessionModels.swift`, `Terminal*`, `hook/setup.go`, `PluginInstaller.swift`, `LicenseService.swift`, `main.swift` | 2026-10-29 | The technical facts each answer is allowed to use. |
|
|
||||||
| NOOK-121 | The original `/faq` creation (2026-10-08) | 2026-10-29 | Confirms the six live questions came from the strategy's named objections, not from a support corpus. Refund was deliberately dropped by Mike. |
|
|
||||||
|
|
||||||
### The gap that shapes this draft
|
|
||||||
|
|
||||||
**Support mail is not readable from this run.** There is no mailbox on the machine; the in-app
|
|
||||||
"Report a bug" form `POST`s to `freno-dev/src/routes/api/the-nook/report.ts`, which emails the
|
|
||||||
developer and stores nothing queryable. `/privacy` and the repo contain no support corpus.
|
|
||||||
|
|
||||||
**Reply threads are not collected.** `freno-dev/marketing/listening.md` is an empty table; FRE-201
|
|
||||||
(the listening job) has not produced a thread yet.
|
|
||||||
|
|
||||||
**Directory comments do not exist yet.** FRE-207 has a submission packet, not live listings; none of
|
|
||||||
the directories has a comment thread about The Nook to mine.
|
|
||||||
|
|
||||||
**Consequence:** I cannot rank by observed ask frequency, because no ask corpus exists. What follows
|
|
||||||
ranks by **purchase-blocking weight first**, then by **the number of named reports in our own issue
|
|
||||||
corpus that belong to the cluster**. The report counts are a proxy for "this objection is live", not
|
|
||||||
a count of people who asked. I have not put a percentage on anything.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 2. The register — clusters, sources, frequency, and whether they block a purchase
|
|
||||||
|
|
||||||
| # | Cluster | The question in the buyer's words | Verbatim source(s), with dates | Frequency evidence | Blocks a purchase? | Disposition |
|
|
||||||
|---|---|---|---|---|---|---|
|
|
||||||
| 1 | Privacy / what leaves the Mac | "Does The Nook read my prompts or my code?" | Live `/faq`, 2026-10-29; code findings in `main.swift:272-278`, `LicenseService.swift:254`, `docs/sidecar-frames.md` | 1 live question + 3 named code findings | **Yes — the whole decision for this audience** | **Withdraw the live answer; replacement held.** See §4. |
|
|
||||||
| 2 | Agent fit / Cursor | "Does it work with Cursor — and can I approve from the notch, or only watch?" | FRE-326, 2026-10-29: *"does it work with Cursor?"*; NOOK-643 (2026-10-20), NOOK-695 (2026-10-20), NOOK-699 (2026-10-20), NOOK-707 (2026-10-21), NOOK-638 (2026-10-20) | 1 board question + 5 reports | **Yes** | **Propose E1** |
|
|
||||||
| 3 | Idle / is it actually working? | "What happens when my agent is idle?" | FRE-326, 2026-10-29: *"what happens when my agent is idle?"*; NOOK-281 (2026-10-12), NOOK-415 (2026-10-15), NOOK-417 (2026-10-15), NOOK-823 (2026-10-22), NOOK-898 (2026-10-23) | 1 board question + 5 reports | **Yes** | **Propose E2** |
|
|
||||||
| 4 | Install trust / permissions | "What permissions does it need — and what does it write into my agent's config?" | Live `/faq`, 2026-10-29; NOOK-733 (2026-10-21), NOOK-648 (2026-10-20), NOOK-685 (2026-10-20), NOOK-418 (2026-10-15), NOOK-568 (2026-10-17) | 1 live question + 5 reports | **Yes** | **Propose E3** |
|
|
||||||
| 5 | Terminal / tmux fit | "Does it work with my terminal, including tmux?" | NOOK-302 (2026-10-13), NOOK-310 (2026-10-13), NOOK-788 (2026-10-22) | 3 reports; no captured ask | **Yes for tmux-first buyers** | **Propose E4** — report-sourced, not an ask |
|
|
||||||
| 6 | Notch / display | “Do I need a Mac with a notch?” | Live `/faq`, 2026-10-29; NOOK-290 (2026-10-12), NOOK-291 (2026-10-12), NOOK-386 (2026-10-14) | 1 live question + 3 reports | Compatibility; rarely the blocker | **Rewrite E5** — the pointer-display sentence was never true |
|
|
||||||
| 7 | Battery / cost | "How much battery does it cost?" | Live `/faq`, 2026-10-29; NOOK-850 (2026-10-23), NOOK-851 (2026-10-23), NOOK-877 (2026-10-23) | 1 live question + 3 reports | Curious, not a hard blocker | **Rewrite E6 without a number** |
|
|
||||||
| 8 | macOS floor | "Why macOS 14.2 or later?" | Live `/faq`, 2026-10-29; NOOK-881 (2026-10-23) | 1 live question + 1 report | Compatibility; a hard no on 14.0/14.1 | **Keep current answer** |
|
|
||||||
| 9 | Offline | "Does it work offline?" | Live `/faq`, 2026-10-29; NOOK-494 (2026-10-16) | 1 live question + 1 report | Compatibility; a hard no for offline-only | **Rewrite E8 for the phone exception** |
|
|
||||||
| 10 | Trial / licence mechanics | "What am I actually buying — trial, Macs, updates?" | NOOK-682 (2026-10-20), NOOK-684 (2026-10-20), NOOK-60 (2026-10-08) | 2 reports; no captured ask | **Yes** | **Held** — no verbatim ask; do not invent one |
|
|
||||||
| 11 | Remote agents / containers | "Can I approve an agent running on a remote box or in Docker?" | FRE-323, FRE-320, FRE-315; `marketing/positioning.md` claims remote SSH | Many reports; the claim is unverified | **Yes — the launch claim** | **Held** — no answer before the demo |
|
|
||||||
| 12 | Phone / Watch | "Is there an iPhone app? Do I need one?" | NOOK-939 (2026-10-27), NOOK-294 (backlog) | 2 reports; status unverified | Curious; would be blocking if sold | **Held** — CTO status answer first |
|
|
||||||
| 13 | Refund / price | "What's your refund policy? Is $10 the real price?" | FRE-204, NOOK-121 | No readable source; contractual | **Yes** | **Out of scope** — FRE-204, CoS + sponsor |
|
|
||||||
|
|
||||||
### What changed since the last register (FRE-204)
|
|
||||||
|
|
||||||
- The live page already has six entries; this draft **keeps one** (macOS 14.2), **rewrites four**
|
|
||||||
(permissions, battery, offline, and notch — whose pointer-display sentence the CTO found was never
|
|
||||||
true), **withdraws one** (privacy), and **proposes three new ones** (E1, E2, E4). It does not re-ask
|
|
||||||
the six questions as if they were new.
|
|
||||||
- The privacy answer is not merely unverified — it is **false at the current build**. It must come
|
|
||||||
down in the same edit, not wait for a nicer replacement.
|
|
||||||
- Cursor is now a supported agent row (`AgentRegistry.swift:524`), so "does it work with Cursor?"
|
|
||||||
has a factual answer today. It was an open question when the live page was written.
|
|
||||||
|
|
||||||
### CTO verdict (FRE-329, 2026-10-29)
|
|
||||||
|
|
||||||
The CTO read The-Nook `f9cbd879`, the site at `c1c498e` and the live page, and checked every entry
|
|
||||||
against the code. **No entry is cut.** Six change text, exactly as below; E1 and E7 ship as written.
|
|
||||||
|
|
||||||
| Entry | Verdict | What changed in this revision |
|
|
||||||
|---|---|---|
|
|
||||||
| E1 Agent fit / Cursor | **verified** | nothing |
|
|
||||||
| E2 Idle | verified, one sentence tightened | the row-eviction sentence |
|
|
||||||
| E3 Permissions / config | **not verified** | three sentences: Login Items toggle, per-event entries, `~/.nook` |
|
|
||||||
| E4 Terminal / tmux | **not verified** | one sentence: which terminals take a typed reply |
|
|
||||||
| E5 Notch | **not verified** | one sentence: one island per enabled display, not the pointer's display |
|
|
||||||
| E6 Battery | verified, one clause tightened | "never runs them in the background" |
|
|
||||||
| E7 macOS 14.2 | **verified** | nothing |
|
|
||||||
| E8 Offline | **not verified** | one sentence, plus a six-row network list in its gate |
|
|
||||||
| §4 privacy | all three findings confirmed; withdrawal is right | `positioning.md` rule 3 comes down in the same change |
|
|
||||||
|
|
||||||
The verdict adds two things to the plan, both now in §4 and §7: the false claim's **source rule** in
|
|
||||||
`marketing/positioning.md` — rule 3 and its approved-claims row — must be struck in the same change
|
|
||||||
as the withdrawal, or the next page restates it; and the egress inventory's scope widens to cover
|
|
||||||
weather, the network panel, the speed test, the changelog, the bug report and Sparkle, plus Sentry's
|
|
||||||
`sendDefaultPii` and trace sample rate.
|
|
||||||
|
|
||||||
The verdict's full text and its per-sentence evidence is
|
|
||||||
[FRE-329's `faq-verdict` document](/FRE/issues/FRE-329#document-faq-verdict). Nothing in it is
|
|
||||||
reproduced here as a new claim; the entry text below is the verdict's own replacement wording, except
|
|
||||||
E4, where I took the verdict's first option (keep the Alacritty clause) and narrowed the jump
|
|
||||||
sentence, which the verdict itself notes is `open -b` for three of the seven names.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. Proposed entries — page-ready
|
|
||||||
|
|
||||||
Each entry carries the six required things: **claim, audience, channel, owner, date, and what has to
|
|
||||||
be true before it ships.** The answer text is the copy to paste; the trace is the evidence a CTO can
|
|
||||||
check.
|
|
||||||
|
|
||||||
### E1 · "Does it work with my agent — and can I approve from the notch, or only watch?"
|
|
||||||
|
|
||||||
> **It depends on the agent, and Cursor is the useful example.** Cursor is watched, not gated: its
|
|
||||||
> sessions, finished turns and errors appear in the island, but when Cursor asks for permission the
|
|
||||||
> prompt stays in Cursor. That is deliberate — Cursor blocks the action when a permission hook runs
|
|
||||||
> and prints nothing, so gating it would override Cursor's own prompts. Other agents do hand the
|
|
||||||
> decision to The Nook, so a tool call waits and you tap Allow or Deny from the card. One limit:
|
|
||||||
> `cursor-agent -p` one-shot runs send no turn end, so they appear but do not get a completion card.
|
|
||||||
|
|
||||||
- **Question source:** FRE-326, 2026-10-29 (*"does it work with Cursor?"*); NOOK-643, 2026-10-20
|
|
||||||
(*"No permission hook is installed, deliberately: Cursor blocks the action when a permission hook
|
|
||||||
prints nothing…"*).
|
|
||||||
- **Claim:** agent gating is per-agent; Cursor is watch-only.
|
|
||||||
- **Audience:** the buyer whose agent is not Claude Code.
|
|
||||||
- **Channel:** `/faq`. No FAQ structured data in this pass — see §6.
|
|
||||||
- **Owner:** CMO writes; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** at the shipped commit, Cursor still reads `.missing(.approvals)` with the same
|
|
||||||
reason, and `.available(.sessions)`, `.available(.completion)` and `.available(.errors)` as stated
|
|
||||||
(`AgentRegistry.swift:523-555`, which is where the CTO read it). The separate `/agents` page is
|
|
||||||
incomplete for Cursor and the other newer rows; that is a page correction, not a gate for this
|
|
||||||
self-contained answer.
|
|
||||||
|
|
||||||
### E2 · "What happens when my agent is idle?"
|
|
||||||
|
|
||||||
> **Idle means the last turn is over, or the session has not produced anything yet — not that the
|
|
||||||
> process is gone.** A running process is liveness, not work: a just-opened agent window can show
|
|
||||||
> idle until you type. When an agent finishes a turn with a final message, the row stays green for
|
|
||||||
> ten minutes, then goes gray. A stale row is different: it means The Nook's integration cannot
|
|
||||||
> report for that session, and the row says so instead of pretending it is idle. Nothing is lost when
|
|
||||||
> a row goes idle — the next prompt brings it back and flips it to running. The row itself leaves the
|
|
||||||
> island 15 minutes after the turn (5 if the turn ended without a reply), so a long-quiet session
|
|
||||||
> reappears on its next event instead of sitting there. If a session that is obviously working says
|
|
||||||
> idle, that is a bug; tell us.
|
|
||||||
|
|
||||||
- **Question source:** FRE-326, 2026-10-29 (*"what happens when my agent is idle?"*); NOOK-898,
|
|
||||||
2026-10-23 (*"kimi payloads fail to decode, so every Kimi session stays idle"*); NOOK-823,
|
|
||||||
2026-10-22 (*"Codex terminal: sessions become idle or disappear prematurely"*); NOOK-417,
|
|
||||||
2026-10-15 (*"Never render plain Idle for a session whose integration is dark"*).
|
|
||||||
- **Claim:** idle is a statement about the last turn, not a guess at the process; stale is a separate
|
|
||||||
state.
|
|
||||||
- **Audience:** anyone watching a fleet and wondering whether to intervene.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO writes; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** `SessionModels.swift:511,552,564-577` still defines `islandStatus` this way (no
|
|
||||||
content → idle; complete → ready for 10 minutes → idle; `integrationStale` → stale) and
|
|
||||||
`SessionState.swift:35,40` still evicts a finished turn after 15 minutes, 5 when it ended without a
|
|
||||||
reply. If an open bug makes a working agent render idle at the shipped commit, the "that is a bug"
|
|
||||||
sentence stays but the bug gets a named issue.
|
|
||||||
|
|
||||||
### E3 · "What permissions does it need — and what does it write into my agent's config?"
|
|
||||||
|
|
||||||
> **The app itself runs unprivileged.** Fan control and charge limiting go through a small helper
|
|
||||||
> that macOS requires to run as root for hardware access; the app registers it on first use and takes
|
|
||||||
> you to System Settings › General › Login Items & Extensions, where you switch it on once. For each
|
|
||||||
> agent it adds what that agent needs — a hook group per event it listens to, or one plugin link —
|
|
||||||
> inside the agent's own config file or directory. It keeps its own files under `~/.nook` — the hook
|
|
||||||
> binary and one plugin copy per agent — and adds only its own entries to that agent's config. A hook
|
|
||||||
> entry you added yourself in the same file survives install and uninstall, and it only touches the
|
|
||||||
> records and switches it created. Uninstall removes exactly what it wrote — and switches off what it
|
|
||||||
> turned on — with no leftover links or orphaned files.
|
|
||||||
|
|
||||||
- **Question source:** live `/faq`, 2026-10-29 (*"What permissions does it need?"*); NOOK-418,
|
|
||||||
2026-10-15 (a custom agent's install target is never shown to the user); NOOK-733, 2026-10-21 (a
|
|
||||||
Codex hook installed but not trusted, so it never ran); NOOK-648, 2026-10-20 and NOOK-685,
|
|
||||||
2026-10-20 (uninstall leftovers); NOOK-568, 2026-10-17 (helper re-registration tore down an
|
|
||||||
approved helper).
|
|
||||||
- **Claim:** reversible install; the helper is the only root step; uninstall is exact.
|
|
||||||
- **Audience:** the buyer who has a hand-tuned `~/.claude/settings.json` or `~/.codex/hooks.json`.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO writes; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** `hook/setup.go`'s strip functions and `PluginInstaller.uninstall` still remove
|
|
||||||
only their own records at the shipped commit (`removeIfOurs`, `stripOurGroups`/`groupIsOurs`); the
|
|
||||||
helper is still registered through `SMAppService.daemon` with a Login Items toggle and no password
|
|
||||||
prompt (`PrivilegedHelper.swift:62-112,204-208`); the custom-agent target is still shown and
|
|
||||||
accepted before install (NOOK-418); the only host switch uninstall flips is Amp's own hook-enable
|
|
||||||
flag (`PluginInstaller.swift:379-385`) — and the answer now says so.
|
|
||||||
|
|
||||||
### E4 · "Does it work with my terminal, including tmux?"
|
|
||||||
|
|
||||||
> **Yes — it recognises Terminal.app, iTerm2, Warp, Ghostty, kitty, WezTerm and tmux. Four of those
|
|
||||||
> take a typed reply; the rest are watched.** A session is tied to the terminal that started it. Jump
|
|
||||||
> lands in the right window for Terminal.app, iTerm2, kitty and any tmux pane — in tmux, the right
|
|
||||||
> pane; on Warp, WezTerm and Ghostty it brings the app forward instead. Replies type straight back
|
|
||||||
> into Terminal.app, iTerm2, kitty and any tmux pane; on Warp, WezTerm and Ghostty you answer in the
|
|
||||||
> app's own window, and Alacritty takes no typed reply from another app at all.
|
|
||||||
|
|
||||||
- **Question source:** no captured ask. Underlying reports: NOOK-302, 2026-10-13 (*"a tmux session
|
|
||||||
shows only 'tmux', and its outer terminal comes from whoever started the tmux server"*); NOOK-310,
|
|
||||||
2026-10-13 (*"jump and send address tmux panes on the default server, ignoring the session's tmux
|
|
||||||
socket"*).
|
|
||||||
- **Claim:** seven terminal families and tmux panes included. Remote panes are not claimed here;
|
|
||||||
the remote launch story is still held.
|
|
||||||
- **Audience:** anyone whose workflow is tmux-first.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO writes; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** `TerminalAncestry.programs` still recognises those seven names; `TerminalSend.attempts`
|
|
||||||
still builds a delivery channel only for tmux, herdr, kitty, iTerm2 and Terminal.app and refuses
|
|
||||||
Alacritty by name; `TerminalJump` still raises the app rather than the window for Warp, WezTerm and
|
|
||||||
Ghostty. This entry is **report-sourced, not ask-sourced**; if a captured ask never arrives, it is
|
|
||||||
still publishable because the reports are real, but it ranks below E1–E3 until one does.
|
|
||||||
|
|
||||||
### E5 · "Do I need a Mac with a notch?"
|
|
||||||
|
|
||||||
> **No. On a notched MacBook the island sits in the notch. On machines and displays without one, it
|
|
||||||
> sits at the top centre of the display — the same pill with the same slots.** You get one island on
|
|
||||||
> every display it is turned on for (all connected displays on first launch), each anchored to the top
|
|
||||||
> of its own screen; Settings › Displays trims that list, and the pointer only decides which display's
|
|
||||||
> floating controls are live. Everything inside the island — agent cards, fan control, the stats strip
|
|
||||||
> — works identically either way.
|
|
||||||
|
|
||||||
- **Question source:** live `/faq`, 2026-10-29; NOOK-290, 2026-10-12 and NOOK-291, 2026-10-12
|
|
||||||
(non-notch display geometry bugs), NOOK-386, 2026-10-14 (empty pill tucks away on a non-notch
|
|
||||||
display).
|
|
||||||
- **Claim:** a notch is optional; external displays work.
|
|
||||||
- **Audience:** Mac mini / Studio / external-monitor buyers.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO keeps the question and rewrites the answer; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** `IslandDisplayManager` still owns one island per enabled display, `DisplayStore`
|
|
||||||
still snapshots every connected display on first launch (`DisplayStore.swift:52-59`), and the
|
|
||||||
non-notch geometry tests still pass. Nothing tests that first-launch snapshot today — that is a test
|
|
||||||
gap to file, not a gate on this answer.
|
|
||||||
|
|
||||||
### E6 · "How much battery does it cost?"
|
|
||||||
|
|
||||||
> **It is a native app, not a background agent.** It watches the agents you already run and never
|
|
||||||
> runs them in the background, so their draw is the number that matters. We do not have a published battery
|
|
||||||
> measurement for The Nook alone; when we do, it will be a measurement, not an estimate. If it costs
|
|
||||||
> more than it should on your Mac, that is a bug — tell us.
|
|
||||||
|
|
||||||
- **Question source:** live `/faq`, 2026-10-29; NOOK-850, 2026-10-23 (*"the idle app does work
|
|
||||||
nothing asked for (CPU wins from a live profile)"*), NOOK-851, 2026-10-23 (a 30 fps timeline ticks
|
|
||||||
the fan icon at idle), NOOK-877, 2026-10-23 (compact Nook still costs too much CPU at rest).
|
|
||||||
- **Claim:** native app, not a background agent; **no numeric battery claim**.
|
|
||||||
- **Audience:** the buyer checking whether this is another menu-bar battery sink.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO writes; CTO verified the no-number wording 2026-10-29.
|
|
||||||
- **Date:** CTO verified the no-number wording 2026-10-29; publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** either a measurement exists and is quoted, or the no-number sentence ships. Do
|
|
||||||
not restore "the heaviest thing it does is a sensor read" — the profile findings above contradict
|
|
||||||
it.
|
|
||||||
|
|
||||||
### E7 · "Why macOS 14.2 or later?"
|
|
||||||
|
|
||||||
> **The audio mixer listens to each app's own sound stream, and Apple only shipped that API in macOS
|
|
||||||
> 14.2 (Sonoma).** The app links against it, so 14.0 and 14.1 cannot launch it.
|
|
||||||
|
|
||||||
- **Question source:** live `/faq`, 2026-10-29; NOOK-881, 2026-10-23 (*"A macOS 14.0/14.1 Mac cannot
|
|
||||||
launch the app at all: dyld dies on a strongly linked CATapDescription overlay symbol"*).
|
|
||||||
- **Claim:** the floor is 14.2 because of the audio tap API, not a policy choice.
|
|
||||||
- **Audience:** anyone on an older macOS.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO keeps; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** `Package.swift:12` and `LSMinimumSystemVersion` still say 14.2, and
|
|
||||||
`DeploymentFloorTests` still refuses an older floor.
|
|
||||||
|
|
||||||
### E8 · "Does it work offline?"
|
|
||||||
|
|
||||||
> **The Mac app does.** The island, agent cards, permission cards and fan control work with no
|
|
||||||
> network; the hooks talk to the app over a local socket. The network is used for update checks,
|
|
||||||
> licence activation, crash reports and the optional trial email, plus a few things only when you use
|
|
||||||
> them: weather (asked for through our relay, with the location you chose), the network panel's
|
|
||||||
> IP-and-ISP lookup, the speed test, the changelog in Settings, and a bug report if you send one. The
|
|
||||||
> phone link is the exception: when you are away from your Mac, the phone reaches it through our
|
|
||||||
> relay, so that part needs a connection.
|
|
||||||
|
|
||||||
- **Question source:** live `/faq`, 2026-10-29; NOOK-494, 2026-10-16 (*"iOS: the main list gives no
|
|
||||||
sign the phone is offline from the Mac"*).
|
|
||||||
- **Claim:** the Mac app is offline-first; the phone link is not.
|
|
||||||
- **Audience:** the buyer with a disconnected or privacy-sensitive setup.
|
|
||||||
- **Channel:** `/faq`.
|
|
||||||
- **Owner:** CMO writes; CTO verified 2026-10-29.
|
|
||||||
- **Date:** CTO verified 2026-10-29 ([FRE-329](/FRE/issues/FRE-329)); publish on approval, target 2026-11-05.
|
|
||||||
- **Must be true:** the only network uses at the shipped commit are the update check, licence
|
|
||||||
activation, crash reporting, the optional trial email and the phone relay, plus exactly these five
|
|
||||||
user-triggered ones — `/v1/weather` on the relay (`SidecarRelayAPI.swift:182-196`),
|
|
||||||
`NetworkInfoService.swift:60-88,276`, `SpeedTest.swift:36,57`, `ChangelogModel.swift:102`,
|
|
||||||
`BugReportClient.swift:72-94` — and `/privacy` lists the same set. This entry shares its gate with
|
|
||||||
the privacy correction below.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 4. The correction that is not a new entry: privacy
|
|
||||||
|
|
||||||
**Live answer, quoted from `nook.freno.me/faq` on 2026-10-29:**
|
|
||||||
|
|
||||||
> "No. The hooks and plugins that connect your agents to The Nook send session metadata only — which
|
|
||||||
> agent is running, which session, which event happened, which terminal it lives in. No prompt text
|
|
||||||
> and no code content leaves your device. Two things do leave the device, and we'd rather say so
|
|
||||||
> plainly: anonymous usage telemetry, and your email address if you choose to give it at trial start.
|
|
||||||
> That's the whole list."
|
|
||||||
|
|
||||||
**Why it cannot stay up:** it is contradicted by the current build.
|
|
||||||
|
|
||||||
1. **Sentry starts unconditionally with `sendDefaultPii = true`** (`Sources/NookApp/main.swift:272-278`).
|
|
||||||
That is crash and error reporting with personal identifiers, not "anonymous usage telemetry".
|
|
||||||
2. **The licence/trial call sends `IOPlatformUUID` and the Mac's device name** (`LicenseService.swift:254`,
|
|
||||||
`:305`). Precision from the verdict: the identifiers ride on activation, not on every launch — a
|
|
||||||
licensed Mac's launch call is `/status` with the key only (`:290-295`).
|
|
||||||
3. **With the phone link on, prompt and reply text transit `nook-relay.freno.me`, sealed end to end**
|
|
||||||
(`docs/sidecar-frames.md`). The relay can route the payload but cannot read it; the live answer
|
|
||||||
still says no prompt text leaves the device.
|
|
||||||
|
|
||||||
`/privacy` discloses the hardware UUID, device name and Stripe, but **not** Sentry and **not** the
|
|
||||||
relay. So there is no replacement sentence I can write that is both true and consistent with the
|
|
||||||
privacy page today.
|
|
||||||
|
|
||||||
**Proposed:** remove the privacy entry from `/faq` in the same edit that ships the other entries,
|
|
||||||
rather than replace it with another sentence I cannot stand behind. The replacement is held until
|
|
||||||
the Security Engineer's egress inventory and the `/privacy` update land.
|
|
||||||
|
|
||||||
**Decided 2026-10-29 — option A, withdraw both.** The Chief of Staff ruled on
|
|
||||||
[FRE-334](/FRE/issues/FRE-334) (`decision` document) that the `/faq` answer and `positioning.md`
|
|
||||||
rule 3 with its approved-claims row come down **in one commit**, and that no privacy claim is written
|
|
||||||
anywhere until FRE-333 lands and the CTO verifies it. Three consequences for the sequence below: the
|
|
||||||
withdrawal is no longer one of the sponsor's options, it is settled company policy; the publish card
|
|
||||||
asks one thing, publish the eight entries with the privacy answer withdrawn; and if an answer ever
|
|
||||||
ships the seven entries with the false answer still up, that is not a variant to absorb — it stops
|
|
||||||
and goes back to the CoS, because it would publish something the CoS has ruled out.
|
|
||||||
|
|
||||||
**The rule that produced the falsehood comes down with it.** The CTO's verdict traces the live answer
|
|
||||||
to `freno-dev/marketing/positioning.md` rule 3 (“Honest privacy scoping”) and to the matching
|
|
||||||
approved-claims row, which state the defensible claim as “No prompt or code content leaves the
|
|
||||||
device” with the backing “envelope carries session/event/terminal metadata only”. That backing is true
|
|
||||||
of the hook→app envelope and says nothing about what leaves the device, so if rule 3 stands while the
|
|
||||||
FAQ answer comes down, the next page restates the claim. Rule 3 and that row are struck in the same
|
|
||||||
commit as this patch (§7 step 3; the same edit also fixes the stale “macOS 14+” row in that table,
|
|
||||||
which NOOK-881 retired).
|
|
||||||
|
|
||||||
- **Claim:** none until the inventory exists — deliberately.
|
|
||||||
- **Audience:** the buyer for whom this is the whole decision.
|
|
||||||
- **Channel:** `/faq` (withdrawal), `/privacy` (replacement), `marketing/positioning.md` (the rule).
|
|
||||||
- **Owner:** CoS for the withdrawal decision — **done 2026-10-29, option A**; Security Engineer for the
|
|
||||||
egress inventory and the disclosure text; CTO for any build change and for verifying the replacement;
|
|
||||||
CMO for the replacement copy and the rule-3 strike.
|
|
||||||
- **Date:** withdrawal decision **done 2026-10-29** (was targeted 2026-10-31); inventory 2026-11-05;
|
|
||||||
replacement copy 2026-11-09, and it needs both the CTO's verification and the sponsor's approval —
|
|
||||||
rule-3 strike in the same commit as the page patch (§7 step 3).
|
|
||||||
- **Must be true:** every egress in the inventory is either in the answer or gone from the build, and
|
|
||||||
`/privacy` lists the same set. The inventory's scope is wider than the draft first drew it — it must
|
|
||||||
cover `main.swift`, `LicenseService.swift`, `Info.plist`, `ChangelogRelease.swift`,
|
|
||||||
`SidecarController.swift`, **plus** `SidecarRelayAPI`/`WeatherService` (`/v1/weather`),
|
|
||||||
`NetworkInfoService`, `SpeedTest`, `ChangelogModel`, `BugReportClient` and Sparkle's appcast — and
|
|
||||||
on the Sentry side not only that it starts but `sendDefaultPii` and the trace sample rate. Until
|
|
||||||
then, do not publish a privacy answer.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 5. Held — clusters with no entry yet
|
|
||||||
|
|
||||||
| Cluster | Why it is held | Owner and date |
|
|
||||||
|---|---|---|
|
|
||||||
| Trial / licence mechanics ("trial, Macs, updates") | No captured ask. NOOK-682 and NOOK-684 are defect reports, not a buyer question. The answer is factual (14 days, 3 Macs, Sparkle updates), but the task says do not invent a question to fill the slot. | CMO to capture an ask; CTO confirms `LicenseService.swift:43`, `:262` by 2026-11-03. |
|
|
||||||
| Remote agents / containers | The launch claim is unverified (FRE-315, FRE-322, FRE-323, FRE-320). No FAQ answer before the demo. | CTO evidence; CMO copy the day it exists. Revisit 2026-11-12. |
|
|
||||||
| Phone / Watch | Status is unverified; the landing page and FAQ currently disagree. | CTO status answer by 2026-11-03; CMO copy after. |
|
|
||||||
| Refund / price | Contractual, and explicitly out of this issue. | FRE-204, CoS + sponsor. |
|
|
||||||
| Custom agents | No captured ask; the `/agents` page already says a custom agent can wire itself in. | No entry until asked. |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 6. What the page edit would change
|
|
||||||
|
|
||||||
**File:** `freno-dev/src/routes/nook/faq.tsx` (site `master` at `134f41e`; the branch is cut from
|
|
||||||
local `c1c498e`, which removed the remote claim from the landing page, not from the FAQ).
|
|
||||||
|
|
||||||
| Action | Entry |
|
|
||||||
|---|---|
|
|
||||||
| **Remove** | “Does The Nook read my prompts or my code?” — until the egress inventory and `/privacy` are true |
|
|
||||||
| **Rewrite (correction only)** | “Do I need a Mac with a notch?” → E5 (per-display island, not the pointer's display) |
|
|
||||||
| **Keep, with the exact text above** | “Why macOS 14.2 or later?” |
|
|
||||||
| **Rewrite** | “What permissions does it need?” → E3 (adds the config/uninstall answer) |
|
|
||||||
| **Rewrite** | “How much battery does it cost?” → E6 (no number) |
|
|
||||||
| **Rewrite** | “Does it work offline?” → E8 (phone exception, six-row network list) |
|
|
||||||
| **Add** | E1 (agent fit / Cursor) |
|
|
||||||
| **Add** | E2 (idle) |
|
|
||||||
| **Add** | E4 (terminal / tmux) |
|
|
||||||
| **Edit** | The file header comment that cites `positioning.md` rule 3 → “Privacy is deliberately absent until the egress inventory and /privacy make an honest answer possible.” |
|
|
||||||
| **Edit** | The `PageHead` description, which still advertises the privacy question → the new eight-entry list |
|
|
||||||
|
|
||||||
Order on the page: E1, E2, E3, E4, E5, E6, E7, E8. The mailto link, the accordion behavior and the
|
|
||||||
page title stay unchanged.
|
|
||||||
|
|
||||||
**Not in this pass:** FAQPage JSON-LD. The page has none today; adding structured data is an SEO
|
|
||||||
change, not an objection-mining change. It should be its own reviewed edit — and E1 no longer promises
|
|
||||||
it.
|
|
||||||
|
|
||||||
**Patch artifacts:** `freno-dev/marketing/drafts/faq-page.patch`, regenerated for this revision, and
|
|
||||||
`freno-dev/marketing/drafts/positioning-privacy-withdrawal.patch` for the rule-3 strike step 3 needs
|
|
||||||
to land with it (both proposals, neither applied). The page file and `positioning.md` are untouched
|
|
||||||
until the gates below are satisfied; `faq-page.patch` re-checked against `freno-dev` master
|
|
||||||
`c1c498e` on 2026-10-29 and applies cleanly.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 7. Publish gates and sequence
|
|
||||||
|
|
||||||
| Step | Owner | Date | What settles it |
|
|
||||||
|---|---|---|---|
|
|
||||||
| 1. CTO verifies the claims and evidence pointers in E1–E8 | CTO | **done 2026-10-29** | [FRE-329](/FRE/issues/FRE-329), verdict in its `faq-verdict` document: E1/E7 verified as written, E2/E6 verified after one sentence each, E3/E4/E5/E8 corrected above, **no entry cut**. Applied in this revision. |
|
|
||||||
| 2. Human approves this revision | Sponsor | target 2026-10-31 | The draft moves from `marketing/drafts/` to `marketing/approved/`, or the confirmation card on FRE-326 is accepted. The card asks one question now — publish the eight entries with the privacy answer withdrawn — because 2b is settled. |
|
|
||||||
| 2b. Withdrawal of the false privacy answer and of `positioning.md` rule 3 | Chief of Staff | **done 2026-10-29** | [FRE-334](/FRE/issues/FRE-334) `decision`: **option A, withdraw both, one commit**, no privacy claim anywhere until FRE-333 lands and the CTO verifies it. Recorded here so the page, the rule and the card cannot disagree. |
|
|
||||||
| 3. Apply the page patch, strike rule 3 + its approved-claims row, commit on `freno-dev` | CMO | 2026-11-03 | Both patches apply together to `freno-dev` master `c1c498e` (checked 2026-10-29, in a throwaway worktree, as one change set); the diff contains only the FAQ entries, the page comment/description, the `positioning.md` rule-3 strike and the 14.2 row. **The site's suite has not been run — this host has no `bun`** — so step 3 still has to run it before the commit. One commit, so the page and the rule move together. |
|
|
||||||
| 4. Merge to `freno-dev/master` (the publish) | Sponsor or Chief of Staff | 2026-11-05 | A human merge; Vercel deploys. No agent pushes to master. |
|
|
||||||
| 5. Verify the live page | CMO | 2026-11-05 | `https://nook.freno.me/faq` returns 200 and shows the eight entries with no privacy answer; the text matches the approved draft, sentence for sentence. |
|
|
||||||
|
|
||||||
**If the CTO had rejected an entry:** cut it from the patch and ship the rest — it did not reject any.
|
|
||||||
**If the sponsor does not approve:** nothing is applied; the draft stays in `drafts/`.
|
|
||||||
**If the support mailbox becomes readable:** re-sort the register by observed asks before step 3;
|
|
||||||
the top three may change, and the page order should follow the asks, not this draft's proxy ranking.
|
|
||||||
**If a `Must be true` line stops being true** before step 3 — a fix regresses, a line moves — the
|
|
||||||
entry goes back to the CTO, not onto the page.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Appendix A — verbatim source notes
|
|
||||||
|
|
||||||
| Date | Source | Verbatim |
|
|
||||||
|---|---|---|
|
|
||||||
| 2026-10-29 | Live `/faq` | "Does The Nook read my prompts or my code?" / "Do I need a Mac with a notch?" / "How much battery does it cost?" / "What permissions does it need?" / "Why macOS 14.2 or later?" / "Does it work offline?" |
|
|
||||||
| 2026-10-29 | FRE-326 description | “does it work with Cursor?” / “what happens when my agent is idle?” |
|
|
||||||
| 2026-10-29 | [FRE-329](/FRE/issues/FRE-329) CTO verdict | “Four entries ship as written, two ship after a wording fix… two (E3, E4) currently say something false to a buyer.” Every correction in §3 is that document's own replacement sentence. |
|
|
||||||
| 2026-10-08 | NOOK-121 | "Add /faq from real objections" — shipped the six live topics; refund dropped by Mike. |
|
|
||||||
| 2026-10-20 | NOOK-643 | "agents: Cursor via hooks.json" — "No permission hook is installed, deliberately: Cursor blocks the action when a permission hook prints nothing…" |
|
|
||||||
| 2026-10-21 | NOOK-707 | "agents: Cursor desktop chats bind to the shared extension-host pid and never end" |
|
|
||||||
| 2026-10-23 | NOOK-898 | "hook: kimi payloads fail to decode, so every Kimi session stays idle" |
|
|
||||||
| 2026-10-22 | NOOK-823 | "Codex terminal: sessions become idle or disappear prematurely" |
|
|
||||||
| 2026-10-15 | NOOK-417 | "Never render plain Idle for a session whose integration is dark" |
|
|
||||||
| 2026-10-15 | NOOK-415 | "Sessions whose integration predates the bridge credential freeze as Idle forever" |
|
|
||||||
| 2026-10-21 | NOOK-733 | "codex: a non-interactive session never runs an installed hook (0.163.0)" |
|
|
||||||
| 2026-10-20 | NOOK-648 | "opencode: uninstalling a pre-package install leaves its old nook.js link dangling" |
|
|
||||||
| 2026-10-20 | NOOK-685 | "tests: InstallerTests.clineHookFiles writes through the managed TaskComplete symlink and then expects that path to survive uninstall" |
|
|
||||||
| 2026-10-15 | NOOK-418 | "security: a custom agent's install target is never shown to, or approved by, the user" |
|
|
||||||
| 2026-10-17 | NOOK-568 | "helper: launch-time re-registration tears down an approved helper and leaves it unregistered" |
|
|
||||||
| 2026-10-13 | NOOK-302 | "terminal: a tmux session shows only 'tmux', and its outer terminal comes from whoever started the tmux server" |
|
|
||||||
| 2026-10-13 | NOOK-310 | "terminal: jump and send address tmux panes on the default server, ignoring the session's tmux socket" |
|
|
||||||
| 2026-10-22 | NOOK-788 | "pane: a remote reply inside a private tmux server resolves to nothing, and a pane id can be sent without its socket" |
|
|
||||||
| 2026-10-12 | NOOK-290 | "Compact island: weather slot clips mid-glyph on non-notch displays (no text cap)" |
|
|
||||||
| 2026-10-12 | NOOK-291 | "Compact island: non-notch pill is 36 pt wider than its slot row (padding double-counted in pillWidth)" |
|
|
||||||
| 2026-10-14 | NOOK-386 | "island: hide the empty pill under the notch (or above the top edge) and keep a narrower hover trigger" |
|
|
||||||
| 2026-10-23 | NOOK-850 | "Nook: the idle app does work nothing asked for (CPU wins from a live profile)" |
|
|
||||||
| 2026-10-23 | NOOK-851 | "island: a 30 fps timeline ticks the fan icon even when the fan is idle" |
|
|
||||||
| 2026-10-23 | NOOK-877 | "island: compact Nook still costs too much CPU at rest (round two, A/B per fix)" |
|
|
||||||
| 2026-10-23 | NOOK-881 | "A macOS 14.0/14.1 Mac cannot launch the app at all: dyld dies on a strongly linked CATapDescription overlay symbol" |
|
|
||||||
| 2026-10-16 | NOOK-494 | "iOS: the main list gives no sign the phone is offline from the Mac" |
|
|
||||||
| 2026-10-20 | NOOK-682 | "licensing: a new user can be blocked at launch instead of getting the 14-day trial" |
|
|
||||||
| 2026-10-20 | NOOK-684 | "licensing: parseISO rejects the server's fractional-second trial timestamp, so an expired server trial resets to 14 days" |
|
|
||||||
| 2026-10-08 | NOOK-60 | "Capture email at trial start" |
|
|
||||||
|
|
||||||
## Appendix B — frequency method
|
|
||||||
|
|
||||||
- **Live questions:** one per entry that quotes the live page. There are six, and they are the only
|
|
||||||
questions on the page today.
|
|
||||||
- **Board questions:** the two examples in FRE-326. They are not customer quotes; they are the
|
|
||||||
board's own words for the purchase-blocking objections this issue was created to answer.
|
|
||||||
- **Report counts:** the number of distinct NOOK issues I read whose subject or resolution directly
|
|
||||||
produced the objection, listed by identifier and date in §2 and Appendix A. I did not use a raw
|
|
||||||
keyword count: "agent" appears in 344 issues and "privacy" in 177, which says nothing about what
|
|
||||||
buyers ask. The counts are deliberately small and inspectable.
|
|
||||||
- **No ask frequency, no percentages.** The first thing a real support corpus changes is the order,
|
|
||||||
not the wording.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
*Draft ends. Nothing here is published. The page file stays unchanged until the sponsor approves this
|
|
||||||
revision and a human merges it.*
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
diff --git a/src/routes/nook/faq.tsx b/src/routes/nook/faq.tsx
|
|
||||||
index 03d135a..bc3adef 100644
|
|
||||||
--- a/src/routes/nook/faq.tsx
|
|
||||||
+++ b/src/routes/nook/faq.tsx
|
|
||||||
@@ -1,8 +1,7 @@
|
|
||||||
/**
|
|
||||||
* `/faq` on the Nook subdomain — answers to the objections that actually
|
|
||||||
- * stop a purchase. Privacy scoping follows marketing/positioning.md rule 3:
|
|
||||||
- * "no prompt or code content leaves the device" (telemetry and the trial
|
|
||||||
- * email do leave — never claim "no data leaves the device").
|
|
||||||
+ * stop a purchase. Privacy is deliberately absent until the egress
|
|
||||||
+ * inventory and /privacy make an honest answer possible.
|
|
||||||
*/
|
|
||||||
import { For } from "solid-js";
|
|
||||||
import { createSignal, Show } from "solid-js";
|
|
||||||
@@ -17,34 +16,46 @@ interface FaqEntry {
|
|
||||||
|
|
||||||
const FAQ: FaqEntry[] = [
|
|
||||||
{
|
|
||||||
- question: "Does The Nook read my prompts or my code?",
|
|
||||||
+ question:
|
|
||||||
+ "Does it work with my agent — and can I approve from the notch, or only watch?",
|
|
||||||
answer:
|
|
||||||
- "No. The hooks and plugins that connect your agents to The Nook send session metadata only — which agent is running, which session, which event happened, which terminal it lives in. No prompt text and no code content leaves your device. Two things do leave the device, and we'd rather say so plainly: anonymous usage telemetry, and your email address if you choose to give it at trial start. That's the whole list."
|
|
||||||
+ "It depends on the agent, and Cursor is the useful example. Cursor is watched, not gated: its sessions, finished turns and errors appear in the island, but when Cursor asks for permission the prompt stays in Cursor. That is deliberate — Cursor blocks the action when a permission hook runs and prints nothing, so gating it would override Cursor's own prompts. Other agents do hand the decision to The Nook, so a tool call waits and you tap Allow or Deny from the card. One limit: cursor-agent -p one-shot runs send no turn end, so they appear but do not get a completion card."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- question: "Do I need a Mac with a notch?",
|
|
||||||
+ question: "What happens when my agent is idle?",
|
|
||||||
answer:
|
|
||||||
- "No. On a notched MacBook the island sits in the notch. On machines and displays without one, it anchors to the display your cursor is on, so a desktop setup with external monitors gets the same treatment. Everything inside the island — agent cards, fan control, the stats strip — works identically either way."
|
|
||||||
+ "Idle means the last turn is over, or the session has not produced anything yet — not that the process is gone. A running process is liveness, not work: a just-opened agent window can show idle until you type. When an agent finishes a turn with a final message, the row stays green for ten minutes, then goes gray. A stale row is different: it means The Nook's integration cannot report for that session, and the row says so instead of pretending it is idle. Nothing is lost when a row goes idle — the next prompt brings it back and flips it to running. The row itself leaves the island 15 minutes after the turn (5 if the turn ended without a reply), so a long-quiet session reappears on its next event instead of sitting there. If a session that is obviously working says idle, that is a bug; tell us."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- question: "How much battery does it cost?",
|
|
||||||
+ question:
|
|
||||||
+ "What permissions does it need — and what does it write into my agent's config?",
|
|
||||||
+ answer:
|
|
||||||
+ "The app itself runs unprivileged. Fan control and charge limiting go through a small helper that macOS requires to run as root for hardware access; the app registers it on first use and takes you to System Settings › General › Login Items & Extensions, where you switch it on once. For each agent it adds what that agent needs — a hook group per event it listens to, or one plugin link — inside the agent's own config file or directory. It keeps its own files under ~/.nook — the hook binary and one plugin copy per agent — and adds only its own entries to that agent's config. A hook entry you added yourself in the same file survives install and uninstall, and it only touches the records and switches it created. Uninstall removes exactly what it wrote — and switches off what it turned on — with no leftover links or orphaned files."
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ question: "Does it work with my terminal, including tmux?",
|
|
||||||
answer:
|
|
||||||
- "The Nook is a small native UI, not a background agent — it watches the agents you're already running; it doesn't run anything itself. The heaviest thing it does is read and write your Mac's fan and charging controllers, which is a lightweight sensor read. If you're running enough coding agents to need it, those agents dwarf the app's own draw."
|
|
||||||
+ "Yes — it recognises Terminal.app, iTerm2, Warp, Ghostty, kitty, WezTerm and tmux. Four of those take a typed reply; the rest are watched. A session is tied to the terminal that started it. Jump lands in the right window for Terminal.app, iTerm2, kitty and any tmux pane — in tmux, the right pane; on Warp, WezTerm and Ghostty it brings the app forward instead. Replies type straight back into Terminal.app, iTerm2, kitty and any tmux pane; on Warp, WezTerm and Ghostty you answer in the app's own window, and Alacritty takes no typed reply from another app at all."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- question: "What permissions does it need?",
|
|
||||||
+ question: "Do I need a Mac with a notch?",
|
|
||||||
+ answer:
|
|
||||||
+ "No. On a notched MacBook the island sits in the notch. On machines and displays without one, it sits at the top centre of the display — the same pill with the same slots. You get one island on every display it is turned on for (all connected displays on first launch), each anchored to the top of its own screen; Settings › Displays trims that list, and the pointer only decides which display's floating controls are live. Everything inside the island — agent cards, fan control, the stats strip — works identically either way."
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ question: "How much battery does it cost?",
|
|
||||||
answer:
|
|
||||||
- "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."
|
|
||||||
+ "It is a native app, not a background agent. It watches the agents you already run and never runs them in the background, so their draw is the number that matters. We do not have a published battery measurement for The Nook alone; when we do, it will be a measurement, not an estimate. If it costs more than it should on your Mac, that is a bug — tell us."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
question: "Why macOS 14.2 or later?",
|
|
||||||
answer:
|
|
||||||
- "The audio mixer listens to each app's own sound stream, and Apple only shipped that API in macOS 14.2 (Sonoma)."
|
|
||||||
+ "The audio mixer listens to each app's own sound stream, and Apple only shipped that API in macOS 14.2 (Sonoma). The app links against it, so 14.0 and 14.1 cannot launch it."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
question: "Does it work offline?",
|
|
||||||
answer:
|
|
||||||
- "Yes. Everything The Nook does — the agent grid, permission cards, fan and thermal control — works with no network at all, and your agents' hooks talk to the app over a local socket. The network is only used for update checks, license activation, and the optional trial email."
|
|
||||||
+ "The Mac app does. The island, agent cards, permission cards and fan control work with no network; the hooks talk to the app over a local socket. The network is used for update checks, licence activation, crash reports and the optional trial email, plus a few things only when you use them: weather (asked for through our relay, with the location you chose), the network panel's IP-and-ISP lookup, the speed test, the changelog in Settings, and a bug report if you send one. The phone link is the exception: when you are away from your Mac, the phone reaches it through our relay, so that part needs a connection."
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
@@ -56,7 +67,7 @@ export default function NookFaqPage() {
|
|
||||||
<EdgeCacheHeaders maxAge={300} />
|
|
||||||
<PageHead
|
|
||||||
title="Frequently asked questions"
|
|
||||||
- description="Does The Nook read your prompts? Do you need a notch? Battery cost, permissions, the macOS 14.2 requirement, offline use — answered straight."
|
|
||||||
+ description="Which agents can you approve from the notch? What does idle mean? Terminal and tmux support, permissions, the macOS 14.2 requirement, offline use — answered straight."
|
|
||||||
ogTitle="The Nook — FAQ"
|
|
||||||
/>
|
|
||||||
<SubdomainHeader />
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
diff --git a/marketing/positioning.md b/marketing/positioning.md
|
|
||||||
index 1bc4973..26d6b04 100644
|
|
||||||
--- a/marketing/positioning.md
|
|
||||||
+++ b/marketing/positioning.md
|
|
||||||
@@ -53,13 +53,20 @@ pages, marketing copy, comparison tables, meta descriptions, emails, FAQs, all o
|
|
||||||
Copy that says "13 agents" or "no data leaves the device" must have a test backing it.
|
|
||||||
If a claim cannot be pointed at code or a test, it does not go in copy.
|
|
||||||
|
|
||||||
-### 3. Honest privacy scoping
|
|
||||||
+### 3. No privacy claim until the egress inventory exists (withdrawn 2026-10-29)
|
|
||||||
|
|
||||||
-Telemetry and the trial email **do** leave the device. The defensible claim is:
|
|
||||||
+The claim that stood here — "No prompt or code content leaves the device" — is **false at HEAD**
|
|
||||||
+and must not be restated in any copy until it is verified and replaced. It was backed by an
|
|
||||||
+argument about envelope metadata, which says nothing about what leaves the machine. Three things
|
|
||||||
+at HEAD contradict it: crash reporting initialises with `sendDefaultPii = true`; the licence call
|
|
||||||
+sends the hardware UUID and the device name; the phone relay carries sealed prompt and reply
|
|
||||||
+payloads. `/privacy` names the hardware UUID and the device name and says nothing about crash
|
|
||||||
+reporting with PII or about the relay.
|
|
||||||
|
|
||||||
-> **No prompt or code content leaves the device.**
|
|
||||||
-
|
|
||||||
-Never "no data leaves the device".
|
|
||||||
+So: write **no** privacy claim at all — not softened, not partial. "Telemetry and the trial email
|
|
||||||
+do leave the device" is true and insufficient; it is not a substitute. The replacement goes in
|
|
||||||
+only after FRE-333 lands an egress inventory and `/privacy` text that match what the app does.
|
|
||||||
+See FRE-326 (the `/faq` withdrawal) and FRE-333 (the inventory).
|
|
||||||
|
|
||||||
### 4. Sell what works today
|
|
||||||
|
|
||||||
@@ -87,8 +94,7 @@ nothing posts itself.
|
|
||||||
| Permission gate answered from a card | awaitPolicyTable + bridge directive path (`hook/normalize.go`, `serialize.go`) |
|
|
||||||
| Fan / thermal / charge control | `helper/` (privileged helper, SMC, no kext) |
|
|
||||||
| One-time purchase, no subscription | $10 → $15 at 1.0; Stripe checkout |
|
|
||||||
-| macOS 14+ | 27 source files use the `@Observable` framework |
|
|
||||||
-| No prompt or code content leaves the device | envelope carries session/event/terminal metadata only (see `docs/agent-interface.md`) |
|
|
||||||
+| macOS 14.2+ | the CoreAudio overlay symbol the mixer uses only exists from 14.2 (NOOK-881) |
|
|
||||||
|
|
||||||
## Held claims (not publishable)
|
|
||||||
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
# `/privacy` — replacement copy, FRE-354 corrections applied 2026-11-04
|
|
||||||
|
|
||||||
**Status:** applied on branch `faq/from-objections-2026-10-29` (commit after `bb6cf27`), per the CTO's FRE-354 verdict — "apply the corrections above and the page is signed." The two copy decisions the verdict delegated to the CMO are taken: the **fuller iPhone paragraph** (its push-token evidence row is recorded in the evidence table below and routed to FRE-333's owner to append to the signed inventory), and the **full (c) block with the LAN/tailnet sentence**, which pulls the corresponding Section 3 clause in. Nothing here is published; the sponsor's merge + push on card [`392a8465`](/FRE/issues/FRE-326#interaction-392a8465) is still the deploy step.
|
|
||||||
**Sequencing fact, updated 2026-11-06:** the contingency has **fired**. `v0.15.1` (tagged 2026-11-04, first tag containing FRE-355's merge `6e74b261`) and `v0.15.2` are live on the appcast (`freno.me/api/TheNook/appcast.xml`, newest item 0.15.2). Shipped behaviour when enabled: crash/error reports, session pings (`enableAutoSessionTracking` untouched), traces at 0.1, and **Sentry also receives the connection's IP address** (`sendDefaultPii = false` is the SDK default and does not suppress it; only the Sentry project's *Prevent Storing of IP Addresses* switch does — FRE-1480). Paragraph (b) and the iPhone paragraph are therefore swapped to the opt-in form in this commit, with two corrections against the pre-written swap text: pings and traces are named (the contingency's own completeness warning), and the IP sentence is kept. Releases 0.3.0 through 0.15.0 started Sentry on every launch with no off switch; the page describes the current release.
|
|
||||||
**Patch:** `marketing/drafts/privacy-page.patch` — applies cleanly to `c1c498e` (`git apply --check`, verified 2026-10-29; parse-checked with esbuild, not the site suite).
|
|
||||||
**Evidence base:** [FRE-333 `egress-inventory`](/FRE/issues/FRE-333#document-egress-inventory) rev 1, eleven destinations, file:line per row, read at `The-Nook` `3c3ba7ee`; and the same document's §G, which proposed a page text. This patch is the §G text **corrected against the inventory** — the differences are listed below, each with the row that forces it.
|
|
||||||
**Why this exists:** [FRE-326](/FRE/issues/FRE-326) + [FRE-334](/FRE/issues/FRE-334#document-decision) recorded option A — the privacy claim is withdrawn everywhere, and no privacy claim returns until the inventory exists, `/privacy` matches it, the CTO verifies both, and the sponsor approves the replacement copy. The inventory landed on 2026-10-29. This is the page half.
|
|
||||||
|
|
||||||
| Field | Value |
|
|
||||||
|---|---|
|
|
||||||
| Claim this page carries | None. It is a disclosure page, not a claim: it states what the app sends and what it does not. The one favourable sentence is (j), which is the CTO's FRE-322 §2 code fact and which he may still decline. |
|
|
||||||
| Audience | Someone deciding whether to pay $10 for a tool that reads their prompts. They read this page *before* the FAQ. |
|
|
||||||
| Channel | `nook.freno.me/privacy`, one page |
|
|
||||||
| Owner | CMO (copy + commit), CTO (verification), sponsor (approval of the replacement copy), Chief of Staff (publish switch) |
|
|
||||||
| Date | Prepared 2026-10-29. Applied 2026-11-04 on the branch with the FRE-354 corrections; the contingency (b)/iPhone swap applied 2026-11-06. `Last Updated` on the page now reads November 6, 2026 — re-check it against the actual deploy date at push. Not a public date. |
|
|
||||||
| What has to be true before it ships | 1) CTO signs the page against `The-Nook` HEAD, paragraph by paragraph — [FRE-354](/FRE/issues/FRE-354), due 2026-11-02. 2) Sponsor accepts the replacement copy. 3) The Sentry paragraph matches the build being deployed — see *Contingency*. 4) It deploys in the same push as the FAQ withdrawal; a page that discloses Sentry next to a FAQ that still says "anonymous usage telemetry" is worse than either alone. |
|
|
||||||
|
|
||||||
## What changed against the live page
|
|
||||||
|
|
||||||
The live page (fetched 2026-10-29T09:2xZ and again 09:4xZ, HTTP 200, `Last Updated: August 26, 2026`, unchanged) says the app "runs locally on your device and sends only the minimal data required for trial and licensing" and lists four things. Against the inventory that is wrong in two directions: it **omits** Sentry (crash reports with IP address, every launch, no off switch), the relay and its install ID, the licence key crossing to the relay, sealed phone payloads, weather coordinates going to the relay *and* to Apple, the GeoIP third parties, the speed test, the changelog fetch, bug-report contents and update checks. It also calls the hardware UUID "masked", which the code contradicts — it sends the raw `IOPlatformUUID`.
|
|
||||||
|
|
||||||
The replacement is organised by *connection*, not by *data type*, because that is how a reader checks it: eleven rows in the inventory, ten of them reachable from the page, one (Sentry) prominent because it is the only one a reader can turn off entirely and still miss in older builds. On the current Mac release (`v0.15.1`+) it is opt-in and off by default; the iPhone build in TestFlight (`ios-v0.3.2`, 2026-10-22) predates it. See *Contingency*.
|
|
||||||
|
|
||||||
## Differences from FRE-333 §G, and what forces each
|
|
||||||
|
|
||||||
§G is the Security Engineer's proposed text; this patch is that text corrected against §G's own inventory. Six deliberate differences, none of them stylistic:
|
|
||||||
|
|
||||||
| # | §G says | This patch says | Why |
|
|
||||||
|---|---|---|---|
|
|
||||||
| 1 | Opening: "processed on your device and are never sent to us" | Opening drops "never sent to us"; (c) and (j) state the two paths agent data does take | Sealed frames still transit our relay (§A.5, §B), and a remote machine carries them by design (§C). §G's own §B says the relay routes them. "Never sent to us" is the class of sentence that got the FAQ answer withdrawn. |
|
|
||||||
| 2 | (d) Weather: relay registration implied only with Phone | (d) adds that Weather registers **even with Phone off, and on a licensed Mac that registration presents the license key** | §A.3 + §D.2. `SidecarController.weather()` routes through the same `keystore.relayCredential(licenseKey:)` as the phone path (`SidecarController.swift:269-279`, `SidecarRelayAPI.swift:298-312`). §G under-disclosed it. |
|
|
||||||
| 3 | (a) trial/activate/status only | (a) adds `/deactivate` (key + UUID) and the trial email (email + UUID, sent once) | §A.2, `/D.4`. §G omitted both endpoints. |
|
|
||||||
| 4 | (i) "The email you give at trial start or checkout delivers your license key" | (i) checkout delivers the key; a trial email is one reminder before the trial ends | `LicenseService.submitTrialEmail` + `OnboardingExtrasStep` say the trial email is an expiry reminder; the key is issued at purchase. §G's sentence promised a key that the trial email does not deliver. |
|
|
||||||
| 5 | (b) Sentry: opt-in, "off unless you turn it on" | (b) is the opt-in form, applied 2026-11-06: off unless enabled in Settings, and it names session pings and the trace sample; **the IP sentence, kept** | The contingency fired with `v0.15.1`. Corrections against the pre-written swap text: pings/traces named because they still flow when enabled; IP kept because `sendDefaultPii = false` does not stop Sentry receiving the connection IP (FRE-1480); the Contingency text already said so. |
|
|
||||||
| 6 | No (j) | (j) carries the CTO's FRE-322 §2 code fact, with the remote-machine exception | Not required for truth; it is the one favourable sentence, and the CTO may decline it. Delete the block if he does. |
|
|
||||||
|
|
||||||
Two facts the inventory corrected and the page does not repeat wrongly: Sparkle's automatic checks are **off by default** here (`UpdateManager` owns the schedule; FRE-322 §2.4 said "on by default" and is stale on this row), and the UUID is **raw, not masked**.
|
|
||||||
|
|
||||||
## Paragraph-level evidence
|
|
||||||
|
|
||||||
| Paragraph | What it now says | Evidence at `3c3ba7ee` |
|
|
||||||
|---|---|---|
|
|
||||||
| (a) Licensing/trial | raw UUID + device name; every launch while trialing; key-only once licensed; deactivate sends key + UUID; trial email sends email + UUID once; trial/status fail open, activation needs a connection once | `LicenseService.swift:300-313` (`/trial`), `:271-284` (`/status`), `:247-262` (`/activate`), `:286-302` (`/deactivate`), `:219-231` (`/trial-email`) |
|
|
||||||
| (b) Crash reporting | opt-in, **off by default**; when enabled: crash/error reports, session pings, traces at 0.1; **Sentry also receives the IP address** (`Options.swift:267-275` at 9.26.1: `sendDefaultPii = false` is the default and does not suppress it); no prompts or code | `Sources/NookApp/main.swift` `startIfEnabled` — `sendDefaultPii = false` (`policy.sendDefaultPii`), `tracesSampleRate = 0.1` while on (`CrashReporting.onTracesSampleRate`); `CrashReporting.registerDefaults` pins `enabledKey: false`; evidence read 2026-11-06, IP row per FRE-1480 |
|
|
||||||
| (c) Phone relay | off by default; relay is the default path, LAN/tailnet direct pairing available; install ID + license key at registration; sealed payloads; relay sees device IDs/names/platforms, timing and volume, not content | `SidecarRelayAPI.swift:144-153`, `SidecarPayload.swift:484-490`, `RemoteEndpoint.swift:14-24`, `docs/sidecar-frames.md` (sealing), inventory §B |
|
|
||||||
| (d) Weather | 0.1° grid snapped **on the Mac**; registers with the relay even with the phone off, licence key included on a licensed Mac; Apple sees place lookups and position | `WeatherForecast.swift:25-30`, `SidecarController.swift:269-279`, `SidecarRelayAPI.swift:298-312`, `WeatherLocation.swift:14-77`, `:89-143` |
|
|
||||||
| (e) Network panel | third-party IP lookup sees your IP; speed test uploads zeros only | `NetworkInfoService.swift:82,276`, `SpeedTest.swift:10-11,36` |
|
|
||||||
| (f) Update checks | ship **off**; turning them on fetches `freno.me`, app version + IP | `UpdateManager.swift:48-55` (`automaticallyChecksForUpdates = false`, default key false) |
|
|
||||||
| (g) Changelog | fetches release notes from `freno.me` | `ChangelogRelease.swift:75-78` |
|
|
||||||
| (h) Bug reports | user-sent only; machine snapshot listed in full | `BugReportClient.swift:44-94`, `BugReportSnapshot.swift:17-36` |
|
|
||||||
| (i) Email/payment | checkout email delivers the key; trial email is a reminder; Stripe | `LicenseService.swift:219-231`, `OnboardingExtrasStep.swift:86-110` |
|
|
||||||
| (j) What does not leave your Mac | hook and bridge are not a cloud service; helper has no networking; two paths carry agent data across the network, both user-switched: remote machines over SSH or the tailnet, and the sealed phone relay | `hook/transport.go:143` (`resolveBridge`), `BridgeBindPlan.swift:9-23`, `RemoteEndpoint.swift:14-24`, inventory §B + §C |
|
|
||||||
| iPhone companion (TestFlight beta) | the TestFlight build (`ios-v0.3.2` = `2e322da5`, 2026-10-22) predates FRE-355: unconditional start, `sendDefaultPii = true`, traces 1.0, no off switch (`ios/AgentNookMobile/App.swift:13-20`); the opt-in code exists at `v0.15.2` but no `ios-v*` tag carries it; other traffic is the phone connection in (c) plus the APNs push token given to the relay | `RelayLink.pair` `RelayLink.swift:104-118`, `updatePushToken` `:226-232` — row added per FRE-354, TestFlight provenance per FRE-1480; append to the FRE-333 inventory |
|
|
||||||
|
|
||||||
## Contingency — the Sentry paragraph is the only one that moves
|
|
||||||
|
|
||||||
**FIRED 2026-11-06 — applied on the branch.** `v0.15.1` is the first release containing FRE-355 and is live on the appcast. The swap below was applied with the corrections recorded in the sequencing paragraph at the top of this document (pings and traces named; IP sentence kept — the pre-written text below had it, and dropping it was wrong; FRE-1480). The original text is kept for the record:
|
|
||||||
|
|
||||||
(b) as committed describes today's build. The inventory's recommendation (§E.1) is an opt-in setting, default off, dropping `sendDefaultPii` and cutting `tracesSampleRate`, on Mac **and** iOS. If that ships, (b) is replaced in the same commit that changes the behaviour:
|
|
||||||
|
|
||||||
> **(b) Crash and error reporting — off unless you turn it on.** If you enable crash reporting in Settings, The Nook sends crash and error reports to Sentry, our crash-reporting processor. Reports include the app version, macOS version, Mac model and what the app was doing when it failed, and Sentry also receives your IP address. They never include your prompts or code.
|
|
||||||
|
|
||||||
**Sequence call, and who owns it.** Shipping (b)-with-no-off-switch is honest, but it puts "no off switch" in front of a buyer during launch week. The better order is the build change first, then this page — that is a build/priority call, not mine: it is proposed on the board as [FRE-355](/FRE/issues/FRE-355) (Senior Engineer, date proposed 2026-11-06, CTO to confirm), and if the CTO says the build change cannot land before the page, the page ships with today's text. Publishing the truthful-today version is never *blocked* by that choice; the *preferred* order is the other way.
|
|
||||||
|
|
||||||
**This is why (b) must not be softened on the way out.** If the opt-in setting ships but `tracesSampleRate` or session tracking stays on, (b)'s opt-in form is incomplete again — it names only "crash and error reports" while performance traces and session pings still flow. The paragraph and the build change move together or neither does. (FRE-354 rewrote this warning: the original named a macOS username that sentry-cocoa never sends.)
|
|
||||||
|
|
||||||
## If the CTO declines paragraph (j)
|
|
||||||
|
|
||||||
(j) is the only favourable sentence on the page and the only one carrying a CTO verdict rather than an inventory row. It is [FRE-322 §2](/FRE/issues/FRE-322#document-verdict) — *"verified as a code fact, not publishable yet… publishing it before the disclosure work lands would put a true sentence next to false ones."* The disclosure work is this page. If the CTO still declines it, delete the whole (j) block; nothing else on the page depends on it, and the page stays complete and true.
|
|
||||||
|
|
||||||
## Open questions for the CTO's read
|
|
||||||
|
|
||||||
1. **The iOS app.** §D.10: the iOS target starts the same Sentry DSN with the same `sendDefaultPii` (`ios/AgentNookMobile/App.swift:12-20`). This page says "runs on your Mac". Is any iOS build in users' hands? If yes, the page needs one sentence (or the build needs the same opt-in); if no, say so and the page stays Mac-only.
|
|
||||||
2. **Weather registration without a licence key.** §E.3 suggests decoupling weather registration from the licence key. If that ships before the page, (d) loses its licence-key clause; if after, the page is true today.
|
|
||||||
3. **(j)** — publish, or cut.
|
|
||||||
|
|
||||||
## Apply checklist — what the apply commit must do, in order
|
|
||||||
|
|
||||||
1. Re-read the live page and the inventory's HEAD; if either moved, re-derive (a)–(j) before applying. The inventory is pinned to `3c3ba7ee`.
|
|
||||||
2. Bump `Last Updated` to the **deploy** date — the patch carries 2026-10-29 as prepared, and that line is the one place the date must change at apply.
|
|
||||||
3. If the Sentry opt-in build change is in the same release, swap (b) for the *Contingency* paragraph — one hunk.
|
|
||||||
4. Apply `privacy-page.patch` and the FRE-326 `faq-page.patch` + `positioning-privacy-withdrawal.patch` in the **same** commit, so no page states the old claim while another corrects it.
|
|
||||||
5. Run the site's suite — `bun test` — which this host cannot do (no `bun`; `node_modules` present, `package.json` test script is `bun test`). A parse/transpile check with esbuild is **not** that suite and must not be recorded as one.
|
|
||||||
|
|
||||||
## Rules this page obeys
|
|
||||||
|
|
||||||
- No competitor named (category nouns only, and none needed here).
|
|
||||||
- No claim without a row in the inventory. Where the inventory has no row, the page says nothing.
|
|
||||||
- No roadmap promise: the page never says a feature or fix is "coming", so the Sentry paragraph does not promise an off switch.
|
|
||||||
- No price, no discount, no date, no launch language.
|
|
||||||
- It is a correction of an existing page, not new marketing; nothing was added to sell anything.
|
|
||||||
- It does not add a `/faq` privacy answer. That answer's return is gated separately ([FRE-326](/FRE/issues/FRE-326) `privacy-return-path`).
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
diff --git a/src/routes/nook/privacy.tsx b/src/routes/nook/privacy.tsx
|
|
||||||
index da0cc1d..db27d8c 100644
|
|
||||||
--- a/src/routes/nook/privacy.tsx
|
|
||||||
+++ b/src/routes/nook/privacy.tsx
|
|
||||||
@@ -1,9 +1,38 @@
|
|
||||||
/**
|
|
||||||
* The Nook privacy policy — `nook.freno.me/privacy`.
|
|
||||||
*
|
|
||||||
- * Reflects the actual data The Nook sends when licensing: a masked hardware
|
|
||||||
- * UUID + device name for trial/activation limits, the email used for purchase,
|
|
||||||
- * and Stripe payment processing.
|
|
||||||
+ * Every statement on this page is traced to the egress inventory at
|
|
||||||
+ * `The-Nook` HEAD (FRE-333, `document-egress-inventory`): eleven internet
|
|
||||||
+ * destinations, file:line evidence per row. When the app's egress changes,
|
|
||||||
+ * this page changes in the same commit — not later.
|
|
||||||
+ *
|
|
||||||
+ * The crash-reporting paragraphs ((b) and the iPhone companion) describe the
|
|
||||||
+ * build users run today: crash reporting is opt-in, off by default, on
|
|
||||||
+ * releases v0.15.1 and later — FRE-355 (merge `6e74b261`) first shipped in
|
|
||||||
+ * `v0.15.1` (2026-11-04), and the live appcast serves `v0.15.2`. When enabled,
|
|
||||||
+ * Sentry receives crash and error reports, session pings, and performance
|
|
||||||
+ * traces at a 0.1 sample rate (`tracesSampleRate = 0.1`), and it also receives
|
|
||||||
+ * the connection's IP address (`sendDefaultPii = false` is the SDK default and
|
|
||||||
+ * does not suppress it — sentry-cocoa 9.26.1 sets `infer_ip = auto` for Cocoa,
|
|
||||||
+ * and only the Sentry project's *Prevent Storing of IP Addresses* switch stops
|
|
||||||
+ * that; FRE-1480). Releases 0.3.0 through 0.15.0 started Sentry on every
|
|
||||||
+ * launch with `sendDefaultPii = true` and no off switch; this page describes
|
|
||||||
+ * the current release. The iPhone paragraph describes `ios-v0.3.2`
|
|
||||||
+ * (2026-10-22, the build in TestFlight) until an `ios-v*` tag carries
|
|
||||||
+ * FRE-355's opt-in code.
|
|
||||||
+ *
|
|
||||||
+ * The *Contingency* in `marketing/drafts/privacy-page.md` fired with `v0.15.1`
|
|
||||||
+ * and is applied in this commit, with two corrections against the pre-written
|
|
||||||
+ * swap text: the shipped build still sends session pings and traces while
|
|
||||||
+ * enabled, so they are named (the contingency's own completeness warning), and
|
|
||||||
+ * the IP sentence is kept — the pre-written swap text already had it, and
|
|
||||||
+ * `sendDefaultPii = false` does not stop Sentry receiving the IP (FRE-1480).
|
|
||||||
+ *
|
|
||||||
+ * Corrected against the CTO's /privacy verdict (FRE-354): no macOS username
|
|
||||||
+ * from Sentry (sendDefaultPii sets the IP only), session pings named, (a)
|
|
||||||
+ * fail-open scoped, (c) relay-path qualified with the direct-pair sentence,
|
|
||||||
+ * (j) "not a cloud service" with the tailnet path, the iPhone paragraph added
|
|
||||||
+ * (TestFlight beta is in users' hands), and section 3 says "content".
|
|
||||||
*/
|
|
||||||
import { buildMainSiteUrl } from "~/lib/subdomain-url";
|
|
||||||
import { PageHead } from "~/components/PageHead";
|
|
||||||
@@ -21,39 +50,139 @@ export default function NookPrivacyPolicy() {
|
|
||||||
<SubdomainHeader />
|
|
||||||
<div class="min-h-screen px-[8vw] py-[10vh]">
|
|
||||||
<div class="py-4 text-xl">The Nook's Privacy Policy</div>
|
|
||||||
- <div class="py-2">Last Updated: August 26, 2026</div>
|
|
||||||
+ <div class="py-2">Last Updated: November 6, 2026</div>
|
|
||||||
<div class="py-2">
|
|
||||||
- Welcome to The Nook ('We', 'Us', 'Our').
|
|
||||||
- Your privacy is important to us. This policy explains what we collect,
|
|
||||||
- why, and how it is handled. The app itself runs locally on your device
|
|
||||||
- and sends only the minimal data required for trial and licensing.
|
|
||||||
+ The Nook runs on your Mac, and the iPhone and Apple Watch companion
|
|
||||||
+ is in TestFlight beta. Your prompts, your code and your agent
|
|
||||||
+ sessions are processed on your own devices. This page lists every
|
|
||||||
+ connection the apps make over the internet — and the local-network
|
|
||||||
+ and tailnet paths the phone can use — what each one sends, and
|
|
||||||
+ whether you can turn it off.
|
|
||||||
</div>
|
|
||||||
<ol>
|
|
||||||
<div class="py-2">
|
|
||||||
<div class="pb-2 text-lg">
|
|
||||||
- <span class="-ml-4 pr-2">1.</span> Data We Collect
|
|
||||||
+ <span class="-ml-4 pr-2">1.</span> What leaves your devices
|
|
||||||
</div>
|
|
||||||
<div class="pl-4">
|
|
||||||
<div class="pb-2">
|
|
||||||
- <div class="-ml-6">(a) Device hardware UUID:</div> When you start
|
|
||||||
- a trial or activate a license, The Nook sends a hardware UUID
|
|
||||||
- from your Mac. It is used solely to enforce the 14-day trial and
|
|
||||||
- the 3-device activation limit, and to prevent resetting the
|
|
||||||
- trial by reinstalling the app.
|
|
||||||
+ <div class="-ml-6">(a) Licensing and trial:</div> When you start
|
|
||||||
+ a trial or activate a license, The Nook sends your Mac's
|
|
||||||
+ hardware UUID and device name to our licensing server
|
|
||||||
+ (freno.me). The UUID enforces the 14-day trial and the 3-device
|
|
||||||
+ activation limit and stops a trial being reset by reinstalling
|
|
||||||
+ the app; the device name is stored with the activation so the
|
|
||||||
+ Mac can be identified in your license records. While you are on
|
|
||||||
+ the trial, this is sent at each launch. Once you are licensed,
|
|
||||||
+ each launch re-checks only that your key has not been revoked.
|
|
||||||
+ Deactivating a Mac sends the license key and that Mac's
|
|
||||||
+ UUID. If you add an email during the trial, that request
|
|
||||||
+ carries the email and the UUID, and it is sent once. The trial
|
|
||||||
+ and status checks fail open: with no connection, an unexpired
|
|
||||||
+ trial or a stored license keeps working, because license
|
|
||||||
+ verification itself is offline. Activating a new license needs
|
|
||||||
+ a connection once.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(b) Crash and error reporting — off unless
|
|
||||||
+ you turn it on:</div> Crash reporting is off by default and
|
|
||||||
+ runs only if you enable it in Settings. When it is on, The Nook
|
|
||||||
+ sends crash reports, error events, hang reports, session pings,
|
|
||||||
+ and a sample of performance traces to Sentry, our
|
|
||||||
+ crash-reporting processor. Each report carries the app version,
|
|
||||||
+ the macOS version, the Mac model and what the app was doing
|
|
||||||
+ when it failed. Sentry also receives your IP address. They
|
|
||||||
+ never include your prompts, your code or your session content.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(c) Phone connection:</div> The phone
|
|
||||||
+ connection ships off and is yours to enable. With the default
|
|
||||||
+ relay path, turning it on registers your Mac with our relay
|
|
||||||
+ (nook-relay.freno.me) using a random install ID, and a licensed
|
|
||||||
+ Mac presents its license key once at registration. Everything
|
|
||||||
+ your Mac and your phone then exchange — session updates,
|
|
||||||
+ approvals, replies — is encrypted end-to-end: the relay routes
|
|
||||||
+ it and cannot read it. On the relay path, the relay can see
|
|
||||||
+ which devices are connected — their IDs, names and platforms —
|
|
||||||
+ when, and how much traffic they exchange.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ You can also pair over your LAN or tailnet instead; those paths
|
|
||||||
+ carry the same sealed traffic and do not use the relay.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(d) Weather:</div> If you add the Weather
|
|
||||||
+ module, your Mac asks our relay for forecasts using coordinates
|
|
||||||
+ rounded to a 0.1° grid — about 11 km — and the rounding happens
|
|
||||||
+ on your Mac before anything is sent. The Weather module
|
|
||||||
+ registers with the relay for this even if you never turn on the
|
|
||||||
+ phone connection, and on a licensed Mac that registration
|
|
||||||
+ presents the license key, exactly as the phone connection's
|
|
||||||
+ does. "My Location" asks macOS for your
|
|
||||||
+ approximate position, and naming or searching for a place uses
|
|
||||||
+ Apple's Maps service, so Apple sees those lookups. Neither
|
|
||||||
+ feature sends us your precise location.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(e) The Network panel:</div> While the
|
|
||||||
+ Network panel's connection section is on screen, The Nook
|
|
||||||
+ asks a third-party IP-lookup service (get.geojs.io, with
|
|
||||||
+ ipwho.is as backup) what your public IP address and provider
|
|
||||||
+ are — that is how the panel can show them to you. Those services
|
|
||||||
+ necessarily see your IP address. The speed-test button measures
|
|
||||||
+ against Cloudflare's public speed endpoint and uploads only
|
|
||||||
+ zeros, never your data.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(f) Update checks:</div> Automatic update
|
|
||||||
+ checks ship off. If you turn them on, or press "Check for
|
|
||||||
+ Updates", The Nook fetches the update feed from freno.me
|
|
||||||
+ and the request carries your app version. Like every request on
|
|
||||||
+ this page, it also arrives from your IP address.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(g) Changelog:</div> Opening Settings ›
|
|
||||||
+ Changelog fetches the release notes from freno.me.
|
|
||||||
+ </div>
|
|
||||||
+ <div class="pb-2">
|
|
||||||
+ <div class="-ml-6">(h) Bug reports:</div> only what you choose
|
|
||||||
+ to send. If you write a bug report, you decide what it says.
|
|
||||||
+ Bug reports also include a machine snapshot — macOS version, Mac
|
|
||||||
+ model, CPU, memory, free disk, locale, and your displays'
|
|
||||||
+ names and resolutions — so the problem can be reproduced. The
|
|
||||||
+ optional contact email is used only to reply to you.
|
|
||||||
</div>
|
|
||||||
<div class="pb-2">
|
|
||||||
- <div class="-ml-6">(b) Device name:</div> The Nook sends your
|
|
||||||
- Mac's name so you can recognize the device in your license
|
|
||||||
- activations. It is not used for any other purpose.
|
|
||||||
+ <div class="-ml-6">(i) Your email and payment:</div> The email
|
|
||||||
+ you give at checkout delivers your license key and looks up your
|
|
||||||
+ order. An email you add during the trial is used for one
|
|
||||||
+ reminder before the trial ends. Payments are processed by
|
|
||||||
+ Stripe; we never see or store your card details.
|
|
||||||
</div>
|
|
||||||
<div class="pb-2">
|
|
||||||
- <div class="-ml-6">(c) Email:</div> The email you provide at
|
|
||||||
- checkout is used to deliver your license key and to look up your
|
|
||||||
- order.
|
|
||||||
+ <div class="-ml-6">(j) What does not leave your Mac:</div> The
|
|
||||||
+ hook and the bridge that connect your agents to The Nook are
|
|
||||||
+ not a cloud service: the hook dials the bridge on your Mac, and
|
|
||||||
+ the bridge only listens. Two paths carry agent data across the
|
|
||||||
+ network, and both are switched on by you: if you add a remote
|
|
||||||
+ machine, the hook on that machine dials this Mac over SSH or
|
|
||||||
+ your tailnet; and if you use the phone connection, the session
|
|
||||||
+ updates, approvals and replies described in (c) travel through
|
|
||||||
+ the relay, sealed end to end. The privileged helper that
|
|
||||||
+ controls fans and charging has no networking code at all.
|
|
||||||
</div>
|
|
||||||
<div class="pb-2">
|
|
||||||
- <div class="-ml-6">(d) Payment:</div> Payments are processed by
|
|
||||||
- Stripe. We never see or store your card details.
|
|
||||||
+ <div class="-ml-6">The iPhone companion.</div> The iPhone and
|
|
||||||
+ Apple Watch app is in TestFlight beta. The build in TestFlight
|
|
||||||
+ starts Sentry on every launch, with no setting that turns it
|
|
||||||
+ off: it sends crash, error and hang reports, session pings,
|
|
||||||
+ performance traces, the app version, the iOS version, the
|
|
||||||
+ iPhone model and your IP address. Those reports never include
|
|
||||||
+ your prompts, code or session content.
|
|
||||||
+ Its other network traffic is the phone connection in (c) — the
|
|
||||||
+ relay, or a direct LAN/tailnet link — plus, if you allow
|
|
||||||
+ notifications, the push token it gives the relay so Apple can
|
|
||||||
+ deliver them.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -63,9 +192,11 @@ export default function NookPrivacyPolicy() {
|
|
||||||
<span class="-ml-4 pr-2">2.</span> How We Use It
|
|
||||||
</div>
|
|
||||||
<div class="pb-2 pl-4">
|
|
||||||
- Device identifiers, your email, and license records are used only
|
|
||||||
- to operate the trial, deliver purchases, and enforce the 3-device
|
|
||||||
- license. We do not use them for advertising or sell them to anyone.
|
|
||||||
+ Device identifiers, install IDs, your email and license records are
|
|
||||||
+ used only to operate the trial and the licenses, to run the relay
|
|
||||||
+ and the weather service, to answer bug reports, and to deliver
|
|
||||||
+ purchases. We do not use them for advertising and we do not sell
|
|
||||||
+ them to anyone.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@@ -74,9 +205,13 @@ export default function NookPrivacyPolicy() {
|
|
||||||
<span class="-ml-4 pr-2">3.</span> Data Security
|
|
||||||
</div>
|
|
||||||
<div class="pb-2 pl-4">
|
|
||||||
- License keys are signed and verified with Ed25519. The connection
|
|
||||||
- to our servers uses TLS. Your license key is stored in the macOS
|
|
||||||
- Keychain on your Mac.
|
|
||||||
+ License keys are signed and verified with Ed25519 and stored in
|
|
||||||
+ the macOS Keychain. The session content your Mac and phone
|
|
||||||
+ exchange is encrypted end-to-end with keys your devices generate
|
|
||||||
+ at pairing; our relay holds no key that can read it, though it
|
|
||||||
+ can read the routing metadata described in (c). Every internet
|
|
||||||
+ connection described on this page uses TLS; the direct
|
|
||||||
+ LAN/tailnet paths use the same end-to-end encryption.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
# Remote SSH copy — HELD, do not publish
|
|
||||||
|
|
||||||
**Status:** removed from the live site on 2026-10-29 in the FRE-323 correction.
|
|
||||||
**Owner:** CMO. **Verified by:** CTO, on the FRE-320/FRE-205 work.
|
|
||||||
**Restore only when:** FRE-320/FRE-205 ship a genuinely one-click install, the CTO
|
|
||||||
verifies that flow, and a recording shows a remote agent joining the island.
|
|
||||||
Until then this file is the only home for these sentences.
|
|
||||||
|
|
||||||
## What was removed
|
|
||||||
|
|
||||||
### 1. Landing collage tile
|
|
||||||
|
|
||||||
Source: `src/components/nook/FeatureCollage.tsx` (removed 2026-10-29).
|
|
||||||
|
|
||||||
```
|
|
||||||
kicker: Remote
|
|
||||||
title: Agents on other machines
|
|
||||||
body: Run agents on Linux boxes and SSH servers — one click installs the
|
|
||||||
nook-hook, and their sessions join the same island.
|
|
||||||
```
|
|
||||||
|
|
||||||
The mock attached to it showed two session rows whose agent chips named
|
|
||||||
`build-box` and `gpu-rig`.
|
|
||||||
|
|
||||||
### 2. Landing feature breakdown section
|
|
||||||
|
|
||||||
Source: `src/components/nook/FeatureBreakdowns.tsx` (removed 2026-10-29).
|
|
||||||
|
|
||||||
```
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
The section's demo animated a `gpu-rig` host moving from "Not set up" through
|
|
||||||
`connecting` → `pushing the hook binary` → `configuring agents` → `checking the
|
|
||||||
host can reach this Mac` → `Live`, then showed a remote session row.
|
|
||||||
|
|
||||||
### 3. Approvals bullet
|
|
||||||
|
|
||||||
Source: `src/components/nook/FeatureBreakdowns.tsx` (removed 2026-10-29).
|
|
||||||
|
|
||||||
```
|
|
||||||
- Works across every hooked agent, local or remote
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Feature chip
|
|
||||||
|
|
||||||
Source: `src/components/nook/IslandExtras.tsx` (removed 2026-10-29).
|
|
||||||
|
|
||||||
```
|
|
||||||
One-click SSH setup
|
|
||||||
```
|
|
||||||
|
|
||||||
## What replaced it
|
|
||||||
|
|
||||||
Nothing. The Remote tile and section were removed rather than replaced; the
|
|
||||||
existing Approvals cell already carries the verified local claim:
|
|
||||||
|
|
||||||
> Approve an agent's tool call from your Mac's notch, and the agent carries on.
|
|
||||||
|
|
||||||
## Restore checklist
|
|
||||||
|
|
||||||
1. FRE-320/FRE-205 have shipped the one-click install and removed the
|
|
||||||
`~/.ssh/config` / `ssh-copy-id` friction described in FRE-320.
|
|
||||||
2. The CTO has verified the shipping flow and the evidence is on FRE-320.
|
|
||||||
3. A recording exists showing a remote agent joining the island.
|
|
||||||
4. CMO restores the copy above, then owns the launch plan for it — with an
|
|
||||||
owner and date per item — before anything goes back on the site.
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Why the remote claim is parked
|
|
||||||
|
|
||||||
The site was selling a setup path a buyer does not get.
|
|
||||||
|
|
||||||
FRE-320 measured today's actual path (2026-10-29): the one-click flow is
|
|
||||||
app-UI-only, needs a hand-edited `~/.ssh/config` for any host not already in ssh
|
|
||||||
config or on the tailnet, needs a one-time `ssh-copy-id` because the app runs ssh
|
|
||||||
with `BatchMode=yes`, and has no manual fallback for minting the per-host
|
|
||||||
credential. FRE-315 and FRE-322 §3 correction 4 marked the remote claim
|
|
||||||
unverified and demo-gated. The CTO named it the largest launch risk because it
|
|
||||||
was already in front of buyers.
|
|
||||||
|
|
||||||
So the landing page now says only what the product can back today: local agents,
|
|
||||||
the card, and the notch. The remote story is not deleted — it is parked here with
|
|
||||||
the FRE-320/FRE-205 work so it can return the day the one-click install ships and
|
|
||||||
is recorded.
|
|
||||||
|
|
||||||
## What has to be true before it returns
|
|
||||||
|
|
||||||
| Requirement | Owner | Date |
|
|
||||||
|---|---|---|
|
|
||||||
| One-click install ships without hand-edited `~/.ssh/config` or `ssh-copy-id` | FRE-320/FRE-205 engineering | When FRE-320/FRE-205 ships |
|
|
||||||
| CTO verifies the shipping flow and records the evidence on FRE-320 | CTO | Same day, before any copy moves |
|
|
||||||
| A recording shows a remote agent joining the island | Sponsor/CMO | Before restore |
|
|
||||||
| Restore copy and rebuild the launch plan with an owner + date per item | CMO | Day the three rows above are true |
|
|
||||||
|
|
||||||
Nothing in this folder is publishable. `marketing/approved/` remains the only
|
|
||||||
place a human publishes from.
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# Listening — buying-intent threads
|
|
||||||
|
|
||||||
Agent-found threads where someone is describing a problem The Nook solves, with a
|
|
||||||
drafted helpful-first reply. Replies are drafted here, reviewed, and posted **by a
|
|
||||||
human** with a single disclosed mention — helpful first, product second.
|
|
||||||
|
|
||||||
Rules:
|
|
||||||
|
|
||||||
- Real threads only — no invented scenarios.
|
|
||||||
- The drafted reply must stand alone as a helpful answer if the mention is removed.
|
|
||||||
- One disclosed mention per reply, maximum.
|
|
||||||
- Never post from this file; replies move through `approved/`.
|
|
||||||
|
|
||||||
| Date | Source | Thread | Problem signal | Drafted reply |
|
|
||||||
|---|---|---|---|---|
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Weekly funnel snapshot
|
|
||||||
|
|
||||||
Generated weekly from the analytics DB + `trials`/`licenses`/`activations`.
|
|
||||||
Format: the funnel numbers, what moved, and the one thing worth acting on.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# pending
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
# The Nook — Positioning (source of truth)
|
|
||||||
|
|
||||||
Every drafted asset draws its voice, claims, and constraints from this file. If an
|
|
||||||
artifact invents its own framing, fix the artifact or fix this file — never both
|
|
||||||
silently diverging.
|
|
||||||
|
|
||||||
Primary source: `~/Code/the-nook/docs/marketing-strategy.md`.
|
|
||||||
|
|
||||||
## The sentence
|
|
||||||
|
|
||||||
> **Your Mac and your agents, under control.** The Nook puts your whole coding-agent
|
|
||||||
> fleet in the notch — thirteen agents — so you see what is running,
|
|
||||||
> unblock it in one tap, and keep the machine from overheating while it works.
|
|
||||||
|
|
||||||
## The wedge
|
|
||||||
|
|
||||||
The thing to say over and over, in every channel, in slightly different words:
|
|
||||||
|
|
||||||
> **An agent blocked on a permission prompt is the most expensive kind of idle.**
|
|
||||||
> You pay for the model, you pay for the wait, and you get neither.
|
|
||||||
|
|
||||||
It is acute, quantifiable, and true — and it is the demo: a card appears, you tap
|
|
||||||
Allow, work resumes. Ten seconds, no explanation needed.
|
|
||||||
|
|
||||||
## The bundling reframe
|
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
> One $10 app instead of a notch toy, a fan utility, a battery limiter, a menu-bar
|
|
||||||
> stats strip, and a notification hack. Same one-time purchase, no subscription.
|
|
||||||
|
|
||||||
Price rises to $15 at 1.0 — dated and honest, not a permanent beta.
|
|
||||||
|
|
||||||
## Hard rules
|
|
||||||
|
|
||||||
### 1. Category nouns, never product nouns
|
|
||||||
|
|
||||||
`freno-dev/AGENTS.md` forbids naming any competitor in user-facing copy — landing
|
|
||||||
pages, marketing copy, comparison tables, meta descriptions, emails, FAQs, all of it.
|
|
||||||
|
|
||||||
- Use **category nouns**: "notch app", "menu-bar monitor", "fan control utility",
|
|
||||||
"battery charge limiter", "agent notification hack". These carry the same search
|
|
||||||
intent and are fully compliant.
|
|
||||||
- Compare against **the status quo, not a competitor**: "vs. a terminal bell you
|
|
||||||
don't hear", "vs. four utilities in your menu bar", "vs. finding out an hour later."
|
|
||||||
- The rule does not reach App Store–external review replies, direct email, and
|
|
||||||
community replies written by a human, where quoting what a user said about another
|
|
||||||
tool is normal conversation.
|
|
||||||
|
|
||||||
### 2. A claim requires a test to exist
|
|
||||||
|
|
||||||
Copy that says "13 agents" or "no data leaves the device" must have a test backing it.
|
|
||||||
If a claim cannot be pointed at code or a test, it does not go in copy.
|
|
||||||
|
|
||||||
### 3. Honest privacy scoping
|
|
||||||
|
|
||||||
Telemetry and the trial email **do** leave the device. The defensible claim is:
|
|
||||||
|
|
||||||
> **No prompt or code content leaves the device.**
|
|
||||||
|
|
||||||
Never "no data leaves the device".
|
|
||||||
|
|
||||||
### 4. Sell what works today
|
|
||||||
|
|
||||||
Phone approvals are deferred until a shipped iOS app exists — no "(coming soon)"
|
|
||||||
parentheticals. The launch story is the approval card: an agent blocked on a
|
|
||||||
permission prompt, unblocked from the Mac's notch, and work resumes.
|
|
||||||
|
|
||||||
Remote SSH is **held**, not approved. The one-click install has not shipped and
|
|
||||||
has not been recorded (FRE-320, FRE-205), and the current path needs hand-edited
|
|
||||||
`~/.ssh/config` and a one-time `ssh-copy-id` (FRE-320). Its copy is parked in
|
|
||||||
`marketing/drafts/remote-ssh/` until the CTO verifies the shipping flow and a
|
|
||||||
demo exists.
|
|
||||||
|
|
||||||
### 5. Humans hold every account
|
|
||||||
|
|
||||||
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** —
|
|
||||||
nothing posts itself.
|
|
||||||
|
|
||||||
## Approved claims (each backed by code)
|
|
||||||
|
|
||||||
| Claim | Backing |
|
|
||||||
|---|---|
|
|
||||||
| Thirteen hooked agents, one glance | `AgentSpec.all` — claude, codex, opencode, pi, omp, muse, hermes, openclaw, zai, gemini, cline, qwen, deepseek |
|
|
||||||
| Permission gate answered from a card | awaitPolicyTable + bridge directive path (`hook/normalize.go`, `serialize.go`) |
|
|
||||||
| Fan / thermal / charge control | `helper/` (privileged helper, SMC, no kext) |
|
|
||||||
| One-time purchase, no subscription | $10 → $15 at 1.0; Stripe checkout |
|
|
||||||
| macOS 14+ | 27 source files use the `@Observable` framework |
|
|
||||||
| No prompt or code content leaves the device | envelope carries session/event/terminal metadata only (see `docs/agent-interface.md`) |
|
|
||||||
|
|
||||||
## Held claims (not publishable)
|
|
||||||
|
|
||||||
| Claim | Why it is held | What has to be true first |
|
|
||||||
|---|---|---|
|
|
||||||
| Remote agents over SSH, one click to install | The one-click path is app-UI-only and needs hand-edited `~/.ssh/config` plus a one-time `ssh-copy-id`; no demo exists (FRE-320). FRE-315 and FRE-322 hold it unverified and demo-gated. | FRE-320/FRE-205 ship a genuinely one-click install, the CTO verifies it, and a recording shows a remote agent joining the island. Copy parked in `marketing/drafts/remote-ssh/`. |
|
|
||||||
|
|
||||||
## Voice
|
|
||||||
|
|
||||||
- Short, concrete, no hype adjectives. Numbers over adjectives ("thirteen agents",
|
|
||||||
"one tap", "$10 once").
|
|
||||||
- The notch/island is the product's home; agents are the product's point.
|
|
||||||
- Never apologize for being a utility. The utility is the point.
|
|
||||||
- Banned phrasings: competitor names (see rule 1), "AI-powered", "revolutionary",
|
|
||||||
"game-changer", "seamlessly". Unverifiable superlatives generally.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# posted
|
|
||||||
22
package.json
@@ -1,23 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "freno.(dev/me)",
|
"name": "example-with-trpc",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vinxi dev",
|
"dev": "vinxi dev",
|
||||||
"dev-flush": "vinxi dev --env-file=.env",
|
"dev-flush": "vinxi dev --env-file=.env",
|
||||||
"build": "vinxi build",
|
"build": "vinxi build",
|
||||||
|
"vercel-build": "rm -rf .vinxi .output node_modules/.vite && vinxi build",
|
||||||
"start": "NODE_OPTIONS='--import ./public/instrument.server.mjs' vinxi start",
|
"start": "NODE_OPTIONS='--import ./public/instrument.server.mjs' vinxi start",
|
||||||
"test": "bun test",
|
"test": "bun test",
|
||||||
"test:security": "bun test src/server/security/",
|
"test:security": "bun test src/server/security/",
|
||||||
"test:watch": "bun test --watch",
|
"test:watch": "bun test --watch",
|
||||||
"test:coverage": "bun test --coverage",
|
"test:coverage": "bun test --coverage",
|
||||||
"perf": "bun run scripts/perf-test.ts",
|
"perf": "bun run scripts/perf-test.ts",
|
||||||
"perf:compare": "bun run scripts/perf-compare.ts",
|
"perf:compare": "bun run scripts/perf-compare.ts"
|
||||||
"nook:grant": "NODE_ENV=production bun --env-file=.env scripts/grant-nook-license.ts"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.953.0",
|
"@aws-sdk/client-s3": "^3.953.0",
|
||||||
"@aws-sdk/s3-request-presigner": "^3.953.0",
|
"@aws-sdk/s3-request-presigner": "^3.953.0",
|
||||||
|
"@clerk/backend": "^3.12.0",
|
||||||
"@libsql/client": "^0.15.15",
|
"@libsql/client": "^0.15.15",
|
||||||
|
"@motionone/solid": "^10.16.4",
|
||||||
"@sentry/solidstart": "^10.67.0",
|
"@sentry/solidstart": "^10.67.0",
|
||||||
"@solidjs/meta": "^0.29.4",
|
"@solidjs/meta": "^0.29.4",
|
||||||
"@solidjs/router": "^0.15.0",
|
"@solidjs/router": "^0.15.0",
|
||||||
@@ -25,11 +27,13 @@
|
|||||||
"@tailwindcss/vite": "^4.0.7",
|
"@tailwindcss/vite": "^4.0.7",
|
||||||
"@tiptap/core": "^3.14.0",
|
"@tiptap/core": "^3.14.0",
|
||||||
"@tiptap/extension-code-block-lowlight": "^3.14.0",
|
"@tiptap/extension-code-block-lowlight": "^3.14.0",
|
||||||
|
"@tiptap/extension-color": "^3.14.0",
|
||||||
"@tiptap/extension-details": "^3.14.0",
|
"@tiptap/extension-details": "^3.14.0",
|
||||||
"@tiptap/extension-details-content": "^2.26.2",
|
"@tiptap/extension-details-content": "^2.26.2",
|
||||||
"@tiptap/extension-details-summary": "^2.26.2",
|
"@tiptap/extension-details-summary": "^2.26.2",
|
||||||
"@tiptap/extension-image": "^3.14.0",
|
"@tiptap/extension-image": "^3.14.0",
|
||||||
"@tiptap/extension-link": "^3.14.0",
|
"@tiptap/extension-link": "^3.14.0",
|
||||||
|
"@tiptap/extension-list-item": "^3.14.0",
|
||||||
"@tiptap/extension-subscript": "^3.14.0",
|
"@tiptap/extension-subscript": "^3.14.0",
|
||||||
"@tiptap/extension-superscript": "^3.14.0",
|
"@tiptap/extension-superscript": "^3.14.0",
|
||||||
"@tiptap/extension-table": "^3.14.0",
|
"@tiptap/extension-table": "^3.14.0",
|
||||||
@@ -39,11 +43,13 @@
|
|||||||
"@tiptap/extension-task-item": "^3.14.0",
|
"@tiptap/extension-task-item": "^3.14.0",
|
||||||
"@tiptap/extension-task-list": "^3.14.0",
|
"@tiptap/extension-task-list": "^3.14.0",
|
||||||
"@tiptap/extension-text-align": "^3.14.0",
|
"@tiptap/extension-text-align": "^3.14.0",
|
||||||
|
"@tiptap/extension-text-style": "^3.14.0",
|
||||||
"@tiptap/pm": "^3.14.0",
|
"@tiptap/pm": "^3.14.0",
|
||||||
"@tiptap/starter-kit": "^3.14.0",
|
"@tiptap/starter-kit": "^3.14.0",
|
||||||
"@trpc/client": "^10.45.2",
|
"@trpc/client": "^10.45.2",
|
||||||
"@trpc/server": "^10.45.2",
|
"@trpc/server": "^10.45.2",
|
||||||
"@tursodatabase/api": "^1.9.2",
|
"@tursodatabase/api": "^1.9.2",
|
||||||
|
"@typeschema/valibot": "^0.13.4",
|
||||||
"bcrypt": "^6.0.0",
|
"bcrypt": "^6.0.0",
|
||||||
"es-toolkit": "^1.43.0",
|
"es-toolkit": "^1.43.0",
|
||||||
"fast-diff": "^1.3.0",
|
"fast-diff": "^1.3.0",
|
||||||
@@ -54,6 +60,7 @@
|
|||||||
"motion": "^12.23.26",
|
"motion": "^12.23.26",
|
||||||
"solid-js": "^1.9.5",
|
"solid-js": "^1.9.5",
|
||||||
"solid-tiptap": "^0.8.0",
|
"solid-tiptap": "^0.8.0",
|
||||||
|
"svix": "^1.98.0",
|
||||||
"ua-parser-js": "^2.0.7",
|
"ua-parser-js": "^2.0.7",
|
||||||
"uuid": "^13.0.0",
|
"uuid": "^13.0.0",
|
||||||
"vinxi": "^0.5.7",
|
"vinxi": "^0.5.7",
|
||||||
@@ -63,11 +70,18 @@
|
|||||||
"node": "24.x"
|
"node": "24.x"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@playwright/test": "^1.57.0",
|
||||||
"@sentry/vite-plugin": "^5.4.0",
|
"@sentry/vite-plugin": "^5.4.0",
|
||||||
"@tailwindcss/typography": "^0.5.19",
|
"@tailwindcss/typography": "^0.5.19",
|
||||||
"@types/bcrypt": "^6.0.0",
|
"@types/bcrypt": "^6.0.0",
|
||||||
|
"@types/fast-diff": "^1.2.2",
|
||||||
|
"chrome-launcher": "^1.2.1",
|
||||||
|
"lighthouse": "^13.0.1",
|
||||||
"playwright": "^1.57.0",
|
"playwright": "^1.57.0",
|
||||||
"prettier": "^3.7.4",
|
"prettier": "^3.7.4",
|
||||||
"prettier-plugin-tailwindcss": "^0.7.2"
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
||||||
|
"rollup-plugin-visualizer": "^6.0.5",
|
||||||
|
"trpc-panel": "^1.3.4",
|
||||||
|
"vite-bundle-visualizer": "^1.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 5.9 MiB |
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Gaze",
|
|
||||||
"short_name": "Gaze",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "/gaze/favicon/web-app-manifest-192x192.png",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/gaze/favicon/web-app-manifest-512x512.png",
|
|
||||||
"sizes": "512x512",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"theme_color": "#002cff",
|
|
||||||
"background_color": "#002cff",
|
|
||||||
"display": "standalone"
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 5.0 MiB |
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "InputHalo",
|
|
||||||
"short_name": "InputHalo",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "/inputhalo/favicon/web-app-manifest-192x192.png",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/inputhalo/favicon/web-app-manifest-512x512.png",
|
|
||||||
"sizes": "512x512",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"theme_color": "#41a5ff",
|
|
||||||
"background_color": "#41a5ff",
|
|
||||||
"display": "standalone"
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 860 KiB |
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Life and Lineage",
|
|
||||||
"short_name": "Lineage",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "/lineage/favicon/web-app-manifest-192x192.png",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/lineage/favicon/web-app-manifest-512x512.png",
|
|
||||||
"sizes": "512x512",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"theme_color": "#a13536",
|
|
||||||
"background_color": "#a13536",
|
|
||||||
"display": "standalone"
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 64 KiB |
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Nessa",
|
|
||||||
"short_name": "Nessa",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "/nessa/favicon/web-app-manifest-192x192.png",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/nessa/favicon/web-app-manifest-512x512.png",
|
|
||||||
"sizes": "512x512",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"theme_color": "#527640",
|
|
||||||
"background_color": "#527640",
|
|
||||||
"display": "standalone"
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
@@ -1,4 +0,0 @@
|
|||||||
<!-- 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>
|
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB |
@@ -1,4 +0,0 @@
|
|||||||
<!-- 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>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "The Nook",
|
|
||||||
"short_name": "The Nook",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "/nook/favicon/web-app-manifest-192x192.png",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "/nook/favicon/web-app-manifest-512x512.png",
|
|
||||||
"sizes": "512x512",
|
|
||||||
"type": "image/png",
|
|
||||||
"purpose": "any"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"theme_color": "#4C9FBC",
|
|
||||||
"background_color": "#4C9FBC",
|
|
||||||
"display": "standalone"
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 392 KiB |
|
Before Width: | Height: | Size: 52 KiB |
@@ -1,21 +1,9 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
Allow: /
|
Allow: /
|
||||||
Allow: /blog
|
Allow: /blog
|
||||||
|
Allow: /projects
|
||||||
# Private / dynamic paths — not for indexing.
|
|
||||||
# Keeps crawlers off auth, admin, and API pages so they don't burn
|
|
||||||
# uncached SSR function invocations.
|
|
||||||
Disallow: /account
|
|
||||||
Disallow: /analytics
|
|
||||||
Disallow: /api/
|
|
||||||
Disallow: /blog/create
|
|
||||||
Disallow: /blog/edit
|
|
||||||
Disallow: /checkout
|
|
||||||
Disallow: /databaseMGMT
|
|
||||||
Disallow: /debug/
|
|
||||||
Disallow: /error-test
|
|
||||||
Disallow: /login
|
Disallow: /login
|
||||||
Disallow: /success
|
Disallow: /debug/
|
||||||
Disallow: /test
|
Disallow: /databaseMGMT
|
||||||
|
|
||||||
Sitemap: https://www.freno.me/sitemap.xml
|
Sitemap: https://www.freno.me/sitemap.xml
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
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.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
/**
|
|
||||||
* One-shot The Nook license Ed25519 keypair generator.
|
|
||||||
*
|
|
||||||
* Run with: bun scripts/generate-license-keys.ts
|
|
||||||
*
|
|
||||||
* Prints:
|
|
||||||
* - The Ed25519 PRIVATE key as base64 PKCS8 DER → NOOK_LICENSE_PRIVATE_KEY
|
|
||||||
* (freno-dev env).
|
|
||||||
* - The raw 32-byte Ed25519 public key (the X coordinate) as base64 SPKI DER
|
|
||||||
* suffix → compiled into the Swift `LicenseVerifier.PublicKeyConstant`.
|
|
||||||
*
|
|
||||||
* The private key lives ONLY in env — never in git.
|
|
||||||
* Paste the public key into Sources/NookCore/Licensing/LicenseVerifier.swift
|
|
||||||
* (step 4 of the distribution plan) after running this once.
|
|
||||||
*/
|
|
||||||
import { generateKeyPairSync, createPrivateKey } from "node:crypto";
|
|
||||||
|
|
||||||
const { privateKey, publicKey } = generateKeyPairSync("ed25519");
|
|
||||||
|
|
||||||
const privateKeyDer = privateKey.export({ format: "der", type: "pkcs8" });
|
|
||||||
const privateKeyPem = privateKey.export({ format: "pem", type: "pkcs8" });
|
|
||||||
|
|
||||||
// Raw 32-byte X coordinate: tail of the SPKI DER public key.
|
|
||||||
const publicKeySpki = publicKey.export({ format: "der", type: "spki" });
|
|
||||||
const rawPublic = publicKeySpki.subarray(-32);
|
|
||||||
|
|
||||||
console.log("── The Nook license keypair ──────────────────────────────");
|
|
||||||
console.log("NOOK_LICENSE_PRIVATE_KEY (base64 PKCS8 DER):");
|
|
||||||
console.log(privateKeyDer.toString("base64"));
|
|
||||||
console.log("");
|
|
||||||
console.log("Private key PEM (reference, for license signing only):");
|
|
||||||
console.log(privateKeyPem);
|
|
||||||
console.log("");
|
|
||||||
console.log("LicenseVerifier public key base64 (raw 32-byte X, step 4):");
|
|
||||||
console.log(rawPublic.toString("base64"));
|
|
||||||
console.log("──────────────────────────────────────────────────────────");
|
|
||||||
|
|
||||||
// Sanity check: sign + verify round trip with the exported artifacts.
|
|
||||||
const publicKeyFromPem = createPrivateKey(privateKeyPem)
|
|
||||||
.export({ format: "der", type: "pkcs8" });
|
|
||||||
if (Buffer.compare(Buffer.from(privateKeyDer), Buffer.from(publicKeyFromPem)) !== 0) {
|
|
||||||
console.error("Keypair export sanity check failed.");
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
console.log("Sanity check passed.");
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import { nookSchemaBootstrap, grantLicense } from "~/server/nook";
|
|
||||||
|
|
||||||
// Mint a free The Nook license (gifting / comps). Defaults to 1 device.
|
|
||||||
//
|
|
||||||
// bun --env-file=.env scripts/grant-nook-license.ts \
|
|
||||||
// --email friend@example.com [--devices 1]
|
|
||||||
|
|
||||||
const arg = (name: string) => {
|
|
||||||
const i = process.argv.indexOf(`--${name}`);
|
|
||||||
return i === -1 ? undefined : process.argv[i + 1];
|
|
||||||
};
|
|
||||||
|
|
||||||
const email = arg("email");
|
|
||||||
const devices = Number(arg("devices") ?? "1");
|
|
||||||
|
|
||||||
if (!email || !/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) {
|
|
||||||
console.error(
|
|
||||||
"Usage: bun --env-file=.env scripts/grant-nook-license.ts --email you@example.com [--devices 1]"
|
|
||||||
);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
await nookSchemaBootstrap;
|
|
||||||
const { key } = await grantLicense(email, devices);
|
|
||||||
|
|
||||||
console.log(`Granted The Nook license for ${email} (${devices} device(s)):`);
|
|
||||||
console.log(key);
|
|
||||||
console.log("Send it to them; they enter it in Settings > License.");
|
|
||||||
@@ -96,6 +96,7 @@ function compareResults(baseline: TestOutput, optimized: TestOutput) {
|
|||||||
"───────────────────────────────────────────────────────────────────\n"
|
"───────────────────────────────────────────────────────────────────\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Compare each page
|
||||||
for (const baseResult of baseline.results) {
|
for (const baseResult of baseline.results) {
|
||||||
const optResult = optimized.results.find((r) => r.page === baseResult.page);
|
const optResult = optimized.results.find((r) => r.page === baseResult.page);
|
||||||
if (!optResult) continue;
|
if (!optResult) continue;
|
||||||
@@ -106,6 +107,7 @@ function compareResults(baseline: TestOutput, optimized: TestOutput) {
|
|||||||
console.log(`\n📄 ${baseResult.page}`);
|
console.log(`\n📄 ${baseResult.page}`);
|
||||||
console.log("─".repeat(70));
|
console.log("─".repeat(70));
|
||||||
|
|
||||||
|
// Core Web Vitals
|
||||||
console.log("\n Core Web Vitals:");
|
console.log("\n Core Web Vitals:");
|
||||||
|
|
||||||
const fcpDiff = opt.fcp - base.fcp;
|
const fcpDiff = opt.fcp - base.fcp;
|
||||||
@@ -119,6 +121,7 @@ function compareResults(baseline: TestOutput, optimized: TestOutput) {
|
|||||||
` CLS: ${base.cls.toFixed(3)} → ${opt.cls.toFixed(3)} (${formatDiff(clsDiff * 1000, "ms")})`
|
` CLS: ${base.cls.toFixed(3)} → ${opt.cls.toFixed(3)} (${formatDiff(clsDiff * 1000, "ms")})`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Loading Metrics
|
||||||
console.log("\n Loading Metrics:");
|
console.log("\n Loading Metrics:");
|
||||||
|
|
||||||
const ttfbDiff = opt.ttfb - base.ttfb;
|
const ttfbDiff = opt.ttfb - base.ttfb;
|
||||||
@@ -145,6 +148,7 @@ function compareResults(baseline: TestOutput, optimized: TestOutput) {
|
|||||||
` Load: ${formatTime(base.loadComplete)} → ${formatTime(opt.loadComplete)} (${formatDiff(loadDiff, "ms")}, ${loadPercent.toFixed(1)}%)${getImpact(loadPercent)}`
|
` Load: ${formatTime(base.loadComplete)} → ${formatTime(opt.loadComplete)} (${formatDiff(loadDiff, "ms")}, ${loadPercent.toFixed(1)}%)${getImpact(loadPercent)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Resource Loading
|
||||||
console.log("\n Resources:");
|
console.log("\n Resources:");
|
||||||
|
|
||||||
const reqDiff = opt.totalRequests - base.totalRequests;
|
const reqDiff = opt.totalRequests - base.totalRequests;
|
||||||
@@ -181,6 +185,7 @@ function compareResults(baseline: TestOutput, optimized: TestOutput) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Overall Summary
|
||||||
console.log(
|
console.log(
|
||||||
"\n\n═══════════════════════════════════════════════════════════════════"
|
"\n\n═══════════════════════════════════════════════════════════════════"
|
||||||
);
|
);
|
||||||
@@ -333,6 +338,7 @@ function compareResults(baseline: TestOutput, optimized: TestOutput) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Specific findings
|
||||||
const reqPercent = calculatePercentChange(baseAvg.requests, optAvg.requests);
|
const reqPercent = calculatePercentChange(baseAvg.requests, optAvg.requests);
|
||||||
if (reqPercent < -5) {
|
if (reqPercent < -5) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ const BASE_URL = process.env.TEST_URL || "http://localhost:3000";
|
|||||||
const RUNS_PER_PAGE = parseInt(process.env.RUNS || "5", 10);
|
const RUNS_PER_PAGE = parseInt(process.env.RUNS || "5", 10);
|
||||||
const WARMUP_RUNS = 1;
|
const WARMUP_RUNS = 1;
|
||||||
|
|
||||||
|
// Pages to test
|
||||||
const TEST_PAGES: PageTestConfig[] = [
|
const TEST_PAGES: PageTestConfig[] = [
|
||||||
{ name: "Home", path: "/" },
|
{ name: "Home", path: "/" },
|
||||||
{ name: "Blog Index", path: "/blog" },
|
{ name: "Blog Index", path: "/blog" },
|
||||||
@@ -77,6 +78,7 @@ const TEST_PAGES: PageTestConfig[] = [
|
|||||||
{ name: "404", path: "/404" }
|
{ name: "404", path: "/404" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Add additional blog post path if provided
|
||||||
if (process.env.TEST_BLOG_POST) {
|
if (process.env.TEST_BLOG_POST) {
|
||||||
TEST_PAGES.push({
|
TEST_PAGES.push({
|
||||||
name: "Custom Blog Post",
|
name: "Custom Blog Post",
|
||||||
@@ -100,6 +102,7 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
interactions: [] as number[]
|
interactions: [] as number[]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Observe LCP
|
||||||
if ("PerformanceObserver" in window) {
|
if ("PerformanceObserver" in window) {
|
||||||
try {
|
try {
|
||||||
const lcpObserver = new PerformanceObserver((entryList) => {
|
const lcpObserver = new PerformanceObserver((entryList) => {
|
||||||
@@ -115,8 +118,10 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
buffered: true
|
buffered: true
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// LCP not supported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Observe CLS
|
||||||
try {
|
try {
|
||||||
const clsObserver = new PerformanceObserver((entryList) => {
|
const clsObserver = new PerformanceObserver((entryList) => {
|
||||||
for (const entry of entryList.getEntries()) {
|
for (const entry of entryList.getEntries()) {
|
||||||
@@ -133,8 +138,10 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
});
|
});
|
||||||
clsObserver.observe({ type: "layout-shift", buffered: true });
|
clsObserver.observe({ type: "layout-shift", buffered: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// CLS not supported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Observe FID (first input)
|
||||||
try {
|
try {
|
||||||
const fidObserver = new PerformanceObserver((entryList) => {
|
const fidObserver = new PerformanceObserver((entryList) => {
|
||||||
const firstInput = entryList.getEntries()[0] as any;
|
const firstInput = entryList.getEntries()[0] as any;
|
||||||
@@ -147,8 +154,10 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
});
|
});
|
||||||
fidObserver.observe({ type: "first-input", buffered: true });
|
fidObserver.observe({ type: "first-input", buffered: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// FID not supported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Observe long tasks
|
||||||
try {
|
try {
|
||||||
const longTaskObserver = new PerformanceObserver((entryList) => {
|
const longTaskObserver = new PerformanceObserver((entryList) => {
|
||||||
for (const entry of entryList.getEntries()) {
|
for (const entry of entryList.getEntries()) {
|
||||||
@@ -157,8 +166,10 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
});
|
});
|
||||||
longTaskObserver.observe({ type: "longtask", buffered: true });
|
longTaskObserver.observe({ type: "longtask", buffered: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// Long tasks not supported
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Observe INP (event timing for interactions)
|
||||||
try {
|
try {
|
||||||
const inpObserver = new PerformanceObserver((entryList) => {
|
const inpObserver = new PerformanceObserver((entryList) => {
|
||||||
for (const entry of entryList.getEntries()) {
|
for (const entry of entryList.getEntries()) {
|
||||||
@@ -183,6 +194,7 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
});
|
});
|
||||||
inpObserver.observe({ type: "event", buffered: true });
|
inpObserver.observe({ type: "event", buffered: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// Event timing not supported
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -191,14 +203,18 @@ async function setupPerformanceObservers(page: Page) {
|
|||||||
async function collectPerformanceMetrics(
|
async function collectPerformanceMetrics(
|
||||||
page: Page
|
page: Page
|
||||||
): Promise<PerformanceMetrics> {
|
): Promise<PerformanceMetrics> {
|
||||||
|
// Wait for page to be loaded
|
||||||
await page.waitForLoadState("load");
|
await page.waitForLoadState("load");
|
||||||
|
|
||||||
|
// Wait a bit longer for LCP to settle (it can change as content loads)
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
// Additional wait for any remaining network activity
|
||||||
await page.waitForLoadState("networkidle", { timeout: 5000 }).catch(() => {
|
await page.waitForLoadState("networkidle", { timeout: 5000 }).catch(() => {
|
||||||
// Ignore timeout - networkidle may never happen for some pages
|
// Ignore timeout - networkidle may never happen for some pages
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Collect comprehensive performance metrics
|
||||||
const metrics = await page.evaluate(() => {
|
const metrics = await page.evaluate(() => {
|
||||||
const perf = performance.getEntriesByType(
|
const perf = performance.getEntriesByType(
|
||||||
"navigation"
|
"navigation"
|
||||||
@@ -206,6 +222,7 @@ async function collectPerformanceMetrics(
|
|||||||
const paint = performance.getEntriesByType("paint");
|
const paint = performance.getEntriesByType("paint");
|
||||||
const fcp = paint.find((entry) => entry.name === "first-contentful-paint");
|
const fcp = paint.find((entry) => entry.name === "first-contentful-paint");
|
||||||
|
|
||||||
|
// Get metrics from our observers
|
||||||
const observedMetrics = (window as any).__perfMetrics || {
|
const observedMetrics = (window as any).__perfMetrics || {
|
||||||
lcp: 0,
|
lcp: 0,
|
||||||
cls: 0,
|
cls: 0,
|
||||||
@@ -215,6 +232,7 @@ async function collectPerformanceMetrics(
|
|||||||
interactions: []
|
interactions: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Fallback to direct API if observers didn't capture anything
|
||||||
let lcp = observedMetrics.lcp;
|
let lcp = observedMetrics.lcp;
|
||||||
let cls = observedMetrics.cls;
|
let cls = observedMetrics.cls;
|
||||||
let fid = observedMetrics.fid;
|
let fid = observedMetrics.fid;
|
||||||
@@ -240,6 +258,7 @@ async function collectPerformanceMetrics(
|
|||||||
.reduce((sum: number, entry: any) => sum + entry.value, 0);
|
.reduce((sum: number, entry: any) => sum + entry.value, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate INP from event timing entries if not already captured
|
||||||
if (inp === 0) {
|
if (inp === 0) {
|
||||||
const eventEntries = performance.getEntriesByType("event") as any[];
|
const eventEntries = performance.getEntriesByType("event") as any[];
|
||||||
const interactionLatencies = eventEntries
|
const interactionLatencies = eventEntries
|
||||||
@@ -256,6 +275,7 @@ async function collectPerformanceMetrics(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get resource timing
|
||||||
const resources = performance.getEntriesByType(
|
const resources = performance.getEntriesByType(
|
||||||
"resource"
|
"resource"
|
||||||
) as PerformanceResourceTiming[];
|
) as PerformanceResourceTiming[];
|
||||||
@@ -298,6 +318,7 @@ async function collectPerformanceMetrics(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Calculate long task duration
|
||||||
let taskDuration = 0;
|
let taskDuration = 0;
|
||||||
if (observedMetrics.longTasks && observedMetrics.longTasks.length > 0) {
|
if (observedMetrics.longTasks && observedMetrics.longTasks.length > 0) {
|
||||||
taskDuration = observedMetrics.longTasks.reduce(
|
taskDuration = observedMetrics.longTasks.reduce(
|
||||||
@@ -306,6 +327,7 @@ async function collectPerformanceMetrics(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get more granular performance entries
|
||||||
let jsExecutionTime = 0;
|
let jsExecutionTime = 0;
|
||||||
let layoutDuration = 0;
|
let layoutDuration = 0;
|
||||||
let paintDuration = 0;
|
let paintDuration = 0;
|
||||||
@@ -317,6 +339,7 @@ async function collectPerformanceMetrics(
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Check for script evaluation entries
|
||||||
const entries = performance.getEntries();
|
const entries = performance.getEntries();
|
||||||
entries.forEach((entry: any) => {
|
entries.forEach((entry: any) => {
|
||||||
if (entry.entryType === "measure") {
|
if (entry.entryType === "measure") {
|
||||||
@@ -376,6 +399,7 @@ async function testPagePerformance(
|
|||||||
` Running ${WARMUP_RUNS} warmup + ${RUNS_PER_PAGE} measured runs...\n`
|
` Running ${WARMUP_RUNS} warmup + ${RUNS_PER_PAGE} measured runs...\n`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Warmup runs (not counted)
|
||||||
for (let i = 0; i < WARMUP_RUNS; i++) {
|
for (let i = 0; i < WARMUP_RUNS; i++) {
|
||||||
const context = await browser.newContext();
|
const context = await browser.newContext();
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
@@ -386,16 +410,20 @@ async function testPagePerformance(
|
|||||||
console.log(` ✓ Warmup run ${i + 1}/${WARMUP_RUNS}`);
|
console.log(` ✓ Warmup run ${i + 1}/${WARMUP_RUNS}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Measured runs
|
||||||
for (let i = 0; i < RUNS_PER_PAGE; i++) {
|
for (let i = 0; i < RUNS_PER_PAGE; i++) {
|
||||||
console.log(` → Run ${i + 1}/${RUNS_PER_PAGE}...`);
|
console.log(` → Run ${i + 1}/${RUNS_PER_PAGE}...`);
|
||||||
|
|
||||||
|
// Create new context for each run to ensure clean state
|
||||||
const context = await browser.newContext({
|
const context = await browser.newContext({
|
||||||
viewport: { width: 1920, height: 1080 }
|
viewport: { width: 1920, height: 1080 }
|
||||||
});
|
});
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
|
|
||||||
|
// Setup performance observers before navigation
|
||||||
await setupPerformanceObservers(page);
|
await setupPerformanceObservers(page);
|
||||||
|
|
||||||
|
// Navigate and collect metrics
|
||||||
await page.goto(url, { waitUntil: "load" });
|
await page.goto(url, { waitUntil: "load" });
|
||||||
const metrics = await collectPerformanceMetrics(page);
|
const metrics = await collectPerformanceMetrics(page);
|
||||||
|
|
||||||
@@ -408,6 +436,7 @@ async function testPagePerformance(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate statistics
|
||||||
const average = calculateAverage(runs);
|
const average = calculateAverage(runs);
|
||||||
const median = calculateMedian(runs);
|
const median = calculateMedian(runs);
|
||||||
const p95 = calculatePercentile(runs, 95);
|
const p95 = calculatePercentile(runs, 95);
|
||||||
@@ -619,6 +648,7 @@ function printResults(results: TestResult[]) {
|
|||||||
"═══════════════════════════════════════════════════════════════════\n"
|
"═══════════════════════════════════════════════════════════════════\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Overall averages
|
||||||
const overallAverage = {
|
const overallAverage = {
|
||||||
lcp: results.reduce((sum, r) => sum + r.median.lcp, 0) / results.length,
|
lcp: results.reduce((sum, r) => sum + r.median.lcp, 0) / results.length,
|
||||||
fcp: results.reduce((sum, r) => sum + r.median.fcp, 0) / results.length,
|
fcp: results.reduce((sum, r) => sum + r.median.fcp, 0) / results.length,
|
||||||
@@ -666,6 +696,7 @@ function printResults(results: TestResult[]) {
|
|||||||
|
|
||||||
console.log("\n Optimization Opportunities:");
|
console.log("\n Optimization Opportunities:");
|
||||||
|
|
||||||
|
// Find pages with highest JS bytes
|
||||||
const highestJS = [...results].sort(
|
const highestJS = [...results].sort(
|
||||||
(a, b) => b.median.jsBytes - a.median.jsBytes
|
(a, b) => b.median.jsBytes - a.median.jsBytes
|
||||||
)[0];
|
)[0];
|
||||||
@@ -676,6 +707,7 @@ function printResults(results: TestResult[]) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find pages with slow LCP
|
||||||
const slowLCP = results.filter((r) => r.median.lcp > 2500);
|
const slowLCP = results.filter((r) => r.median.lcp > 2500);
|
||||||
if (slowLCP.length > 0) {
|
if (slowLCP.length > 0) {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -683,6 +715,7 @@ function printResults(results: TestResult[]) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find pages with high CLS
|
||||||
const highCLS = results.filter((r) => r.median.cls > 0.1);
|
const highCLS = results.filter((r) => r.median.cls > 0.1);
|
||||||
if (highCLS.length > 0) {
|
if (highCLS.length > 0) {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -690,6 +723,7 @@ function printResults(results: TestResult[]) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Find pages with high INP
|
||||||
const highINP = results.filter((r) => r.median.inp > 200);
|
const highINP = results.filter((r) => r.median.inp > 200);
|
||||||
if (highINP.length > 0) {
|
if (highINP.length > 0) {
|
||||||
console.log(
|
console.log(
|
||||||
@@ -706,6 +740,7 @@ async function main() {
|
|||||||
console.log(`Pages to test: ${TEST_PAGES.length}`);
|
console.log(`Pages to test: ${TEST_PAGES.length}`);
|
||||||
console.log(`Runs per page: ${RUNS_PER_PAGE} (+ ${WARMUP_RUNS} warmup)\n`);
|
console.log(`Runs per page: ${RUNS_PER_PAGE} (+ ${WARMUP_RUNS} warmup)\n`);
|
||||||
|
|
||||||
|
// Check if server is running
|
||||||
try {
|
try {
|
||||||
const response = await fetch(BASE_URL);
|
const response = await fetch(BASE_URL);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -735,8 +770,10 @@ async function main() {
|
|||||||
|
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|
||||||
|
// Print results
|
||||||
printResults(results);
|
printResults(results);
|
||||||
|
|
||||||
|
// Save results to JSON file
|
||||||
const timestamp = new Date()
|
const timestamp = new Date()
|
||||||
.toISOString()
|
.toISOString()
|
||||||
.replace(/[:.]/g, "-")
|
.replace(/[:.]/g, "-")
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
// One-off: upload the backfilled appcast to the download bucket.
|
|
||||||
// Usage: cd ~/Code/freno-dev && bun --env-file=.env /tmp/upload-appcast.ts <file>
|
|
||||||
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
|
|
||||||
import { readFileSync } from "node:fs";
|
|
||||||
|
|
||||||
const [, , file] = process.argv;
|
|
||||||
if (!file) {
|
|
||||||
console.error("usage: bun --env-file=.env upload-appcast.ts <appcast.xml>");
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
const body = readFileSync(file);
|
|
||||||
const xml = body.toString("utf8");
|
|
||||||
// Guard: refuse to upload without all three release descriptions present.
|
|
||||||
for (const v of ["0.6.0", "0.6.2", "0.6.3"]) {
|
|
||||||
if (!xml.includes(`sparkle:shortVersionString>${v}<`)) {
|
|
||||||
console.error(`refusing: item for ${v} missing`);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const client = new S3Client({
|
|
||||||
region: process.env.AWS_REGION,
|
|
||||||
credentials: {
|
|
||||||
accessKeyId: process.env.MY_AWS_ACCESS_KEY!,
|
|
||||||
secretAccessKey: process.env.MY_AWS_SECRET_KEY!
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
await client.send(
|
|
||||||
new PutObjectCommand({
|
|
||||||
Bucket: process.env.VITE_DOWNLOAD_BUCKET_STRING,
|
|
||||||
Key: "api/TheNook/appcast.xml",
|
|
||||||
Body: body,
|
|
||||||
ContentType: "application/xml; charset=utf-8"
|
|
||||||
})
|
|
||||||
);
|
|
||||||
console.log("uploaded", file, "->", "api/TheNook/appcast.xml");
|
|
||||||
306
src/app.css
@@ -74,11 +74,6 @@
|
|||||||
--color-base: #fbf1c7;
|
--color-base: #fbf1c7;
|
||||||
--color-mantle: #f3eac1;
|
--color-mantle: #f3eac1;
|
||||||
--color-crust: #e7deb7;
|
--color-crust: #e7deb7;
|
||||||
|
|
||||||
/* Button text colors: white on dark bg variants (primary/danger),
|
|
||||||
theme text on light bg variants (secondary). */
|
|
||||||
--color-button-text: #ffffff;
|
|
||||||
--color-button-text-alt: var(--color-text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
@@ -109,11 +104,6 @@
|
|||||||
--color-base: #1e1e2e;
|
--color-base: #1e1e2e;
|
||||||
--color-mantle: #141620;
|
--color-mantle: #141620;
|
||||||
--color-crust: #0e0f16;
|
--color-crust: #0e0f16;
|
||||||
|
|
||||||
/* Dark mode: dark text on lighter bg variants (primary/danger),
|
|
||||||
white text on dark bg variants (secondary). */
|
|
||||||
--color-button-text: var(--color-crust);
|
|
||||||
--color-button-text-alt: #ffffff;
|
|
||||||
}
|
}
|
||||||
@theme {
|
@theme {
|
||||||
--color-rosewater: #efc9c2;
|
--color-rosewater: #efc9c2;
|
||||||
@@ -173,8 +163,6 @@
|
|||||||
--color-base: #fbf1c7;
|
--color-base: #fbf1c7;
|
||||||
--color-mantle: #f3eac1;
|
--color-mantle: #f3eac1;
|
||||||
--color-crust: #e7deb7;
|
--color-crust: #e7deb7;
|
||||||
--color-button-text: #ffffff;
|
|
||||||
--color-button-text-alt: var(--color-text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root.dark {
|
:root.dark {
|
||||||
@@ -204,8 +192,6 @@
|
|||||||
--color-base: #1e1e2e;
|
--color-base: #1e1e2e;
|
||||||
--color-mantle: #141620;
|
--color-mantle: #141620;
|
||||||
--color-crust: #0e0f16;
|
--color-crust: #0e0f16;
|
||||||
--color-button-text: var(--color-crust);
|
|
||||||
--color-button-text-alt: #ffffff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@@ -574,295 +560,3 @@ a.hover-underline-animation:hover::after {
|
|||||||
.shaker:hover {
|
.shaker:hover {
|
||||||
animation: shaker 0.5s ease;
|
animation: shaker 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Nook landing: campfire sprite frame cycling ──────────────────── */
|
|
||||||
/* Each frame layer is stacked; its animation holds opacity 1 during its
|
|
||||||
slot and 0 otherwise, so the stack reads as stop-motion at the app's
|
|
||||||
sprite cadence (frame time = total duration / frame count). The phase
|
|
||||||
lives inside the keyframes and every layer animates delay-free from the
|
|
||||||
same clock WebKit quantizes animation starts per cycle wrap, so
|
|
||||||
delay-offset layers can drop a wrap frame and show BOTH transparent
|
|
||||||
for a frame (the "blank frame" flicker). Complementary holds mean any
|
|
||||||
moment sums to exactly one opaque layer. Linear timing: steps()
|
|
||||||
holds mis-swap at boundary frames under WebKit. */
|
|
||||||
/* 2-frame sprites: layer i uses campfire-slot-2-{a,b}. */
|
|
||||||
@keyframes campfire-slot-2-a {
|
|
||||||
0%,
|
|
||||||
49.99% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
50%,
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes campfire-slot-2-b {
|
|
||||||
0%,
|
|
||||||
49.99% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
50%,
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 6-frame sprites (question): six slot phases. */
|
|
||||||
@keyframes campfire-slot-6-a {
|
|
||||||
0%,
|
|
||||||
16.66% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
16.67%,
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes campfire-slot-6-b {
|
|
||||||
0%,
|
|
||||||
16.66% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
16.67%,
|
|
||||||
33.32% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
33.33%,
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes campfire-slot-6-c {
|
|
||||||
0%,
|
|
||||||
33.32% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
33.33%,
|
|
||||||
49.99% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
50%,
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes campfire-slot-6-d {
|
|
||||||
0%,
|
|
||||||
49.99% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
50%,
|
|
||||||
66.66% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
66.67%,
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes campfire-slot-6-e {
|
|
||||||
0%,
|
|
||||||
66.66% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
66.67%,
|
|
||||||
83.32% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
83.33%,
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes campfire-slot-6-f {
|
|
||||||
0%,
|
|
||||||
83.32% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
83.33%,
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.campfire-frame {
|
|
||||||
animation: var(--slot-kf, campfire-slot-2-a) var(--campfire-duration, 1s)
|
|
||||||
linear infinite;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ── Nook landing: breakdown section reveal ───────────────────────── */
|
|
||||||
.reveal {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(24px);
|
|
||||||
transition:
|
|
||||||
opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
|
|
||||||
transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.reveal.in {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.reveal {
|
|
||||||
opacity: 1;
|
|
||||||
transform: none;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.campfire-frame {
|
|
||||||
animation: none;
|
|
||||||
opacity: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.campfire-frame + .campfire-frame {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* ── Nook landing: fan card shake, builds with fan speed ───────── */
|
|
||||||
.fan-card-shake {
|
|
||||||
transform-origin: left center;
|
|
||||||
animation-name: fan-shake;
|
|
||||||
animation-duration: var(--fan-speed, 0.4s);
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-timing-function: ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fan-shake {
|
|
||||||
0%, 100% { transform: rotate(0deg); }
|
|
||||||
50% { transform: rotate(calc(var(--fan-amp, 0deg) * -1)); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sputtering sparks off the fan card at max speed */
|
|
||||||
.fan-spark {
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 9999px;
|
|
||||||
background: #ffd23f;
|
|
||||||
box-shadow: 0 0 4px 1px rgba(255, 140, 0, 0.9);
|
|
||||||
animation: fan-spark-fly var(--sd, 0.5s) ease-out var(--sdel, 0s) infinite;
|
|
||||||
}
|
|
||||||
@keyframes fan-spark-fly {
|
|
||||||
0% { transform: translate(0, 0) scale(1); opacity: 0; }
|
|
||||||
10% { opacity: 1; }
|
|
||||||
100% { transform: translate(var(--sx, 20px), var(--sy, 30px)) scale(0.4); opacity: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Demo pulse: battery bolt */
|
|
||||||
@keyframes nook-pulse {
|
|
||||||
0%, 100% { opacity: 1; }
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
26
src/app.tsx
@@ -11,7 +11,6 @@ import {
|
|||||||
import "./app.css";
|
import "./app.css";
|
||||||
import { LeftBar, RightBar } from "./components/Bars";
|
import { LeftBar, RightBar } from "./components/Bars";
|
||||||
import { TerminalSplash } from "./components/TerminalSplash";
|
import { TerminalSplash } from "./components/TerminalSplash";
|
||||||
import SubdomainFooter from "./components/SubdomainFooter";
|
|
||||||
import { MetaProvider } from "@solidjs/meta";
|
import { MetaProvider } from "@solidjs/meta";
|
||||||
import ErrorBoundaryFallback from "./components/ErrorBoundaryFallback";
|
import ErrorBoundaryFallback from "./components/ErrorBoundaryFallback";
|
||||||
import { BarsProvider, useBars } from "./context/bars";
|
import { BarsProvider, useBars } from "./context/bars";
|
||||||
@@ -35,8 +34,10 @@ function AppLayout(props: { children: any }) {
|
|||||||
let lastScrollY = 0;
|
let lastScrollY = 0;
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
// Initialize performance tracking
|
||||||
initPerformanceTracking();
|
initPerformanceTracking();
|
||||||
|
|
||||||
|
// Start monitoring for new deployments
|
||||||
startDeploymentMonitoring();
|
startDeploymentMonitoring();
|
||||||
|
|
||||||
const windowWidth = createWindowWidth();
|
const windowWidth = createWindowWidth();
|
||||||
@@ -198,24 +199,21 @@ function AppLayout(props: { children: any }) {
|
|||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={!isMainSite()}>
|
<Show when={!isMainSite()}>
|
||||||
<div class="bg-base flex min-h-screen w-full flex-col overflow-x-hidden">
|
<div class="bg-base min-h-screen w-full overflow-x-hidden">
|
||||||
<noscript>
|
<noscript>
|
||||||
<div class="bg-yellow text-crust border-text fixed top-0 z-150 w-full border-b-2 p-4 text-center font-semibold">
|
<div class="bg-yellow text-crust border-text fixed top-0 z-150 w-full border-b-2 p-4 text-center font-semibold">
|
||||||
JavaScript is disabled. Features will be limited.
|
JavaScript is disabled. Features will be limited.
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div class="flex-1">
|
<ErrorBoundary
|
||||||
<ErrorBoundary
|
fallback={(error, reset) => (
|
||||||
fallback={(error, reset) => (
|
<ErrorBoundaryFallback error={error} reset={reset} />
|
||||||
<ErrorBoundaryFallback error={error} reset={reset} />
|
)}
|
||||||
)}
|
>
|
||||||
>
|
<Suspense fallback={<TerminalSplash inverse />}>
|
||||||
<Suspense fallback={<TerminalSplash inverse />}>
|
{props.children}
|
||||||
{props.children}
|
</Suspense>
|
||||||
</Suspense>
|
</ErrorBoundary>
|
||||||
</ErrorBoundary>
|
|
||||||
</div>
|
|
||||||
<SubdomainFooter />
|
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -366,11 +366,6 @@ function MainRightBarContent() {
|
|||||||
Contact Me
|
Contact Me
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="hover:text-subtext0 w-fit transition-transform duration-200 ease-in-out hover:-translate-y-0.5 hover:scale-110 hover:font-bold">
|
|
||||||
<a href="/privacy-policy" onClick={handleLinkClick}>
|
|
||||||
Privacy
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://github.com/MikeFreno/"
|
href="https://github.com/MikeFreno/"
|
||||||
@@ -465,7 +460,7 @@ function MainRightBarContent() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function RightBarContent() {
|
export function RightBarContent() {
|
||||||
const site = useSite();
|
const site = useSite();
|
||||||
return (
|
return (
|
||||||
<Show when={site().id === "main"} fallback={<SubdomainRightBarContent />}>
|
<Show when={site().id === "main"} fallback={<SubdomainRightBarContent />}>
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ const sendContactEmail = action(async (formData: FormData) => {
|
|||||||
|
|
||||||
const { env } = await import("~/env/server");
|
const { env } = await import("~/env/server");
|
||||||
|
|
||||||
|
// Verify Cloudflare Turnstile token
|
||||||
const turnstileValid = await verifyTurnstileToken(
|
const turnstileValid = await verifyTurnstileToken(
|
||||||
turnstileToken,
|
turnstileToken,
|
||||||
env.TURNSTILE_SECRET_KEY,
|
env.TURNSTILE_SECRET_KEY,
|
||||||
@@ -251,6 +252,7 @@ export function ContactForm(props: ContactFormProps) {
|
|||||||
|
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
|
|
||||||
|
// Load server data using createAsync
|
||||||
const contactData = createAsync(() => getContactData(), {
|
const contactData = createAsync(() => getContactData(), {
|
||||||
deferStream: true
|
deferStream: true
|
||||||
});
|
});
|
||||||
@@ -348,6 +350,7 @@ export function ContactForm(props: ContactFormProps) {
|
|||||||
const message = formData.get("message") as string;
|
const message = formData.get("message") as string;
|
||||||
|
|
||||||
if (name && email && message) {
|
if (name && email && message) {
|
||||||
|
// Get fresh Turnstile token
|
||||||
let currentToken = turnstileToken();
|
let currentToken = turnstileToken();
|
||||||
if (
|
if (
|
||||||
!currentToken &&
|
!currentToken &&
|
||||||
@@ -385,6 +388,7 @@ export function ContactForm(props: ContactFormProps) {
|
|||||||
setError("");
|
setError("");
|
||||||
form.reset();
|
form.reset();
|
||||||
|
|
||||||
|
// Reset Turnstile widget
|
||||||
if (typeof window !== "undefined" && (window as any).turnstile) {
|
if (typeof window !== "undefined" && (window as any).turnstile) {
|
||||||
const widgetEl = document.getElementById("turnstile-widget-1");
|
const widgetEl = document.getElementById("turnstile-widget-1");
|
||||||
if (widgetEl) {
|
if (widgetEl) {
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
import { HttpHeader } from "@solidjs/start";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Renders edge-cache response headers for a page route.
|
|
||||||
*
|
|
||||||
* Sets `CDN-Cache-Control` so Vercel serves the rendered HTML from the edge
|
|
||||||
* (no origin re-render) for `maxAge` seconds, then stale-while-revalidate up
|
|
||||||
* to `staleSeconds`. `Cache-Control: public, max-age=0` keeps browsers
|
|
||||||
* revalidating, so visitors always get the latest version — only the CDN
|
|
||||||
* holds a cached copy. Function/CND-Cache-Control overrides the Vercel
|
|
||||||
* default, so repeated visits and bot crawls stop re-rendering at origin.
|
|
||||||
*/
|
|
||||||
export function EdgeCacheHeaders(props: {
|
|
||||||
/** Seconds the CDN may serve the response fresh. */
|
|
||||||
maxAge: number;
|
|
||||||
/** Seconds the CDN serves stale while revalidating (default: 1 day). */
|
|
||||||
staleSeconds?: number;
|
|
||||||
}) {
|
|
||||||
const stale = props.staleSeconds ?? 86400;
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<HttpHeader name="Cache-Control" value="public, max-age=0" />
|
|
||||||
<HttpHeader
|
|
||||||
name="CDN-Cache-Control"
|
|
||||||
value={`public, s-maxage=${props.maxAge}, stale-while-revalidate=${stale}`}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -60,42 +60,6 @@ describe("resolvePageHeadMeta — canonical URL derivation", () => {
|
|||||||
expect(meta.canonical).toBe("https://nessa.freno.me/contact");
|
expect(meta.canonical).toBe("https://nessa.freno.me/contact");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Subdomain routing is host-aware (root routes dispatch by useSite()), so
|
|
||||||
// useLocation() normally reports the public path. resolvePageHeadMeta also
|
|
||||||
// defensively strips a subdomain prefix from a prefixed pathname, so the
|
|
||||||
// canonical stays public even if the prefixed form ever appears.
|
|
||||||
it("nessa prefixed /nessa/contact → https://nessa.freno.me/contact", () => {
|
|
||||||
const meta = resolvePageHeadMeta(
|
|
||||||
BASE_PROPS,
|
|
||||||
SITE_CONFIG.nessa,
|
|
||||||
"/nessa/contact"
|
|
||||||
);
|
|
||||||
expect(meta.canonical).toBe("https://nessa.freno.me/contact");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("lineage prefixed /lineage/privacy → https://lineage.freno.me/privacy", () => {
|
|
||||||
const meta = resolvePageHeadMeta(
|
|
||||||
BASE_PROPS,
|
|
||||||
SITE_CONFIG.lineage,
|
|
||||||
"/lineage/privacy"
|
|
||||||
);
|
|
||||||
expect(meta.canonical).toBe("https://lineage.freno.me/privacy");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("nessa prefixed root /nessa/ → https://nessa.freno.me/", () => {
|
|
||||||
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.nessa, "/nessa/");
|
|
||||||
expect(meta.canonical).toBe("https://nessa.freno.me/");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("main path that happens to start with /nessa is NOT stripped (main site has no prefix)", () => {
|
|
||||||
const meta = resolvePageHeadMeta(
|
|
||||||
BASE_PROPS,
|
|
||||||
SITE_CONFIG.main,
|
|
||||||
"/nessa/contact"
|
|
||||||
);
|
|
||||||
expect(meta.canonical).toBe("https://freno.me/nessa/contact");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("lineage → canonical starts with https://lineage.freno.me", () => {
|
it("lineage → canonical starts with https://lineage.freno.me", () => {
|
||||||
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.lineage, "/");
|
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.lineage, "/");
|
||||||
expect(meta.canonical.startsWith("https://lineage.freno.me")).toBe(true);
|
expect(meta.canonical.startsWith("https://lineage.freno.me")).toBe(true);
|
||||||
@@ -132,17 +96,12 @@ describe("resolvePageHeadMeta — canonical URL derivation", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("resolvePageHeadMeta — OpenGraph fallbacks", () => {
|
describe("resolvePageHeadMeta — OpenGraph fallbacks", () => {
|
||||||
it("ogImage defaults to the site's ogDefaultImage, resolved to an absolute URL", () => {
|
it("ogImage defaults to the site's ogDefaultImage when not provided", () => {
|
||||||
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.nessa, "/");
|
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.nessa, "/");
|
||||||
expect(meta.ogImage).toBe("https://nessa.freno.me/nessa/og-default.png");
|
expect(meta.ogImage).toBe(SITE_CONFIG.nessa.ogDefaultImage);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("the nook default resolves to the absolute og.png URL", () => {
|
it("explicit ogImage overrides the site default", () => {
|
||||||
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.nook, "/");
|
|
||||||
expect(meta.ogImage).toBe("https://nook.freno.me/nook/og.png");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("explicit absolute ogImage passes through unchanged", () => {
|
|
||||||
const meta = resolvePageHeadMeta(
|
const meta = resolvePageHeadMeta(
|
||||||
{ ...BASE_PROPS, ogImage: "https://cdn/custom.png" },
|
{ ...BASE_PROPS, ogImage: "https://cdn/custom.png" },
|
||||||
SITE_CONFIG.main,
|
SITE_CONFIG.main,
|
||||||
@@ -151,15 +110,6 @@ describe("resolvePageHeadMeta — OpenGraph fallbacks", () => {
|
|||||||
expect(meta.ogImage).toBe("https://cdn/custom.png");
|
expect(meta.ogImage).toBe("https://cdn/custom.png");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("explicit site-relative ogImage is resolved against the site domain", () => {
|
|
||||||
const meta = resolvePageHeadMeta(
|
|
||||||
{ ...BASE_PROPS, ogImage: "/og/custom.png" },
|
|
||||||
SITE_CONFIG.gaze,
|
|
||||||
"/"
|
|
||||||
);
|
|
||||||
expect(meta.ogImage).toBe("https://gaze.freno.me/og/custom.png");
|
|
||||||
});
|
|
||||||
|
|
||||||
it("ogTitle falls back to the base title (no suffix)", () => {
|
it("ogTitle falls back to the base title (no suffix)", () => {
|
||||||
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.main, "/");
|
const meta = resolvePageHeadMeta(BASE_PROPS, SITE_CONFIG.main, "/");
|
||||||
expect(meta.ogTitle).toBe("Blog");
|
expect(meta.ogTitle).toBe("Blog");
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ export default function PageHead(props: PageHeadProps) {
|
|||||||
<Meta property="og:description" content={meta().ogDescription} />
|
<Meta property="og:description" content={meta().ogDescription} />
|
||||||
)}
|
)}
|
||||||
<Meta property="og:image" content={meta().ogImage} />
|
<Meta property="og:image" content={meta().ogImage} />
|
||||||
{/* X/Twitter large-image card; falls back to the og:* tags above. */}
|
|
||||||
<Meta name="twitter:card" content="summary_large_image" />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
import { A } from "@solidjs/router";
|
|
||||||
import { buildMainSiteUrl } from "~/lib/site-context";
|
|
||||||
|
|
||||||
export default function SubdomainFooter() {
|
|
||||||
return (
|
|
||||||
<footer class="border-surface0 bg-surface0 relative z-10 border-t py-8">
|
|
||||||
<div class="relative flex flex-col items-center gap-2 text-sm sm:flex-row sm:justify-center">
|
|
||||||
<A
|
|
||||||
href={buildMainSiteUrl()}
|
|
||||||
class="text-text/60 hover:text-text/80 text-center underline underline-offset-4 transition-colors"
|
|
||||||
>
|
|
||||||
made with <span class="text-red-400"><3</span>
|
|
||||||
</A>
|
|
||||||
<A
|
|
||||||
href={buildMainSiteUrl("/downloads")}
|
|
||||||
class="text-text/80 hover:text-text underline underline-offset-4 transition-colors sm:absolute sm:right-4"
|
|
||||||
>
|
|
||||||
see more products
|
|
||||||
</A>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -12,13 +12,13 @@ import { For, Show } from "solid-js";
|
|||||||
import { A, useLocation } from "@solidjs/router";
|
import { A, useLocation } from "@solidjs/router";
|
||||||
import { useSite } from "~/context/SiteContext";
|
import { useSite } from "~/context/SiteContext";
|
||||||
import { useDarkMode } from "~/context/darkMode";
|
import { useDarkMode } from "~/context/darkMode";
|
||||||
import { NAV_CONFIG } from "~/lib/nav-config";
|
import { NAV_CONFIG, BACK_TO_FRENO } from "~/lib/nav-config";
|
||||||
import { DarkModeToggle } from "~/components/DarkModeToggle";
|
import { DarkModeToggle } from "~/components/DarkModeToggle";
|
||||||
|
|
||||||
export default function SubdomainHeader() {
|
export default function SubdomainHeader() {
|
||||||
const site = useSite();
|
const site = useSite();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { isDark } = useDarkMode();
|
const { isDark, toggleDarkMode } = useDarkMode();
|
||||||
|
|
||||||
const brandName = () => site().displayName;
|
const brandName = () => site().displayName;
|
||||||
const brandColor = () =>
|
const brandColor = () =>
|
||||||
@@ -32,7 +32,10 @@ export default function SubdomainHeader() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header class="bg-base/80 border-surface0 sticky top-0 z-50 w-full border-b backdrop-blur-md">
|
<header
|
||||||
|
class="sticky top-0 z-50 w-full border-b backdrop-blur-md"
|
||||||
|
classList={{ "bg-base/80 border-surface0": site().headerOpaque }}
|
||||||
|
>
|
||||||
<div class="mx-auto flex h-14 max-w-7xl items-center justify-between px-4">
|
<div class="mx-auto flex h-14 max-w-7xl items-center justify-between px-4">
|
||||||
<A
|
<A
|
||||||
href="/"
|
href="/"
|
||||||
@@ -75,7 +78,7 @@ export default function SubdomainHeader() {
|
|||||||
</Show>
|
</Show>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
<DarkModeToggle shouldScale={false} />
|
<DarkModeToggle />
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ export function Typewriter(props: {
|
|||||||
entries.forEach((entry) => {
|
entries.forEach((entry) => {
|
||||||
// If component leaves viewport while animating, we could pause
|
// If component leaves viewport while animating, we could pause
|
||||||
// For now, we just ensure it starts when visible
|
// For now, we just ensure it starts when visible
|
||||||
|
if (!entry.isIntersecting && cleanupAnimation) {
|
||||||
|
// Component is off-screen - could add pause logic here if needed
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export default function AddAttachmentSection(props: AddAttachmentSectionProps) {
|
|||||||
};
|
};
|
||||||
reader.readAsDataURL(file);
|
reader.readAsDataURL(file);
|
||||||
|
|
||||||
|
// Refresh the S3 file list
|
||||||
await loadAttachments();
|
await loadAttachments();
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -80,6 +81,7 @@ export default function AddAttachmentSection(props: AddAttachmentSectionProps) {
|
|||||||
body: JSON.stringify({ key })
|
body: JSON.stringify({ key })
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Refresh the S3 file list
|
||||||
await loadAttachments();
|
await loadAttachments();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Failed to delete file:", err);
|
console.error("Failed to delete file:", err);
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ export default function CommentSectionWrapper(
|
|||||||
const newComment = async (commentBody: string, parentCommentID?: number) => {
|
const newComment = async (commentBody: string, parentCommentID?: number) => {
|
||||||
setCommentSubmitLoading(true);
|
setCommentSubmitLoading(true);
|
||||||
|
|
||||||
|
// Clear any existing timeout
|
||||||
if (commentSubmitTimeoutId) {
|
if (commentSubmitTimeoutId) {
|
||||||
clearTimeout(commentSubmitTimeoutId);
|
clearTimeout(commentSubmitTimeoutId);
|
||||||
}
|
}
|
||||||
@@ -427,6 +428,7 @@ export default function CommentSectionWrapper(
|
|||||||
const editComment = async (body: string, comment_id: number) => {
|
const editComment = async (body: string, comment_id: number) => {
|
||||||
setCommentEditLoading(true);
|
setCommentEditLoading(true);
|
||||||
|
|
||||||
|
// Clear any existing timeout
|
||||||
if (editCommentTimeoutId) {
|
if (editCommentTimeoutId) {
|
||||||
clearTimeout(editCommentTimeoutId);
|
clearTimeout(editCommentTimeoutId);
|
||||||
}
|
}
|
||||||
@@ -525,6 +527,7 @@ export default function CommentSectionWrapper(
|
|||||||
|
|
||||||
setCommentDeletionLoading(true);
|
setCommentDeletionLoading(true);
|
||||||
|
|
||||||
|
// Clear any existing timeout
|
||||||
if (deleteCommentTimeoutId) {
|
if (deleteCommentTimeoutId) {
|
||||||
clearTimeout(deleteCommentTimeoutId);
|
clearTimeout(deleteCommentTimeoutId);
|
||||||
}
|
}
|
||||||
@@ -620,6 +623,7 @@ export default function CommentSectionWrapper(
|
|||||||
setOperationError("");
|
setOperationError("");
|
||||||
|
|
||||||
if (data.commentBody) {
|
if (data.commentBody) {
|
||||||
|
// Soft delete (replace body with deletion message)
|
||||||
setAllComments((prev) =>
|
setAllComments((prev) =>
|
||||||
prev.map((comment) => {
|
prev.map((comment) => {
|
||||||
if (comment.id === data.commentID) {
|
if (comment.id === data.commentID) {
|
||||||
@@ -648,6 +652,7 @@ export default function CommentSectionWrapper(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
// Hard delete (remove from list)
|
||||||
setAllComments((prev) =>
|
setAllComments((prev) =>
|
||||||
prev.filter((comment) => comment.id !== data.commentID)
|
prev.filter((comment) => comment.id !== data.commentID)
|
||||||
);
|
);
|
||||||
@@ -662,6 +667,7 @@ export default function CommentSectionWrapper(
|
|||||||
}, 300);
|
}, 300);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Deletion/edit prompt toggle
|
||||||
const toggleModification = (
|
const toggleModification = (
|
||||||
commentID: number,
|
commentID: number,
|
||||||
commenterID: string,
|
commenterID: string,
|
||||||
@@ -702,6 +708,7 @@ export default function CommentSectionWrapper(
|
|||||||
setCommentBodyForModification("");
|
setCommentBodyForModification("");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Reaction handling
|
||||||
const commentReaction = (reactionType: ReactionType, commentID: number) => {
|
const commentReaction = (reactionType: ReactionType, commentID: number) => {
|
||||||
if (!props.currentUserID) {
|
if (!props.currentUserID) {
|
||||||
console.warn("Cannot react to comment: user not authenticated");
|
console.warn("Cannot react to comment: user not authenticated");
|
||||||
@@ -793,6 +800,7 @@ export default function CommentSectionWrapper(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Click outside handlers (SolidJS version)
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
const handleClickOutsideDelete = (e: MouseEvent) => {
|
const handleClickOutsideDelete = (e: MouseEvent) => {
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ function sanitizeMermaidSvg(svgString: string): string {
|
|||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const doc = parser.parseFromString(svgString, "text/html");
|
const doc = parser.parseFromString(svgString, "text/html");
|
||||||
|
|
||||||
|
// Remove dangerous elements
|
||||||
doc.querySelectorAll("script, iframe, object, embed, form, link, meta, base").forEach((el) => {
|
doc.querySelectorAll("script, iframe, object, embed, form, link, meta, base").forEach((el) => {
|
||||||
el.remove();
|
el.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Remove event handlers and dangerous attributes from all elements
|
||||||
doc.querySelectorAll("[on*], [href*='javascript:'], [style*='expression(']").forEach((el) => {
|
doc.querySelectorAll("[on*], [href*='javascript:'], [style*='expression(']").forEach((el) => {
|
||||||
const attrs = Array.from(el.attributes);
|
const attrs = Array.from(el.attributes);
|
||||||
attrs.forEach((attr) => {
|
attrs.forEach((attr) => {
|
||||||
|
|||||||
@@ -11,17 +11,15 @@ function sanitizeHtml(html: string): string {
|
|||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const doc = parser.parseFromString(html, "text/html");
|
const doc = parser.parseFromString(html, "text/html");
|
||||||
|
|
||||||
|
// Remove dangerous elements
|
||||||
doc
|
doc
|
||||||
.querySelectorAll(
|
.querySelectorAll(
|
||||||
"script, iframe, object, embed, form, link, meta, base, svg script"
|
"script, iframe, object, embed, form, link, meta, base, svg script"
|
||||||
)
|
)
|
||||||
.forEach((el) => el.remove());
|
.forEach((el) => el.remove());
|
||||||
|
|
||||||
// Remove event handler attributes and dangerous URLs from all elements.
|
// Remove event handler attributes and dangerous URLs from all elements
|
||||||
// NOTE: attribute-name wildcards (e.g. [on*]) are not valid CSS selectors and
|
doc.querySelectorAll("[on*], [href], [style], [action]").forEach((el) => {
|
||||||
// throw a SyntaxError on querySelectorAll, so we match all elements here and
|
|
||||||
// the per-attribute checks below handle on*/href/style/action filtering.
|
|
||||||
doc.querySelectorAll("*").forEach((el) => {
|
|
||||||
const attrs = Array.from(el.attributes);
|
const attrs = Array.from(el.attributes);
|
||||||
attrs.forEach((attr) => {
|
attrs.forEach((attr) => {
|
||||||
const name = attr.name;
|
const name = attr.name;
|
||||||
@@ -130,6 +128,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
const processVideos = () => {
|
const processVideos = () => {
|
||||||
if (!contentRef) return;
|
if (!contentRef) return;
|
||||||
|
|
||||||
|
// Handle direct video elements
|
||||||
const videoElements = contentRef.querySelectorAll("video");
|
const videoElements = contentRef.querySelectorAll("video");
|
||||||
|
|
||||||
videoElements.forEach((video) => {
|
videoElements.forEach((video) => {
|
||||||
@@ -137,14 +136,18 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
video.setAttribute("playsinline", "");
|
video.setAttribute("playsinline", "");
|
||||||
video.setAttribute("controls", "");
|
video.setAttribute("controls", "");
|
||||||
|
|
||||||
|
// Remove download attribute if present
|
||||||
video.removeAttribute("download");
|
video.removeAttribute("download");
|
||||||
|
|
||||||
|
// Ensure proper MIME types on source elements
|
||||||
const sources = video.querySelectorAll("source");
|
const sources = video.querySelectorAll("source");
|
||||||
sources.forEach((source) => {
|
sources.forEach((source) => {
|
||||||
const src = source.getAttribute("src");
|
const src = source.getAttribute("src");
|
||||||
if (src) {
|
if (src) {
|
||||||
|
// Remove download attribute from sources
|
||||||
source.removeAttribute("download");
|
source.removeAttribute("download");
|
||||||
|
|
||||||
|
// Set correct type attribute if missing
|
||||||
if (!source.hasAttribute("type")) {
|
if (!source.hasAttribute("type")) {
|
||||||
if (src.endsWith(".mp4")) {
|
if (src.endsWith(".mp4")) {
|
||||||
source.setAttribute("type", "video/mp4");
|
source.setAttribute("type", "video/mp4");
|
||||||
@@ -157,6 +160,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// If video has direct src attribute, ensure type is set
|
||||||
const videoSrc = video.getAttribute("src");
|
const videoSrc = video.getAttribute("src");
|
||||||
if (videoSrc && !video.hasAttribute("type")) {
|
if (videoSrc && !video.hasAttribute("type")) {
|
||||||
if (videoSrc.endsWith(".mp4")) {
|
if (videoSrc.endsWith(".mp4")) {
|
||||||
@@ -169,6 +173,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Handle iframes with video sources - replace with proper video tags
|
||||||
const iframes = contentRef.querySelectorAll("iframe");
|
const iframes = contentRef.querySelectorAll("iframe");
|
||||||
iframes.forEach((iframe) => {
|
iframes.forEach((iframe) => {
|
||||||
const src = iframe.getAttribute("src");
|
const src = iframe.getAttribute("src");
|
||||||
@@ -179,6 +184,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
src.endsWith(".webm") ||
|
src.endsWith(".webm") ||
|
||||||
src.endsWith(".ogg"))
|
src.endsWith(".ogg"))
|
||||||
) {
|
) {
|
||||||
|
// Create a proper video element
|
||||||
const video = document.createElement("video");
|
const video = document.createElement("video");
|
||||||
video.setAttribute("controls", "");
|
video.setAttribute("controls", "");
|
||||||
video.setAttribute("playsinline", "");
|
video.setAttribute("playsinline", "");
|
||||||
@@ -186,6 +192,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
video.style.maxWidth = "100%";
|
video.style.maxWidth = "100%";
|
||||||
video.style.height = "auto";
|
video.style.height = "auto";
|
||||||
|
|
||||||
|
// Set appropriate type based on file extension
|
||||||
let videoType = "video/mp4";
|
let videoType = "video/mp4";
|
||||||
if (src.endsWith(".mov")) {
|
if (src.endsWith(".mov")) {
|
||||||
videoType = "video/mp4"; // MOV files are typically H.264 which plays as mp4
|
videoType = "video/mp4"; // MOV files are typically H.264 which plays as mp4
|
||||||
@@ -198,6 +205,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
video.setAttribute("type", videoType);
|
video.setAttribute("type", videoType);
|
||||||
video.src = src;
|
video.src = src;
|
||||||
|
|
||||||
|
// Replace the iframe with the video element
|
||||||
const parent = iframe.parentElement;
|
const parent = iframe.parentElement;
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parent.replaceChild(video, iframe);
|
parent.replaceChild(video, iframe);
|
||||||
@@ -205,6 +213,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Also check for any anchor tags wrapping videos that might have download attribute
|
||||||
const videoLinks = contentRef.querySelectorAll("a");
|
const videoLinks = contentRef.querySelectorAll("a");
|
||||||
videoLinks.forEach((link) => {
|
videoLinks.forEach((link) => {
|
||||||
const hasVideo = link.querySelector("video");
|
const hasVideo = link.querySelector("video");
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export default function PostForm(props: PostFormProps) {
|
|||||||
props.postId
|
props.postId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Mark initial load as complete after data is loaded (for edit mode)
|
||||||
// Use setTimeout to ensure this runs after all signals are initialized
|
// Use setTimeout to ensure this runs after all signals are initialized
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
if (props.mode === "edit" && props.initialData) {
|
if (props.mode === "edit" && props.initialData) {
|
||||||
@@ -72,10 +73,12 @@ export default function PostForm(props: PostFormProps) {
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Helper to ensure post exists (create if needed)
|
||||||
const ensurePostExists = async (): Promise<number> => {
|
const ensurePostExists = async (): Promise<number> => {
|
||||||
const existingId = createdPostId() || props.postId;
|
const existingId = createdPostId() || props.postId;
|
||||||
if (existingId) return existingId;
|
if (existingId) return existingId;
|
||||||
|
|
||||||
|
// Create minimal post if it doesn't exist yet
|
||||||
const result = await api.database.createPost.mutate({
|
const result = await api.database.createPost.mutate({
|
||||||
category: "blog",
|
category: "blog",
|
||||||
title: title().replaceAll(" ", "_") || "Untitled",
|
title: title().replaceAll(" ", "_") || "Untitled",
|
||||||
@@ -92,6 +95,7 @@ export default function PostForm(props: PostFormProps) {
|
|||||||
return newId;
|
return newId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Individual autosave functions for each field
|
||||||
const autoSaveTitle = async () => {
|
const autoSaveTitle = async () => {
|
||||||
const currentTitle = title();
|
const currentTitle = title();
|
||||||
if (!currentTitle || currentTitle === props.initialData?.title) return;
|
if (!currentTitle || currentTitle === props.initialData?.title) return;
|
||||||
@@ -244,6 +248,7 @@ export default function PostForm(props: PostFormProps) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Debounced versions
|
||||||
const debouncedAutoSaveTitle = debounce(autoSaveTitle, 2500);
|
const debouncedAutoSaveTitle = debounce(autoSaveTitle, 2500);
|
||||||
const debouncedAutoSaveSubtitle = debounce(autoSaveSubtitle, 2500);
|
const debouncedAutoSaveSubtitle = debounce(autoSaveSubtitle, 2500);
|
||||||
const debouncedAutoSaveBody = debounce(autoSaveBody, 2500);
|
const debouncedAutoSaveBody = debounce(autoSaveBody, 2500);
|
||||||
@@ -251,6 +256,7 @@ export default function PostForm(props: PostFormProps) {
|
|||||||
const debouncedAutoSavePublished = debounce(autoSavePublished, 1000);
|
const debouncedAutoSavePublished = debounce(autoSavePublished, 1000);
|
||||||
const debouncedAutoSaveBanner = debounce(autoSaveBanner, 2500);
|
const debouncedAutoSaveBanner = debounce(autoSaveBanner, 2500);
|
||||||
|
|
||||||
|
// Individual effects for each field
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
const titleVal = title();
|
const titleVal = title();
|
||||||
if (isInitialLoad()) return;
|
if (isInitialLoad()) return;
|
||||||
@@ -399,6 +405,7 @@ export default function PostForm(props: PostFormProps) {
|
|||||||
author_id: props.userID
|
author_id: props.userID
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// Create new post
|
||||||
const result = await api.database.createPost.mutate({
|
const result = await api.database.createPost.mutate({
|
||||||
category: "blog",
|
category: "blog",
|
||||||
title: title().replaceAll(" ", "_"),
|
title: title().replaceAll(" ", "_"),
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export default function PostSorting(props: PostSortingProps) {
|
|||||||
case "newest":
|
case "newest":
|
||||||
break; // Posts already come newest first from DB (DESC order)
|
break; // Posts already come newest first from DB (DESC order)
|
||||||
case "oldest":
|
case "oldest":
|
||||||
sorted.reverse();
|
sorted.reverse(); // Reverse to get oldest first
|
||||||
break;
|
break;
|
||||||
case "most_liked":
|
case "most_liked":
|
||||||
sorted.sort((a, b) => (b.total_likes || 0) - (a.total_likes || 0));
|
sorted.sort((a, b) => (b.total_likes || 0) - (a.total_likes || 0));
|
||||||
|
|||||||
@@ -1547,6 +1547,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
},
|
},
|
||||||
handleDOMEvents: {
|
handleDOMEvents: {
|
||||||
touchstart: (view, event) => {
|
touchstart: (view, event) => {
|
||||||
|
// Only handle touch events on mobile in fullscreen with active suggestion
|
||||||
if (
|
if (
|
||||||
!hasSuggestion() ||
|
!hasSuggestion() ||
|
||||||
!isFullscreen() ||
|
!isFullscreen() ||
|
||||||
@@ -1561,6 +1562,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
touchend: (view, event) => {
|
touchend: (view, event) => {
|
||||||
|
// Only handle touch events on mobile in fullscreen with active suggestion
|
||||||
if (
|
if (
|
||||||
!hasSuggestion() ||
|
!hasSuggestion() ||
|
||||||
!isFullscreen() ||
|
!isFullscreen() ||
|
||||||
@@ -1858,6 +1860,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
const node = allSuperscriptNodes[i];
|
const node = allSuperscriptNodes[i];
|
||||||
const text = node.text;
|
const text = node.text;
|
||||||
|
|
||||||
|
// Check if this is a complete reference (with optional whitespace)
|
||||||
const completeMatch = text.match(/^\s*\[(\d+)\]\s*$/);
|
const completeMatch = text.match(/^\s*\[(\d+)\]\s*$/);
|
||||||
if (completeMatch) {
|
if (completeMatch) {
|
||||||
const hasOtherMarks = node.marks.some(
|
const hasOtherMarks = node.marks.some(
|
||||||
@@ -1874,6 +1877,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if this might be the start of a split reference
|
||||||
if (text === "[" && i + 2 < allSuperscriptNodes.length) {
|
if (text === "[" && i + 2 < allSuperscriptNodes.length) {
|
||||||
const nextNode = allSuperscriptNodes[i + 1];
|
const nextNode = allSuperscriptNodes[i + 1];
|
||||||
const afterNode = allSuperscriptNodes[i + 2];
|
const afterNode = allSuperscriptNodes[i + 2];
|
||||||
@@ -1954,6 +1958,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
|
|
||||||
allRefs.sort((a, b) => a.pos - b.pos);
|
allRefs.sort((a, b) => a.pos - b.pos);
|
||||||
|
|
||||||
|
// Check if renumbering is needed (if any ref doesn't match its expected number)
|
||||||
let needsRenumbering = false;
|
let needsRenumbering = false;
|
||||||
for (let i = 0; i < allRefs.length; i++) {
|
for (let i = 0; i < allRefs.length; i++) {
|
||||||
if (allRefs[i].refNum !== i + 1) {
|
if (allRefs[i].refNum !== i + 1) {
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export const Mermaid = Node.create({
|
|||||||
getAttrs: (element) => {
|
getAttrs: (element) => {
|
||||||
if (typeof element === "string") return false;
|
if (typeof element === "string") return false;
|
||||||
|
|
||||||
|
// Skip if already has data-type or data-mermaid-diagram attribute
|
||||||
if (
|
if (
|
||||||
element.hasAttribute("data-type") ||
|
element.hasAttribute("data-type") ||
|
||||||
element.hasAttribute("data-mermaid-diagram")
|
element.hasAttribute("data-mermaid-diagram")
|
||||||
@@ -82,6 +83,7 @@ export const Mermaid = Node.create({
|
|||||||
const content = code.textContent || "";
|
const content = code.textContent || "";
|
||||||
const trimmedContent = content.trim();
|
const trimmedContent = content.trim();
|
||||||
|
|
||||||
|
// Check if this looks like a mermaid diagram
|
||||||
const mermaidKeywords = [
|
const mermaidKeywords = [
|
||||||
"graph ",
|
"graph ",
|
||||||
"sequenceDiagram",
|
"sequenceDiagram",
|
||||||
@@ -172,10 +174,12 @@ export const Mermaid = Node.create({
|
|||||||
code.textContent = node.attrs.content || "";
|
code.textContent = node.attrs.content || "";
|
||||||
pre.appendChild(code);
|
pre.appendChild(code);
|
||||||
|
|
||||||
|
// Validation status indicator
|
||||||
const statusIndicator = document.createElement("div");
|
const statusIndicator = document.createElement("div");
|
||||||
statusIndicator.className =
|
statusIndicator.className =
|
||||||
"absolute top-2 left-2 w-3 h-3 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-200";
|
"absolute top-2 left-2 w-3 h-3 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-200";
|
||||||
|
|
||||||
|
// Validate syntax asynchronously
|
||||||
const validateSyntax = async () => {
|
const validateSyntax = async () => {
|
||||||
const content = node.attrs.content || "";
|
const content = node.attrs.content || "";
|
||||||
if (!content.trim()) {
|
if (!content.trim()) {
|
||||||
@@ -246,6 +250,7 @@ export const Mermaid = Node.create({
|
|||||||
(p: any) => p.spec?.key === "mermaidSelection"
|
(p: any) => p.spec?.key === "mermaidSelection"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Use intersection observer to trigger update when visible
|
||||||
let updateInterval: ReturnType<typeof setInterval> | null = null;
|
let updateInterval: ReturnType<typeof setInterval> | null = null;
|
||||||
const observer = new IntersectionObserver(
|
const observer = new IntersectionObserver(
|
||||||
(entries) => {
|
(entries) => {
|
||||||
|
|||||||
29
src/components/icons/BackArrow.tsx
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
const BackArrow = (props: {
|
||||||
|
height: number;
|
||||||
|
width: number;
|
||||||
|
stroke: string;
|
||||||
|
strokeWidth: number;
|
||||||
|
class?: string;
|
||||||
|
}) => {
|
||||||
|
return (
|
||||||
|
<div class={props.class}>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
strokeWidth={props.strokeWidth}
|
||||||
|
stroke={props.stroke}
|
||||||
|
height={props.height}
|
||||||
|
width={props.width}
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BackArrow;
|
||||||
39
src/components/icons/MenuBars.tsx
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
function MenuBars() {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
width="36"
|
||||||
|
height="30"
|
||||||
|
viewBox="0 0 120 100"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<g id="Mask group">
|
||||||
|
<g id="Frame 1">
|
||||||
|
<rect width="120" height="100" />
|
||||||
|
<line
|
||||||
|
id="LineA"
|
||||||
|
x1="11.5"
|
||||||
|
y1="31.5"
|
||||||
|
x2="108.5"
|
||||||
|
y2="31.5"
|
||||||
|
strokeWidth="6"
|
||||||
|
strokeLinecap="round"
|
||||||
|
class="stroke-black dark:stroke-white"
|
||||||
|
/>
|
||||||
|
<line
|
||||||
|
id="LineB"
|
||||||
|
x1="11.5"
|
||||||
|
y1="64.5"
|
||||||
|
x2="108.5"
|
||||||
|
y2="64.5"
|
||||||
|
strokeWidth="6"
|
||||||
|
strokeLinecap="round"
|
||||||
|
class="stroke-black dark:stroke-white"
|
||||||
|
/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default MenuBars;
|
||||||
@@ -1,367 +0,0 @@
|
|||||||
import { For, type JSX } from "solid-js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Pixel-art campfire sprite, faithful to the app's CampfireFrames: a 14×14
|
|
||||||
* grid where the log base never moves and only the flame and sparks animate.
|
|
||||||
* `state` picks the frame set and cadence — idle simmers, running dances,
|
|
||||||
* ready exhales, error pulses dead embers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const FIRE_PALETTE: Record<string, string> = {
|
|
||||||
o: "#e7873a",
|
|
||||||
y: "#ffce70",
|
|
||||||
w: "#ffffff",
|
|
||||||
b: "#8b5a2b",
|
|
||||||
d: "#5a3a1b",
|
|
||||||
s: "#ffd166",
|
|
||||||
r: "#c43a30",
|
|
||||||
R: "#f25240",
|
|
||||||
x: "#ff7864",
|
|
||||||
m: "rgba(255,255,255,0.5)",
|
|
||||||
k: "rgba(255,255,255,0.26)",
|
|
||||||
e: "#a8582a",
|
|
||||||
E: "#d87636",
|
|
||||||
B: "#4890fc",
|
|
||||||
L: "#92c7ff",
|
|
||||||
C: "#e9f8ff",
|
|
||||||
S: "#bfe0ff"
|
|
||||||
};
|
|
||||||
|
|
||||||
interface CampfireFrame {
|
|
||||||
rows: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const IDLE_FRAMES: CampfireFrame[] = [
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".....oyo......",
|
|
||||||
"....oyyyo.....",
|
|
||||||
"..dddeeeeeEd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".........k....",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"......oyo.....",
|
|
||||||
"....oyyyo.....",
|
|
||||||
"..dddEEEEEEd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const RUN_FRAMES: CampfireFrame[] = [
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".....s.yy.....",
|
|
||||||
".....oyyo.....",
|
|
||||||
"....oywwyo....",
|
|
||||||
"...oyywwyyo...",
|
|
||||||
"...oyywwyyo...",
|
|
||||||
"...oyywwyyo...",
|
|
||||||
"....oywwyo....",
|
|
||||||
"..dddddddddd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
".....s........",
|
|
||||||
".....yy.......",
|
|
||||||
".....oyyo.....",
|
|
||||||
"....oywwyo....",
|
|
||||||
"...oyywwyyo...",
|
|
||||||
"...oyywwyyo...",
|
|
||||||
"...oyywwyyo...",
|
|
||||||
"....oywwyo....",
|
|
||||||
"..dddddddddd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const READY_FRAMES: CampfireFrame[] = [
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"......yy......",
|
|
||||||
".....oyyo.....",
|
|
||||||
"....oyyyyo....",
|
|
||||||
"....oyyyyo....",
|
|
||||||
"..dddyyyyyyd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"........m.....",
|
|
||||||
".....yy.......",
|
|
||||||
".....oyyo.....",
|
|
||||||
"....oyyyyo....",
|
|
||||||
"....oyyyyo....",
|
|
||||||
"..dddyyyyyyd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
/* App CampfireFrames.ques0-5: cool blue flame, tip dips, sparks spit. */
|
|
||||||
const QUES_FRAMES: CampfireFrame[] = [
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".....S.LL.....",
|
|
||||||
".....BLLB.....",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"..dddccccccd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
".....S........",
|
|
||||||
".....LL.......",
|
|
||||||
".....BLLB.....",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"..dddccccccd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
".....S........",
|
|
||||||
"......LL......",
|
|
||||||
".....BLLB.....",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"..dddccccccd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
".....S........",
|
|
||||||
"..............",
|
|
||||||
"......LL......",
|
|
||||||
".....BLLB.....",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"..dddccccccd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
".....S........",
|
|
||||||
"..............",
|
|
||||||
".......LL.....",
|
|
||||||
".....BLLB.....",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"..dddccccccd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"........S.....",
|
|
||||||
"..............",
|
|
||||||
".......LL.....",
|
|
||||||
".....BLLB.....",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"...BLLCCLLB...",
|
|
||||||
"....BLCCLB....",
|
|
||||||
"..dddccccccd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const ERROR_FRAMES: CampfireFrame[] = [
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..dddrrrrrrd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rows: [
|
|
||||||
"........x.....",
|
|
||||||
"..............",
|
|
||||||
".....x........",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
"..dddRRRRRRd..",
|
|
||||||
"..dbbbbbbbbd..",
|
|
||||||
"..............",
|
|
||||||
"..............",
|
|
||||||
".............."
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export type CampfireState = "idle" | "running" | "ready" | "question" | "error";
|
|
||||||
|
|
||||||
const STATE_FRAMES: Record<CampfireState, CampfireFrame[]> = {
|
|
||||||
idle: IDLE_FRAMES,
|
|
||||||
running: RUN_FRAMES,
|
|
||||||
ready: READY_FRAMES,
|
|
||||||
question: QUES_FRAMES,
|
|
||||||
error: ERROR_FRAMES
|
|
||||||
};
|
|
||||||
|
|
||||||
const STATE_FPS: Record<CampfireState, number> = {
|
|
||||||
idle: 2,
|
|
||||||
running: 9,
|
|
||||||
ready: 4,
|
|
||||||
question: 4.5,
|
|
||||||
error: 4
|
|
||||||
};
|
|
||||||
|
|
||||||
export function Campfire(props: { state: CampfireState; pixel?: number }) {
|
|
||||||
const pixel = () => props.pixel ?? 3;
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class="animate-campfire grid"
|
|
||||||
style={{
|
|
||||||
"grid-template-columns": `repeat(14, ${pixel()}px)`,
|
|
||||||
/* One full cycle: every frame exactly one frame-interval long. */
|
|
||||||
"--campfire-duration": `${(1000 * STATE_FRAMES[props.state].length) / STATE_FPS[props.state] / 1000}s`
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* Slot phase lives in the keyframes per layer (campfire-slot-N-x);
|
|
||||||
delay-offset layers blank a wrap frame under WebKit. */}
|
|
||||||
<For each={STATE_FRAMES[props.state]}>
|
|
||||||
{(frame, i) => {
|
|
||||||
const n = STATE_FRAMES[props.state].length;
|
|
||||||
const phase = String.fromCharCode(97 + (i() % 26));
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class="campfire-frame col-span-full row-start-1"
|
|
||||||
style={{ "--slot-kf": `campfire-slot-${n}-${phase}` }}
|
|
||||||
>
|
|
||||||
<For each={frame.rows}>
|
|
||||||
{(row) => (
|
|
||||||
<div class="flex" style={{ height: `${pixel()}px` }}>
|
|
||||||
<For each={row.split("")}>
|
|
||||||
{(ch) => (
|
|
||||||
<span
|
|
||||||
class="inline-block"
|
|
||||||
style={{
|
|
||||||
width: `${pixel()}px`,
|
|
||||||
height: `${pixel()}px`,
|
|
||||||
background:
|
|
||||||
ch === "." ? "transparent" : FIRE_PALETTE[ch]
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</For>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,250 +0,0 @@
|
|||||||
import { For, createSignal, onCleanup, onMount, type JSX } from "solid-js";
|
|
||||||
import { IslandPill, STATUS, CALM, CRITICAL, ModuleCard } from "./IslandMock";
|
|
||||||
import { ApprovalCardMock, DieLine, CLAUDE } from "./ModuleMocks";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Feature collage: five cells sold as the app's actual UI. The hero cell
|
|
||||||
* shows the real collapsed pill (campfire slot, camera housing, live data)
|
|
||||||
* dressed in the island's black surface; supporting cells reuse the same
|
|
||||||
* module chrome, status palette, and metric language.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export function CollageCell(props: {
|
|
||||||
class?: string;
|
|
||||||
kicker: string;
|
|
||||||
title: string;
|
|
||||||
body: string;
|
|
||||||
children?: JSX.Element;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={`border-overlay1 bg-surface1 relative flex flex-col overflow-hidden rounded-2xl border p-6 ${props.class ?? ""}`}
|
|
||||||
>
|
|
||||||
<p class="text-subtext1 mb-3 text-[11px] font-semibold tracking-[0.14em] uppercase">
|
|
||||||
{props.kicker}
|
|
||||||
</p>
|
|
||||||
<h3 class="text-text mb-2 text-lg font-bold tracking-tight">
|
|
||||||
{props.title}
|
|
||||||
</h3>
|
|
||||||
<p class="text-subtext0 text-sm leading-relaxed">{props.body}</p>
|
|
||||||
<div class="mt-5 flex-1">{props.children}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stage for app-UI mocks: the island's black ink ground. The real island
|
|
||||||
* is always dark (preferredColorScheme .dark), so the mocks read correctly
|
|
||||||
* in both site themes.
|
|
||||||
*/
|
|
||||||
export function InkStage(props: { children: JSX.Element; class?: string }) {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={`flex justify-center rounded-xl py-5 ${props.class ?? ""}`}
|
|
||||||
style={{ background: "#0d0d0f" }}
|
|
||||||
>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Fans panel mock: RPM gauge rows in the app's card chrome. */
|
|
||||||
function FansPanelMock() {
|
|
||||||
const fans = [
|
|
||||||
{ rpm: 1270, frac: 0.26 },
|
|
||||||
{ rpm: 1219, frac: 0.25 }
|
|
||||||
];
|
|
||||||
return (
|
|
||||||
<ModuleCard>
|
|
||||||
<div class="space-y-2.5">
|
|
||||||
<For each={fans}>
|
|
||||||
{(f) => (
|
|
||||||
<div class="flex items-center gap-3">
|
|
||||||
<div
|
|
||||||
class="h-1 flex-1 overflow-hidden rounded-full"
|
|
||||||
style={{ background: "rgba(255,255,255,0.08)" }}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="h-full rounded-full"
|
|
||||||
style={{
|
|
||||||
width: `${f.frac * 100}%`,
|
|
||||||
background: CALM
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span
|
|
||||||
class="font-mono text-white"
|
|
||||||
style={{ "font-size": "13px", "font-weight": 500 }}
|
|
||||||
>
|
|
||||||
{f.rpm}
|
|
||||||
</span>
|
|
||||||
<span class="text-[9px] font-semibold text-white/50">RPM</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
<div class="h-px" style={{ background: "rgba(255,255,255,0.06)" }} />
|
|
||||||
<div class="flex gap-2">
|
|
||||||
<span class="rounded-md border border-white/15 px-2 py-0.5 text-[11px] text-white/70">
|
|
||||||
Auto
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
class="rounded-md px-2 py-0.5 text-[11px] font-bold"
|
|
||||||
style={{ color: CRITICAL }}
|
|
||||||
>
|
|
||||||
MAX
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ModuleCard>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 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() {
|
|
||||||
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 (
|
|
||||||
<ModuleCard>
|
|
||||||
<div class="space-y-2">
|
|
||||||
<DieLine label="CPU" usage={trace(0)} celsius={58 + 4 * Math.sin(n() * 0.3)} />
|
|
||||||
<DieLine label="GPU" usage={trace(2)} celsius={gpuCelsius()} />
|
|
||||||
</div>
|
|
||||||
</ModuleCard>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function FeatureCollage() {
|
|
||||||
return (
|
|
||||||
<section
|
|
||||||
class="bg-base relative z-20 px-4 pt-40 pb-16 md:px-8"
|
|
||||||
id="feature-collage"
|
|
||||||
>
|
|
||||||
<div class="mx-auto max-w-5xl">
|
|
||||||
<p class="text-subtext1 mb-2 text-center text-xs font-semibold tracking-[0.18em] uppercase">
|
|
||||||
Why the Nook
|
|
||||||
</p>
|
|
||||||
<h2 class="text-text mb-12 text-center text-3xl font-bold">
|
|
||||||
One glance. Everything your agents are doing.
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-3">
|
|
||||||
{/* Hero: real collapsed pill on the island surface */}
|
|
||||||
<div class="border-overlay1 bg-surface1 relative col-span-1 flex flex-col items-center overflow-hidden rounded-2xl border p-6 md:col-span-2">
|
|
||||||
<div class="mb-5 self-start">
|
|
||||||
<p class="text-subtext1 mb-3 text-[11px] font-semibold tracking-[0.14em] uppercase">
|
|
||||||
The island
|
|
||||||
</p>
|
|
||||||
<h3 class="text-text mb-2 text-2xl font-bold tracking-tight">
|
|
||||||
Every agent, one glance
|
|
||||||
</h3>
|
|
||||||
<p class="text-subtext0 max-w-sm text-sm leading-relaxed">
|
|
||||||
A pill tucked into your notch — a campfire for your whole fleet
|
|
||||||
on the left, live data on the right. Blue running, green ready,
|
|
||||||
amber needs you.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="my-10 flex w-full justify-center">
|
|
||||||
<IslandPill
|
|
||||||
campfire="running"
|
|
||||||
right={
|
|
||||||
<div class="flex flex-col items-center gap-1 px-1">
|
|
||||||
<div class="flex gap-1.5">
|
|
||||||
<span
|
|
||||||
class="inline-block h-2.5 w-2.5 rounded-[3px]"
|
|
||||||
style={{ background: STATUS.running }}
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
class="inline-block h-2.5 w-2.5 rounded-[3px]"
|
|
||||||
style={{ background: STATUS.ready }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-1.5">
|
|
||||||
<span
|
|
||||||
class="inline-block h-2.5 w-2.5 rounded-[3px]"
|
|
||||||
style={{ background: STATUS.attention }}
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
class="inline-block h-2.5 w-2.5 rounded-[3px]"
|
|
||||||
style={{ background: STATUS.idle }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<p class="text-subtext0 -mb-1 text-center text-xs">
|
|
||||||
expand for the full panel ↓
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Approvals */}
|
|
||||||
<CollageCell
|
|
||||||
kicker="Approvals"
|
|
||||||
title="Unblock agents, anywhere"
|
|
||||||
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>
|
|
||||||
<div class="w-full max-w-sm px-3">
|
|
||||||
<ApprovalCardMock
|
|
||||||
agent={CLAUDE}
|
|
||||||
title="the-nook · bridge"
|
|
||||||
tool="Edit"
|
|
||||||
input="server/routes.ts"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</InkStage>
|
|
||||||
</CollageCell>
|
|
||||||
|
|
||||||
{/* Fans */}
|
|
||||||
<CollageCell
|
|
||||||
kicker="Cooling"
|
|
||||||
title="Silence it or max it"
|
|
||||||
body="Read both fans live, then take over the curve completely. Flip to MAX before a compile, whisper-quiet when the fleet idles."
|
|
||||||
>
|
|
||||||
<InkStage class="w-full">
|
|
||||||
<div class="w-full max-w-[260px] text-left">
|
|
||||||
<FansPanelMock />
|
|
||||||
</div>
|
|
||||||
</InkStage>
|
|
||||||
</CollageCell>
|
|
||||||
|
|
||||||
{/* Gauges */}
|
|
||||||
<CollageCell
|
|
||||||
kicker="Your Mac"
|
|
||||||
title="The gauges that matter"
|
|
||||||
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">
|
|
||||||
<div class="w-full max-w-[300px] text-left">
|
|
||||||
<GaugesMock />
|
|
||||||
</div>
|
|
||||||
</InkStage>
|
|
||||||
</CollageCell>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-subtext1 mt-6 text-center text-xs">
|
|
||||||
Plus a mixer, capture, timers, weather, and a dozen more modules —{" "}
|
|
||||||
<a
|
|
||||||
href="#island-extras"
|
|
||||||
class="underline decoration-dotted hover:opacity-80"
|
|
||||||
>
|
|
||||||
see them all ↓
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,899 +0,0 @@
|
|||||||
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 = [
|
|
||||||
"13 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",
|
|
||||||
"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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,295 +0,0 @@
|
|||||||
import { For, createMemo, onMount, onCleanup, type JSX } from "solid-js";
|
|
||||||
import { Campfire, type CampfireState } from "./Campfire";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Faithful mock of the island's collapsed pill and expanded panel.
|
|
||||||
* Geometry follows the app's IslandSurfaceShape: the top edge spans the
|
|
||||||
* full width, the notch housing sits centered, and each corner is a
|
|
||||||
* concave scoop (quadratic curve with the control ON the top edge).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The app's island indicator palette (AgentsModuleView.statusColor). */
|
|
||||||
export const STATUS = {
|
|
||||||
running: "#6EA7FF",
|
|
||||||
ready: "#6FB982",
|
|
||||||
attention: "#E7A762",
|
|
||||||
error: "#E5484D",
|
|
||||||
idle: "rgba(255,255,255,0.35)"
|
|
||||||
};
|
|
||||||
|
|
||||||
/** MetricPalette.calm — the desaturated sky of every metric bar. */
|
|
||||||
export const CALM = "#6EA7FF";
|
|
||||||
export const WARM = "#E7A762";
|
|
||||||
export const CRITICAL = "rgba(229,72,77,0.9)";
|
|
||||||
|
|
||||||
/* NookPalette.accent — brand + live interactive state, never status. */
|
|
||||||
export const ACCENT = "#4897b2";
|
|
||||||
|
|
||||||
/** The expanded panel's card chrome: white 5.5% fill, white 7% stroke. */
|
|
||||||
export const CARD_FILL = "rgba(255,255,255,0.055)";
|
|
||||||
export const CARD_STROKE = "rgba(255,255,255,0.07)";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* One module-card surface shared by every mock panel — the app's
|
|
||||||
* cardChrome(): rounded 12, hairline stroke, white-on-black fill.
|
|
||||||
*/
|
|
||||||
export function ModuleCard(props: {
|
|
||||||
children: JSX.Element;
|
|
||||||
class?: string;
|
|
||||||
style?: Record<string, string>;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
class={`rounded-xl ${props.class ?? ""}`}
|
|
||||||
style={{
|
|
||||||
background: CARD_FILL,
|
|
||||||
"box-shadow": `inset 0 0 0 1px ${CARD_STROKE}`,
|
|
||||||
...props.style
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div class="p-3">{props.children}</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Island surface, faithful to the app's IslandSurfaceShape: the top edge
|
|
||||||
* spans the full outer width while the body is inset, each corner joining
|
|
||||||
* them with a concave quad flare (control point ON the top edge), the
|
|
||||||
* bottom a convex 14px round. Rendered as an inline SVG with
|
|
||||||
* foreignObject-clip via CSS `clip-path: path(...)`.
|
|
||||||
*/
|
|
||||||
const FLARE = 22; // the app's topRadius — how far the wings taper inward
|
|
||||||
const BOTTOM_R = 14;
|
|
||||||
|
|
||||||
function islandPath(w: number, h: number): string {
|
|
||||||
const tr = Math.min(FLARE, w / 2);
|
|
||||||
const br = Math.min(BOTTOM_R, tr);
|
|
||||||
// Mirrors IslandSurfaceShape.path exactly (same node order, same controls).
|
|
||||||
return (
|
|
||||||
`M0,0 L${w},0 ` +
|
|
||||||
`Q${w - tr},0 ${w - tr},${tr} ` +
|
|
||||||
`L${w - tr},${h - br} ` +
|
|
||||||
`Q${w - tr},${h} ${w - tr - br},${h} ` +
|
|
||||||
`L${tr + br},${h} ` +
|
|
||||||
`Q${tr},${h} ${tr},${h - br} ` +
|
|
||||||
`L${tr},${tr} ` +
|
|
||||||
`Q${tr},0 0,0 Z`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function IslandSurface(props: { children: JSX.Element; class?: string }) {
|
|
||||||
let el: HTMLDivElement | undefined;
|
|
||||||
// The path must track the element's real size; a fixed viewBox would
|
|
||||||
// stretch the flare. Measure on mount + resize.
|
|
||||||
onMount(() => {
|
|
||||||
const node = el;
|
|
||||||
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 = () => {
|
|
||||||
node.style.clipPath = `path("${islandPath(node.offsetWidth, node.offsetHeight)}")`;
|
|
||||||
};
|
|
||||||
apply();
|
|
||||||
const observer = new ResizeObserver(apply);
|
|
||||||
observer.observe(node);
|
|
||||||
onCleanup(() => observer.disconnect());
|
|
||||||
});
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
ref={el}
|
|
||||||
class={`bg-black ${props.class ?? ""}`}
|
|
||||||
style={{ "border-radius": "0 0 14px 14px" }}
|
|
||||||
>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ISLAND … */
|
|
||||||
const NOTCH_NAME = "The Nook";
|
|
||||||
|
|
||||||
/* ── Collapsed pill ─────────────────────────────────────────────────── */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The collapsed pill: campfire slot left, camera housing center, live
|
|
||||||
* data slot right. Slot squares are native (no menu-bar stub — the wings
|
|
||||||
* hang from nothing, like a floating notch).
|
|
||||||
*/
|
|
||||||
export function IslandPill(props: {
|
|
||||||
campfire?: CampfireState;
|
|
||||||
right?: JSX.Element;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<IslandSurface class="mx-auto w-fit">
|
|
||||||
<div class="flex items-end" style={{ height: "60px" }}>
|
|
||||||
<div
|
|
||||||
class="flex items-center justify-center"
|
|
||||||
style={{ width: "86px", height: "56px" }}
|
|
||||||
>
|
|
||||||
<Campfire state={props.campfire ?? "running"} pixel={4.2} />
|
|
||||||
</div>
|
|
||||||
{/* camera housing: lens dot centered like the real notch */}
|
|
||||||
<div
|
|
||||||
class="flex items-center justify-center"
|
|
||||||
style={{ width: "150px", height: "56px" }}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="rounded-full"
|
|
||||||
style={{
|
|
||||||
width: "12px",
|
|
||||||
height: "12px",
|
|
||||||
background: "radial-gradient(circle at 40% 35%, #2a3a4a 0%, #0a0c10 70%)",
|
|
||||||
"box-shadow": "inset 0 0 0 1px rgba(255,255,255,0.06)"
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="flex items-center justify-center"
|
|
||||||
style={{ width: "86px", height: "56px" }}
|
|
||||||
>
|
|
||||||
{props.right}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</IslandSurface>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The agents dot-grid slot indicator: balanced rows of status squares. */
|
|
||||||
export function AgentDotGrid(props: { states: (keyof typeof STATUS)[] }) {
|
|
||||||
// Balanced rows: 3+3+2 for 8, 2x2 for 4, 3 for 3 … app: 1,2,3,4=2x2,
|
|
||||||
// 5=[3,2], 6=[3,3], 7=[4,3], 8=[4,4], 9=[3,3,3]
|
|
||||||
const rows = (n: number): number[] => {
|
|
||||||
switch (n) {
|
|
||||||
case 1:
|
|
||||||
return [1];
|
|
||||||
case 2:
|
|
||||||
return [2];
|
|
||||||
case 3:
|
|
||||||
return [3];
|
|
||||||
case 4:
|
|
||||||
return [2, 2];
|
|
||||||
case 5:
|
|
||||||
return [3, 2];
|
|
||||||
case 6:
|
|
||||||
return [3, 3];
|
|
||||||
case 7:
|
|
||||||
return [4, 3];
|
|
||||||
case 8:
|
|
||||||
return [4, 4];
|
|
||||||
default:
|
|
||||||
return [4, 4];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const sizes = rows(props.states.length);
|
|
||||||
const groups = createMemo(() => {
|
|
||||||
let cursor = 0;
|
|
||||||
return sizes.map((count) => props.states.slice(cursor, (cursor += count)));
|
|
||||||
});
|
|
||||||
return (
|
|
||||||
<div class="flex flex-col items-center gap-[1.5px]">
|
|
||||||
<For each={groups()}>
|
|
||||||
{(group) => (
|
|
||||||
<div class="flex gap-[1.5px]">
|
|
||||||
<For each={group}>
|
|
||||||
{(s) => (
|
|
||||||
<span
|
|
||||||
class="rounded-[1.5px]"
|
|
||||||
style={{
|
|
||||||
width: "7px",
|
|
||||||
height: "7px",
|
|
||||||
background: STATUS[s]
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ── Expanded panel ─────────────────────────────────────────────────── */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The expanded island: header ("The Nook" + "N active" + controls),
|
|
||||||
* tab strip, divider, then one panel page. Width ~ the app's expanded
|
|
||||||
* footprint on a 14" display.
|
|
||||||
*/
|
|
||||||
export function IslandExpanded(props: {
|
|
||||||
activeCount: number;
|
|
||||||
tabs: { icon: string; label: string; active?: boolean }[];
|
|
||||||
children: JSX.Element;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<div class="w-[560px] max-w-full">
|
|
||||||
<IslandSurface>
|
|
||||||
{/* header */}
|
|
||||||
<div class="flex items-center px-[18px] py-2.5">
|
|
||||||
<span class="text-[14px] font-semibold text-white">{NOTCH_NAME}</span>
|
|
||||||
<div class="flex-1" />
|
|
||||||
<span class="text-[11px] text-white/50">
|
|
||||||
{props.activeCount} active
|
|
||||||
</span>
|
|
||||||
<span class="ml-3 text-[11px] font-semibold text-white/60">⚙</span>
|
|
||||||
<span class="ml-3 text-[11px] font-semibold text-white/60">✕</span>
|
|
||||||
</div>
|
|
||||||
{/* tab strip: one icon button per panel; active wears accent 22% */}
|
|
||||||
<div class="flex gap-2 px-[18px] pb-1.5">
|
|
||||||
<For each={props.tabs}>
|
|
||||||
{(tab) => (
|
|
||||||
<span
|
|
||||||
title={tab.label}
|
|
||||||
class="flex items-center justify-center rounded-[5px]"
|
|
||||||
style={{
|
|
||||||
width: "22px",
|
|
||||||
height: "22px",
|
|
||||||
"font-size": "13px",
|
|
||||||
background: tab.active ? `${ACCENT}38` : "transparent",
|
|
||||||
color: tab.active ? "rgba(255,255,255,0.95)" : "rgba(255,255,255,0.5)"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{tab.icon}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</For>
|
|
||||||
</div>
|
|
||||||
<div class="h-px bg-white/10" />
|
|
||||||
<div class="px-[18px] py-4">{props.children}</div>
|
|
||||||
</IslandSurface>
|
|
||||||
</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"
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,405 +0,0 @@
|
|||||||
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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,617 +0,0 @@
|
|||||||
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">
|
|
||||||
>{" "}
|
|
||||||
<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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,286 +0,0 @@
|
|||||||
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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/**
|
|
||||||
* 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
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
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);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||