| … | … | @@ -39,8 +53,42 @@ export function MiddleTruncate({ | |
| 59 | + | ||
| 60 | + | function fitHead(head: HTMLElement) { | |
| 61 | + | const text = head.firstChild; | |
| 62 | + | const overflowing = head.scrollWidth > head.clientWidth && text instanceof Text; | |
🟢 Low ui/middle-truncate.tsx:62
After widening to a width that fits the text but not the text plus …, fitHead keeps the label truncated. The existing data-overflow leaves the ::before ellipsis in the shrink-0 tail while scrollWidth is measured, reducing the head's available width and keeping the overflow check true. Clear data-overflow before measuring, then set it from the resulting check.
| 1 | head.removeAttribute("data-overflow"); |
| 2 | const overflowing = head.scrollWidth > head.clientWidth && text instanceof Text; |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/web/src/components/ui/middle-truncate.tsx around line 62: |
| 2 | |
| 3 | After widening to a width that fits the text but not the text plus `…`, `fitHead` keeps the label truncated. The existing `data-overflow` leaves the `::before` ellipsis in the `shrink-0` tail while `scrollWidth` is measured, reducing the head's available width and keeping the overflow check true. Clear `data-overflow` before measuring, then set it from the resulting check. |
| … | … | @@ -1151,6 +1151,14 @@ export default function GitActionsControl({ | |
| 1158 | + | gitActionProgress === null && | |
| 1159 | + | quickAction.disabled && | |
| 1160 | + | !changesTotals?.insertions && | |
| 1161 | + | !changesTotals?.deletions; | |
🟡 Medium components/GitActionsControl.tsx:1161
A draft on detached HEAD with only untracked files hides both the Changes row and Git actions, making Commit inaccessible, even though hasWorkingTreeChanges is true. Those files can have zero insertions and deletions, so the diff-total checks make quietEmptyDraft treat real work as empty; include hasWorkingTreeChanges in the emptiness check.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/web/src/components/GitActionsControl.tsx around line 1161: |
| 2 | |
| 3 | A draft on detached `HEAD` with only untracked files hides both the Changes row and Git actions, making Commit inaccessible, even though `hasWorkingTreeChanges` is true. Those files can have zero insertions and deletions, so the diff-total checks make `quietEmptyDraft` treat real work as empty; include `hasWorkingTreeChanges` in the emptiness check. |