mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #2034] [MERGED] fix(quartermaster): item images stay with their item (0.1.33) #2085
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#2085
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-Agents/pull/2034
Author: @newfiesledneck
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/quartermaster-item-images📝 Commits (6)
ead0032fix(quartermaster): item images stay with their item (0.1.32)8699dbfMerge remote-tracking branch 'upstream/staging' into fix/quartermaster-item-images6ed7688Merge remote-tracking branch 'upstream/staging' into fix/quartermaster-item-images6a73c4dMerge remote-tracking branch 'upstream/staging' into fix/quartermaster-item-images1467b0aMerge remote-tracking branch 'upstream/staging' into fix/quartermaster-item-images35755f0fix(quartermaster): address review of item image controls (0.1.33)📊 Changes
19 files changed (+1483 additions, -301 deletions)
View changed files
➕
artifacts/quartermaster-0.1.32.zip(+0 -0)➕
artifacts/quartermaster-0.1.33.zip(+0 -0)📝
catalog/catalog.json(+8 -8)📝
catalog/notes.json(+12 -12)📝
catalog/v2/catalog.json(+8 -8)📝
catalog/v2/notes.json(+12 -12)📝
catalog/v3/catalog.json(+8 -8)📝
catalog/v3/notes.json(+12 -12)📝
packages/quartermaster/CHANGELOG.md(+17 -0)📝
packages/quartermaster/README.md(+49 -4)📝
packages/quartermaster/client.js(+360 -80)📝
packages/quartermaster/manifest.json(+5 -5)📝
packages/quartermaster/server.mjs(+209 -58)📝
packages/quartermaster/src/00-api.js(+28 -19)📝
packages/quartermaster/src/05-state.js(+33 -21)📝
packages/quartermaster/src/10-dock.js(+297 -38)📝
packages/quartermaster/src/12-image-gen.js(+1 -1)📝
scripts/build-quartermaster-package.mjs(+1 -1)📝
tests/quartermaster-modal-lifecycle.regression.mjs(+423 -14)📄 Description
Linked issue
Closes #1697
#1697 was closed when #1712 (hidden items) merged, but #1712 didn't change item images. This PR is the fix for it.
Why this change
What changed
Images stay with their item
Image details and Unlink
Deleting moved to the item editor
New images never replace another file
apple.pngexists, a new image is saved asapple (1).png,apple (2).pngand so on.Bug fixes found along the way
Generated outputs:
packages/quartermaster/client.js,server.mjsandmanifest.json;artifacts/quartermaster-0.1.32.zipandartifacts/quartermaster-0.1.33.zip; and the Quartermaster entries incatalog/. All rebuilt withscripts/build-quartermaster-package.mjs. Both changelogs and the README's Item Images section are updated.Package and security impact
quartermaster(0.1.31 → 0.1.33).engine.minstays at 2.4.6.client.jsandserver.mjs. Routes, all under the existing/api/quartermasterprefix:GET …/items/:itemId/image/info: read-only; returns the shown file, its source, the saved filename, and whether it can be deleted.POST …/items/:itemId/image(upload): takes an optionalsource(generatedoruploaded, anything else isuploaded). The filename is built server-side from the item name: characters invalid in filenames, control characters, leading dots and trailing dots/spaces are stripped, Windows reserved names are suffixed, and the name is capped at 120 characters. The file is written with an exclusive-create flag intogallery/quartermaster/items/only, never a subfolder, and never over an existing file.PATCH …/items/:itemId: the client can't setimageFile(400); it can only sendnullto unlink.GET …/items/:itemId/image: serves the saved file, then the name match;Cache-Control: no-store; 404 only when there's no image, 500 on other disk errors.DELETE …/items/:itemId/image: deletes only a top-level file (400 for image-pack files) and clears the saved filename.imageFile, from the database or an Import, is only used if it's a plain filename: no/or\, no control characters, no leading dot, an allowed image extension, at most 200 characters. Anything else is ignored (and dropped on Import), so a stored value can't point outside the items folder. Tests cover both safe names and rejected ones.imageFileandimageSourceon items and on outfit/revert snapshots. Data saved by earlier versions loads without them and keeps matching by name. Export/Import carries them. Replacing an item's image leaves the old file on disk (another chat's item may still use it); the editor's × deletes on purpose. The usual update + restart for quartermaster. No migration.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated checks. These passed locally after merging current
staging:npm run checknode scripts/test-catalog-lanes.mjsnode scripts/validate-package-locales.mjsnode scripts/validate-catalog.mjsnode scripts/tests/catalog-release-notes.regression.mjsnode scripts/tests/vendored-engine.regression.mjsnode tests/quartermaster-modal-lifecycle.regression.mjs(38 tests)git diff --checkNew regression tests. They cover:
imageFile, and a saved file that's gone reporting as missing/,.., Windows reserved names, empty names,apple (1).png)18 deliberate breakages of the new logic were each caught by these tests. One gap: the 500 on disk errors has no automated test, because the error can't be produced reliably on Windows.
Manual testing in Marinara Engine. Quartermaster 0.1.32 was installed and tested across several chats:
Documentation impact
Quartermaster README: Item Images section rewritten, and 0.1.32 and 0.1.33 changelog entries.
UI evidence (if applicable)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.