Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Feedback: a rating picked then dismissed is never recorded

Closed
#1,006 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript, vite

Research direction

Start with FeedbackDialog and trackFeedback, then inspect the existing PostHog insights for feedback_submitted and the analytics memory pages on event-name tests and trustworthy counts. Review the event-name/property tests before deciding the event shape. Done means star-only dismissal records one final rating, note submission does not double-count it, and VITE_POSTHOG_KEY gating and dead-code elimination remain covered.

Written by the indexing model from the issue text.

Description

enhancement gaal ux:flow

Decisions (2026-09-29)

  • Two distinct event names, not one event with an enriched follow-up. The existing feedback_submitted event keeps its name and its current properties (rating, category, feedback_text, wants_contact, email) so existing PostHog insights on it do not break; it gains one property, open_id. A new event feedback_rated (snake_case, matching feedback_submitted, parse_failed, llm_critique_ran in src/lib/analytics.ts) records the rating.
  • The rating fires ONCE per dialog open, at the end of the open — not per star click. Mint an id when the dialog opens (open_id). When the open ends with a rating selected — on submit, or on close/dismiss — fire feedback_rated exactly once with { rating, open_id, outcome } where outcome is "submitted" or "dismissed". A rating changed before the open ends is simply the last value picked (last rating wins); nothing is emitted per click, so no downstream de-duplication is needed. An open with no star picked fires nothing. A hard tab-kill fires nothing; that loss is accepted (no pagehide beacon).
  • Submit still fires feedback_submitted (rating + note + email as today, plus open_id), and also fires the single feedback_rated for that open (outcome: "submitted"). The two events are distinct, so the rating is not double-counted within either.
  • A star-only rating does not count as "submitted". It must not set ocv_feedback_submitted (which puts FeedbackPanel into its done state and stops it asking). Only a real feedback_submitted sets the flag. The follow-up ask is already bounded: the panel demotes itself to the compact star strip after two views (FeedbackDialog.tsx docblock).
  • Same behaviour for the inline nudge (FeedbackNudge.tsx) if it has its own rating step: one feedback_rated per open, same shape.

Problem

FeedbackDialog only sends anything when a step-2 form is submitted: trackFeedback fires one feedback_submitted event carrying the rating, the note and the optional email together. A user who picks a star and then closes the dialog without writing anything sends nothing.

That discards the strongest signal we get from exactly the users least likely to fill in a free-text box. A 2★ followed by a close is a complete answer ("this didn't work for me"), and today it vanishes without a trace.

Found in the #912 research pass (writeup) and deliberately left out of #912 and PR #942, because fixing it changes the analytics event shape.

Implementation

  • src/lib/analytics.ts: add a pure, exported props builder and a trackFeedbackRated({ rating, openId, outcome }) wrapper that calls track("feedback_rated", …), mirroring buildFeedbackProps / trackFeedback. Add open_id to buildFeedbackProps / FeedbackArgs. Both stay dead-code-eliminated when VITE_POSTHOG_KEY is unset (they go through track()).
  • FeedbackDialog.tsx / useFeedbackDialog.ts (and the nudge, if applicable): mint the open id on open; hold the currently selected rating in state; on submit fire feedback_submitted + feedback_rated; on close/dismiss with a rating and no prior submit, fire feedback_rated (outcome: "dismissed"). Guard so a single open can never emit feedback_rated twice (e.g. submit followed by the close handler).
  • Do not touch ocv_feedback_submitted semantics except to confirm a dismissed star-only open leaves it unset.

Acceptance criteria

  • Picking a star and closing the dialog fires feedback_rated exactly once (outcome: "dismissed") and does NOT fire feedback_submitted or set ocv_feedback_submitted
  • Submitting a note after a star fires feedback_submitted once and feedback_rated once (outcome: "submitted"), sharing the same open_id; the rating is not double-counted
  • Changing the star before the open ends emits only the final value, and nothing is emitted per star click
  • Opening the dialog and closing it with no star picked emits nothing
  • Reopening the dialog mints a new open_id
  • feedback_submitted properties are otherwise unchanged (existing insights keep working)
  • Analytics stays env-gated and dead-code-eliminated when VITE_POSTHOG_KEY is unset
  • Event-name/property tests in src/lib/analytics.test.ts and FeedbackDialog.test.tsx updated alongside the shape change
Dominant language
TypeScript
Stars
11
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from offlinecv/OfflineCV

All issues in offlinecv/OfflineCV

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.