Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions apps/staged/src/lib/features/sessions/HashtagInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -481,16 +481,12 @@
<Icon size={14} />
{/if}
</span>
<span class="hashtag-item-title">{item.title}</span>
{#if item.repoSlug || item.branchName}
<span class="hashtag-item-context">
{#if item.repoSlug}{item.repoSlug}{/if}
{#if item.repoSlug && item.branchName}
&middot;
{/if}
{#if item.branchName}{item.branchName}{/if}
</span>
{/if}
<span class="hashtag-item-text">
<span class="hashtag-item-title">{item.title}</span>
{#if item.subtitle}
<span class="hashtag-item-subtitle">{item.subtitle}</span>
{/if}
</span>
</div>
{/each}
</div>
Expand Down Expand Up @@ -549,7 +545,7 @@

/* Dropdown — fixed-positioned near the caret via inline style */
.hashtag-dropdown {
width: 340px;
width: 420px;
max-width: calc(100vw - 32px);
background: var(--bg-chrome);
border: 1px solid var(--border-muted);
Expand All @@ -563,7 +559,7 @@

.hashtag-dropdown-item {
display: flex;
align-items: center;
align-items: flex-start;
gap: 8px;
padding: 6px 10px;
border-radius: 6px;
Expand Down Expand Up @@ -608,20 +604,25 @@
color: var(--image-color);
}

.hashtag-item-title {
.hashtag-item-text {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
min-width: 0;
}

.hashtag-item-title {
font-size: var(--size-sm);
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.hashtag-item-context {
.hashtag-item-subtitle {
font-size: var(--size-xs);
color: var(--text-faint);
flex-shrink: 0;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
5 changes: 5 additions & 0 deletions apps/staged/src/lib/features/sessions/hashtagItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export function timelineToHashtagItems(
title: note.title,
color: '--note-color',
bgColor: '--note-bg',
subtitle: repoSlug,
branchName,
Comment on lines +103 to 104
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include branch name in timeline subtitles

When the project-level hashtag picker includes multiple branches from the same repo, buildProjectHashtagItems still passes branch.branchName into timelineToHashtagItems, but the new subtitle uses only repoSlug and the dropdown no longer renders branchName separately. This regresses the previous repo · branch context, making items with the same or similar titles from different branches indistinguishable in the project hashtag dropdown.

Useful? React with 👍 / 👎.

repoSlug,
});
Expand All @@ -113,6 +114,7 @@ export function timelineToHashtagItems(
title: commit.subject,
color: '--commit-color',
bgColor: '--commit-bg',
subtitle: repoSlug,
branchName,
repoSlug,
});
Expand All @@ -128,6 +130,7 @@ export function timelineToHashtagItems(
title,
color: '--review-color',
bgColor: '--review-bg',
subtitle: repoSlug,
branchName,
repoSlug,
});
Expand All @@ -141,6 +144,7 @@ export function timelineToHashtagItems(
title: image.filename,
color: '--image-color',
bgColor: '--image-bg',
subtitle: repoSlug,
branchName,
repoSlug,
});
Expand All @@ -158,6 +162,7 @@ export function projectNotesToHashtagItems(notes: ProjectNote[]): HashtagItem[]
title: n.title,
color: '--note-color',
bgColor: '--note-bg',
subtitle: 'Project note',
}));
}

Expand Down
1 change: 1 addition & 0 deletions apps/staged/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ export interface HashtagItem {
title: string;
color: string;
bgColor: string;
subtitle?: string;
branchName?: string;
repoSlug?: string;
}
Expand Down