[PR #8334] [MERGED] feat(packages): share gallery image saving helpers with clients #8307

Closed
opened 2026-10-27 06:07:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8334
Author: @SpicyMarinara
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/gacha-image-download-host


📝 Commits (4)

  • ee839a9 chore: track shared gallery image saving work
  • c7306b6 Expose gallery image saving to package clients
  • 56262f6 Exercise image saving from an installed package client
  • b2492d1 Update package lifecycle checks for capability API 1.385

📊 Changes

8 files changed (+218 additions, -25 deletions)

View changed files

📝 docs/development/optional-agent-packages.md (+19 -13)
📝 e2e/marinara-host-namespace.e2e.ts (+31 -4)
➕ e2e/package-image-downloads.e2e.ts (+132 -0)
📝 packages/client/src/lib/marinara-host-contract.ts (+5 -0)
📝 packages/client/src/lib/marinara-host.ts (+17 -1)
📝 packages/shared/src/schemas/capability-package.schema.ts (+2 -1)
📝 scripts/regressions/capability-package-lifecycle.regression.ts (+6 -5)
📝 scripts/regressions/marinara-host-namespace.regression.ts (+6 -1)

📄 Description

What changed

Expose the existing Engine gallery image-saving helpers to installed package clients through the frozen services.imageDownloads namespace. Capability API 1.385 adds the four existing function identities without changing their download, Android bridge, prepared iPhone share, cancellation or error behavior.

Gacha Forge uses this contract in Pasta-Devs/Marinara-Agents#1708 to save individual background thumbnails. Closes #8333.

Why

Package artwork needs the same client-device saving behavior as Engine galleries. Preparing an iPhone image before tapping preserves the native share gesture; a failed share must not silently fall back to a browser preview.

Validation

  • pnpm install --frozen-lockfile, pnpm check, pnpm version:check and the focused host namespace regression passed.

  • Namespace/browser proof verifies the four exact helper identities and frozen service object. The initial focused matrix passed seven cases with two existing desktop-only namespace skips.

  • Final installed-package image tests passed all six cases across desktop Chromium, mobile Chromium and mobile WebKit: browser download, Android bridge, prepared same-tap share, silent cancellation and no fallback after a share error.

  • Local CodeRabbit service review completed with zero findings. One test-quality finding was accepted and repaired by moving handlers into the installed package client; the final focused test review completed with zero findings.

  • Hosted CI exposed stale lifecycle fixtures for the previous API minor. The test-only repair now accepts 1.385, retains 1.384 and rejects future 1.386; its unchanged baseline failed, the repaired lifecycle regression passed, and focused formatting plus maintainer source review passed. No assertion or production helper was removed. Fresh exact-head CI and Dottore review are pending.

Manual verification

  • Manually verify native image sharing and Save Image on a physical iPhone; browser emulation and synthetic native bridges do not establish device proof.

Notes

Documentation translation follow-up: #8339. The Gacha Forge consumer is tracked separately in Pasta-Devs/Marinara-Agents#1708. Hosted CI and Dottore review remain separate merge gates.


🔄 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/8334 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/gacha-image-download-host` --- ### 📝 Commits (4) - [`ee839a9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ee839a9d4efd82132648cab4e13a49ea016a1208) chore: track shared gallery image saving work - [`c7306b6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c7306b616313b8de7287e802e3bead635dbf365c) Expose gallery image saving to package clients - [`56262f6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/56262f688a8507e05b41b7cd52374a9215724b73) Exercise image saving from an installed package client - [`b2492d1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b2492d1f26f20f6e01ad14262828efbf53124dc4) Update package lifecycle checks for capability API 1.385 ### 📊 Changes **8 files changed** (+218 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/optional-agent-packages.md` (+19 -13) 📝 `e2e/marinara-host-namespace.e2e.ts` (+31 -4) ➕ `e2e/package-image-downloads.e2e.ts` (+132 -0) 📝 `packages/client/src/lib/marinara-host-contract.ts` (+5 -0) 📝 `packages/client/src/lib/marinara-host.ts` (+17 -1) 📝 `packages/shared/src/schemas/capability-package.schema.ts` (+2 -1) 📝 `scripts/regressions/capability-package-lifecycle.regression.ts` (+6 -5) 📝 `scripts/regressions/marinara-host-namespace.regression.ts` (+6 -1) </details> ### 📄 Description ## What changed Expose the existing Engine gallery image-saving helpers to installed package clients through the frozen `services.imageDownloads` namespace. Capability API 1.385 adds the four existing function identities without changing their download, Android bridge, prepared iPhone share, cancellation or error behavior. Gacha Forge uses this contract in Pasta-Devs/Marinara-Agents#1708 to save individual background thumbnails. Closes #8333. ## Why Package artwork needs the same client-device saving behavior as Engine galleries. Preparing an iPhone image before tapping preserves the native share gesture; a failed share must not silently fall back to a browser preview. ## Validation - `pnpm install --frozen-lockfile`, `pnpm check`, `pnpm version:check` and the focused host namespace regression passed. - Namespace/browser proof verifies the four exact helper identities and frozen service object. The initial focused matrix passed seven cases with two existing desktop-only namespace skips. - Final installed-package image tests passed all six cases across desktop Chromium, mobile Chromium and mobile WebKit: browser download, Android bridge, prepared same-tap share, silent cancellation and no fallback after a share error. - Local CodeRabbit service review completed with zero findings. One test-quality finding was accepted and repaired by moving handlers into the installed package client; the final focused test review completed with zero findings. - Hosted CI exposed stale lifecycle fixtures for the previous API minor. The test-only repair now accepts 1.385, retains 1.384 and rejects future 1.386; its unchanged baseline failed, the repaired lifecycle regression passed, and focused formatting plus maintainer source review passed. No assertion or production helper was removed. Fresh exact-head CI and Dottore review are pending. ## Manual verification - [ ] Manually verify native image sharing and Save Image on a physical iPhone; browser emulation and synthetic native bridges do not establish device proof. ## Notes Documentation translation follow-up: #8339. The Gacha Forge consumer is tracked separately in Pasta-Devs/Marinara-Agents#1708. Hosted CI and Dottore review remain separate merge gates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-27 06:07:33 +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#8307
No description provided.