[PR #4023] [MERGED] fix: issue sweep — Push Story mode selector, Gemini model fetch, Termux channel-switch updates (#4020, #4021, #4022) #6207

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

📋 Pull Request Information

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

Base: staging ← Head: fix/issue-sweep-push-story-gemini-termux


📝 Commits (8)

  • 4802633 fix(updates): give update installs realistic timeouts and surface pnpm errors
  • c030a0a fix(connections): fetch the full Google Gemini model catalog
  • 1b9516f feat(chat): pick Natural/Random progression from the Push Story button
  • 476ecc2 docs(changelog): record issue-sweep fixes for #4020, #4021, #4022
  • 929383b fix: address CodeRabbit review on issue-sweep PR
  • b08944a docs(troubleshooting): note the Android channel-switch update fix
  • d9714ab refactor(agents): remove dead directorMode default from AgentEditor
  • d144e53 docs(changelog): note removal of the editor Story Push Mode default

📊 Changes

9 files changed (+249 additions, -184 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 docs/TROUBLESHOOTING.md (+12 -0)
📝 packages/client/src/components/agents/AgentEditor.tsx (+0 -55)
📝 packages/client/src/components/chat/AgentAddSetupFields.tsx (+3 -48)
📝 packages/client/src/components/chat/ChatInput.tsx (+104 -42)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+4 -23)
📝 packages/server/src/routes/connections.routes.ts (+59 -5)
📝 packages/server/src/routes/updates.routes.ts (+58 -11)
📝 packages/shared/src/constants/model-lists.ts (+6 -0)

📄 Description

Why

Sweep of the three unclaimed open issues, all reported by users on v2.3.4:

  • #4020 — Switching stable → staging on Termux dies with an opaque Update failed: Command failed: corepack pnpm ... install --force --frozen-lockfile. The install step had a fixed 180s timeout; a channel switch forces a near-full dependency reinstall, which a phone cannot finish in 3 minutes. The killed process surfaced no stderr, so users had nothing to act on.
  • #4021 — Google Gemini model fetching returns a truncated list: the ListModels endpoint is paginated (small default page size) and we issued a single request without following nextPageToken, so most of the catalog — including every newer model — was silently dropped. The static fallback dropdown was also missing the newest Gemini/Gemma entries.
  • #4022 — Push Story always used the mode buried in Chat Settings → Agents → Narrative Director, forcing a settings round-trip to switch between Natural and Random progression. Requested UX (from the Discord thread): choose Naturally/Randomly right on the Push Story control.

What changed

  • #4020, updates.routes.ts: update-step timeouts scale 4× on Android; install base raised 180s → 300s; exec maxBuffer raised to 32 MiB so verbose --force installs aren't aborted; pnpm failures now report the failing step, whether it hit the timeout, and the tail of the process output. Corepack/npx probe timeouts get the same Android scaling (first run downloads the pinned pnpm).
  • #4021, connections.routes.ts: the Google branch of /:id/models now follows nextPageToken (pageSize=1000, capped at 20 pages) and no longer hides models that only advertise streamGenerateContent or omit supportedGenerationMethods. model-lists.ts: added gemini-3.6-flash and the gemma-4 family to the static fallback — please sanity-check these IDs against a live fetch before release, the live fetch is the source of truth.
  • #4022, ChatInput.tsx: clicking Push Story now opens a two-option selector (Naturally — "Push the existing plot forward." / Randomly — "Add a plausible surprise to the scene."); picking one arms that mode for the next response and shows it on the button label; a second click disarms. ChatSettingsDrawer.tsx / AgentAddSetupFields.tsx: the segmented mode control is removed (nothing reads metadata.narrativeDirectorMode at generation time anymore — the server only runs the director with the explicit per-request mode) and replaced with a hint pointing at the Push Story button.
  • CHANGELOG.md: Unreleased → Fixed entries for all three.

Test plan

  • Manually verify a stable → staging switch completes on Termux (or that a genuine failure now shows the pnpm output tail in the error toast).
  • Manually verify "Fetch Models from API" on a Google Gemini connection lists the full current model catalog (more than 50 entries, including the newest releases).
  • Verify the new static GOOGLE_MODELS IDs (gemini-3.6-flash, gemma-4-*) against a live ListModels response.
  • Manually verify clicking Push Story in a roleplay chat offers Naturally/Randomly with descriptions, arms the chosen mode (label shows it), and a second click disarms — desktop and mobile viewport.
  • Manually verify the Narrative Director card in Chat Settings → Agents and the add-agent setup no longer show the Natural/Random selector, and Secret Plot controls still work.
  • pnpm check passes. (It passed in the authoring session; re-verify locally.)

Fixes #4020. Fixes #4021. Fixes #4022.

Summary by CodeRabbit

  • New Features

    • Choose Natural or Random Story pushes directly from the Push Story button.
    • Added newly available Gemini and Gemma models to connection setup.
  • Bug Fixes

    • Improved Google model discovery across paginated results.
    • Increased update reliability on slower devices and provided more specific installation error details.

🔄 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/4023 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/24/2026 **Status:** ✅ Merged **Merged:** 7/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/issue-sweep-push-story-gemini-termux` --- ### 📝 Commits (8) - [`4802633`](https://github.com/Pasta-Devs/Marinara-Engine/commit/48026336b99f3a4eeba72e222dd07ecdc3ff6e04) fix(updates): give update installs realistic timeouts and surface pnpm errors - [`c030a0a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c030a0a1cf1f45b8d4366b8e75a5cd1e83ee08d0) fix(connections): fetch the full Google Gemini model catalog - [`1b9516f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1b9516f8ecc6c61deaa64b76c9f5a5d684e1cee8) feat(chat): pick Natural/Random progression from the Push Story button - [`476ecc2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/476ecc2192af44097041b70bfcd02391f7348d88) docs(changelog): record issue-sweep fixes for #4020, #4021, #4022 - [`929383b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/929383be4871a0d8d921cb44ed137bf11a54457e) fix: address CodeRabbit review on issue-sweep PR - [`b08944a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b08944a8cffa56ca6cd711dc6da0f4000c896b97) docs(troubleshooting): note the Android channel-switch update fix - [`d9714ab`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d9714abda26cea8cf1b1bfd1638b076b57524d65) refactor(agents): remove dead directorMode default from AgentEditor - [`d144e53`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d144e5368ab1b916ac371ca0ed4faa0a41a7801d) docs(changelog): note removal of the editor Story Push Mode default ### 📊 Changes **9 files changed** (+249 additions, -184 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `docs/TROUBLESHOOTING.md` (+12 -0) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+0 -55) 📝 `packages/client/src/components/chat/AgentAddSetupFields.tsx` (+3 -48) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+104 -42) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+4 -23) 📝 `packages/server/src/routes/connections.routes.ts` (+59 -5) 📝 `packages/server/src/routes/updates.routes.ts` (+58 -11) 📝 `packages/shared/src/constants/model-lists.ts` (+6 -0) </details> ### 📄 Description ## Why Sweep of the three unclaimed open issues, all reported by users on v2.3.4: - **#4020** — Switching stable → staging on Termux dies with an opaque `Update failed: Command failed: corepack pnpm ... install --force --frozen-lockfile`. The install step had a fixed 180s timeout; a channel switch forces a near-full dependency reinstall, which a phone cannot finish in 3 minutes. The killed process surfaced no stderr, so users had nothing to act on. - **#4021** — Google Gemini model fetching returns a truncated list: the ListModels endpoint is paginated (small default page size) and we issued a single request without following `nextPageToken`, so most of the catalog — including every newer model — was silently dropped. The static fallback dropdown was also missing the newest Gemini/Gemma entries. - **#4022** — Push Story always used the mode buried in Chat Settings → Agents → Narrative Director, forcing a settings round-trip to switch between Natural and Random progression. Requested UX (from the Discord thread): choose Naturally/Randomly right on the Push Story control. ## What changed - **#4020, `updates.routes.ts`**: update-step timeouts scale 4× on Android; install base raised 180s → 300s; exec `maxBuffer` raised to 32 MiB so verbose `--force` installs aren't aborted; pnpm failures now report the failing step, whether it hit the timeout, and the tail of the process output. Corepack/npx probe timeouts get the same Android scaling (first run downloads the pinned pnpm). - **#4021, `connections.routes.ts`**: the Google branch of `/:id/models` now follows `nextPageToken` (`pageSize=1000`, capped at 20 pages) and no longer hides models that only advertise `streamGenerateContent` or omit `supportedGenerationMethods`. `model-lists.ts`: added `gemini-3.6-flash` and the `gemma-4` family to the static fallback — **please sanity-check these IDs against a live fetch before release**, the live fetch is the source of truth. - **#4022, `ChatInput.tsx`**: clicking Push Story now opens a two-option selector (Naturally — "Push the existing plot forward." / Randomly — "Add a plausible surprise to the scene."); picking one arms that mode for the next response and shows it on the button label; a second click disarms. `ChatSettingsDrawer.tsx` / `AgentAddSetupFields.tsx`: the segmented mode control is removed (nothing reads `metadata.narrativeDirectorMode` at generation time anymore — the server only runs the director with the explicit per-request mode) and replaced with a hint pointing at the Push Story button. - `CHANGELOG.md`: Unreleased → Fixed entries for all three. ## Test plan - [ ] Manually verify a stable → staging switch completes on Termux (or that a genuine failure now shows the pnpm output tail in the error toast). - [ ] Manually verify "Fetch Models from API" on a Google Gemini connection lists the full current model catalog (more than 50 entries, including the newest releases). - [ ] Verify the new static `GOOGLE_MODELS` IDs (`gemini-3.6-flash`, `gemma-4-*`) against a live ListModels response. - [ ] Manually verify clicking Push Story in a roleplay chat offers Naturally/Randomly with descriptions, arms the chosen mode (label shows it), and a second click disarms — desktop and mobile viewport. - [ ] Manually verify the Narrative Director card in Chat Settings → Agents and the add-agent setup no longer show the Natural/Random selector, and Secret Plot controls still work. - [ ] `pnpm check` passes. (It passed in the authoring session; re-verify locally.) Fixes #4020. Fixes #4021. Fixes #4022. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Choose Natural or Random Story pushes directly from the **Push Story** button. - Added newly available Gemini and Gemma models to connection setup. - **Bug Fixes** - Improved Google model discovery across paginated results. - Increased update reliability on slower devices and provided more specific installation error details. <!-- 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:08: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#6207
No description provided.