Skip to content

Tell readers what Run means before the first execution — code runs locally and can reach the network #43

Closed as not planned

Description

@bencode

Problem

Gamma Reader is candid about code execution — in the README. "Code runtimes may download dependencies and executed code can make network requests," and Code Lab "runs reader-supplied TypeScript in a same-origin worker that can reach indexedDB" (the very reason model keys are kept out of it). In the product itself, nothing says any of this: the Run control carries only a shortcut tooltip (code-lab/src/components/code-cell/index.tsx:62-71), and the Lab reader contains no notice of any kind (zero matches for warning/notice/network across features/reader/lab-reader/).

The omission is an inconsistency, not a style choice: the product already communicates the equivalent trust fact for chat — an empty conversation states "Messages and document excerpts used in chat are sent to the AI provider" (conversation-messages.tsx:73-77). Code execution is the stronger capability to disclose: a reader who imports someone else's .lab.md and presses Run is executing foreign code in their browser, with network access, minutes into their first session — the starter files are themselves Labs, so first-run readers reach this moment quickly.

Proposal

  • Attach one quiet line to the first Run in a project (or per imported Lab document): "Running code executes it in this browser — it can make network requests." Placed with the cell's output area or as a dismissible note beside Run; never a modal, never blocking.
  • Distinguish provenance if cheap: a Lab the reader authored may need no repeat notice, while the first Run of an imported document always gets the line — foreign code is the case the disclosure exists for.
  • Match the tone of the existing chat privacy notice: a plain sentence, role=status, no warning colors.

Goal

After this, a reader pressing Run for the first time — especially on a document they imported — has been told in the product that code executes locally and can reach the network, with the same candor the chat surface already applies to messages.

Verification

grep -rqi "network" ui-packages/web/src/features/reader/lab-reader
pnpm --filter @gamma-reader/web test --silent
pnpm check

Refs

  • ui-packages/web/src/features/reader/lab-reader/ — no execution notice anywhere today
  • ui-packages/code-lab/src/components/code-cell/index.tsx:62-71 — Run carries only a shortcut tooltip
  • ui-packages/web/src/features/conversation/conversation-messages.tsx:73-77 — the chat equivalent the Lab surface lacks
  • README.md — "Local-first by design" (executed code can make network requests) and "Chat models and limits" (same-origin worker reaches indexedDB)
  • ui-packages/web/PRODUCT.md — "explain the few actions that affect persistence"
  • Teach import paths and assistant capabilities at the empty states, not only in the README #39 — same principle at a different moment: teach at the point of action, not only in the README

Activity

  1. added
    enhancement
    source:scheduled
    on Sep 30, 2026
  2. bencode commented on Sep 30, 2026

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop (a session separate from the one that files these issues), under the maintainer's standing instruction to evaluate, sharpen, or retire source:scheduled proposals.

    Evidence audit (against main@d28fe0b): all citations confirmed.

    • ✅ Run carries only the shortcut tooltip Run code (⌘/Ctrl+Enter) (code-cell/index.tsx:65-69); zero matches for network/notice/warning across features/reader/lab-reader/.
    • ✅ README candor confirmed at both cited spots (":44" network requests; ":81" same-origin worker reaching indexedDB), and the chat-surface parallel is real (conversation-messages.tsx:73-76).
    • ✅ "Starter files are themselves Labs" verified: two of the seeds are .lab.md documents (core/samples.ts:57,63) — the first-run reachability argument holds.
    • ✅ Sensor: lint passed; verify fails today as it should → stays open.

    Verdict: valid, keep open. The consistency argument (chat discloses its trust fact, code execution doesn't disclose a stronger one) is sound and matches PRODUCT.md.

    One structural tension to resolve (non-blocking): the anchor scopes the notice to ui-packages/web/src/features/reader/lab-reader, but the proposal's own placement ("with the cell's output area or as a dismissible note beside Run") points at the Run control — which lives in the code-lab package (ui-packages/code-lab/src/components/code-cell/), a standalone package outside that anchor's scope. An implementer following the placement literally fails the gate. Either widen the anchor to include ui-packages/code-lab/src or fix the placement to the lab-reader surface.

  3. bencode commented on Oct 2, 2026

    @bencode
    OwnerAuthor

    Not planned — discussed with the maintainer on 2026-10-01. Gamma Reader stays deliberately small: a feature lands only when no existing path covers the need. Labs are mainly for learners writing and running their own code (tutorials such as SICP); a first-run notice would interrupt exactly that audience. The README keeps the disclosure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsource:scheduled

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions