Skip to content
Back

Response feedback

Feedback on a reply: thumbs that fill, reason chips and a note after thumbs down, a short thank-you that folds away, and Try again when sending fails.

oxyn add response-feedback
MCP

Tokens minted in the last second of a minute expire before verify runs. Add a 30 s leeway and freeze the clock in a regression test.

Dioxus
rsx! {
    ResponseFeedback {
        allow_comment: true,
        on_rating: move |r: Option<String>| save(message_id, r),
    }
}

Rendered from Rust at build time · goes live when visible

When to use

  • After the agent answers, the user does one of five things with a message: copy it, fix what they asked (edit and resend), ask again (retry, maybe with a different model or effort), compare attempts (version arrows), or grade it (thumbs with a reason).
  • Every product we studied has this bar.
  • Agent runs add states chat kits ignore: a message interrupted mid-tool, a partial answer after a model error, a message sent mid-run that the agent has not read yet, and edits that must stop the current run before they branch.
  • This spec gives every one of those a defined look, action and label.

When not to use

Installation

Response feedback is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.

Terminal
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add response-feedback
Rust
use crate::oxyn::{ResponseFeedback, MessageActions, STATUS_INDICATOR_CSS};

Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{ResponseFeedback, MessageActions, STATUS_INDICATOR_CSS};

Usage

Dioxus · rust
rsx! {
    ResponseFeedback {
        allow_comment: true,
        on_rating: move |r: Option<String>| save(message_id, r),
    }
}

Examples

Idle

Thumbs only.

Tokens minted in the last second of a minute expire before verify runs. Add a 30 s leeway and freeze the clock in a regression test.

Code
rsx! {
    ResponseFeedback {
        allow_comment: true,
        on_rating: move |r: Option<String>| save(message_id, r),
    }
}

Down

Thumbs down with reasons and a note.

Tokens minted in the last second of a minute expire before verify runs. Add a 30 s leeway and freeze the clock in a regression test.

What went wrong?
Shares this reply for review
Rated bad response
Code
rsx! {
    ResponseFeedback {
        rating: "down",
        allow_comment: true,
        on_rating: move |r: Option<String>| save(message_id, r),
    }
}

Up

Thumbs up asks what was good.

Tokens minted in the last second of a minute expire before verify runs. Add a 30 s leeway and freeze the clock in a regression test.

What was good?
Shares this reply for review
Rated good response
Code
rsx! {
    ResponseFeedback {
        rating: "up",
        allow_comment: true,
        on_rating: move |r: Option<String>| save(message_id, r),
    }
}

Retry

A failed send becomes Try again (Oxyn plus).

Tokens minted in the last second of a minute expire before verify runs. Add a 30 s leeway and freeze the clock in a regression test.

What went wrong?
Shares this reply for review
Rated bad response
Code
rsx! {
    ResponseFeedback {
        rating: "down",
        allow_comment: true,
        on_rating: move |r: Option<String>| save(message_id, r),
    }
}

API reference

ResponseFeedback

PropTypeDefaultDescription
negativeVec<String>NEGATIVE.iter().map(|s| s.to_string()).collect()Reasons after thumbs down.
positiveVec<String>POSITIVE.iter().map(|s| s.to_string()).collect()Reasons after thumbs up ([] skips the row).
allow_commentbooltrueNote field after thumbs down.
ratingOption<String>Default::default()Initial rating (`up` · `down`).
privacy_noteString"Shares this reply for review"Privacy line next to Submit.
fail_sendboolDefault::default()Simulate a failed send.
disabledboolDefault::default()Disabled (still streaming).
leadingElementVNode::empty()Leading actions (copy, regenerate).
on_ratingEventHandler<Option<String>>—Rating changed.

MessageActions

PropTypeDefaultDescription
textrequiredString—Text to copy.
regeneratebooltrueRegenerate button.
branchboolDefault::default()Branch button.
persistentboolDefault::default()Always visible.
metaOption<String>Default::default()Trailing meta ("1.2k tokens · 4.1s").
on_regenerateEventHandler<()>—Regenerate pressed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpacePress a thumb or chip
EscapeClose the panel, keep the rating
⌘orCtrlEnterSubmit from the note

Accessibility

  • Thumbs are toggle buttons (Good / Bad response) with aria-expanded while the panel is open.
  • Chips use aria-pressed and invert when selected.
  • A polite region announces rating, sending, thanks and errors.
From the spec
  • Each message: role="article", aria-labelledby header ("You, 14:02" / "Agent, 14:02"), and aria-describedby the status row when not Complete ("Interrupted after 42 seconds").
  • Action labels: "Copy message" → "Copied" (announced politely once); "Edit message"; "Retry response"; "Retry with a different model"; "Good response" / "Bad response" (aria-pressed); "Previous version" / "Next version" and the switcher aria-label "Version 2 of 3"; "Branch from here"; "More actions".
  • Hover-revealed actions are always in the DOM / accessibility tree and appear on focus-within; they are never removed when hidden (opacity only), so keyboard users can reach them.
  • Live region: copy result, "Feedback sent", "Version 2 of 3 shown", "Response stopped", "Response failed" (assertive), "Editing message" when the editor opens.
  • Editor: labelled "Edit your message"; focus moves into it on open and back to the message's Edit button on cancel, to the new bubble on Save.
  • Contrast: user bubble text ≥ 4.5:1 on its fill in both themes; unread 60 % state dims the fill only; muted thumbs ≥ 3:1; danger rows carry words.
  • Reduced motion: §5 last row.
  • Focus order inside a message: header (if interactive) → body links / code buttons / citations → status row actions (Continue / Retry) → footer actions (copy → retry → ▾ → 👍 → 👎 → ‹ › → ⋯).

