Skip to content

Add distribution-owned response feedback UI - #214

Open
comp615 wants to merge 4 commits into
mainfrom
ccroom/response-feedback-ui
Open

Add distribution-owned response feedback UI#214
comp615 wants to merge 4 commits into
mainfrom
ccroom/response-feedback-ui

Conversation

@comp615

@comp615 comp615 commented Aug 25, 2026

Copy link
Copy Markdown

This PR description was generated by AMP.

Summary

Berd distributions need a generic way to collect turn-level response ratings without putting a company-specific telemetry endpoint or schema in the public app.

This adds opt-in thumbs-up/down controls tied to the canonical assistant response, session ID, and message ID. Stock Berd uses a typed no-op transport and ordering seam; distributions can supply their own sink and enable the UI through the transport-neutral feedbackSurveys build capability plus runtime config. Mounting, hovering, focusing, or revealing controls emits nothing; only explicit good, bad, and cleared transitions reach the sink.

Response feedback controls

Related issue

N/A — no duplicate issue or PR found.

Testing

bin/just check
bin/pnpm vitest run src/features/chat/response-feedback src/shared/runtime-config/schema.test.ts
bin/just _tauri-cargo-unix check --features block-feedback
AI tool validation prompt

Copy and paste into your AI tool:

Review block/berd branch ccroom/response-feedback-ui and verify:
1. Run the focused response-feedback and runtime-config tests.
2. Confirm stock Berd sends no feedback events, while the typed sink receives session ID, message ID, appearance ID, and response only when the user changes a rating; confirm the distribution sink owns delivery ordering.
3. Confirm only the canonical terminal assistant response receives controls in classic and virtual transcripts.

@comp615
comp615 marked this pull request as ready for review August 26, 2026 00:41
@comp615
comp615 requested a review from a team August 26, 2026 00:41

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Reviewed in the context of the stacked session-survey work and a distribution-owned transport. These comments are limited to unresolved contracts owned by this PR; later-stack concerns are left on the PR that owns them.

Comment thread src/features/chat/ui/MessageBubble.tsx Outdated
Comment thread src/features/chat/response-feedback/feedbackSurveyEvents.ts Outdated
#[serde(skip_serializing_if = "Option::is_none", default)]
pub project_key: Option<String>,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub response_rating_enabled: Option<bool>,

@kalvinnchau kalvinnchau Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Is the admin runtime-config endpoint guaranteed to version responses by client? RuntimeFeedbackConfig uses deny_unknown_fields, but this adds a field while retaining schema version 1. An older managed client receiving the new field rejects the entire endpoint response and falls back to cache/default policy; the stacked survey PR adds another field under the same v1 shape. If mixed client versions can reach one endpoint, this needs an extensible field or negotiated schema response rather than an undeclared additive v1 change.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the compatibility risk is conditional on the service contract. The client sends no visible schema/client negotiation signal, so I avoided a speculative local version change that would not protect already-shipped strict v1 clients. Can mixed Berd versions receive the same /desktop/v1/runtime-config response, and if so what service-side signal shapes fields for each client? — Amp 🤖

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