Skip to content

Dst cli clig improvements - #5690

Draft
jim761 wants to merge 2 commits into
mainfrom
dst-cli-clig-improvements
Draft

Dst cli clig improvements#5690
jim761 wants to merge 2 commits into
mainfrom
dst-cli-clig-improvements

Conversation

@jim761

@jim761 jim761 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Closes DST-XXXX

Screenshots / Preview

Before After

Test Instructions

Breaking Changes

No

Checklist

  • Storybook preview and Marigold docs preview are available
  • Stories added/updated (with component-test tag where applicable)
  • Unit tests added/updated
  • Component documentation added/updated (if it exists)
  • Accessibility reviewed against ARIA APG (for new/changed interactive components)
  • Visual regression tests updated (for UI changes)
  • Changeset added (pnpm changeset)

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marigold-docs Ready Ready Preview Aug 25, 2026 1:45pm
marigold-storybook Ready Ready Preview Aug 25, 2026 1:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
marigold-production Ignored Ignored Aug 25, 2026 1:45pm

Request Review

@github-actions github-actions Bot added the type:feature New feature or component label Jul 30, 2026
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2c99640

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@marigold/cli Minor
@marigold/docs Patch
@marigold/system Patch
@marigold/components Patch
@marigold/icons Patch
@marigold/theme-rui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Accessibility tests executed. Download the report here.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for Marigold Code Coverage

Status Category Percentage Covered / Total
🔵 Lines 98.8% 2989 / 3025
🔵 Statements 97.81% 3134 / 3204
🔵 Functions 97.97% 822 / 839
🔵 Branches 91.23% 1937 / 2123
File CoverageNo changed files found.
Generated in workflow #23689 for commit 2c99640 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Accessibility tests executed. Download the report here.

Base automatically changed from beta-release to main August 4, 2026 08:40
jim761 and others added 2 commits August 25, 2026 11:59
Add a first-run telemetry disclosure and "did you mean?" command
suggestions, closing two gaps against the Command Line Interface
Guidelines (clig.dev).

- First-run notice: since telemetry is opt-out, print a one-time
  disclosure to stderr (keeps stdout/JSON clean for agents) explaining
  anonymous collection and how to opt out. Mirrors the .NET SDK model.
  The flag is persisted only after an actual print on a TTY, so
  non-interactive agent/pipe runs never consume the notice before a
  human sees it. The invocation that shows the notice is itself not
  tracked — no data leaves the machine before the user has had a chance
  to opt out; tracking begins on the next run.
- "Did you mean?": unknown commands now suggest the nearest valid
  command via edit distance (e.g. `serach` -> search), matching the
  error-recovery pattern used by git/cargo/npm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Telemetry stays on by default, but no longer carries anything that can
single out a machine, user, or session. This is what makes the opt-out
default defensible: with no identifier there is no personal data to have
a lawful basis for under GDPR, and the CLI no longer stores an identifier
on the user's device, which would require consent under ePrivacy
Art. 5(3) / TDDDG section 25.

- Remove `anonymousId`. Gone from the event payload, `UserConfig`, and
  the server schema. A value written by an older CLI is stripped on the
  next config read and erased from disk. The trade is deliberate: we can
  count invocations, not people, and unique-user numbers come from public
  npm download counts instead.
- Correct the first-run notice. It previously claimed no arguments and no
  personal data were collected, while the event carried both `args` and a
  persistent UUID. It now states what is actually sent and links the
  disclosure.
- Clamp `args` via new `slugArg`/`enumArg` helpers. Enum flags are
  recorded as their validated value or as `invalid`, so a mistyped
  `--format=jsonn` is no longer echoed back; positionals are forwarded
  only when identifier-shaped. Free-text search terms stay as `used`.
- Truncate `receivedAt` to the hour. Exact timestamps would let events be
  stitched back into per-session sequences by timing alone, undoing the
  point of removing the identifier.
- Add 90-day retention. The daily event list previously had no TTL and
  was kept indefinitely.
- Reject unknown keys on the endpoint (`z.strictObject`), so an
  identifying field can never be accepted quietly.
- Replace the per-anonymousId quota with a global daily cap, since there
  is no client identifier to key on. It is a cost backstop, not a
  security control; abuse belongs behind WAF rate limiting.
- Document every field in the `marigold telemetry` section of the CLI
  docs page, including what is never sent and why the default is opt-out.
  It lives there rather than on a standalone privacy page, which nobody
  would navigate to. `marigold --help` links the anchor so
  non-interactive users have a discoverable disclosure too.

Still needs a human: DPO sign-off on the residual Art. 5(3) question
(reading platform/nodeVersion off the device), and confirming the Upstash
region is in the EU.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Accessibility tests executed. Download the report here.

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

Labels

type:docs Improvements or additions to documentation type:feature New feature or component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant