mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#5737
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/2803
Author: @kolacheee
Created: 6/22/2026
Status: ✅ Merged
Merged: 6/22/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/issue-2802-extension-import-errors📝 Commits (2)
ecc32dbfix(client): surface extension & Mari workspace import failures (#2802)9a2f643Resolve staging conflicts for extension import errors📊 Changes
3 files changed (+41 additions, -10 deletions)
View changed files
📝
packages/client/src/components/chat/HomeProfessorMariChat.tsx(+2 -2)📝
packages/client/src/components/panels/SettingsPanel.tsx(+22 -8)📝
packages/client/src/lib/api-client.ts(+17 -0)📄 Description
Linked issue
Closes #2802
Why this change
When an extension import fails, the error was swallowed to
console.warnonly and the user saw, at most, a generic "Failed to install 1 extension" toast with no reason — even though the client already held the server's exact error message. The same silent-failure pattern existed on Professor Mari's workspace approve/reject handlers, whosevoidcall sites discarded the promise rejection entirely.The single most common real cause is the privileged-access gate returning 403 (accessing the app over a non-loopback address without an
ADMIN_SECRET) — confirmed gated for bothPOST /extensionsand the Mari workspaceapprove/rejectroutes. Nothing in the UI said so, so users hit a dead end on a core feature with no breadcrumb toward the fix (real report: Arch + Firefox, "the extensions and mari package import things just silently fail for me").This is purely an observability / UX fix. The 403 itself is intended security (extension install is a JS-injection route) and is unchanged — this only makes the failure visible and actionable.
What changed
lib/api-client.ts— newgetPrivilegedActionErrorMessage(error, fallback)helper (+ exportedPRIVILEGED_ACCESS_HINT). For a privileged-gate 403 it returns an actionable hint ("open via localhost, or setADMIN_SECRETand enter it under Settings → Advanced → Admin Access"), appending the terse server reason so missing vs invalid secret is distinguishable; otherwise it passes through the server/Errormessage.panels/SettingsPanel.tsx→importExtensionEntries— replaced the count-onlytoast.warningwithtoast.errorcarrying the real per-entry cause (first failure + "(+N more)"). Also counts silently-skipped (normalizeExtensionImportEntry === null) entries and reports them in the success toast, instead of dropping them with no feedback.SettingsPanel.tsx— routed the direct.js/.cssfile and folder importcatchblocks through the same helper, so single-file installs also get the 403 hint.chat/HomeProfessorMariChat.tsx— wrappedapproveWorkspaceChange/rejectWorkspaceChangeintry/catchwith an error toast; previously theirvoid approveWorkspaceChange(id)call sites swallowed the rejection, so a failed workspace apply showed nothing.Background/automatic Mari loads (workspace status, skills list) intentionally keep their
console.error-only handling — the issue scopes user-facing toasts to user-initiated actions, and toasting on every mount-time load failure would be noisy. The skill create/save/toggle/delete and send handlers already toast.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated check already run by the author:
pnpm check(clean-stale-client + impeccable:check + lint/tsc + full build) completed successfully on this branch.Still needs manual verification by a human before merge — these are TO-DOs, not done:
ADMIN_SECRETset, import a.js/.css/.zip/.jsonextension, and confirm a toast now shows the actionable admin-secret hint (not a silent failure or bare count).ADMIN_SECRETon the server, enter it under Settings → Advanced → Admin Access, retry the import, and confirm it succeeds.Docs and release impact
Client-only UX/observability change; no server behavior, config, or version-bearing files touched. No version bump. (Optional follow-up: a TROUBLESHOOTING.md note about the privileged-access 403 could help, but is out of scope here.)
UI evidence (if applicable)
Not added — change surfaces toast text on an error path; see Manual verification notes for how to reproduce. Before/after screenshots of the error toast can be attached during manual verification.
Summary by CodeRabbit
Bug Fixes
Improvements
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.