mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1602] [MERGED] Surface request failures instead of empty states (game assets, bot browser) #5137
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#5137
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/1602
Author: @Romuromylus
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/29/2026
Merged by: @Romuromylus
Base:
refactor← Head:fix/error-state-handling📝 Commits (5)
7dbc58fSurface game asset tree load failures with a retryd155aabSurface bot browser provider detail failures with a retry609866bDegrade import-time detail re-fetch instead of aborting the import8003861Merge branch 'refactor' into fix/error-state-handling2c08bceMerge branch 'refactor' into fix/error-state-handling📊 Changes
4 files changed (+338 additions, -66 deletions)
View changed files
➕
src/features/modes/game-assets/components/GameAssetsBrowserView.test.tsx(+149 -0)📝
src/features/modes/game-assets/components/GameAssetsBrowserView.tsx(+23 -3)📝
src/features/shell/bot-browser/components/BotBrowserView.test.tsx(+80 -0)📝
src/features/shell/bot-browser/components/BotBrowserView.tsx(+86 -63)📄 Description
Why this change
Two bugs where a failed request is rendered as a benign empty state, hiding real failures from the user. Grouped as the same bug class (failure-as-empty-state).
What changed
GameAssetsBrowserViewdestructured onlydataandisLoadingfrom the tree query, so a rejected query rendered the same blank state as an empty tree - no error, no retry, and uploads stayed enabled. Now renders an error message + Retry (wired torefetch) in both the sidebar and main pane onisError, and gates uploads until the tree resolves..catch(() => null), so a genuine failure rendered the benign "no detailed definition available" empty state, indistinguishable from a card with no extra data. Detail failures now throw,openDetailsets a detail-error state (keeping the selected card), andDetailViewrenders a Retry - mirroring the existing search-error path.nullis reserved for successful-but-empty responses. The import path reusesfetchDetailonly for enrichment after the authoritative PNG / search data is already in hand, so its re-fetch degrades tonullon failure rather than aborting the import.Verification
pnpm check:architectureandpnpm check:frontend(tsc -b) pass on this branch.react-dom/clientmount matching the existingBotBrowserView.test.tsxharness): #1539 - the error + Retry render andrefetchfires; #1531 - appended to the existing suite, a failed detail fetch shows the error + Retry instead of the empty state (the three existing search-path tests are untouched). Both RED on baseline, GREEN with the fix.bot-browser-api) already reject correctly; these fixes are purely the views surfacing those failures. No Tauri-runtime change.Follow-ups (deferred, not blocking)
importStCharactermocks and a driven Import click); it is a one-line restoration of the pre-existing.catch(() => null)on an optional re-fetch. The datacat optional V2-download endpoint keeps a narrow best-effort catch (it commonly 404s and falls through to the authoritative character endpoint, which now throws).loadDatacatTags(tag-panel enrichment, not a detail path) keeps its.catch(() => null)- out of scope.Linked issues
Closes #1539
Closes #1531
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.