[PR #3525] [MERGED] Add extension storage endpoints #5979

Closed
opened 2026-10-23 04:05:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3525
Author: @kaldigo
Created: 7/12/2026
Status: ✅ Merged
Merged: 7/12/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/extension-storage


📝 Commits (3)

  • c3a97ec Add extension storage endpoints
  • 232c634 Merge branch 'staging' into codex/extension-storage
  • d1120df Harden extension storage access

📊 Changes

5 files changed (+139 additions, -21 deletions)

View changed files

📝 packages/client/src/components/layout/CustomThemeInjector.tsx (+32 -20)
📝 packages/server/src/routes/extensions.routes.ts (+38 -1)
➕ packages/server/src/services/extensions/extension-storage.service.ts (+40 -0)
📝 packages/server/src/services/extensions/server-extension-runtime.ts (+9 -0)
📝 packages/shared/src/schemas/extension.schema.ts (+20 -0)

📄 Description

Linked issue

Closes #3524

Why this change

  • Extensions need a supported way to persist global settings and small extension-owned state across clients connected to the same Marinara instance.

What changed

  • Added server-backed storage endpoints for installed extensions:
    • GET /api/extensions/:extensionRef/storage
    • PATCH /api/extensions/:extensionRef/storage
    • DELETE /api/extensions/:extensionRef/storage
  • Added shared schema validation for extension storage payloads, including a size limit.
  • Added extension storage service backed by app settings and scoped by installed extension id.
  • Allowed extension storage lookups by installed extension id or exact extension name.
  • Exposed storage helpers to loaded client/server extension runtimes.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Ran pnpm check.
  • Ran pnpm version:check.
  • Ran pnpm test.
  • Ran pnpm regression; non-UI regression lanes passed.
  • Verified extension storage API behavior against a local dev server:
    • unsafe writes require x-marinara-csrf
    • storage initially returns an empty object
    • patching by extension id stores values
    • patching by exact extension name resolves the same storage
    • patching merges top-level values
    • invalid non-object payloads return 400
    • oversized payloads return 400
    • deleting storage clears it
    • deleting the temporary test extension succeeds

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

No screenshots attached; this is API/runtime storage plumbing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3525 **Author:** [@kaldigo](https://github.com/kaldigo) **Created:** 7/12/2026 **Status:** ✅ Merged **Merged:** 7/12/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/extension-storage` --- ### 📝 Commits (3) - [`c3a97ec`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c3a97ec13bdd2c8bf697cfcd73453c3280533478) Add extension storage endpoints - [`232c634`](https://github.com/Pasta-Devs/Marinara-Engine/commit/232c634e8033a263df5e7c54dc5c3eed2dff0f92) Merge branch 'staging' into codex/extension-storage - [`d1120df`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d1120df5775408d9840f051f0cb0fd1b44da7142) Harden extension storage access ### 📊 Changes **5 files changed** (+139 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/layout/CustomThemeInjector.tsx` (+32 -20) 📝 `packages/server/src/routes/extensions.routes.ts` (+38 -1) ➕ `packages/server/src/services/extensions/extension-storage.service.ts` (+40 -0) 📝 `packages/server/src/services/extensions/server-extension-runtime.ts` (+9 -0) 📝 `packages/shared/src/schemas/extension.schema.ts` (+20 -0) </details> ### 📄 Description ## Linked issue Closes #3524 ## Why this change - Extensions need a supported way to persist global settings and small extension-owned state across clients connected to the same Marinara instance. ## What changed - Added server-backed storage endpoints for installed extensions: - `GET /api/extensions/:extensionRef/storage` - `PATCH /api/extensions/:extensionRef/storage` - `DELETE /api/extensions/:extensionRef/storage` - Added shared schema validation for extension storage payloads, including a size limit. - Added extension storage service backed by app settings and scoped by installed extension id. - Allowed extension storage lookups by installed extension id or exact extension name. - Exposed storage helpers to loaded client/server extension runtimes. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Ran `pnpm check`. - Ran `pnpm version:check`. - Ran `pnpm test`. - Ran `pnpm regression`; non-UI regression lanes passed. - Verified extension storage API behavior against a local dev server: - unsafe writes require `x-marinara-csrf` - storage initially returns an empty object - patching by extension id stores values - patching by exact extension name resolves the same storage - patching merges top-level values - invalid non-object payloads return `400` - oversized payloads return `400` - deleting storage clears it - deleting the temporary test extension succeeds ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) No screenshots attached; this is API/runtime storage plumbing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:05:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5979
No description provided.