Repository navigation
Description
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:868openBootstrapFlow()->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.enabledincmd/rune/rune.star:583, read byide.TelemetryEnabled(internal/ide/config.go:2645), consumed atcmd/rune/main.go:894. - Payload shapes:
telemetryUsagePayload/telemetrySystemPayloadatcmd/rune/ide/apiclient/telemetry.go:366-392. - The presets (
preset_modal.yaml,preset_emacs.yaml,preset_standard_*.yaml) contain notelemetry: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: falseWritten 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
openVimPromptselect advances to the telemetry prompt, not to the swap.- Both telemetry answers produce the correct
enabled:value in the writtenconfig.yaml, and the result round-trips throughide.TelemetryEnabled. - Dismissing the telemetry prompt re-opens it (existing
guardedPromptChainbehavior). - Example-payload field coverage test in
apiclient: every field oftelemetryUsagePayloadappears in the rendered example.
Risks
- The prompt is centered with
PadHorizontal: 4inside 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
Add telemetry consent prompt to bootstrap wizard
Add telemetry consent prompt to bootstrap wizard (#90)
Spandan-Mishra commentedon Sep 24, 2026
@ernestrc you should close this as the PR is merged!