[PR #3856] [MERGED] feat(noodle): add subscriptions and access controls #6130

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

📋 Pull Request Information

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

Base: staging ← Head: noodl-split-6-subscriptions-access


📝 Commits (10+)

  • 4f2da3d feat(noodle): add subscriptions and access controls
  • 9e37a56 feat(noodle): allow deleting NoodleR stage profiles
  • 87248aa feat(noodle): render NoodleR inside the shared Noodle shell
  • 94d73b8 feat(noodle): drive NoodleR access rules by the global persona, not a preview toggle
  • bc12492 docs(noodle): update settings guide for the removed Browse-as-persona toggle
  • f906a0c feat(noodle): move stage profile subscriber access settings into a modal
  • 1e0dbc9 Merge branch 'staging' into noodl-split-6-subscriptions-access
  • 5801695 fix(noodle): close self-access and N+1 gaps in NoodleR subscriptions
  • fcbb4a1 fix(noodle): make subscribe/unlockPost atomic and enforce hidden-viewer rules in storage
  • a2ba850 fix(noodle): give NoodleR a working mobile drawer trigger, trim shell API

📊 Changes

16 files changed (+1895 additions, -570 deletions)

View changed files

📝 docs/noodle/settings.md (+17 -3)
📝 packages/client/src/components/noodle/GuidedPostModal.tsx (+49 -4)
📝 packages/client/src/components/noodle/NoodleHome.tsx (+73 -447)
➕ packages/client/src/components/noodle/NoodleShell.tsx (+514 -0)
📝 packages/client/src/components/noodle/NoodlerHome.tsx (+480 -74)
📝 packages/client/src/hooks/use-noodle.ts (+77 -3)
📝 packages/server/src/db/file-backed-store.ts (+18 -0)
📝 packages/server/src/db/schema/noodle.ts (+25 -1)
📝 packages/server/src/routes/noodle.routes.ts (+142 -0)
📝 packages/server/src/services/noodle/noodle-private-generation.service.ts (+2 -0)
➕ packages/server/src/services/noodle/noodler-access.ts (+16 -0)
📝 packages/server/src/services/storage/noodle.storage.ts (+222 -10)
📝 packages/shared/src/schemas/noodle.schema.ts (+43 -11)
📝 packages/shared/src/types/noodle.ts (+51 -0)
📝 scripts/regressions/noodle-prompt.regression.ts (+82 -1)
📝 scripts/regressions/noodle-settings.regression.ts (+84 -16)

📄 Description

Important

This PR is Slice 6 of the larger NoodleR implementation. It builds on Slices 1A (#3744), 1B (#3751), 2 (#3759), 3 (#3782), 4 (#3795), and 5 (#3830), and is not representative of the complete NoodleR feature. A real chronological post feed/timeline for NoodleR (merged across creators, with images, timestamps, and interactions) is out of scope here and tracked separately as Slice 6b.

Linked issue

Closes #3855

Why this change

NoodleR stage profiles (Slice 5) had no way to gate who can see a private post. Creators need subscriber-only and pay-per-view (PPV) post access, plus a way to hide a stage profile entirely from selected personas, before any fan-facing NoodleR experience can be built on top. Along the way, NoodleR was also found to render outside Noodle's shared navigation shell and to gate the access-controlled viewer behind a redundant local preview toggle instead of the app's existing global persona selection — both fixed here as prerequisites.

What changed

  • Added post access levels (public, subscriber, ppv) with PPV price entry when guiding a post.
  • Added persona subscriptions to a stage profile and PPV post unlocks, with idempotent subscribe/unlock.
  • Added a "Subscriptions include PPV" toggle and a "Hidden from personas" per-persona visibility list on each stage profile, enforced server-side on the viewer scope, subscribe, and unlock endpoints.
  • Added a viewer experience in the NoodleR hub that reads the globally selected persona (no separate preview toggle) to show locked/unlocked creator posts.
  • Deleting a stage profile now also removes its subscriptions and PPV unlock records.
  • Extracted NoodleShell from NoodleHome and mounted both NoodleHome and NoodlerHome inside it, so NoodleR keeps Noodle's left nav, mobile drawer, and bottom nav instead of a standalone frame.
  • Removed the local "Manage profiles" / "Browse as persona" toggle; the hub now always shows the persona-driven access view, and stage-profile management moved to its own "Manage profiles" header entry point.
  • Updated NoodleR settings documentation to match.

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

  • Automated validation completed with pnpm check (workspace lint, TypeScript checks, and production builds) and the noodle-settings/noodle-prompt regression scripts, which cover idempotent subscribe/unlock, hidden-from-viewer filtering, and the public/subscriber/PPV access matrix (including subscriptionIncludesPpv).
  • Manual browser verification still required: subscribe/unsubscribe and PPV unlock across multiple personas, hidden-from-personas blocking direct subscribe/unlock attempts, switching the globally selected persona updating the hub's locked/unlocked state, the "Manage profiles" entry point's create/edit/delete flow, and responsive/theme checks for NoodleR inside the shared shell.
  • Known minor gap, not yet fixed: self-subscribe/self-unlock to your own stage profile is only prevented by UI filtering (the creator is excluded from /noodler/viewer), not by the /noodler/accounts/:id/subscribe or /noodler/posts/:id/unlock endpoints themselves — a direct API call with your own persona id would currently succeed. Low severity (no real payment is processed, single-user local app) but flagging for reviewer judgment on whether it should block this PR.

Docs and release impact

  • Updated docs (docs/noodle/settings.md) for the new subscriptions/access controls and the removed preview toggle.
  • Version/release files updated (only if this PR includes a version bump) — not applicable.

UI evidence (if applicable)

  • Screenshots/recordings still need to be attached after manual browser verification.

Summary by CodeRabbit

  • New Features
    • Added Public, Subscribers, and PPV access options for guided private posts, including optional PPV pricing.
    • Introduced subscription and PPV unlock mechanics, with viewer-specific post visibility and access rules.
    • Expanded stage profile privacy controls, including subscriber access to PPV and “hidden from personas”.
    • Added stage-profile deletion that removes related posts, subscriptions, and PPV unlock records.
  • Documentation
    • Updated NoodleR docs to clarify stage profile management, private-post generation flow, and subscription/PPV behavior.
  • UI/UX Improvements
    • Refreshed Noodle navigation with a shared shell layout and improved persona switching.

🔄 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/3856 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 7/20/2026 **Status:** ✅ Merged **Merged:** 7/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `noodl-split-6-subscriptions-access` --- ### 📝 Commits (10+) - [`4f2da3d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4f2da3db46167c8e7bd98c754f754cae6528c88c) feat(noodle): add subscriptions and access controls - [`9e37a56`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9e37a56d2cb0e80b298942138913e203bf7e47a5) feat(noodle): allow deleting NoodleR stage profiles - [`87248aa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/87248aacfd1b856c90a96ae4b9ba417744be078b) feat(noodle): render NoodleR inside the shared Noodle shell - [`94d73b8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/94d73b8787d927adc7328e5d705792a9b8f6c9ce) feat(noodle): drive NoodleR access rules by the global persona, not a preview toggle - [`bc12492`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bc12492aafc79be48cf8d510d091754e4d3f6fac) docs(noodle): update settings guide for the removed Browse-as-persona toggle - [`f906a0c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f906a0cf1f90c69f30171be0704013811e1ccf1c) feat(noodle): move stage profile subscriber access settings into a modal - [`1e0dbc9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1e0dbc9e4c47f87c892a71781c6ebe3bb76774fc) Merge branch 'staging' into noodl-split-6-subscriptions-access - [`5801695`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5801695394e07f21323c4fb33dd667c0b843bdb6) fix(noodle): close self-access and N+1 gaps in NoodleR subscriptions - [`fcbb4a1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fcbb4a19a527b0acfa378b29b085cecc4b07d50e) fix(noodle): make subscribe/unlockPost atomic and enforce hidden-viewer rules in storage - [`a2ba850`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a2ba850d623202f26c1c654b624c2fa649dc0bb4) fix(noodle): give NoodleR a working mobile drawer trigger, trim shell API ### 📊 Changes **16 files changed** (+1895 additions, -570 deletions) <details> <summary>View changed files</summary> 📝 `docs/noodle/settings.md` (+17 -3) 📝 `packages/client/src/components/noodle/GuidedPostModal.tsx` (+49 -4) 📝 `packages/client/src/components/noodle/NoodleHome.tsx` (+73 -447) ➕ `packages/client/src/components/noodle/NoodleShell.tsx` (+514 -0) 📝 `packages/client/src/components/noodle/NoodlerHome.tsx` (+480 -74) 📝 `packages/client/src/hooks/use-noodle.ts` (+77 -3) 📝 `packages/server/src/db/file-backed-store.ts` (+18 -0) 📝 `packages/server/src/db/schema/noodle.ts` (+25 -1) 📝 `packages/server/src/routes/noodle.routes.ts` (+142 -0) 📝 `packages/server/src/services/noodle/noodle-private-generation.service.ts` (+2 -0) ➕ `packages/server/src/services/noodle/noodler-access.ts` (+16 -0) 📝 `packages/server/src/services/storage/noodle.storage.ts` (+222 -10) 📝 `packages/shared/src/schemas/noodle.schema.ts` (+43 -11) 📝 `packages/shared/src/types/noodle.ts` (+51 -0) 📝 `scripts/regressions/noodle-prompt.regression.ts` (+82 -1) 📝 `scripts/regressions/noodle-settings.regression.ts` (+84 -16) </details> ### 📄 Description > [!IMPORTANT] > **This PR is Slice 6 of the larger NoodleR implementation. It builds on Slices 1A (#3744), 1B (#3751), 2 (#3759), 3 (#3782), 4 (#3795), and 5 (#3830), and is not representative of the complete NoodleR feature. A real chronological post feed/timeline for NoodleR (merged across creators, with images, timestamps, and interactions) is out of scope here and tracked separately as Slice 6b.** ## Linked issue Closes #3855 ## Why this change NoodleR stage profiles (Slice 5) had no way to gate who can see a private post. Creators need subscriber-only and pay-per-view (PPV) post access, plus a way to hide a stage profile entirely from selected personas, before any fan-facing NoodleR experience can be built on top. Along the way, NoodleR was also found to render outside Noodle's shared navigation shell and to gate the access-controlled viewer behind a redundant local preview toggle instead of the app's existing global persona selection — both fixed here as prerequisites. ## What changed - Added post access levels (`public`, `subscriber`, `ppv`) with PPV price entry when guiding a post. - Added persona subscriptions to a stage profile and PPV post unlocks, with idempotent subscribe/unlock. - Added a "Subscriptions include PPV" toggle and a "Hidden from personas" per-persona visibility list on each stage profile, enforced server-side on the viewer scope, subscribe, and unlock endpoints. - Added a viewer experience in the NoodleR hub that reads the globally selected persona (no separate preview toggle) to show locked/unlocked creator posts. - Deleting a stage profile now also removes its subscriptions and PPV unlock records. - Extracted `NoodleShell` from `NoodleHome` and mounted both `NoodleHome` and `NoodlerHome` inside it, so NoodleR keeps Noodle's left nav, mobile drawer, and bottom nav instead of a standalone frame. - Removed the local "Manage profiles" / "Browse as persona" toggle; the hub now always shows the persona-driven access view, and stage-profile management moved to its own "Manage profiles" header entry point. - Updated NoodleR settings documentation to match. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Automated validation completed with `pnpm check` (workspace lint, TypeScript checks, and production builds) and the `noodle-settings`/`noodle-prompt` regression scripts, which cover idempotent subscribe/unlock, hidden-from-viewer filtering, and the public/subscriber/PPV access matrix (including `subscriptionIncludesPpv`). - Manual browser verification still required: subscribe/unsubscribe and PPV unlock across multiple personas, hidden-from-personas blocking direct subscribe/unlock attempts, switching the globally selected persona updating the hub's locked/unlocked state, the "Manage profiles" entry point's create/edit/delete flow, and responsive/theme checks for NoodleR inside the shared shell. - **Known minor gap, not yet fixed**: self-subscribe/self-unlock to your own stage profile is only prevented by UI filtering (the creator is excluded from `/noodler/viewer`), not by the `/noodler/accounts/:id/subscribe` or `/noodler/posts/:id/unlock` endpoints themselves — a direct API call with your own persona id would currently succeed. Low severity (no real payment is processed, single-user local app) but flagging for reviewer judgment on whether it should block this PR. ## Docs and release impact - [x] Updated docs (`docs/noodle/settings.md`) for the new subscriptions/access controls and the removed preview toggle. - [ ] Version/release files updated (only if this PR includes a version bump) — not applicable. ## UI evidence (if applicable) - Screenshots/recordings still need to be attached after manual browser verification. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Public, Subscribers, and PPV access options for guided private posts, including optional PPV pricing. * Introduced subscription and PPV unlock mechanics, with viewer-specific post visibility and access rules. * Expanded stage profile privacy controls, including subscriber access to PPV and “hidden from personas”. * Added stage-profile deletion that removes related posts, subscriptions, and PPV unlock records. * **Documentation** * Updated NoodleR docs to clarify stage profile management, private-post generation flow, and subscription/PPV behavior. * **UI/UX Improvements** * Refreshed Noodle navigation with a shared shell layout and improved persona switching. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:21 +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#6130
No description provided.