[PR #1692] [MERGED] Fix sidebar new chat no-runtime guard #5218

Closed
opened 2026-10-22 04:14:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1692
Author: @cha1latte
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @cha1latte

Base: refactor ← Head: bughunt/refactor-lane2-chat-20260531


📝 Commits (1)

  • 3d10191 Fix sidebar new chat runtime guard

📊 Changes

4 files changed (+16 additions, -0 deletions)

View changed files

➕ docs/pr-evidence/refactor-lane2-chat-20260531/after-home.png (+0 -0)
➕ docs/pr-evidence/refactor-lane2-chat-20260531/after-sidebar.png (+0 -0)
➕ docs/pr-evidence/refactor-lane2-chat-20260531/before.png (+0 -0)
📝 src/app/shell/useStartNewChat.ts (+16 -0)

📄 Description



Linked issue

Not linked; coordinator-assigned refactor bug-hunt lane 2.

Why this change

  • In web-shell mode with no Remote Runtime URL configured, the sidebar New chat button tried to list connections through storage before opening the guarded setup flow. That threw Remote Runtime URL is not configured and left the user on the home screen instead of showing the no-runtime setup guidance.

What changed

  • Added the same web-shell/no-Remote-Runtime guard to useStartNewChat before it fetches connections.
  • When the sidebar starts a conversation/roleplay/game chat without a configured runtime, it now sets pendingNewChatMode so the existing NewChatConnectionGate modal opens.
  • Added scoped UI evidence images for the before/after proof.

Refactor impact

Primary owner:

app shell

Impact areas reviewed:

  • Sidebar New chat flow for the active chat mode.
  • Existing home quick-start Conversation flow as an adjacent no-runtime control.
  • Embedded Tauri branch is preserved by checking __TAURI_INTERNALS__ before applying the web-shell guard.

Boundary notes:

  • UI/app-shell-only change. No engine, shared API adapter, Rust, schema, dependency, auth, storage, or prompt-pipeline changes.

Pressure points touched:

  • src/app/shell/useStartNewChat.ts

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

Codex proof, all run from C:\tmp\ME-refactor-bughunt-lane2-chat-20260531 against local Vite on 127.0.0.1:5175:

  • Reproduced before fix: node scratch\\lane2-new-chat-repro.mjs http://127.0.0.1:5175/ before-click failed because the sidebar New chat click did not open the runtime gate and emitted page error Remote Runtime URL is not configured.
  • Verified original repro after fix: node scratch\\lane2-new-chat-repro.mjs http://127.0.0.1:5175/ after-rebase-new-chat passed; sidebar New chat opened Remote Runtime required with no click-time page errors.
  • Adjacent control: node scratch\\lane2-new-chat-repro.mjs http://127.0.0.1:5175/ after-rebase-home "Start Conversation chat" passed; home quick-start Conversation still opens the same gate with no click-time page errors.
  • pnpm typecheck passed.
  • pnpm check passed.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Bunny maintainer-equivalent review passed before push.

No blocking manual-only verification remains for the core web-shell no-runtime claim. I did not run a packaged Tauri app smoke test; the Tauri path is kept out of the new guard by the embedded IPC check.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs or release-note changes needed for this focused bug fix.

UI evidence

Before, sidebar New chat stayed on the home screen and emitted a runtime URL page error:

Before sidebar New chat no-runtime failure

After, sidebar New chat opens the guarded setup modal:

After sidebar New chat runtime gate

Adjacent home quick-start still opens the same guarded setup modal:

After home Conversation runtime gate


🔄 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/1692 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/31/2026 **Status:** ✅ Merged **Merged:** 5/31/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `bughunt/refactor-lane2-chat-20260531` --- ### 📝 Commits (1) - [`3d10191`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3d10191c9c28657c61ad25976a5e635da78a570b) Fix sidebar new chat runtime guard ### 📊 Changes **4 files changed** (+16 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/refactor-lane2-chat-20260531/after-home.png` (+0 -0) ➕ `docs/pr-evidence/refactor-lane2-chat-20260531/after-sidebar.png` (+0 -0) ➕ `docs/pr-evidence/refactor-lane2-chat-20260531/before.png` (+0 -0) 📝 `src/app/shell/useStartNewChat.ts` (+16 -0) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Not linked; coordinator-assigned refactor bug-hunt lane 2. ## Why this change - In web-shell mode with no Remote Runtime URL configured, the sidebar `New chat` button tried to list connections through storage before opening the guarded setup flow. That threw `Remote Runtime URL is not configured` and left the user on the home screen instead of showing the no-runtime setup guidance. ## What changed - Added the same web-shell/no-Remote-Runtime guard to `useStartNewChat` before it fetches connections. - When the sidebar starts a conversation/roleplay/game chat without a configured runtime, it now sets `pendingNewChatMode` so the existing `NewChatConnectionGate` modal opens. - Added scoped UI evidence images for the before/after proof. ## Refactor impact Primary owner: app shell Impact areas reviewed: - Sidebar `New chat` flow for the active chat mode. - Existing home quick-start Conversation flow as an adjacent no-runtime control. - Embedded Tauri branch is preserved by checking `__TAURI_INTERNALS__` before applying the web-shell guard. Boundary notes: - UI/app-shell-only change. No engine, shared API adapter, Rust, schema, dependency, auth, storage, or prompt-pipeline changes. Pressure points touched: - `src/app/shell/useStartNewChat.ts` ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Codex proof, all run from `C:\tmp\ME-refactor-bughunt-lane2-chat-20260531` against local Vite on `127.0.0.1:5175`: - Reproduced before fix: `node scratch\\lane2-new-chat-repro.mjs http://127.0.0.1:5175/ before-click` failed because the sidebar `New chat` click did not open the runtime gate and emitted page error `Remote Runtime URL is not configured`. - Verified original repro after fix: `node scratch\\lane2-new-chat-repro.mjs http://127.0.0.1:5175/ after-rebase-new-chat` passed; sidebar `New chat` opened `Remote Runtime required` with no click-time page errors. - Adjacent control: `node scratch\\lane2-new-chat-repro.mjs http://127.0.0.1:5175/ after-rebase-home "Start Conversation chat"` passed; home quick-start Conversation still opens the same gate with no click-time page errors. - `pnpm typecheck` passed. - `pnpm check` passed. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Bunny maintainer-equivalent review passed before push. No blocking manual-only verification remains for the core web-shell no-runtime claim. I did not run a packaged Tauri app smoke test; the Tauri path is kept out of the new guard by the embedded IPC check. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims No docs or release-note changes needed for this focused bug fix. ## UI evidence Before, sidebar `New chat` stayed on the home screen and emitted a runtime URL page error: ![Before sidebar New chat no-runtime failure](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/bughunt/refactor-lane2-chat-20260531/docs/pr-evidence/refactor-lane2-chat-20260531/before.png) After, sidebar `New chat` opens the guarded setup modal: ![After sidebar New chat runtime gate](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/bughunt/refactor-lane2-chat-20260531/docs/pr-evidence/refactor-lane2-chat-20260531/after-sidebar.png) Adjacent home quick-start still opens the same guarded setup modal: ![After home Conversation runtime gate](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/bughunt/refactor-lane2-chat-20260531/docs/pr-evidence/refactor-lane2-chat-20260531/after-home.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:19 +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#5218
No description provided.