refactor(documents): drop duplicate sender/receiver in list rows
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m49s
CI / OCR Service Tests (push) Successful in 35s
CI / Backend Unit Tests (push) Failing after 2m52s

The desktop document-list row showed sender/receiver twice — once
side-by-side in the middle column and again stacked in the right
column. Stack the middle-column block vertically (the side-by-side
grid wasted horizontal space and competed with the larger thumbnail)
and remove the now-redundant copy from the right column.

The middle-column block keeps the search-match highlighting, which the
right-column copy never had.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-23 08:19:46 +02:00
parent 6aae159698
commit fc0fc57409
2 changed files with 26 additions and 22 deletions

View File

@@ -117,6 +117,30 @@ describe('DocumentRow sender', () => {
const unknownElements = page.getByText('Unbekannt');
await expect.element(unknownElements.first()).toBeInTheDocument();
});
it('renders the sender display name only once across the row', async () => {
const item = makeItem({
document: {
...makeItem().document,
sender: { id: 's1', displayName: 'Großmutter Maria' }
}
});
render(DocumentRow, { item });
const matches = await page.getByText('Großmutter Maria').all();
expect(matches.length).toBe(1);
});
it('renders each receiver display name only once across the row', async () => {
const item = makeItem({
document: {
...makeItem().document,
receivers: [{ id: 'r1', displayName: 'Onkel Karl' }]
}
});
render(DocumentRow, { item });
const matches = await page.getByText('Onkel Karl').all();
expect(matches.length).toBe(1);
});
});
// ─── Tags ─────────────────────────────────────────────────────────────────────