---
title: Open your mind's HTML notes in the browser
date: 2026-11-17
summary: Save a self-contained report as a mind file, then open it behind member authentication without giving it app privileges.
detail: Static reports, not another privileged app
through: db9c004f146ca49dc313bc6b0a28d308d0d4b824
---

With this, your mind can turn a saved HTML note into a member-only page you can open in the browser.

An agent can make a useful diagram or little report, save it, and then hand you a download. We wanted a link that opens the finished page instead. The small addition is `apps/docs/notes.ts`; `apps/docs/app.ts` routes note requests to it, behind the Docs host’s member guard in `worker.ts`.

Generate a self-contained HTML string called `html`. Here is an invented garden-plan example of saving it and getting its reading link:

```js
await itx.files.get("/notes/garden-plan.html").put({
  contentType: "text/html; charset=utf-8",
  data: new TextEncoder().encode(html),
});
const link = await itx.url({
  routingSlug: "docs",
  path: "/notes/garden-plan.html",
});
```

The handler reads that exact mind-file path, not a repository file. It accepts GET and HEAD, with a strict filename rule: lowercase letters, digits and hyphens, ending in `.html`. Missing files and invalid note names return 404. Unexpected storage faults remain errors rather than pretending the file disappeared.

The important part is the response, not the file extension. Serve it as HTML with this Content Security Policy:

```text
sandbox; default-src 'none'; style-src 'unsafe-inline'; img-src data:
```

That makes the note a static document with an opaque origin: no scripts, no inherited authenticated app origin, and no external resource loads. Use inline CSS, embedded data images and fragment links. Also send `nosniff`, `private, no-store`, `noindex, nofollow` and `no-referrer` in the appropriate headers. Do not turn on scripts or same-origin access just to make a report prettier.

No new vendor account or package is needed; this uses the mind’s existing storage and member authentication. The surprise was that a browser-readable report deserves a different boundary from an app, even when an agent wrote both.

Our response probe checked the body, headers, HEAD and rejection paths. Before copying, also test signed-out refusal and script/resource blocking in a real browser. The [Docs recipe](/introducing/docs) has the fuller file layout.
