Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
feat(web): sharpen feedback CTA and drop recalibration banner (#920)
Raghav Chamadiyaa1fc45869af8
diff --git a/packages/ui/src/health/index.ts b/packages/ui/src/health/index.tsindex d01b8b6b8..2411e3f09 100644--- a/packages/ui/src/health/index.ts+++ b/packages/ui/src/health/index.ts@@ -34,7 +34,6 @@ export * from "./ai-prompt-modal";export * from "./ai-prompt-button";export * from "./hot-functions-panel";export * from "./hidden-coupling-list";-export * from "./recalibration-banner";export * from "./defect-accuracy-card";export * from "./code-health-adapter";export * from "./triage-view";diff --git a/packages/ui/src/health/recalibration-banner.tsx b/packages/ui/src/health/recalibration-banner.tsxdeleted file mode 100644index d1e28c026..000000000--- a/packages/ui/src/health/recalibration-banner.tsx+++ /dev/null@@ -1,66 +0,0 @@-"use client";--import { useEffect, useState } from "react";-import { Info, X } from "lucide-react";--const STORAGE_PREFIX = "repowise:health:recalibration-banner-dismissed:";--export interface RecalibrationBannerProps {- repoId: string;-}--export function RecalibrationBanner({ repoId }: RecalibrationBannerProps) {- const [visible, setVisible] = useState(false);-- useEffect(() => {- if (typeof window === "undefined") return;- try {- const dismissed = window.localStorage.getItem(STORAGE_PREFIX + repoId);- if (!dismissed) setVisible(true);- } catch {- setVisible(true);- }- }, [repoId]);-- if (!visible) return null;-- const dismiss = () => {- try {- window.localStorage.setItem(STORAGE_PREFIX + repoId, "1");- } catch {- /* localStorage unavailable — just hide in this session. */- }- setVisible(false);- };-- return (- <div- role="status"- className="flex items-start gap-3 rounded-lg border border-[var(--color-accent-primary)]/40 bg-[var(--color-accent-muted)] px-4 py-3 text-sm"- >- <Info- className="mt-0.5 h-4 w-4 shrink-0 text-[var(--color-accent-primary)]"- aria-hidden="true"- />- <div className="flex-1 space-y-1">- <p className="font-medium text-[var(--color-text-primary)]">- Scores were recalibrated.- </p>- <p className="text-[var(--color-text-secondary)]">- Organizational signals — developer congestion, knowledge- concentration, hidden coupling — now weigh more heavily because- they're the strongest empirical predictors of defects. Some- files moved.- </p>- </div>- <button- type="button"- onClick={dismiss}- aria-label="Dismiss"- className="rounded p-1 text-[var(--color-text-tertiary)] hover:bg-[var(--color-bg-elevated)] hover:text-[var(--color-text-primary)]"- >- <X className="h-4 w-4" />- </button>- </div>- );-}diff --git a/packages/ui/src/health/triage-view.tsx b/packages/ui/src/health/triage-view.tsxindex ab6cc5ece..fdf35ae86 100644--- a/packages/ui/src/health/triage-view.tsx+++ b/packages/ui/src/health/triage-view.tsx@@ -31,7 +31,6 @@ import {type CodeHealthMapFile,type CodeHealthOverlay,} from "./code-health-map";-import { RecalibrationBanner } from "./recalibration-banner";import { DefectAccuracyCard } from "./defect-accuracy-card";import { FileSpotlight } from "./code-health-controls";import { type Severity } from "./tokens";@@ -166,8 +165,6 @@ export function TriageView({</div>) : overview ? (<>- <RecalibrationBanner repoId={cacheKey} />-{/* Proof, up front: the defect-validated headline that sets this scoreapart — a slim one-line banner that expands to the full breakdown. */}{overview.defect_accuracy ? (diff --git a/packages/web/src/components/layout/feedback-button.tsx b/packages/web/src/components/layout/feedback-button.tsxindex 476ad193e..6e3256631 100644--- a/packages/web/src/components/layout/feedback-button.tsx+++ b/packages/web/src/components/layout/feedback-button.tsx@@ -1,7 +1,7 @@"use client";import { useState } from "react";-import { MessageSquarePlus } from "lucide-react";+import { MessageSquarePlus, Lock } from "lucide-react";import {Dialog,DialogContent,@@ -76,20 +76,20 @@ export function FeedbackButton() {<buttontype="button"onClick={() => setOpen(true)}- aria-label="Send feedback"- className="flex w-full items-center gap-1.5 text-xs text-[var(--color-text-tertiary)] transition-colors hover:text-[var(--color-text-secondary)]"+ aria-label="Help us improve Repowise"+ className="flex w-full items-center gap-2 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2 text-xs font-medium text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-accent-primary)]/50 hover:bg-[var(--color-accent-muted)] hover:text-[var(--color-text-primary)]">- <MessageSquarePlus className="h-3.5 w-3.5 shrink-0" />- <span>Send feedback</span>+ <MessageSquarePlus className="h-4 w-4 shrink-0 text-[var(--color-accent-primary)]" />+ <span>Help us improve Repowise</span></button><Dialog open={open} onOpenChange={handleOpenChange}><DialogContent className="max-w-md"><DialogHeader>- <DialogTitle>Send feedback</DialogTitle>+ <DialogTitle>Help us improve Repowise</DialogTitle><DialogDescription>- Found a bug or have an idea? It goes straight to the maintainers. We read every- message.+ Found a bug or have an idea? It goes straight to the maintainers, and we read every+ message. It's anonymous by default — no account needed.</DialogDescription></DialogHeader>@@ -162,6 +162,13 @@ export function FeedbackButton() {</div></div>+ <div className="flex items-start gap-1.5 text-[11px] text-[var(--color-text-tertiary)]">+ <Lock className="mt-0.5 h-3 w-3 shrink-0" aria-hidden="true" />+ <span>+ Submitted anonymously. We only see your email if you add one above.+ </span>+ </div>+<DialogFooter><Button variant="outline" onClick={() => handleOpenChange(false)} disabled={submitting}>Cancel