diff --git a/apps/staged/src/lib/features/branches/BranchCard.svelte b/apps/staged/src/lib/features/branches/BranchCard.svelte index 7d138b3cb..18b421a5f 100644 --- a/apps/staged/src/lib/features/branches/BranchCard.svelte +++ b/apps/staged/src/lib/features/branches/BranchCard.svelte @@ -40,7 +40,7 @@ import RemoteWorkspaceStatusBadge from './RemoteWorkspaceStatusBadge.svelte'; import RemoteWorkspaceStatusView from './RemoteWorkspaceStatusView.svelte'; import { alerts } from '../../shared/alerts.svelte'; - import { timelineToHashtagItems } from '../sessions/hashtagItems'; + import { timelineToHashtagItems, projectNotesToHashtagItems } from '../sessions/hashtagItems'; interface Props { branch: Branch; @@ -115,15 +115,7 @@ let stale = false; commands.listProjectNotes(projectId).then((notes) => { if (stale) return; - projectNoteHashtagItems = notes - .filter((n) => n.title.trim()) - .map((n) => ({ - type: 'project-note' as const, - id: n.id, - title: n.title, - color: '--note-color', - bgColor: '--note-bg', - })); + projectNoteHashtagItems = projectNotesToHashtagItems(notes); }); return () => { stale = true; diff --git a/apps/staged/src/lib/features/sessions/hashtagItems.ts b/apps/staged/src/lib/features/sessions/hashtagItems.ts index 420df3b7e..cb89d74ba 100644 --- a/apps/staged/src/lib/features/sessions/hashtagItems.ts +++ b/apps/staged/src/lib/features/sessions/hashtagItems.ts @@ -101,7 +101,7 @@ export function timelineToHashtagItems( } for (const review of timeline.reviews) { - const title = review.title || `Review of ${review.commitSha.slice(0, 7)}`; + const title = review.title || review.commitSha.slice(0, 7); items.push({ type: 'review', id: review.id, @@ -116,7 +116,7 @@ export function timelineToHashtagItems( return items; } -function projectNotesToHashtagItems(notes: ProjectNote[]): HashtagItem[] { +export function projectNotesToHashtagItems(notes: ProjectNote[]): HashtagItem[] { return notes .filter((n) => n.title.trim()) .map((n) => ({ diff --git a/apps/staged/src/lib/features/timeline/BranchTimeline.svelte b/apps/staged/src/lib/features/timeline/BranchTimeline.svelte index 71589505d..041ff91bc 100644 --- a/apps/staged/src/lib/features/timeline/BranchTimeline.svelte +++ b/apps/staged/src/lib/features/timeline/BranchTimeline.svelte @@ -592,6 +592,9 @@ 0 && hasHashtagTokens(item.title) + ? renderHashtagTokens(item.title, hashtagItems) + : undefined} secondaryMeta={item.sessionId ? (liveSessionHints[item.sessionId] ?? item.secondaryMeta ??