[PR #3759] [MERGED] refactor(noodle): add typed navigation and real containers #6093

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

📋 Pull Request Information

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

Base: staging ← Head: noodl-split-2-nav-shell


📝 Commits (10+)

  • 28b265c refactor(noodle): make navigation states explicit
  • 28fcc2c refactor(noodle): move data ownership into containers
  • d3b98a0 docs(noodle): clarify NoodleR preview status
  • 782c5f3 fix(noodle): keep NoodleR launch in settings
  • 9237bb2 fix(noodle): verify before enabling NoodleR
  • b2d47b6 Merge branch 'staging' into noodl-split-2-nav-shell
  • f5de7f2 fix(noodle): address nav shell review
  • 60b3c89 Merge remote-tracking branch 'origin/noodl-split-2-nav-shell' into noodl-split-2-nav-shell
  • 0f949cd fix(noodle): scope compose modal focus portals
  • 10ee301 fix(noodle): clarify noodler development warning

📊 Changes

7 files changed (+6107 additions, -5753 deletions)

View changed files

📝 docs/noodle/settings.md (+2 -2)
➕ packages/client/src/components/noodle/NoodleHome.tsx (+5827 -0)
📝 packages/client/src/components/noodle/NoodleView.tsx (+9 -5750)
➕ packages/client/src/components/noodle/NoodlerHome.tsx (+151 -0)
➕ packages/client/src/components/noodle/noodle-navigation.types.ts (+15 -0)
📝 packages/client/src/components/ui/Modal.tsx (+20 -1)
➕ packages/client/src/hooks/use-dialog-focus-scope.ts (+83 -0)

📄 Description

Linked issue

Closes #3756

Source review thread: #3618

Important

This PR is Slice 2 of the NoodleR implementation plan: Client nav shell + real containers. It builds on merged Slice 1A (#3744) and Slice 1B (#3751). Later NoodleR capabilities remain intentionally out of scope.

Why this change

The Noodle client represented its destination with independent view, profile-account, and profile-connection state. Those values could describe stale or invalid combinations, so every transition had to clear unrelated state manually.

The earlier NoodleR extraction also left public and private home components as presentation puppets controlled by one oversized parent. Slice 2 establishes a typed navigation shell and gives each mode a real container before later NoodleR features build on top of it.

Summary

  • Add one discriminated NoodleNavigationState for public Home, Search, Notifications, Profile, Settings, NoodleR verification, and the private hub.
  • Keep profile account and follower/following state inside the profile destination.
  • Replace independent navigation setters with complete destination transitions.
  • Reduce the exported NoodleView parent from 59 local state hooks to 1.
  • Turn NoodleView into the navigation shell.
  • Move the existing public implementation into the NoodleHome container.
  • Add a NoodlerHome container that owns the feature-gate query, enable mutation, private-account query, and loading/error/empty/populated states.
  • Remove private-account querying from the public settings container.
  • Use explicit notification item types and remove unknown casts from touched container code.
  • Keep NoodleR out of the desktop sidebar, mobile drawer, and mobile bottom navigation.
  • Make Noodle Settings the only NoodleR entry point in this slice.
  • Require verification before NoodleR is persisted as enabled.
  • Show the 18+ notice and unfinished-feature/no-feature-request warning before enablement.
  • Update the Noodle settings guide for the verification and private account hub behavior.

Architecture

NoodleView owns the discriminated navigation destination and dispatches to one of two containers:

  • NoodleHome owns public Noodle queries, mutations, derived state, and local UI state.
  • NoodlerHome owns private-account access, enablement, querying, and hub states.

Invalid combinations such as a settings screen retaining a viewed profile ID, or a home screen retaining a followers subview, are not members of the navigation union.

The extraction is intentionally limited to capabilities present after Slices 1A and 1B. It does not import later NoodleR profile, subscription, generation, stage identity, scheduling, or project behavior from the closed oversized branch.

Behavior

Existing public Noodle destinations retain their previous screens: Home, Search, Notifications, own profile, other account profiles, Followers, Following, and Settings.

NoodleR is launched only from the NoodleR Access section in Noodle Settings. It is not shown in the desktop sidebar, mobile drawer, or mobile bottom navigation.

When NoodleR is disabled, attempting to turn on the setting opens verification without persisting enablement. The verification screen states that NoodleR is intended for adults, is not finalized, and should not receive feature requests while it remains in development. Confirming the 18+ action persists enablement and opens the private-account hub. Leaving verification through Back keeps NoodleR disabled.

Once enabled, Settings displays an Open NoodleR button. The hub displays loading, retryable error, empty, and populated account states. Turning the setting off disables access directly and removes the launch button.

Known limitations

  • NoodleR currently exposes only the isolated private-account hub provided by Slice 1B.
  • Private profiles, subscriptions, generation, stage identity, fan activity, auto-posting, and projects belong to later slices.
  • No NoodleR notification API exists yet, so the typed notification collection is empty.
  • Automated browser tests could not start on the current host because Playwright Chromium is missing libnspr4.so.

Validation

Automated evidence gathered while preparing this PR:

  • pnpm check passed.
  • pnpm guard:installer-artifacts passed.
  • Every deterministic lane reached by pnpm regression passed, including all Noodle regressions.
  • Focused client lint passed after the entry-point and verification-flow follow-ups.
  • pnpm smoke:ui could not execute test code because Chromium failed at launch with missing host library libnspr4.so.
  • pnpm version:check was not required because no version-bearing files changed.
  • A repository search confirmed no unknown notification collections, unknown notification callbacks, or unknown-data casts remain in the touched containers.

Manual verification required

Manual browser verification was completed by the contributor. The following flows were verified:

  1. Verify all existing public Noodle destinations on desktop and mobile.
  2. Confirm NoodleR has no desktop-sidebar, mobile-drawer, or mobile-bottom-navigation entry.
  3. Start from disabled NoodleR and confirm the Settings toggle routes to verification without persisting enablement.
  4. Confirm the verification screen shows the 18+ notice, unfinished-feature warning, and no-feature-request notice before the confirmation action.
  5. Use Back from verification and confirm NoodleR remains disabled.
  6. Confirm the verification action persists enablement and opens the private account hub.
  7. Confirm enabled Settings shows Open NoodleR, and disabling removes it.
  8. Verify private-account loading, retryable error, empty, and populated states where practical.
  9. Check light and dark themes and capture desktop/mobile screenshots for review evidence.

The verified results are recorded by checking each item below. Screenshots were also captured during verification.

Test plan

  • Manually verify public Home, Search, Notifications, Profile, Followers, Following, and Settings on desktop.
  • Manually verify the same public navigation paths on mobile.
  • Manually verify account switching clears profile-specific navigation.
  • Confirm NoodleR is absent from the desktop sidebar, mobile drawer, and mobile bottom navigation.
  • With NoodleR disabled, turn on the Settings toggle and confirm verification opens without persisting enablement.
  • Confirm verification shows the 18+ notice, unfinished-feature warning, and no-feature-request notice.
  • Use Back from verification and confirm NoodleR remains disabled.
  • Confirm the verification action enables NoodleR and opens the private account hub.
  • Confirm enabled Settings shows Open NoodleR.
  • Manually verify private-account loading, error, retry, empty, and populated states.
  • Manually verify Back returns from NoodleR to public Home.
  • Disable NoodleR from Settings and confirm Open NoodleR disappears.
  • Manually verify light and dark themes.
  • Capture desktop and mobile screenshots.

Docs touched

  • docs/noodle/settings.md: documents the NoodleR opt-in route, private account hub, and the later-slice boundary.

Summary by CodeRabbit

  • New Features
    • Added a full Noodle social timeline with posts, replies, likes, reposts, polls, image attachments, mentions, profiles, notifications, search, and settings.
    • Added private NoodleR access with opt-in onboarding and a hub for available private accounts.
    • Added loading, error, empty, and verification states for private content.
    • Added mobile navigation and support for scheduling timeline refreshes, invites, and prompt settings.
  • Documentation
    • Clarified NoodleR availability, privacy behavior, account access, and upcoming capabilities.

🔄 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/3759 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 7/17/2026 **Status:** ✅ Merged **Merged:** 7/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `noodl-split-2-nav-shell` --- ### 📝 Commits (10+) - [`28b265c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/28b265cee0dcae76c57d01713a6cc89c3ffa20c1) refactor(noodle): make navigation states explicit - [`28fcc2c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/28fcc2c1971fb755a0ad9cf3b436c4b46b934a10) refactor(noodle): move data ownership into containers - [`d3b98a0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d3b98a090c486161ffc04e7e118bf68e5fa949b7) docs(noodle): clarify NoodleR preview status - [`782c5f3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/782c5f36f82dd70fce655e81a717a08458b4fe93) fix(noodle): keep NoodleR launch in settings - [`9237bb2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9237bb28b91652b3ee310771dc6ebd15733a4f7c) fix(noodle): verify before enabling NoodleR - [`b2d47b6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b2d47b6e9f509e6d95ceae3f17a98574dff8ba2e) Merge branch 'staging' into noodl-split-2-nav-shell - [`f5de7f2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f5de7f2ec908dcba51501a04c31a02492a66a273) fix(noodle): address nav shell review - [`60b3c89`](https://github.com/Pasta-Devs/Marinara-Engine/commit/60b3c892b001ee5345ae41981f81a90bd68e3998) Merge remote-tracking branch 'origin/noodl-split-2-nav-shell' into noodl-split-2-nav-shell - [`0f949cd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0f949cd685aef5ff664e83406830b003c6f3c5eb) fix(noodle): scope compose modal focus portals - [`10ee301`](https://github.com/Pasta-Devs/Marinara-Engine/commit/10ee3019ad192b9936e1d05794d73e0410aabb52) fix(noodle): clarify noodler development warning ### 📊 Changes **7 files changed** (+6107 additions, -5753 deletions) <details> <summary>View changed files</summary> 📝 `docs/noodle/settings.md` (+2 -2) ➕ `packages/client/src/components/noodle/NoodleHome.tsx` (+5827 -0) 📝 `packages/client/src/components/noodle/NoodleView.tsx` (+9 -5750) ➕ `packages/client/src/components/noodle/NoodlerHome.tsx` (+151 -0) ➕ `packages/client/src/components/noodle/noodle-navigation.types.ts` (+15 -0) 📝 `packages/client/src/components/ui/Modal.tsx` (+20 -1) ➕ `packages/client/src/hooks/use-dialog-focus-scope.ts` (+83 -0) </details> ### 📄 Description ## Linked issue Closes #3756 Source review thread: #3618 > [!IMPORTANT] > **This PR is Slice 2 of the NoodleR implementation plan: Client nav shell + real containers.** It builds on merged Slice 1A (#3744) and Slice 1B (#3751). Later NoodleR capabilities remain intentionally out of scope. ## Why this change The Noodle client represented its destination with independent view, profile-account, and profile-connection state. Those values could describe stale or invalid combinations, so every transition had to clear unrelated state manually. The earlier NoodleR extraction also left public and private home components as presentation puppets controlled by one oversized parent. Slice 2 establishes a typed navigation shell and gives each mode a real container before later NoodleR features build on top of it. ## Summary - Add one discriminated `NoodleNavigationState` for public Home, Search, Notifications, Profile, Settings, NoodleR verification, and the private hub. - Keep profile account and follower/following state inside the profile destination. - Replace independent navigation setters with complete destination transitions. - Reduce the exported `NoodleView` parent from 59 local state hooks to 1. - Turn `NoodleView` into the navigation shell. - Move the existing public implementation into the `NoodleHome` container. - Add a `NoodlerHome` container that owns the feature-gate query, enable mutation, private-account query, and loading/error/empty/populated states. - Remove private-account querying from the public settings container. - Use explicit notification item types and remove unknown casts from touched container code. - Keep NoodleR out of the desktop sidebar, mobile drawer, and mobile bottom navigation. - Make Noodle Settings the only NoodleR entry point in this slice. - Require verification before NoodleR is persisted as enabled. - Show the 18+ notice and unfinished-feature/no-feature-request warning before enablement. - Update the Noodle settings guide for the verification and private account hub behavior. ## Architecture `NoodleView` owns the discriminated navigation destination and dispatches to one of two containers: - `NoodleHome` owns public Noodle queries, mutations, derived state, and local UI state. - `NoodlerHome` owns private-account access, enablement, querying, and hub states. Invalid combinations such as a settings screen retaining a viewed profile ID, or a home screen retaining a followers subview, are not members of the navigation union. The extraction is intentionally limited to capabilities present after Slices 1A and 1B. It does not import later NoodleR profile, subscription, generation, stage identity, scheduling, or project behavior from the closed oversized branch. ## Behavior Existing public Noodle destinations retain their previous screens: Home, Search, Notifications, own profile, other account profiles, Followers, Following, and Settings. NoodleR is launched only from the NoodleR Access section in Noodle Settings. It is not shown in the desktop sidebar, mobile drawer, or mobile bottom navigation. When NoodleR is disabled, attempting to turn on the setting opens verification without persisting enablement. The verification screen states that NoodleR is intended for adults, is not finalized, and should not receive feature requests while it remains in development. Confirming the 18+ action persists enablement and opens the private-account hub. Leaving verification through Back keeps NoodleR disabled. Once enabled, Settings displays an **Open NoodleR** button. The hub displays loading, retryable error, empty, and populated account states. Turning the setting off disables access directly and removes the launch button. ## Known limitations - NoodleR currently exposes only the isolated private-account hub provided by Slice 1B. - Private profiles, subscriptions, generation, stage identity, fan activity, auto-posting, and projects belong to later slices. - No NoodleR notification API exists yet, so the typed notification collection is empty. - Automated browser tests could not start on the current host because Playwright Chromium is missing `libnspr4.so`. ## Validation Automated evidence gathered while preparing this PR: - `pnpm check` passed. - `pnpm guard:installer-artifacts` passed. - Every deterministic lane reached by `pnpm regression` passed, including all Noodle regressions. - Focused client lint passed after the entry-point and verification-flow follow-ups. - `pnpm smoke:ui` could not execute test code because Chromium failed at launch with missing host library `libnspr4.so`. - `pnpm version:check` was not required because no version-bearing files changed. - A repository search confirmed no unknown notification collections, unknown notification callbacks, or unknown-data casts remain in the touched containers. ## Manual verification required Manual browser verification was completed by the contributor. The following flows were verified: 1. Verify all existing public Noodle destinations on desktop and mobile. 2. Confirm NoodleR has no desktop-sidebar, mobile-drawer, or mobile-bottom-navigation entry. 3. Start from disabled NoodleR and confirm the Settings toggle routes to verification without persisting enablement. 4. Confirm the verification screen shows the 18+ notice, unfinished-feature warning, and no-feature-request notice before the confirmation action. 5. Use Back from verification and confirm NoodleR remains disabled. 6. Confirm the verification action persists enablement and opens the private account hub. 7. Confirm enabled Settings shows **Open NoodleR**, and disabling removes it. 8. Verify private-account loading, retryable error, empty, and populated states where practical. 9. Check light and dark themes and capture desktop/mobile screenshots for review evidence. The verified results are recorded by checking each item below. Screenshots were also captured during verification. ## Test plan - [x] Manually verify public Home, Search, Notifications, Profile, Followers, Following, and Settings on desktop. - [x] Manually verify the same public navigation paths on mobile. - [x] Manually verify account switching clears profile-specific navigation. - [x] Confirm NoodleR is absent from the desktop sidebar, mobile drawer, and mobile bottom navigation. - [x] With NoodleR disabled, turn on the Settings toggle and confirm verification opens without persisting enablement. - [x] Confirm verification shows the 18+ notice, unfinished-feature warning, and no-feature-request notice. - [x] Use Back from verification and confirm NoodleR remains disabled. - [x] Confirm the verification action enables NoodleR and opens the private account hub. - [x] Confirm enabled Settings shows **Open NoodleR**. - [x] Manually verify private-account loading, error, retry, empty, and populated states. - [x] Manually verify Back returns from NoodleR to public Home. - [x] Disable NoodleR from Settings and confirm **Open NoodleR** disappears. - [x] Manually verify light and dark themes. - [x] Capture desktop and mobile screenshots. ## Docs touched - `docs/noodle/settings.md`: documents the NoodleR opt-in route, private account hub, and the later-slice boundary. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a full Noodle social timeline with posts, replies, likes, reposts, polls, image attachments, mentions, profiles, notifications, search, and settings. * Added private NoodleR access with opt-in onboarding and a hub for available private accounts. * Added loading, error, empty, and verification states for private content. * Added mobile navigation and support for scheduling timeline refreshes, invites, and prompt settings. * **Documentation** * Clarified NoodleR availability, privacy behavior, account access, and upcoming capabilities. <!-- 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:01 +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#6093
No description provided.