bug: TipFeedback type includes helpful/not_helpful but backend rejects them #73

Closed
opened 2026-04-16 15:24:28 +00:00 by alvis · 0 comments
Owner

Problem

packages/shared-types/src/http/tip.ts:17 defines:

action: 'done' | 'dismiss' | 'snooze' | 'helpful' | 'not_helpful'

But services/api/src/routes/recommender.ts:261 validates:

const validActions = ['done', 'dismiss', 'snooze'];

The web UI (apps/web/src/app/tip/page.tsx) shows Helpful/Not helpful buttons that will get 400 responses.

Fix

Either:

  1. Remove helpful | not_helpful from the type and UI buttons (simpler), or
  2. Implement them as feedback actions with reward mapping (e.g. helpful=+0.5, not_helpful=−0.5)

Option 2 aligns with the reward model — explicit helpfulness signal is more informative than dwell-time inference.

## Problem `packages/shared-types/src/http/tip.ts:17` defines: ```ts action: 'done' | 'dismiss' | 'snooze' | 'helpful' | 'not_helpful' ``` But `services/api/src/routes/recommender.ts:261` validates: ```ts const validActions = ['done', 'dismiss', 'snooze']; ``` The web UI (`apps/web/src/app/tip/page.tsx`) shows Helpful/Not helpful buttons that will get 400 responses. ## Fix Either: 1. Remove `helpful | not_helpful` from the type and UI buttons (simpler), or 2. Implement them as feedback actions with reward mapping (e.g. helpful=+0.5, not_helpful=−0.5) Option 2 aligns with the reward model — explicit helpfulness signal is more informative than dwell-time inference.
alvis added this to the M2 — AI tips + multi-source signals milestone 2026-04-16 15:24:28 +00:00
alvis closed this issue 2026-04-17 13:34:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alvis/oO#73