fix(results-panel): correct feedback charts, insights, and add refresh#199
Merged
Conversation
- biggestBlocker: tally() not textSamples() (it is a single-select field, not free text) — removes duplicates and enables a proper bar chart - buildFeedbackInsights: pattern-match option strings instead of hardcoded short keys; actual stored values are 'Yes, already planning to'/'Maybe', not 'yes'/'maybe'; same fix for deadlineStatus (full sentence options, not 'comfortable'/'tight') - FeedbackChart: dynamic YAxis width computed from longest label (max 160px) + tickFormatter truncation so long option strings are readable - Layout: 6-chart grid (adds surfacesPrimary + biggestBlocker); replaces the old 'BIGGEST BLOCKERS' text list; adds 'WHAT COULDN'T BITREFILL HANDLE' for couldntHandle free-text responses - Refresh button: increments refreshTick dep so leaderboard/stats/feedback can be reloaded after score re-saves without a full page refresh - Mock data: updated to use real Bitrefill option strings so dev:harness exercises the same code paths as production
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
Stadium UI verification — http://localhost:8080 (dev:harness)Scenarios: 5 total, 5 pass, 0 fail, 0 skipped
Preview mode: window.STADIUM_MOCK = true |
Merged
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Five bugs fixed in the completed-program results panel (
ProgramResultsSummarySection):1. Y-axis labels unreadable
deadlineStatusoptions are full sentences (up to 57 chars); the fixedYAxis width={90}was truncating them to garbage. Now computed dynamically from the longest label (min(160, max(80, longestLabel × 5.4)px)) with atickFormatterthat adds…for anything that still doesn't fit. Tooltip shows the full text on hover.2. Duplicate entries / wrong chart type for
biggestBlockerbiggestBlockeris a single-select field with fixed options, butaggregateFeedbackusedtextSamples()(raw string collection). Two respondents choosing the same option appeared as two identical list entries. Fixed totally()— now a bar chart showing counts per option. Server change:program-submission.repository.js.3. "0% plan to continue building" (always wrong)
buildFeedbackInsightswas looking forkeepCounts["yes"]/keepCounts["maybe"]but the actual stored values are"Yes, already planning to"/"Maybe". Same mismatch ondeadlineStatus— checked for"comfortable"/"tight"/"too tight"but real options are full sentences. Both insight calculations always returned 0. Fixed with/^yes/i//^maybe/iregex matching and pattern detection on deadline outcome strings.4.
couldntHandlefree-text collected but never showncouldntHandleSampleswas aggregated server-side but absent from the UI. Added a·WHAT BITREFILL COULDN'T HANDLE (OPEN TEXT)section below the charts.5. Stale data after score re-save
Leaderboard was loaded once on mount. If a judge re-saved scores, the panel showed old values until page refresh. Added a
↺ REFRESHbutton (top-right of the section header) that re-triggers the data fetch without a full page reload.Also: mock data updated
getFeedbackAggregatemock now uses real Bitrefill option strings sodev:harnessexercises the same code paths as production and would have caught bugs 2 and 3 above.Test plan
cd client && npm run build✓cd server && npm test✓ (439/439)