feat: Route Impact Score for route builder and community pages#17
Open
faizm10 wants to merge 11 commits into
Open
feat: Route Impact Score for route builder and community pages#17faizm10 wants to merge 11 commits into
faizm10 wants to merge 11 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Turbopack was picking up the wrong workspace root due to multiple package-lock.json files in the repo. Setting `root: __dirname` in next.config.ts pins it to the client/ directory. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements GitHub issue #13. A scorecard evaluates each custom route across four weighted dimensions — frequency (40%), corridor length (25%), service hours (20%), and stop count (15%) — and produces a letter grade (A+ through F) displayed with color-coded progress bars. - lib/routeScoring.ts: pure synchronous scoring engine; computes metrics from CustomRoute data (stops, geometry, schedule) with no external deps - components/RouteScorecard.tsx: dark-themed card component with grade badge and per-metric progress bars, color-coded green → red by grade - BuilderWizard.tsx: scorecard appears at the top of the review step, updating live as the user adjusts stops and schedule - community/[id]/page.tsx: score computed server-side from stored routeData JSON and rendered between the map preview and action buttons No DB schema changes required — scores are derived on-the-fly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Closes #13.
Adds a Route Impact Score that evaluates every custom transit route across four dimensions and gives it an overall letter grade (A+ → F). The scorecard appears in two places:
routeDataJSON and rendered between the map preview and action buttonsScoring dimensions
New files
client/lib/routeScoring.ts— pure synchronous scoring engine, no external deps or fetchesclient/components/RouteScorecard.tsx— dark-themed card with grade badge + color-coded progress barsAlso included
client/next.config.ts— Turbopackroot: __dirnamefix for thetailwindcssresolution error in monorepos (unrelated to scoring but caught in the same session)Test plan
npm run buildinclient/— clean (verified: no TS errors)/community/[id]post → scorecard renders between map and action buttonsrouteData: nullpost → scorecard is skipped gracefully🤖 Generated with Claude Code