mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4006] [MERGED] Give Browser Personal Extensions a constrained window UI #6197
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#6197
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/4006
Author: @SpicyMarinara
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feature/extension-ui-window📝 Commits (1)
6d72b6aAdd a constrained window UI capability to Browser Personal Extensions📊 Changes
6 files changed (+316 additions, -7 deletions)
View changed files
📝
CHANGELOG.md(+1 -1)📝
docs/development/personal-extensions.md(+4 -1)📝
docs/extending/personal-extensions.md(+1 -1)📝
packages/client/src/components/layout/PersonalExtensionInjector.tsx(+33 -1)📝
packages/server/src/routes/personal-extensions.routes.ts(+236 -3)📝
scripts/regressions/extension-security.regression.ts(+41 -0)📄 Description
Linked issue
No pre-existing issue — this addresses a maintainer report that Professor Mari refuses reasonable browser-extension requests (e.g. "a small extension that opens a closable window showing an ASCII bunny", or extensions that add buttons/tools). One should be opened to track it if desired.
Why this change
The extension hardening in #4000 moved Browser Extensions into a Worker inside a hidden, opaque-origin iframe whose only capabilities are storage, logging, timers, and cleanup — no way to render anything on screen. That was correct for safety but left browser extensions unable to show UI at all, so Professor Mari (accurately) refuses to build display or interactive extensions and won't write placebo code that can't escape containment.
This adds a narrow, host-rendered UI surface so extensions can present windows, buttons, and simple input tools — while keeping every sandbox guarantee from #4000.
What changed
marinara.ui.showWindow({ title, elements, onEvent, onClose })returns a handle withupdate({ title?, elements? })andclose().elementsis a fixed whitelist —heading,text,pre,button,input,spacer— with plain-string fields;button/inputrequire anid. A button click delivers{ windowId, elementId, values }toonEvent, wherevaluesmaps each inputidto its current string value.textContentonly (never parsed markup) inside the existing opaque-origin,allow-scripts,connect-src 'none'iframe. The extension code runs in the Worker and still has no DOM, network, host-window, or Marinara access.Security posture (unchanged from #4000)
The extension never receives DOM, HTML injection, network, or host access. It can only describe a window in a constrained vocabulary that the trusted host renders as text. Making the sandbox iframe visible grants no new powers — it is still opaque-origin with the same strict CSP.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdAutomated:
pnpm checkandpnpm regression:extensions-security(including the real macOS Seatbelt server-sandbox proof) pass. The regression now also asserts the generated worker exposesmarinara.ui, never touches the DOM, and that the bootstrap renders viatextContent, never assigns markup, and reveals the iframe only through theui-window-opensignal.Manual verification notes
Docs and release impact
docs/extending/personal-extensions.md,docs/development/personal-extensions.md, andCHANGELOG.mdupdated; no version bump.UI evidence
New capability renders inside the sandbox iframe overlay; screenshots to be added during manual verification.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.