Motion & interaction

  • User bubble enter: receives the composer fly-up (≤ 260 ms, composer.md §4); for messages not typed here (sync, queue dispatch): scale 0.96 → 1 + y 6 → 0, 200 ms spring.snap (Claude desktop user bubble enters from scale .92 + 6 px, note 08 — we use a smaller scale).
  • Actions reveal: after dur.actions.reveal hover intent (80 ms) the bar fades in 120 ms; hides 160 ms after a 300 ms leave delay; focus-within keeps it visible. Last agent turn: always visible. "copy blurs into a green check", note 11 — our timings).
  • Retry: ↻ rotates 360° once (400 ms ease.in-out); keeps rotating at 1 turn / 1000 ms while Regenerating (loaders.md loop.base).
  • Thumb vote: scale 1 → 1.18 → 1 (spring.soft, ~240 ms), fill swaps to color.feedback.on; the opposite thumb dims to 50 % (still ≥ 3:1).
  • Reason row: unfolds below the bar (dur.collapse 200 ms); chips stagger in (40 ms, cap 5); on Send the row crossfades to "Thanks" then folds after 1.2 s.
  • Version switch: number rolls (dur.digit.roll 280 ms); body crossfades 180 ms while height springs
  • Edit open: bubble fill fades to the editor surface (120 ms); width locks to the bubble's width then springs to editor width (200 ms); caret at end. Cancel: reverse. Save & send: editor text morphs into the new bubble (same fly as composer send, 260 ms).
  • Interrupted / failed marker: "Interrupted" drops in from the status tab (owned by composer-status-strip.md, 220 ms ease.firm); failed row tone fades 200 ms; no shake on text.
  • Regenerating: old body to 40 % opacity (160 ms); when the new first block lands, old collapses (200 ms) with the anchor rule (messages.md §4.2).
  • Unread → Read: fill 60 → 100 % over 200 ms.
Timing
TransitionDurationDelayEasing / springStaggerFrame rate
User bubble enter (non-composer)200 ms0spring.snap—60 Hz
Actions reveal / hide120 / 160 ms80 / 300 msease.out / ease.in—60 Hz
Copy → ✓ / hold / revert160 / 1500 / 160 ms0ease.out—60 Hz
Retry spin (press / loop)400 ms / 1000 ms per turn0ease.in-out / linear—60 Hz
Thumb pop~240 ms0spring.soft—60 Hz
Reason row unfold / fold200 / 200 ms0 / 1200 ms after Thanksease.out / ease.inchips 40 ms, cap 560 Hz
Version switch180 ms crossfade + height spring; digits 280 ms0ease.in-out + spring.snap—60 Hz
Edit open / cancel120 ms fill + 200 ms width0ease.out / spring.snap—60 Hz
Save & send fly≤ 260 ms0ease.in—60 Hz
Regenerating dim / collapse160 / 200 mscollapse on first new blockease.out / spring.snap—60 Hz
Unread → Read200 ms0ease.out—30 Hz
Pending clock glyphappears after 600 ms600 msfade 120 ms——
Reduced motionall transitions → 0–80 ms opacity crossfade; no pop, no spin (↻ shows a static "…" badge while regenerating), no width spring; copy ✓ still holds 1500 ms; version digits swap without rolling—linearnoneon change

Responsive behaviour

  • The privacy line hides below 400 px of container.
Edge cases (spec)
  • Long text: user messages > 24 lines fold to 12 lines with "Show more" (coss ui long-message collapse, note 01); agent long output is handled by streaming-markdown (code collapse) — prose is never folded by default.
  • Huge pastes / binary-looking text: > 20 000 chars renders as plain mono with no markdown parse (proposed).
  • Overflow: long URLs / tokens break after 40 chars in prose (text-reveal rule); code never wraps unless the code block's wrap toggle is on.
  • RTL: bubbles mirror (user on the left); grouped-corner radii mirror; ‹ › arrows mirror (‹ = previous in reading order); version numbers stay LTR in a bidi isolate; mixed-direction bubbles use the first strong character for alignment.
  • Tiny sizes (16–20 px controls): action icons 16 px with 24 px hit areas in IDE; on < 280 px width everything goes into ⋯.
  • Dense IDE panels: message/dense + message-actions/overflow; timestamps tooltip-only.
  • Touch: 44 px hit areas; long-press = actions sheet; no hover state; feedback chips wrap to two rows.
  • Slow networks: Pending clock after 600 ms; SendFailed after the adapter's timeout; feedback sends queue locally and retry silently (vote shown immediately).
  • Very fast agent: Reserved → Complete in one frame: no status row, actions fade in directly.
  • Very slow agent: footer stays hidden until Done; partial text is copyable by selection at any time.
  • Edit while the agent is mid-approval: StopConfirm copy changes to "This will cancel the pending approval and stop the run".
  • Many versions (> 9): arrows show "‹ 12 / 37 ›" with reserved width for the widest count (status-text §2.2 ReserveMagnitude).
  • Deleted / redacted message (app policy): row "Message deleted" with no actions except Undo for 5 s.
  • Feedback on an old version: stored against that version id; switching versions shows that version's vote.

Notes for AI

  • Import ResponseFeedback, MessageActions from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: FeedbackEl in oxyn_gpui.
  • Props to set first: text.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI