[GH-ISSUE #8228] [Issue]: Personal extension list API returns unnecessary revision source code #8166

Closed
opened 2026-10-25 04:03:10 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @minikkeuen on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8228

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The GET /api/personal-extensions endpoint includes the full css, js, and serverJs source code of every historical extension revision, even though the extension list UI only requires revision metadata.

This causes unnecessarily large API responses, especially when multiple extensions have accumulated revision histories.

Expected behavior

The extension list endpoint should return only the metadata required to display historical revisions and support rollback.

Historical revision source code should remain stored on the server but should not be included in list responses.

Current extension source code and existing update/rollback behavior should remain unchanged.

Actual behavior

The endpoint returns full historical revision source code alongside current extension data.

In a local dataset containing 25 extensions and 150 historical revisions:

  • Original serialized response: 22,109,762 bytes (21.09 MiB)
  • Response excluding historical revision source code: 3,538,054 bytes (3.37 MiB)
  • Reduction: 18,571,708 bytes (~84%)

These values were calculated by serializing the response using local extension data. They are not direct HTTP transfer measurements.

Steps to reproduce

  1. Install multiple personal extensions through Settings → Addons → External Extensions.
  2. Update their source code repeatedly to accumulate revision histories.
  3. Open the External Extensions settings page.
  4. Inspect the response from GET /api/personal-extensions in the browser's Network panel.
  5. Observe that each historical revision includes its full css, js, and serverJs fields.

Environment

  • Marinara Engine version: 2.5.1
  • Install type: source
  • OS + version: macOS 26.6.2
  • Browser or app shell: Safari

Logs, screenshots, or video

No errors are required to reproduce this issue.

The issue can be observed by inspecting the JSON response from GET /api/personal-extensions.

A local serialization comparison showed an approximately 84% reduction when historical revision source fields were omitted.

Additional context

The revision history UI uses metadata such as timestamps and content hashes. Rollback is handled server-side using the revision's contentHash, so returning historical source code in the list response is unnecessary.

A minimal optimization has been implemented and validated locally:

  • Historical revision source fields are omitted from list responses only.
  • Current extension source code remains available.
  • Stored revision data and update/rollback responses remain unchanged.
  • Regression tests and pnpm check pass.

The implementation is prepared as a separate PR targeting staging.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @minikkeuen on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8228 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The `GET /api/personal-extensions` endpoint includes the full `css`, `js`, and `serverJs` source code of every historical extension revision, even though the extension list UI only requires revision metadata. This causes unnecessarily large API responses, especially when multiple extensions have accumulated revision histories. ## Expected behavior The extension list endpoint should return only the metadata required to display historical revisions and support rollback. Historical revision source code should remain stored on the server but should not be included in list responses. Current extension source code and existing update/rollback behavior should remain unchanged. ## Actual behavior The endpoint returns full historical revision source code alongside current extension data. In a local dataset containing 25 extensions and 150 historical revisions: - Original serialized response: **22,109,762 bytes (21.09 MiB)** - Response excluding historical revision source code: **3,538,054 bytes (3.37 MiB)** - Reduction: **18,571,708 bytes (~84%)** These values were calculated by serializing the response using local extension data. They are not direct HTTP transfer measurements. ## Steps to reproduce 1. Install multiple personal extensions through Settings → Addons → External Extensions. 2. Update their source code repeatedly to accumulate revision histories. 3. Open the External Extensions settings page. 4. Inspect the response from `GET /api/personal-extensions` in the browser's Network panel. 5. Observe that each historical revision includes its full `css`, `js`, and `serverJs` fields. ## Environment - Marinara Engine version: 2.5.1 - Install type: source - OS + version: macOS 26.6.2 - Browser or app shell: Safari ## Logs, screenshots, or video No errors are required to reproduce this issue. The issue can be observed by inspecting the JSON response from `GET /api/personal-extensions`. A local serialization comparison showed an approximately 84% reduction when historical revision source fields were omitted. ## Additional context The revision history UI uses metadata such as timestamps and content hashes. Rollback is handled server-side using the revision's `contentHash`, so returning historical source code in the list response is unnecessary. A minimal optimization has been implemented and validated locally: - Historical revision source fields are omitted from list responses only. - Current extension source code remains available. - Stored revision data and update/rollback responses remain unchanged. - Regression tests and `pnpm check` pass. The implementation is prepared as a separate PR targeting `staging`. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-25 04:03:10 +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#8166
No description provided.