fix(desktop): align file and directory text

This commit is contained in:
Brendonovich
2026-08-21 03:32:23 +00:00
parent adbac6a96a
commit fef487bdb3
2 changed files with 21 additions and 5 deletions
@@ -37,6 +37,22 @@ test("labels single-file patches by operation", async ({ page }) => {
await expect(removed.locator('[data-slot="diff-changes-deletions"]')).toHaveCount(0)
await expect(modified.locator('[data-slot="diff-changes-additions"]')).toHaveText("+4")
await expect(modified.locator('[data-slot="diff-changes-deletions"]')).toHaveText("-3")
const alignment = await page.locator('[data-timeline-part-id="prt_created_patch"]').evaluate((element) => {
const bounds = (selector: string) => {
const target = element.querySelector(selector)
if (!target) throw new Error(`Missing ${selector}`)
const range = document.createRange()
range.selectNodeContents(target)
const rect = range.getBoundingClientRect()
return { top: rect.top, bottom: rect.bottom }
}
return {
filename: bounds('[data-slot="message-part-title-filename"]'),
directory: bounds('[data-slot="message-part-directory"]'),
}
})
expect(alignment.directory).toEqual(alignment.filename)
})
test("preserves nested patch file state through outer collapse and reopen", async ({ page }) => {
@@ -438,6 +438,11 @@
align-items: center;
gap: 8px;
min-width: 0;
font-family: var(--font-family-sans);
font-size: 14px;
font-style: normal;
line-height: var(--line-height-large);
letter-spacing: var(--letter-spacing-normal);
}
[data-slot="message-part-title"] {
@@ -446,12 +451,7 @@
align-items: baseline;
gap: 8px;
min-width: 0;
font-family: var(--font-family-sans);
font-size: 14px;
font-style: normal;
font-weight: var(--font-weight-medium);
line-height: var(--line-height-large);
letter-spacing: var(--letter-spacing-normal);
color: var(--v2-text-text-muted);
}