Skip to content

cli: add openui feedback for anonymous feedback - #1266

Merged
AbhinRustagi merged 5 commits into
mainfrom
devin/1790681615-agent-feedback
Sep 29, 2026
Merged

AbhinRustagi merged 5 commits into
mainfrom
devin/1790681615-agent-feedback

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds openui feedback so users and coding agents can send short anonymous feedback about OpenUI from the terminal. The CLI captures it directly to PostHog with the CLI's existing public ingestion key.

openui [--agent-name <slug>] feedback [--category bug|feature|docs|other] <message...>

The event agent_feedback_submitted has the properties { message, category (default "other"), agent_name?, cli_version }. It is sent anonymously:

  • a fresh crypto.randomUUID() distinct ID per submission, never the persisted telemetry ID
  • $process_person_profile: false, so no person profile is created
  • disableGeoip: true
  • $ip: "0.0.0.0": PostHog only fills $ip from the connection when the property is absent, so this placeholder keeps the sender's IP off the event

It is sent even with --no-telemetry / DO_NOT_TRACK=1, because the user runs it explicitly. captureImmediate swallows send errors, so the command listens for the client's error event and exits non-zero with Could not send feedback: ….

Changes

  • commands/feedback/{command,run}.ts: new command. Validates the message (non-empty, ≤2000 chars) and the category, and prints Thanks! Feedback sent. on success.
  • lib/posthog.ts (new): key and host, plus createPostHogClient(options?), which applies the shared host / flushAt: 1 / flushInterval: 0 settings.
    • Telemetry uses createPostHogClient().
    • Feedback uses createPostHogClient({ disableGeoip: true }).
  • A Found a bug or have an idea? hint in the top-level openui help (root program only) and in the create "Done!" message.
  • lib/context.ts, program.ts: expose cliVersion on the context.
  • CLI README: openui feedback section. Root README: "Feedback" section.
  • Changeset.

Test Plan

  • Verified locally
    • pnpm --filter @openuidev/cli lint:check and build pass.
    • Local mock PostHog host (OPENUI_POSTHOG_HOST):
      • The event has the expected properties plus $geoip_disable: true and $ip: "0.0.0.0".
      • The distinct ID is different on every run and never the telemetry ID.
      • It is still sent with --no-telemetry and with DO_NOT_TRACK=1.
      • category defaults to other, and agent_name is omitted for unknown.
      • With telemetry on, cli_invoked still arrives after the factory refactor.
    • HTTP 500 and an unreachable host both exit 1 with Could not send feedback: …, after about 9s of SDK retries.
    • The hint shows in bare openui and openui --help, and not in openui create --help.

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility (new command only)

Link to Devin session: https://app.devin.ai/sessions/1176b6dec03745c6b07115be26fed6e9
Open in Devin Desktop: https://app.devin.ai/desktop/session/1176b6dec03745c6b07115be26fed6e9?variant=devin
Requested by: @zahlekhan

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openui-docs Ready Ready Preview Sep 29, 2026 12:38pm UTC

Request Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Comment thread packages/openui-cli/src/lib/telemetry.ts
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AbhinRustagi
AbhinRustagi enabled auto-merge (squash) September 29, 2026 12:36
@AbhinRustagi
AbhinRustagi merged commit 17be496 into main Sep 29, 2026
43 checks passed
@AbhinRustagi
AbhinRustagi deleted the devin/1790681615-agent-feedback branch September 29, 2026 12:40

This branch was successfully deployed

1 active deployment
Preview — 8e21ed5a Deployed Sep 29, 2026 by vercel[bot]
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.

2 participants