mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
W9-5: Tooltip sweep — HelpTip helper + per-view decode (#533)
* [W9-5a] Tooltip sweep foundation: HelpTip helper + shared cryptic badges HelpTip: DRY wrapper over the verbose 3-element Radix Tooltip pattern so a broad sweep stays a one-line wrap per site (falsy label short-circuits to the bare child). Unit-tested (3 cases). TaskStatusBadge + AgentStateBadge: the panel's most cryptic, most-frequent elements (15 task lifecycle states, 11 agent states) had no explanation anywhere. Add a per-state tooltip via HelpTip, with the canonical text in one description map and exported as taskStatusDescription / agentStateDescription so the per-view inline renderers (kanban, task header) reuse it instead of re-declaring. This is part 1 of the W9-5 tooltip sweep; the per-view inline surfaces follow in subsequent PRs. * [W9-5b] Per-view tooltip sweep: decode cryptic badges, icon-only buttons, status dots 35 HelpTip additions across 22 panel components, reusing the W9-5a helper plus taskStatusDescription/agentStateDescription. Tipped: task-id/commit-hash/branch/PR badges, severity/origin/status badges, priority (P0-P3), migration/shared flags, MegaTask umbrella badge, Review Gate / For Resumption / Confidential note badges, icon-only view/delete/edit/clear/show-hide buttons, semver bump + gate-state badges, ahead-not-pushed badge. Skipped self-explanatory labeled buttons and elements already carrying title=. --------- Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ import {
|
||||
RefreshCcw,
|
||||
GitGraph,
|
||||
} from "lucide-react";
|
||||
import { HelpTip } from "@/components/ui/help-tip";
|
||||
|
||||
interface GitActionsPanelProps {
|
||||
status: GitStatusResponse | undefined;
|
||||
@@ -228,10 +229,12 @@ export function GitActionsPanel({
|
||||
)}
|
||||
Push to Remote
|
||||
{status?.ahead !== undefined && status.ahead > 0 && (
|
||||
<Badge variant="secondary" className="ml-auto">
|
||||
<ArrowUp className="h-3 w-3 mr-1" />
|
||||
{status.ahead}
|
||||
</Badge>
|
||||
<HelpTip label="Commits not yet pushed to the remote repository">
|
||||
<Badge variant="secondary" className="ml-auto">
|
||||
<ArrowUp className="h-3 w-3 mr-1" />
|
||||
{status.ahead}
|
||||
</Badge>
|
||||
</HelpTip>
|
||||
)}
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import { GitBranch, Check, Cloud, Plus, RefreshCw } from "lucide-react";
|
||||
import { HelpTip } from "@/components/ui/help-tip";
|
||||
|
||||
interface GitBranchPanelProps {
|
||||
branches: GitBranchListResponse | undefined;
|
||||
@@ -183,9 +184,11 @@ export function GitBranchPanel({
|
||||
</span>
|
||||
</div>
|
||||
{branch.last_commit && (
|
||||
<span className="text-xs text-muted-foreground font-mono shrink-0">
|
||||
{branch.last_commit.slice(0, 7)}
|
||||
</span>
|
||||
<HelpTip label="Short commit hash on this branch">
|
||||
<span className="text-xs text-muted-foreground font-mono shrink-0">
|
||||
{branch.last_commit.slice(0, 7)}
|
||||
</span>
|
||||
</HelpTip>
|
||||
)}
|
||||
</Button>
|
||||
))}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ScrollArea } from "@/components/ui/scroll-area";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { GitCommit, User, Calendar } from "lucide-react";
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
import { HelpTip } from "@/components/ui/help-tip";
|
||||
|
||||
interface GitLogPanelProps {
|
||||
log: GitLogResponse | undefined;
|
||||
@@ -105,12 +106,14 @@ export function GitLogPanel({
|
||||
<p className="text-sm font-medium leading-snug line-clamp-2">
|
||||
{commit.message}
|
||||
</p>
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="font-mono text-xs shrink-0"
|
||||
>
|
||||
{commit.short_hash}
|
||||
</Badge>
|
||||
<HelpTip label="Short commit hash">
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="font-mono text-xs shrink-0"
|
||||
>
|
||||
{commit.short_hash}
|
||||
</Badge>
|
||||
</HelpTip>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 mt-1 text-xs text-muted-foreground">
|
||||
<span className="flex items-center gap-1">
|
||||
|
||||
Reference in New Issue
Block a user