Skip to content

Add telemetry consent prompt to the bootstrap wizard #86

Closed

Description

@ernestrc

Summary

Add a third prompt to the first-run bootstrap wizard asking the user for permission to send telemetry to Rune. Today telemetry is on by default and the user is never asked; the only opt-out is editing ~/.rune/config.yaml after the fact.

The prompt should explain that the data — in particular the per-language file-open counts — is what the Rune Authors use to decide which language support to build next, and should show a concrete example of the payload that is actually posted, rendered as a fenced code block.

Scope: new installs only. Existing installs never re-enter bootstrap, so they keep telemetry on by default and opt out via config as today. No startup nag, no storage-partition "has been asked" flag.

Current state

  • Bootstrap wizard: cmd/rune/bootstrap_handler.go:868 openBootstrapFlow() -> openWelcomePrompt (:882) -> openVimPrompt (:904) -> performSwap() (:533) -> writePresetConfig() (:779) writes ~/.rune/config.yaml.
  • guardedPromptChain (:936) re-opens any prompt dismissed without a selection, so the wizard cannot be escaped.
  • Prompt messages are already rendered as markdown (internal/browser/component.go:1058), including fenced code blocks (internal/component/markdown/code.go).
  • Telemetry exists and defaults on: telemetry.enabled in cmd/rune/rune.star:583, read by ide.TelemetryEnabled (internal/ide/config.go:2645), consumed at cmd/rune/main.go:894.
  • Payload shapes: telemetryUsagePayload / telemetrySystemPayload at cmd/rune/ide/apiclient/telemetry.go:366-392.
  • The presets (preset_modal.yaml, preset_emacs.yaml, preset_standard_*.yaml) contain no telemetry: section today.

Proposed changes

1. Third prompt in the chain

New openTelemetryPrompt, inserted between key bindings and the swap:

welcome -> key bindings -> telemetry -> performSwap

openVimPrompt's onSelect stores b.chosenEditor and calls b.openTelemetryPrompt() instead of scheduling performSwap. The telemetry prompt's onSelect stores b.telemetryEnabled and schedules performSwap. Placing it last means writePresetConfig already knows the answer when it writes the file.

Options " sure " / " no thanks ", keys y / n, following the bootstrapVimKeys style. Note that optVimYes / optStandard / optEmacs double as map keys in optionToChoice; the new option labels need the same byte-identical discipline between prompt and callback.

2. Prompt copy

Markdown, roughly:

## Help us pick what to build next

Rune reports a small amount of anonymous usage data. The most useful
signal is which languages people actually edit -- it is how we decide
which language support to build next.

We never send file names, paths, file contents, terminal output, or
anything you type. Here is a complete report:

    {json example}

You can change this any time in ~/.rune/config.yaml, and the full list
of fields is on the Telemetry page in the docs.

3. Payload example without drift

Add an exported helper in apiclient, e.g. ExampleUsagePayloadJSON() string, that json.MarshalIndents a representative telemetryUsagePayload. The prompt embeds its output, so the example can never diverge from what is actually posted.

4. Persist the answer

renderPreset(editor string, telemetry bool) appends an explicit block to the preset body:

telemetry:
  # Report anonymous usage and system information. See the Telemetry
  # page in the Rune docs for the full list of what is reported.
  enabled: false

Written explicitly for both answers so the user can see and flip it. TestRenderPreset (cmd/rune/bootstrap_test.go:54) needs updating for the new parameter.

5. Docs

cmd/rune/docs/docs/learn/telemetry.md currently says "Telemetry is on by default". Update it to note that new installs are asked during setup and that the answer is written to config.yaml.

Tests

  • openVimPrompt select advances to the telemetry prompt, not to the swap.
  • Both telemetry answers produce the correct enabled: value in the written config.yaml, and the result round-trips through ide.TelemetryEnabled.
  • Dismissing the telemetry prompt re-opens it (existing guardedPromptChain behavior).
  • Example-payload field coverage test in apiclient: every field of telemetryUsagePayload appears in the rendered example.

Risks

  • The prompt is centered with PadHorizontal: 4 inside an aspect-ratio float; a wide JSON block could wrap badly on narrow terminals. Worth eyeballing the indented example at ~80 columns and trimming fields if needed.

Verification

make generate && make lint && make test

Activity

  1. added
    enhancement
    on Sep 17, 2026
  2. added a commit that references this issue on Sep 20, 2026
    76b404a
  3. Spandan-Mishra commented on Sep 24, 2026

    @Spandan-Mishra
    Contributor

    @ernestrc you should close this as the PR is merged!

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions