Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(notifications): reveal compact feedback on hover (#6543)

Louis Beaumont7db438c367e8
diff --git a/COVERAGE.md b/COVERAGE.md
index d135047d5..384fa501b 100644
--- a/COVERAGE.md
+++ b/COVERAGE.md
@@ -19,14 +19,14 @@ results and `cargo llvm-cov` data on top when judging release confidence.
### Tauri E2E
- Mapped specs: 119
-- Declared test blocks: 344
-- Weighted coverage points: 269.9
+- Declared test blocks: 345
+- Weighted coverage points: 270.6
| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score |
| --- | --- | --- | --- | --- | --- | --- |
-| windows | 91 | 298 | 244.0 | 15 | 97 | 92% |
-| macos | 115 | 306 | 239.7 | 17 | 103 | 90% |
-| linux | 80 | 256 | 213.2 | 14 | 93 | 88% |
+| windows | 91 | 299 | 244.7 | 15 | 97 | 92% |
+| macos | 115 | 307 | 240.4 | 17 | 103 | 90% |
+| linux | 80 | 257 | 213.9 | 14 | 93 | 88% |
### Core Engine
diff --git a/apps/screenpipe-app-tauri/app/notification-panel/page.tsx b/apps/screenpipe-app-tauri/app/notification-panel/page.tsx
index 5ef86e3a6..34831a435 100644
--- a/apps/screenpipe-app-tauri/app/notification-panel/page.tsx
+++ b/apps/screenpipe-app-tauri/app/notification-panel/page.tsx
@@ -426,6 +426,7 @@ export default function NotificationPanelPage() {
return (
<div
+ className="group/notif"
style={{ width: "100%", height: "100%", background: "transparent" }}
onMouseEnter={() => {
hoveredRef.current = true;
diff --git a/apps/screenpipe-app-tauri/components/notification-feedback.test.tsx b/apps/screenpipe-app-tauri/components/notification-feedback.test.tsx
index f981fb0c1..4353c9f37 100644
--- a/apps/screenpipe-app-tauri/components/notification-feedback.test.tsx
+++ b/apps/screenpipe-app-tauri/components/notification-feedback.test.tsx
@@ -23,6 +23,33 @@ const notification = {
};
describe("NotificationFeedback", () => {
+ it("reveals compact rating choices through parent hover or focus", () => {
+ const parentClick = vi.fn();
+ render(
+ <div className="group/notif" onClick={parentClick}>
+ <NotificationFeedback notification={notification} />
+ </div>,
+ );
+
+ expect(
+ screen.getByRole("group", { name: "notification feedback options" }),
+ ).toBeInTheDocument();
+ expect(screen.queryByText("useful?")).not.toBeInTheDocument();
+ expect(
+ screen.getByRole("button", { name: "useful notification" }),
+ ).toHaveStyle({ width: "20px", height: "20px" });
+ expect(screen.getByTestId("notification-feedback")).toHaveClass(
+ "grid-rows-[0fr]",
+ "group-hover/notif:grid-rows-[1fr]",
+ "group-focus-within/notif:grid-rows-[1fr]",
+ );
+
+ fireEvent.click(
+ screen.getByRole("button", { name: "not useful notification" }),
+ );
+ expect(parentClick).not.toHaveBeenCalled();
+ });
+
it("expands a small correction input and saves down feedback on send", async () => {
capture.mockClear();
const submitFeedback = vi.fn().mockResolvedValue(undefined);
@@ -33,7 +60,9 @@ describe("NotificationFeedback", () => {
/>,
);
- fireEvent.click(screen.getByRole("button", { name: "not useful notification" }));
+ fireEvent.click(
+ screen.getByRole("button", { name: "not useful notification" }),
+ );
const input = screen.getByRole("textbox", { name: "what should improve" });
fireEvent.change(input, { target: { value: " include project names " } });
fireEvent.click(screen.getByRole("button", { name: "send feedback" }));
@@ -45,7 +74,9 @@ describe("NotificationFeedback", () => {
"include project names",
);
});
- expect(await screen.findByText("saved for the next run")).toBeInTheDocument();
+ expect(
+ await screen.findByText("saved for the next run"),
+ ).toBeInTheDocument();
expect(capture).toHaveBeenCalledWith(
"notification_feedback_submitted",
expect.objectContaining({
@@ -69,10 +100,16 @@ describe("NotificationFeedback", () => {
/>,
);
- fireEvent.click(screen.getByRole("button", { name: "useful notification" }));
+ fireEvent.click(
+ screen.getByRole("button", { name: "useful notification" }),
+ );
await waitFor(() => {
- expect(submitFeedback).toHaveBeenCalledWith(notification, "up", undefined);
+ expect(submitFeedback).toHaveBeenCalledWith(
+ notification,
+ "up",
+ undefined,
+ );
});
expect(screen.queryByRole("textbox")).not.toBeInTheDocument();
expect(capture).toHaveBeenCalledWith(
@@ -101,6 +138,8 @@ describe("NotificationFeedback", () => {
/>,
);
- expect(screen.queryByTestId("notification-feedback")).not.toBeInTheDocument();
+ expect(
+ screen.queryByTestId("notification-feedback"),
+ ).not.toBeInTheDocument();
});
});
diff --git a/apps/screenpipe-app-tauri/components/notification-feedback.tsx b/apps/screenpipe-app-tauri/components/notification-feedback.tsx
index 0275ee29b..eb3543621 100644
--- a/apps/screenpipe-app-tauri/components/notification-feedback.tsx
+++ b/apps/screenpipe-app-tauri/components/notification-feedback.tsx
@@ -80,8 +80,8 @@ export function NotificationFeedback({
display: "inline-flex",
alignItems: "center",
justifyContent: "center",
- width: "24px",
- height: "24px",
+ width: "20px",
+ height: "20px",
padding: 0,
border: "1px solid hsl(var(--border))",
borderRadius: 0,
@@ -93,119 +93,143 @@ export function NotificationFeedback({
return (
<div
- className="ph-no-capture"
- style={
- variant === "inbox"
- ? { padding: 0, marginTop: "8px" }
- : { padding: "0 14px 8px 14px" }
- }
+ className="ph-no-capture pointer-events-none grid grid-rows-[0fr] opacity-0 transition-[grid-template-rows,opacity] duration-150 motion-reduce:transition-none group-hover/notif:pointer-events-auto group-hover/notif:grid-rows-[1fr] group-hover/notif:opacity-100 group-focus-within/notif:pointer-events-auto group-focus-within/notif:grid-rows-[1fr] group-focus-within/notif:opacity-100"
data-testid="notification-feedback"
+ onClick={(event) => event.stopPropagation()}
+ onKeyDown={(event) => event.stopPropagation()}
>
- <div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
- <span
- style={{
- marginRight: "2px",
- fontSize: "9px",
- color: "hsl(var(--muted-foreground))",
- fontFamily: '"IBM Plex Mono", monospace',
- }}
- >
- useful?
- </span>
- <button
- type="button"
- onClick={selectUp}
- disabled={saveState === "saving"}
- aria-label="useful notification"
- aria-pressed={rating === "up"}
- title="useful"
- style={iconButtonStyle(rating === "up")}
- >
- <ThumbsUp size={12} strokeWidth={1.8} />
- </button>
- <button
- type="button"
- onClick={selectDown}
- disabled={saveState === "saving"}
- aria-label="not useful notification"
- aria-pressed={rating === "down"}
- title="not useful"
- style={iconButtonStyle(rating === "down")}
- >
- <ThumbsDown size={12} strokeWidth={1.8} />
- </button>
- {saveState === "saved" && rating === "up" && (
- <span style={{ fontSize: "9px", color: "hsl(var(--muted-foreground))" }}>
- saved
- </span>
- )}
- </div>
-
- {rating === "down" && (
- <form
- onSubmit={sendCorrection}
- style={{ display: "flex", gap: "6px", marginTop: "6px" }}
+ <div className="min-h-0 overflow-hidden">
+ <div
+ style={
+ variant === "inbox"
+ ? { padding: 0, marginTop: "8px" }
+ : { padding: "0 14px 8px 14px" }
+ }
>
- <input
- autoFocus
- value={correction}
- onChange={(event) => {
- setCorrection(event.target.value);
- if (saveState !== "idle") setSaveState("idle");
- }}
- maxLength={500}
- placeholder="what should improve?"
- aria-label="what should improve"
- style={{
- minWidth: 0,
- flex: 1,
- height: "28px",
- padding: "0 8px",
- border: "1px solid hsl(var(--border))",
- borderRadius: 0,
- outline: "none",
- background: "hsl(var(--background))",
- color: "hsl(var(--foreground))",
- fontFamily: '"IBM Plex Mono", monospace',
- fontSize: "10px",
- }}
- />
- <button
- type="submit"
- disabled={!correction.trim() || saveState === "saving"}
- aria-label="send feedback"
- title="send feedback"
+ <div
+ role="group"
+ aria-label="notification feedback options"
style={{
- display: "inline-flex",
+ display: "flex",
alignItems: "center",
- justifyContent: "center",
- width: "28px",
- height: "28px",
- padding: 0,
- border: "1px solid hsl(var(--border))",
- borderRadius: 0,
- background: correction.trim() ? "hsl(var(--foreground))" : "transparent",
- color: correction.trim()
- ? "hsl(var(--background))"
- : "hsl(var(--muted-foreground))",
- cursor: correction.trim() ? "pointer" : "default",
+ gap: "4px",
}}
>
- <Send size={12} strokeWidth={1.8} />
- </button>
- </form>
- )}
+ <button
+ type="button"
+ onClick={selectUp}
+ disabled={saveState === "saving"}
+ aria-label="useful notification"
+ aria-pressed={rating === "up"}
+ title="useful"
+ style={iconButtonStyle(rating === "up")}
+ >
+ <ThumbsUp size={9} strokeWidth={1.8} />
+ </button>
+ <button
+ type="button"
+ onClick={selectDown}
+ disabled={saveState === "saving"}
+ aria-label="not useful notification"
+ aria-pressed={rating === "down"}
+ title="not useful"
+ style={iconButtonStyle(rating === "down")}
+ >
+ <ThumbsDown size={9} strokeWidth={1.8} />
+ </button>
+ {saveState === "saved" && rating === "up" && (
+ <span
+ style={{
+ fontSize: "9px",
+ color: "hsl(var(--muted-foreground))",
+ }}
+ >
+ saved
+ </span>
+ )}
+ </div>
+ {rating === "down" && (
+ <form
+ onSubmit={sendCorrection}
+ style={{ display: "flex", gap: "6px", marginTop: "6px" }}
+ >
+ <input
+ autoFocus
+ value={correction}
+ onChange={(event) => {
+ setCorrection(event.target.value);
+ if (saveState !== "idle") setSaveState("idle");
+ }}
+ maxLength={500}
+ placeholder="what should improve?"
+ aria-label="what should improve"
+ style={{
+ minWidth: 0,
+ flex: 1,
+ height: "28px",
+ padding: "0 8px",
+ border: "1px solid hsl(var(--border))",
+ borderRadius: 0,
+ outline: "none",
+ background: "hsl(var(--background))",
+ color: "hsl(var(--foreground))",
+ fontFamily: '"IBM Plex Mono", monospace',
+ fontSize: "10px",
+ }}
+ />
+ <button
+ type="submit"
+ disabled={!correction.trim() || saveState === "saving"}
+ aria-label="send feedback"
+ title="send feedback"
+ style={{
+ display: "inline-flex",
+ alignItems: "center",
+ justifyContent: "center",
+ width: "28px",
+ height: "28px",
+ padding: 0,
+ border: "1px solid hsl(var(--border))",
+ borderRadius: 0,
+ background: correction.trim()
+ ? "hsl(var(--foreground))"
+ : "transparent",
+ color: correction.trim()
+ ? "hsl(var(--background))"
+ : "hsl(var(--muted-foreground))",
+ cursor: correction.trim() ? "pointer" : "default",
+ }}
+ >
+ <Send size={12} strokeWidth={1.8} />
+ </button>
+ </form>
+ )}
- {saveState === "saved" && rating === "down" && (
- <div style={{ marginTop: "4px", fontSize: "9px", color: "hsl(var(--muted-foreground))" }}>
- saved for the next run
+ {saveState === "saved" && rating === "down" && (
+ <div
+ style={{
+ marginTop: "4px",
+ fontSize: "9px",
+ color: "hsl(var(--muted-foreground))",
+ }}
+ >
+ saved for the next run
+ </div>
+ )}
+ {saveState === "error" && (
+ <div
+ role="alert"
+ style={{
+ marginTop: "4px",
+ fontSize: "9px",
+ color: "hsl(var(--muted-foreground))",
+ }}
+ >
+ could not save — try again
+ </div>
+ )}
</div>
- )}
- {saveState === "error" && (
- <div role="alert" style={{ marginTop: "4px", fontSize: "9px", color: "hsl(var(--muted-foreground))" }}>
- could not save — try again
- </div>
- )}
+ </div>
</div>
);
}
diff --git a/apps/screenpipe-app-tauri/e2e/COVERAGE.md b/apps/screenpipe-app-tauri/e2e/COVERAGE.md
index 7668ab9f8..5b52d1c41 100644
--- a/apps/screenpipe-app-tauri/e2e/COVERAGE.md
+++ b/apps/screenpipe-app-tauri/e2e/COVERAGE.md
@@ -7,8 +7,8 @@ and layer declared in the manifest, weighted by confidence and criticality.
- Manifest: `e2e/coverage-map.json`
- Specs directory: `e2e/specs`
- Mapped specs: 119
-- Declared test blocks: 344
-- Weighted coverage points: 269.9
+- Declared test blocks: 345
+- Weighted coverage points: 270.6
Confidence weights: strong=1.0, partial=0.7, conditional=0.4, smoke=0.3.
Criticality weights: high=1.0, medium=0.7, low=0.4.
@@ -19,9 +19,9 @@ can execute more runtime cases than this number shows.
| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score |
| --- | --- | --- | --- | --- | --- | --- |
-| windows | 91 | 298 | 244.0 | 15 | 97 | 92% |
-| macos | 115 | 306 | 239.7 | 17 | 103 | 90% |
-| linux | 80 | 256 | 213.2 | 14 | 93 | 88% |
+| windows | 91 | 299 | 244.7 | 15 | 97 | 92% |
+| macos | 115 | 307 | 240.4 | 17 | 103 | 90% |
+| linux | 80 | 257 | 213.9 | 14 | 93 | 88% |
## Runtime Results
@@ -45,7 +45,7 @@ pass/fail/skip counts.
| os-integration | 7 specs / 30 tests / 25.5 pts | 14 specs / 27 tests / 16.0 pts | 2 specs / 13 tests / 9.4 pts |
| performance | 2 specs / 44 tests / 44.0 pts | 4 specs / 34 tests / 30.5 pts | 1 specs / 29 tests / 29.0 pts |
| pipes | 6 specs / 19 tests / 19.0 pts | 8 specs / 25 tests / 25.0 pts | 6 specs / 19 tests / 19.0 pts |
-| real-ui-e2e | 65 specs / 199 tests / 164.7 pts | 78 specs / 203 tests / 166.9 pts | 60 specs / 175 tests / 150.5 pts |
+| real-ui-e2e | 65 specs / 200 tests / 165.4 pts | 78 specs / 204 tests / 167.6 pts | 60 specs / 176 tests / 151.2 pts |
| settings | 14 specs / 40 tests / 37.0 pts | 16 specs / 34 tests / 29.7 pts | 13 specs / 31 tests / 28.0 pts |
| storage-privacy | 9 specs / 42 tests / 33.3 pts | 9 specs / 27 tests / 26.1 pts | 6 specs / 20 tests / 19.1 pts |
| tauri-command | 19 specs / 51 tests / 39.6 pts | 27 specs / 62 tests / 47.1 pts | 18 specs / 52 tests / 40.2 pts |
@@ -123,7 +123,7 @@ pass/fail/skip counts.
| chat-cross-window-transcript-sync.spec.ts | windows, macos, linux | chat-ai, window-lifecycle, real-ui-e2e | chat, chat-streaming, window-lifecycle | high | strong | mixed | 1 | Both Home and standalone Chat show persistent pending feedback, then hydrate a completed disk transcript and clear stop state from the real cross-window save event without calling a provider. |
| chat-empty-space.spec.ts | windows, macos, linux | chat-ai, real-ui-e2e | chat | medium | strong | real-user-flow | 1 | A real Tauri chat session keeps a short answer at the top of the message rail without exposing a false new-content state. |
| chat-hosted-retry-feedback.spec.ts | macos | chat-ai, real-ui-e2e, tauri-command | chat, chat-streaming | high | strong | real-user-flow | 1 | A local provider returns priced_request_in_flight twice; Pi retries while the UI remains active, a real composer follow-up enters the Rust queue, and both turns recover without the misleading mid-response error. |
-| chat-inline-charts.spec.ts | windows, macos, linux | real-ui-e2e | chat, markdown, charts | medium | strong | real-user-flow | 7 | Seeds an assistant message containing ```chart fences and asserts the charts render inline between the surrounding paragraphs, bar widths are proportional to the data, hover shows a tooltip and recolours the mark, a malformed fence degrades to a readable code block, every chart exposes a screen-reader table, and no chart uses a rounded corner (DESIGN.md). |
+| chat-inline-charts.spec.ts | windows, macos, linux | real-ui-e2e | chat, markdown, charts | medium | strong | real-user-flow | 8 | Seeds an assistant message containing ```chart fences and asserts the charts render inline between the surrounding paragraphs, bar widths are proportional to the data, hover shows a tooltip and recolours the mark, a malformed fence degrades to a readable code block, every chart exposes a screen-reader table, and no chart uses a rounded corner (DESIGN.md). |
| chat-local-ai-gateway.spec.ts | macos | chat-ai, real-ui-e2e, tauri-command | chat, chat-streaming | high | strong | real-user-flow | 1 | Opt-in full-stack hosted-AI path: the E2E app and real Pi route through the Rust-validated loopback URL into the production Worker bundle under Miniflare, with migrated local D1 and network-closed fake provider egress, then the streamed answer reaches the real chat UI. |
| chat-new-chat-first-message-ux.spec.ts | macos | chat-ai, real-ui-e2e | chat, chat-first-message-ux, chat-turn-status | medium | partial | real-user-flow | 1 | Real + new chat through the first assistant token over a cold Pi start: pins that the message and cleared composer land in the send frame, that only one status element is ever mounted, and that the pane never snaps alignment. Opt-in (SCREENPIPE_E2E_LOCAL_AI_GATEWAY). |
| chat-new-session-stale-save.spec.ts | windows, macos, linux | chat-ai, real-ui-e2e, storage-privacy | chat, chat-drafts | high | strong | synthetic | 1 | Switching to a new Pi session binds its echoed user turn to the new conversation file and leaves the previous chat intact. |
diff --git a/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift b/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift
index f7036148a..987b1f7bf 100644
--- a/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift
+++ b/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift
@@ -326,11 +326,6 @@ private struct NativeNotificationFeedbackView: View {
var body: some View {
VStack(alignment: .leading, spacing: 6) {
HStack(spacing: 6) {
- Text("useful?")
- .font(Brand.swiftUIMonoFont(size: 9))
- .foregroundColor(.primary.opacity(0.34))
- .padding(.trailing, 2)
-
feedbackButton(systemName: "hand.thumbsup", rating: .up) {
model.rating = .up
model.correction = ""
@@ -404,8 +399,8 @@ private struct NativeNotificationFeedbackView: View {
let selected = model.rating == rating
return Button(action: action) {
Image(systemName: systemName)
- .font(.system(size: 11, weight: .regular))
- .frame(width: 24, height: 24)
+ .font(.system(size: 9, weight: .regular))
+ .frame(width: 20, height: 20)
.foregroundColor(selected ? Color(nsColor: .windowBackgroundColor) : .primary.opacity(0.42))
.background(Rectangle().fill(selected ? Color.primary.opacity(0.82) : Color.clear))
.overlay(Rectangle().stroke(Color.primary.opacity(0.12), lineWidth: 1))
@@ -557,7 +552,7 @@ struct NotificationContentView: View {
.zIndex(1)
}
- if payload.type == "pipe" || payload.pipe_name != nil || payload.source_session_id != nil {
+ if isHovered && (payload.type == "pipe" || payload.pipe_name != nil || payload.source_session_id != nil) {
NativeNotificationFeedbackView(
model: feedback,
onSubmit: submitFeedback,
diff --git a/docs/images/notification-feedback/collapsed.png b/docs/images/notification-feedback/collapsed.png
new file mode 100644
index 000000000..a4c92853a
Binary files /dev/null and b/docs/images/notification-feedback/collapsed.png differ
diff --git a/docs/images/notification-feedback/negative.png b/docs/images/notification-feedback/negative.png
new file mode 100644
index 000000000..9c03df283
Binary files /dev/null and b/docs/images/notification-feedback/negative.png differ
diff --git a/docs/images/notification-feedback/options.png b/docs/images/notification-feedback/options.png
new file mode 100644
index 000000000..81bc68211
Binary files /dev/null and b/docs/images/notification-feedback/options.png differ
diff --git a/docs/images/notification-feedback/positive.png b/docs/images/notification-feedback/positive.png
new file mode 100644
index 000000000..4b3bb98ed
Binary files /dev/null and b/docs/images/notification-feedback/positive.png differ