Display AI-assigned expertise tags on project detail page

- Add projectTags relation to project.get query
- Show expertise tags with confidence percentages
- Tags displayed with their assigned colors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 13:18:45 +01:00
parent 4d8823e8e9
commit f59cfd393b
2 changed files with 35 additions and 0 deletions

View File

@@ -305,6 +305,33 @@ function ProjectDetailContent({ projectId }: { projectId: string }) {
</div>
)}
{/* AI-Assigned Expertise Tags */}
{project.projectTags && project.projectTags.length > 0 && (
<div>
<p className="text-sm font-medium text-muted-foreground mb-2">
Expertise Tags
</p>
<div className="flex flex-wrap gap-2">
{project.projectTags.map((pt) => (
<Badge
key={pt.tag.id}
variant="secondary"
className="flex items-center gap-1"
style={pt.tag.color ? { backgroundColor: `${pt.tag.color}20`, borderColor: pt.tag.color } : undefined}
>
{pt.tag.name}
{pt.confidence < 1 && (
<span className="text-xs opacity-60">
{Math.round(pt.confidence * 100)}%
</span>
)}
</Badge>
))}
</div>
</div>
)}
{/* Simple Tags (legacy) */}
{project.tags && project.tags.length > 0 && (
<div>
<p className="text-sm font-medium text-muted-foreground mb-2">