mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7719] [MERGED] fix(gallery): pinned images keep their place and size after a reload, and can be locked #7896
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7896
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7719
Author: @SpicyMarinara
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7688-pinned-gallery-lock📝 Commits (2)
357694cfix(gallery): pinned images keep their place and size after a reload, and can be locked53a45e9fix(gallery): a drag in a small window keeps the pin's saved size📊 Changes
4 files changed (+354 additions, -111 deletions)
View changed files
➕
e2e/pinned-gallery-layout.e2e.ts(+156 -0)📝
packages/client/src/components/chat/PinnedImageOverlay.tsx(+160 -107)📝
packages/client/src/localization/locales/en.json(+4 -0)📝
packages/client/src/stores/gallery.store.ts(+34 -4)📄 Description
Linked issue
Closes #7688
Why this change
resizealso reset the pin to the default size, so on a phone the keyboard or address bar could undo a layout without a reload.What changed
gallery.store.ts: each pin can hold alayout(x,y,w,hin viewport pixels, pluslocked).setPinnedLayoutsaves it with the pinned list. A stored layout that is broken is dropped on load and the pin stays.PinnedImageOverlay.tsx: a pin opens at its saved layout and saves it when a drag or resize ends. What you see is that layout fitted to the current window (same shape, kept on screen); the saved layout stays as the user left it, the way floating chat windows work. A window resize no longer resets the size, and a drag in a small window keeps the saved size, so the pin grows back when the window does. An image without stored dimensions no longer resizes itself on load once it has a saved layout.Lock/Unlockicon,aria-pressed, a hint for each state).ui.chat.pinnedmediaviewer.lockPinnedMedia,lockHint,unlockHintandpinnedMediaLocked. No existing copy was changed.e2e/pinned-gallery-layout.e2e.tspins a real gallery image, moves and resizes it, then reloads and checks that its box is the same. Next it narrows the window, drags the shrunk pin and widens the window again, checking that the pin grows back to its size. It then locks the pin, checks that a drag does not move it and that it has no resize handle, reloads and checks again, and finally unlocks it and checks that it moves.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks:
f040d9067, desktop-chromium). After the reload the pin is back in the middle: its x is 474 px from where it was left (expect(...).toBeLessThanOrEqual(1), received 474).--workers=1). One run failed on the first page load of a fresh dev server: the pin took more than 10 s to appear, the test deleted the chat, and the image then returned 404. The first visibility check now waits up to 30 s.tsc --noEmitpasses for shared, server, client and root (e2e types).prettier --checkpasses on all changed files.node scripts/check-locales.mjs,pnpm localization:checkandpnpm impeccable:checkpass.pnpm check(lint/format/build across the repo), Docker, and the rest of the Playwright suite.Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No files under
docs/changed.UI evidence (if applicable)
The e2e attaches
locked-pin.png(a locked pin on a phone: lock button highlighted next to the X, no resize handle) to its test results.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.