authorgravatar for 62337003+Bil0000@users.noreply.github.comBilal Bakr <62337003+Bil0000@users.noreply.github.com> 2026-09-12 21:02:13+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-12 11:02:13-07:00
loga43f9b45ae85caf37e0be8270ad3d27365ece2bd
tree197cb4b18628605a80df7516f0e86a1ecbf857c7
parent5349522108bec896bb6a69ae76c6e1b8d419ae16
signature Signed by PGP key B5690EEEBB952194

fix(web): preserve snapshot preview size in sent messages (#11429)

Co-authored-by: Illia Panasenko <hello@ipanasenko.me> Co-authored-by: Julius Marminge <julius0216@outlook.com>

2 files changed, 1 insertions(+), 2 deletions(-)

apps/web/src/components/chat/MessagesTimeline.test.tsx-1
...@@ -700,7 +700,6 @@ describe("MessagesTimeline", () => {...@@ -700,7 +700,6 @@ describe("MessagesTimeline", () => {
700 expect(markup).toContain("t3code — Tests");700 expect(markup).toContain("t3code — Tests");
701 expect(markup).toContain('src="data:image/png;base64,aWNvbg=="');701 expect(markup).toContain('src="data:image/png;base64,aWNvbg=="');
702 expect(markup).toContain("h-28 w-52 max-w-full");702 expect(markup).toContain("h-28 w-52 max-w-full");
703 expect(markup).not.toContain("col-span-2");
704 expect(onAnchorReady).toHaveBeenCalledOnce();703 expect(onAnchorReady).toHaveBeenCalledOnce();
705 expect(onAnchorReady).toHaveBeenCalledWith(firstEntry.message.id, 0);704 expect(onAnchorReady).toHaveBeenCalledWith(firstEntry.message.id, 0);
706 });705 });
apps/web/src/components/chat/MessagesTimeline.tsx+1-1
...@@ -1569,7 +1569,7 @@ function UserTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "message"...@@ -1569,7 +1569,7 @@ function UserTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "message"
1569 className={cn(1569 className={cn(
1570 "bg-background/70",1570 "bg-background/70",
1571 image.source?.kind === "snap-shot" && image.previewUrl1571 image.source?.kind === "snap-shot" && image.previewUrl
1572 ? SNAP_SHOT_ATTACHMENT_FRAME_CLASS1572 ? cn(SNAP_SHOT_ATTACHMENT_FRAME_CLASS, "col-span-2")
1573 : "aspect-[4/3] overflow-hidden rounded-lg border border-border/80",1573 : "aspect-[4/3] overflow-hidden rounded-lg border border-border/80",
1574 )}1574 )}
1575 >1575 >