feat: show Fork chip badge on forked tree cards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-25 00:21:39 -05:00
parent b4b526a427
commit 90bb127ea9
4 changed files with 20 additions and 0 deletions

View File

@@ -52,6 +52,11 @@ export function TreeGridView({
Maintenance
</span>
)}
{'fork_info' in tree && Boolean((tree as Record<string, unknown>).fork_info) && (
<span className="shrink-0 rounded-full bg-violet-400/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-violet-400">
Fork
</span>
)}
</div>
<div className="flex items-center gap-2">
{onTogglePin && (

View File

@@ -53,6 +53,11 @@ export function TreeListView({
Maintenance
</span>
)}
{'fork_info' in tree && Boolean((tree as Record<string, unknown>).fork_info) && (
<span className="shrink-0 rounded-full bg-violet-400/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-violet-400">
Fork
</span>
)}
{tree.is_public ? (
<span title="Public tree">
<Globe className="h-3.5 w-3.5 text-muted-foreground flex-shrink-0" />

View File

@@ -182,6 +182,11 @@ export function TreeTableView({
Maintenance
</span>
)}
{'fork_info' in tree && Boolean((tree as Record<string, unknown>).fork_info) && (
<span className="shrink-0 rounded-full bg-violet-400/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-violet-400">
Fork
</span>
)}
{tree.is_public ? (
<span title="Public tree">
<Globe className="h-3.5 w-3.5 text-muted-foreground flex-shrink-0" />

View File

@@ -257,6 +257,11 @@ export function MyTreesPage() {
<Wrench className="h-4 w-4 shrink-0 text-amber-400" />
)}
<h3 className="font-semibold text-foreground">{tree.name}</h3>
{tree.parent_tree_id && (
<span className="shrink-0 rounded-full bg-violet-400/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-violet-400">
Fork
</span>
)}
</div>
<div className="flex items-center gap-1.5">
{tree.tree_type === 'procedural' && (