Skip to content

feat(telemetry): report every remaining setting, drop the removed ones - #1105

Merged
devswha merged 9 commits into
mainfrom
feat/telemetry-all-settings
Oct 14, 2026
Merged

devswha merged 9 commits into
mainfrom
feat/telemetry-all-settings

Conversation

@devswha

@devswha devswha commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Stacked on #1104 (itself on #1099); retarget to main once they merge.

Change

The settings snapshot now covers every setting the app keeps after #1099 and #1104, so a later trim can be decided from data:

  • Added: paletteLight, paletteDark, uiFontSize (11–20, or null for the screen's size), diffStyle, and usageOrderCustom, a yes/no for whether the usage meters' accounts were put in an order of the user's own (the accounts themselves are never sent, as for usageHiddenCount).
  • Dropped: the nine fields refactor(settings): remove eleven maintainer-added settings #1099 and refactor(settings): remove page overlap, files at once, highlight code and chat page keys #1104 kept sending as fixed values (terminalCursorStyle, terminalCursorBlink, narrowPaneFont, showSuggestionChip, usagePace, highlightCode, pageOverlapRows, chatPageKeys, attachLimit). No released version sends a snapshot yet (0.4.8 still sends changed_settings), so nothing in the field breaks.
  • palette accepts only the three palettes the app still has.
  • TelemetrySourceSettings no longer exempts the four settings it listed as "not collected", so a new setting still needs an explicit decision.

Deployed

  • Production D1: ALTER TABLE events ADD COLUMN settings TEXT (telemetry/README.md). The table now has settings; all 1967 existing rows were kept, with settings NULL.
  • Worker deployed from this branch (version 84a7f138), and telemetry/deployed.json updated with bun scripts/release-guards.ts --worker-deployed. A malformed snapshot posted to the live endpoint is refused with 400.

Validation

  • bun run check fast: generated types, typecheck and build pass. Its unit run caught the hard-coded key count in api.test.ts (53 → 49); after that fix, bun run test:unit passes 3584, 0 fail.
  • telemetry/worker.test.ts (full snapshot, legacy changed_settings, real-table INSERT and the README queries), server/telemetry.test.ts, settings.test.ts and release-guards.test.ts pass.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2520447e-2ed9-4e47-9662-cd2909dec8ac
📥 Commits

Reviewing files that changed from the base of the PR and between 97f06f3 and c3c0439.

📒 Files selected for processing: 8
  • changelog.d/telemetry-all-settings.md
  • docs/guide.md
  • shared/telemetry.ts
  • src/lib/api.test.ts
  • src/lib/settings.test.ts
  • src/lib/settings.ts
  • telemetry/deployed.json
  • telemetry/worker.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Telemetry
    • Anonymous usage counts now include selected light and dark palettes, interface font size, and diff layout.
    • They also indicate whether usage-meter accounts have ever been reordered, without reporting account names or their order.
    • Settings removed from this release are no longer included in telemetry. Customization indicators cover fonts, shortcuts, key-bar layouts, quick replies, and usage-meter account order.

The telemetry snapshot and validator now use a revised settings allowlist. The snapshot includes light and dark palettes, UI font size, diff style, and usage-order customization. Documentation and tests reflect the updated fields.

Changes: Anonymous telemetry settings

Layer / File(s) Summary
Snapshot contract and output
shared/telemetry.ts, src/lib/settings.ts, docs/guide.md, changelog.d/telemetry-all-settings.md
The contract and validator add palette variants, nullable UI font size, diff style, and usage-order customization. The snapshot reports these settings and removes legacy fields. The documentation and changelog describe the updated reported settings.
Snapshot validation
src/lib/settings.test.ts, src/lib/api.test.ts, telemetry/worker.test.ts, telemetry/deployed.json
Snapshot expectations and the worker fixture reflect the revised settings. The expected snapshot key count and recorded deployed hash are updated.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Suggested reviewers: haeminway1

Merge Risk: ⚪ Minimal · up to c3c04

The snapshot adds sanitized theme, font, and diff preferences while reporting account-order customization as a boolean, not account details. No actionable merge risk remains.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main telemetry change: reporting remaining settings and removing obsolete fields.
Description check Passed The description includes the required Change and Validation sections. It explains the behavior changes, deployment details, and validation results with relevant test coverage.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 5 files. (3 skipped: 3 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Contrast, Text smoothing, Panel motion, the UI and code fonts and Folder and branch never shipped (#951, #1033 are after v0.4.8), so their changelog fragments no longer add them and trim-settings removes only the five that shipped. Drops the pace text from the guide, removed settings from DESIGN.md's page list, a vacuous test, the contrast.ts credit and FontFamilyInput's unused placeholder prop.
…actor/trim-settings-2

# Conflicts:
#	src/lib/settings.test.ts
…settings from the docs

DESIGN.md's Settings page list and paging notes and the guide's shortcut rows still described Highlight code, the chat paging toggle, Files at once and a configurable page overlap.
@devswha
devswha changed the base branch from refactor/trim-settings-2 to main October 14, 2026 16:55
Carries this branch's own changes (92c1226..a09cc2e) onto main after #1099 and #1104 were squash-merged; telemetry/worker.ts, shared/telemetry.ts and deployed.json are unchanged from the deployed receiver.
@devswha
devswha merged commit 709fc70 into main Oct 14, 2026
17 checks passed
@devswha
devswha deleted the feat/telemetry-all-settings branch October 14, 2026 17:08
devswha added a commit that referenced this pull request Oct 14, 2026
…chema (#1123)

The Turkish UI language was removed in #1081, and `sanitizeSettings`
loads a stored `"tr"` as `"system"`, so no snapshot can carry it. No
release has sent a settings snapshot yet (#866 is in no `v*` tag), so
dropping the value refuses nothing a shipped sender sends.

- `shared/telemetry.ts`: `language` no longer accepts `"tr"` (type and
validator).
- `telemetry/worker.test.ts`: the Worker refuses a snapshot with
`language: "tr"`.

Every other setting is already reported (#1105), so the snapshot needs
nothing else.

**Before the next release:** `shared/telemetry.ts` is a Worker source,
so redeploy the Worker and record it (`bun scripts/release-guards.ts
--worker-deployed`, commit `telemetry/deployed.json`), per
telemetry/README.md#deploy. The release guard fails until then.

No changelog fragment: nothing a user sees changes.

Tested: `bun run typecheck`; `HERDR_TEST_MODE=unit bun test` on
telemetry/worker, src/lib/settings, src/lib/api, server/telemetry and
scripts/release-guards tests (101 pass).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant