Skip to content

Commit 2c4db82

Browse files
BunsDevclaude
andauthored
Location row: keep the distinguishing tail visible in narrow panes (#8)
With the Changes panel open the chat pane is ~700px and the 60-char tail was still cut by the CSS end-ellipsis, hiding the worktree id. Budget is now 40 chars (fits the narrow case), and the branch pill and buttons no longer shrink, so only the path gives way. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent b12712a commit 2c4db82

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/desktop/src/renderer/components/ThreadView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function shortenHome(p: string): string {
2828
}
2929

3030
/** Keeps the tail of a long path (the part that distinguishes worktrees), dropping whole leading segments. */
31-
export function tailPath(p: string, max = 60): string {
31+
export function tailPath(p: string, max = 40): string {
3232
if (p.length <= max) return p;
3333
const parts = p.split("/");
3434
let out = "";

‎apps/desktop/src/renderer/styles.css‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,5 +255,6 @@ kbd { font: 11px var(--mono); background: rgba(255,255,255,.08); border: 1px sol
255255
.location { display: flex; align-items: center; gap: 8px; padding: 4px 16px; border-bottom: 1px solid var(--line); background: var(--bg-1); flex: none; font-size: 12px; color: var(--fg-2); min-width: 0; }
256256
.location-kind { width: 14px; text-align: center; color: var(--accent); }
257257
.location-branch { background: rgba(124, 156, 255, .12); border: 1px solid rgba(124, 156, 255, .35); color: var(--accent); border-radius: 999px; padding: 0 8px; font-size: 11.5px; white-space: nowrap; }
258-
.location-path { color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
258+
.location-path { color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
259+
.location .btn.small, .location-branch, .location-kind { flex: none; }
259260
.location .btn.small { padding: 1px 8px; font-size: 12px; }

0 commit comments

Comments
 (0)