Skip to content

feat: add confidence badge on result card#51

Merged
jpdevhub merged 4 commits into
jpdevhub:mainfrom
aditikhushi81-cpu:main
Jun 3, 2026
Merged

feat: add confidence badge on result card#51
jpdevhub merged 4 commits into
jpdevhub:mainfrom
aditikhushi81-cpu:main

Conversation

@aditikhushi81-cpu

@aditikhushi81-cpu aditikhushi81-cpu commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Description

Added a confidence badge on the Analysis Dashboard result card.

Changes

  • Display confidence percentage on the result card
  • Added confidence badge UI
  • Shows "Low Confidence" when confidence is below 70%
  • Shows "High Confidence" when confidence is 70% or above

Summary by cubic

Added a confidence badge to the Analysis Dashboard result card to make model certainty clear at a glance. Shows "Low Confidence" below 70% and "High Confidence" at 70%+ with color cues.

  • New Features
    • Color-coded badge with subtle background and border next to the confidence percentage.
    • Responsive layout using flex-wrap to prevent overflow on small screens.

Written for commit 1627824. Summary will update on new commits.

Review in cubic

Closes #49

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

@aditikhushi81-cpu is attempting to deploy a commit to the karan3431's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

🎉 Thank you for your Pull Request! We're thrilled to have your contribution to FreshScan AI.

Before we review, please make sure you have:

  • Followed the CONTRIBUTING.md guidelines.
  • Ensured all automated CI checks (linting, tests) are passing.
  • Checked that your commit messages follow the Conventional Commits format.

A maintainer will review your code as soon as possible!

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@jpdevhub jpdevhub left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start, Aditi! The logic works perfectly and flex-wrap was a good call. However, before we can merge this, we need to make sure the styling matches the rest of our custom design system. Could you please update the following Let me know when you've pushed these updates and I will get it merged!

Comment thread src/pages/AnalysisDashboard.tsx Outdated
<span
className={`px-2 py-1 rounded-md text-xs font-semibold ${
confidence < 70
? "bg-yellow-500/20 text-yellow-400 border border-yellow-500/30"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid hardcoded Tailwind colors: We don't use default colors like green-500 or yellow-500 because they break our Light/Dark mode themes. Please use our custom theme variables (e.g., text-neon and text-error).

Comment thread src/pages/AnalysisDashboard.tsx Outdated
</span>

<span
className={`px-2 py-1 rounded-md text-xs font-semibold ${

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove rounded corners: Our UI uses sharp edges. Please remove the rounded-md class from the badge to maintain the brutalist aesthetic.

Comment thread src/pages/AnalysisDashboard.tsx Outdated
: "bg-green-500/20 text-green-400 border border-green-500/30"
}`}
>
{confidence < 70 ? "Low Confidence" : "High Confidence"}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Match the Typography: The rest of the metrics use our mono font and uppercase tracking text. Instead of "High Confidence", please use HIGH_CONFIDENCE with the font-[family-name:var(--font-mono)] and tracking-widest classes so it looks like a terminal output.

Comment thread src/pages/AnalysisDashboard.tsx Outdated
CLASSIFICATION: {classification}
</span>

<span className="font-[family-name:var(--font-mono)] text-[0.5625rem] text-on-surface-variant tracking-widest">

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the Indentation: The newly added elements inside the flex div have lost their indentation and are flushed completely to the left edge of the file. Please format the code so the indentation aligns correctly with the surrounding React code.

@aditikhushi81-cpu

Copy link
Copy Markdown
Contributor Author

Hi @jpdevhub,

I've addressed all requested review comments:
Replaced hardcoded colors with theme classes
Removed rounded corners Updated typography to match the design system
Fixed formatting and indentation

The changes have been pushed. Please review when convenient.

Thank you!

@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fresh-scan-ai Ready Ready Preview, Comment Jun 3, 2026 3:16pm

@jpdevhub

jpdevhub commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Dont make main branch in any project it can crash whole system. Rest of the things are okk and fine

@jpdevhub

jpdevhub commented Jun 3, 2026

Copy link
Copy Markdown
Owner

In the pr description give your issue no. with #closes tag so that it will closes issue we are ready to merge !

@aditikhushi81-cpu

Copy link
Copy Markdown
Contributor Author

Hi @jpdevhub,

I've updated the PR description and added:

Closes #51

Thank you!

@jpdevhub

jpdevhub commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Actually it was #49 your issue what i assigned

@jpdevhub

jpdevhub commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Thanks for contribution. I am merging this pr

@jpdevhub jpdevhub merged commit ded69cf into jpdevhub:main Jun 3, 2026
6 checks passed
@jpdevhub

jpdevhub commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Dont forget to star the repo and take more issues and contribute more!

@jpdevhub

jpdevhub commented Jun 4, 2026

Copy link
Copy Markdown
Owner

You are not in the official contributer list
image
join the discord channel of ssoc their are instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E-06: Scan Confidence Badge on Result Card

2 participants