mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2761] [Issue]: Game-assets browser UI robustness — broken thumbnails, no virtualization, retained state, keystroke normalization #1400
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#1400
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?
Originally created by @kolacheee on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2761
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Lower-impact UI/UX robustness issues in the asset browser and sprite modal.
Sub-bug 1: No thumbnail onError fallback (#36)
<img src={gameAssetFileUrl(node.path) ?? ''}>(171-176, 257-262) has no onError; a missing/corrupt file 404s and shows the browser's broken-image glyph instead of a FileImage fallback (which is imported but only used for non-image nodes).Sub-bug 2: No virtualization (#37)
nodes.map(...)renders one card/row per node (98, 201) with no windowing; a folder with hundreds/thousands of sprites produces O(n) DOM nodes -> laggy scroll/selection.loading="lazy"defers bytes but not DOM/layout cost.Sub-bug 3: Filename input normalizes per keystroke (#65)
handleCellRenamerunstrim().toLowerCase().replace(/[^a-z0-9_-]/g,'_')on every onChange and writes it back as the controlled value, so capitals are instantly lowercased and trailing spaces are swallowed — a human-readable multi-word label can't be typed. (No data corruption; handleSave re-normalizes anyway.)Sub-bug 4: Frame-preview re-decode per tick (#67)
cropSpriteDataUrlon everyframeAdjustmentschange — full base64 decode + canvas draw + PNG re-encode — with no debounce/rAF; the cancel flag only gates setState, not the in-flight work. Visible jank on large sprites during slider drags.Sub-bug 5: Retained state after close (#38) [disputed]
Sub-bug 6: user_bg resolveAssetUrl (#61) [latent]
resolveAssetUrldoesgameAssetFileUrl(entry.path)for a__user_bg__/...sentinel path, producing/api/game-assets/file/__user_bg__/...which 404s; GameSurface special-cases the prefix, the store doesn't. Currently no callers (latent landmine on public store API).Suggested Fix
<img src=''>.Verification checklist (all manual)
pnpm checkAffected files
packages/client/src/components/game-assets/AssetGrid.tsxpackages/client/src/components/ui/SpriteGenerationModal.tsxpackages/client/src/stores/game-asset.store.tsAudit provenance
Found by a multi-agent static audit of the TTS/voice + image-generation subsystems (Round 1 + round-2 gap sweep + completeness critic, each finding adversarially verified) against the merged
stagingtree. Severity: LOW.@SpicyMarinara commented on GitHub (Jun 21, 2026):
Fixed in PR #2747.\n\nWhat changed:\n- asset grid/list thumbnails now track failed image loads and fall back to a file-image icon instead of the browser broken-image glyph\n- large folders render in paged chunks with a Load more control to avoid mounting every asset at once\n- sprite filename edits keep the user's raw draft while typing and normalize on blur/save\n- sprite frame previews are debounce/rAF-coalesced before canvas recrops\n- sprite modal transient generation state is reset on close\n- user_bg paths are handled centrally in game-asset URL resolution so store callers do not build dead game-assets URLs\n\nDeferred repo-wide validation until the end of the issue sweep per maintainer request.