fix(frontend): enhance text contrast for hero section metric labels#141
fix(frontend): enhance text contrast for hero section metric labels#141Vaanshimadaan wants to merge 4 commits into
Conversation
|
@Vaanshimadaan is attempting to deploy a commit to the karan3431's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe landing page hero stat pills were updated so the first label uses new styling and the second label text was removed, while both displayed values remain unchanged. ChangesHero metric labels
Related issues: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.1)src/pages/LandingPage.tsxFile contains syntax errors that prevent linting: Line 85: Expected corresponding JSX closing tag for 'GlassCard'.; Line 84: Expected corresponding JSX closing tag for 'div'.; Line 71: Expected corresponding JSX closing tag for 'section'.; Line 69: Expected corresponding JSX closing tag for 'div'.; Line 118: expected 🔧 ESLint
src/pages/LandingPage.tsxParsing error: Expected corresponding JSX closing tag for 'GlassCard'. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/LandingPage.tsx`:
- Around line 99-104: Restore the stacked label/value layout in LandingPage by
making the caption/value spans render as separate block elements again; the
removal of block mb-1 in the pill markup causes them to sit inline and collapse
onto one line. Update the span styling in the affected metric sections
(including the repeated pill markup around the "Inference Speed" and matching
items) so the label remains above the value.
- Line 107: The Biomarker Accuracy label is missing from the small pill next to
the 98.9% metric. Restore the label text in the LandingPage component where the
empty span is rendered, so the UI again shows “Biomarker Accuracy” alongside the
percentage badge.
- Line 99: The LandingPage caption text is using an invalid Tailwind
letter-spacing class, so the spacing is being ignored. Update the span styling
in LandingPage to replace tracking-wi with a valid Tailwind utility such as
tracking-wide or tracking-widest, and make the same fix anywhere else in the
same component that uses the same invalid class so the intended caption spacing
applies consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6e59c89a-3cff-4d58-8441-2c7702850adf
📒 Files selected for processing (1)
src/pages/LandingPage.tsx
|
"@jpdevhub I have submitted the PR with the required changes and followed the design patterns. Please review it when you get a chance! |
jpdevhub
left a comment
There was a problem hiding this comment.
Thank you for picking this up! Unfortunately this PR has a few issues that need to be fixed before we can merge
The actual contrast fix is missing — text-on-surface-variant is unchanged from the original. To fix the contrast, try changing it to text-on-surface or text-white. Also, your branch is out of date — please rebase onto main before resubmitting!
|
"Hey! @jpdevhub I've fixed the typos (updated tracking-wi to tracking-widest), restored the missing labels, and updated the text contrast to use text-white as suggested. I also successfully rebased the branch onto main. Ready for review!" |
|
Resolve the merge conflicts. Atleast do the courtesy of removing the quotes from whatever Ai you used before putting it in github comments. |
|
@jpdevhub I have removed the merge conflicts and reopened the pr as requested . Please review it once you get time . Thanks! |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/pages/LandingPage.tsx (1)
85-94: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winBroken JSX and lost content in stat pills — will fail to parse.
Multiple critical problems here:
- Line 87 is a stray
</span>with no matching opening tag — this is invalid JSX and will fail to compile, as flagged by static analysis (Expected corresponding JSX closing tag for 'GlassCard'/'div').- The "Inference Speed" label text (and its wrapping
<span>open tag) has been deleted entirely — issue#140requires this label to remain visible with better contrast, not be removed.- The second
<GlassCard>(lines 92-94) is completely empty — both the "Biomarker Accuracy" label and the98.9%value span are gone. This contradicts the ai_summary's claim that "both displayed values remain unchanged" and directly regresses past-review fixes where the author said they "restored missing labels."- Neither
t('landing.inferenceSpeed')nort('landing.biomarkerAccuracy')(both present insrc/i18n/locales/en.json) are referenced anywhere in this file anymore.This is a regression relative to the PR's own stated fix (contrast via
text-white) and issue#140's requirement that labels remain visible.🐛 Proposed fix restoring both labels with proper contrast and closing tags
<GlassCard className="px-6 py-4" variant="glass"> - - </span> + <span className="block mb-1 font-[family-name:var(--font-mono)] text-[0.625rem] tracking-widest text-white"> + {t('landing.inferenceSpeed')} + </span> <span className="font-[family-name:var(--font-display)] text-3xl font-bold text-neon"> {t('landing.speedValue')} </span> </GlassCard> <GlassCard className="px-6 py-4" variant="glass"> - + <span className="block mb-1 font-[family-name:var(--font-mono)] text-[0.625rem] tracking-widest text-white"> + {t('landing.biomarkerAccuracy')} + </span> + <span className="font-[family-name:var(--font-display)] text-3xl font-bold text-neon"> + {t('landing.accuracyValue')} + </span> </GlassCard>🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/LandingPage.tsx` around lines 85 - 94, Restore the broken JSX in LandingPage by removing the stray closing tag and reintroducing the missing stat pill content inside both GlassCard blocks so the component compiles again. In the section that renders the landing stats, keep the Inference Speed label and its value using the existing t('landing.inferenceSpeed') and t('landing.speedValue') keys, and restore the Biomarker Accuracy label and 98.9% value using t('landing.biomarkerAccuracy') plus the value span. Make sure the surrounding GlassCard and span tags are properly balanced and that the label text remains visible with the intended contrast.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@src/pages/LandingPage.tsx`:
- Around line 85-94: Restore the broken JSX in LandingPage by removing the stray
closing tag and reintroducing the missing stat pill content inside both
GlassCard blocks so the component compiles again. In the section that renders
the landing stats, keep the Inference Speed label and its value using the
existing t('landing.inferenceSpeed') and t('landing.speedValue') keys, and
restore the Biomarker Accuracy label and 98.9% value using
t('landing.biomarkerAccuracy') plus the value span. Make sure the surrounding
GlassCard and span tags are properly balanced and that the label text remains
visible with the intended contrast.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7c1cacdc-f25b-4cab-b6da-08b103ef914e
📒 Files selected for processing (1)
src/pages/LandingPage.tsx
Description
Fixed the low text contrast/readability issue on the hero section metric labels. Added the
text-on-surface-variantclass to both "Inference Speed" and "Biomarker Accuracy" labels to ensure they are visible against the dark background and stay synced with the rest of the page styling.Closes #140
Checklist
npm run lintpasses with no errorsnpm run buildcompiles without TypeScript errorspython -m pytestpasses (including new tests I added).envfiles, API keys, secrets, model weights, or__pycache__in this diffmain, not mergedSummary by CodeRabbit