[PR #1295] [MERGED] Fix gallery Illustrate status #5020

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/refactor-issue-1230-gallery-illustrate-status


📝 Commits (1)

  • ab6a678 Fix gallery illustrate status

📊 Changes

6 files changed (+71 additions, -15 deletions)

View changed files

📝 src/features/modes/conversation/components/ChatConversationSurface.tsx (+1 -1)
📝 src/features/modes/roleplay/components/ChatRoleplaySurface.tsx (+1 -1)
📝 src/features/modes/shared/chat-ui/components/ChatCommonOverlays.tsx (+1 -1)
📝 src/features/modes/shared/chat-ui/components/ChatGallery.tsx (+65 -9)
📝 src/features/modes/shared/chat-ui/components/ChatGalleryDrawer.tsx (+1 -1)
📝 src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts (+2 -2)

📄 Description

Linked issue

Closes #1230

Why this change

  • The chat Gallery Illustrate action could fail prerequisites with only a transient toast and no persistent drawer feedback, and it stayed clickable while the async retry path was running.

What changed

  • Makes the gallery Illustrate action await the async illustrator retry callback.
  • Shows an inline status while the illustrator path is checking chat/image settings.
  • Disables the action during the in-flight attempt to prevent repeated accidental clicks.
  • Keeps thrown failures, including No LLM connection is configured, visible inside the gallery drawer after the toast fades.

Refactor impact

Primary owner:

Shared mode UI / chat gallery.

Impact areas reviewed:

  • Conversation and roleplay surfaces that pass the shared gallery onIllustrate callback.
  • Shared chat overlays and drawer callback typing.
  • Runtime generation retry path remains unchanged; this PR only exposes its async pending/failure state in UI.

Boundary notes:

  • No engine, shared API, Rust, storage, schema, dependency, or remote-runtime contract changes.

Pressure points touched:

  • Shared mode UI: ChatGallery, ChatGalleryDrawer, ChatCommonOverlays.
  • Conversation and roleplay surface prop types only.

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

Codex-run proof, with checkboxes intentionally left for a human contributor:

  • node scratch\issue-1230-gallery-illustrate-proof.mjs --before reproduced the original bug: the button stayed enabled, no inline pending status appeared, and the missing LLM connection was only a toast.
  • node scratch\issue-1230-gallery-illustrate-proof.mjs --after verified the fixed path: pending state appears, the button disables during the async prerequisite check, No LLM connection is configured remains inline after failure, and the button re-enables for deliberate retry.
  • pnpm typecheck passed.
  • pnpm check passed: architecture, frontend typecheck, Rust cargo check --manifest-path src-tauri/Cargo.toml --workspace, and docs.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Bunny review passed before PR open: focused UI diff, proof covers the core issue, no blocking findings.

Manual verification notes

  • No required human-only verification for the core claim. The Playwright proof used the real Vite app with a stubbed remote runtime returning one conversation, no gallery images, and no LLM connections.

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 metadata changes needed; this is a small visible UI feedback fix.

UI evidence

Before, the action remains enabled with no inline status:

Before: no inline gallery illustrate status

After, pending state disables the action:

After: gallery illustrate pending state

After, the missing LLM connection failure persists inline:

After: gallery illustrate inline failure

Summary by CodeRabbit

  • New Features

    • Illustration functionality now supports asynchronous operations, allowing longer-running tasks to complete properly.
  • Improvements

    • Illustration controls now display pending status while processing and show error messages on failure.
    • Illustration button is disabled during operation to prevent duplicate requests.

Review Change Stack


🔄 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/1295 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/26/2026 **Status:** ✅ Merged **Merged:** 5/26/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/refactor-issue-1230-gallery-illustrate-status` --- ### 📝 Commits (1) - [`ab6a678`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ab6a6783fb6df4e7d8100caf50a9424db50bc659) Fix gallery illustrate status ### 📊 Changes **6 files changed** (+71 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/features/modes/conversation/components/ChatConversationSurface.tsx` (+1 -1) 📝 `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` (+1 -1) 📝 `src/features/modes/shared/chat-ui/components/ChatCommonOverlays.tsx` (+1 -1) 📝 `src/features/modes/shared/chat-ui/components/ChatGallery.tsx` (+65 -9) 📝 `src/features/modes/shared/chat-ui/components/ChatGalleryDrawer.tsx` (+1 -1) 📝 `src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts` (+2 -2) </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 <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #1230 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - The chat Gallery `Illustrate` action could fail prerequisites with only a transient toast and no persistent drawer feedback, and it stayed clickable while the async retry path was running. ## What changed <!-- List the key changes in this PR. --> - Makes the gallery `Illustrate` action await the async illustrator retry callback. - Shows an inline status while the illustrator path is checking chat/image settings. - Disables the action during the in-flight attempt to prevent repeated accidental clicks. - Keeps thrown failures, including `No LLM connection is configured`, visible inside the gallery drawer after the toast fades. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> Shared mode UI / chat gallery. Impact areas reviewed: - Conversation and roleplay surfaces that pass the shared gallery `onIllustrate` callback. - Shared chat overlays and drawer callback typing. - Runtime generation retry path remains unchanged; this PR only exposes its async pending/failure state in UI. Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - No engine, shared API, Rust, storage, schema, dependency, or remote-runtime contract changes. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - Shared mode UI: `ChatGallery`, `ChatGalleryDrawer`, `ChatCommonOverlays`. - Conversation and roleplay surface prop types only. ## 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 Codex-run proof, with checkboxes intentionally left for a human contributor: - `node scratch\issue-1230-gallery-illustrate-proof.mjs --before` reproduced the original bug: the button stayed enabled, no inline pending status appeared, and the missing LLM connection was only a toast. - `node scratch\issue-1230-gallery-illustrate-proof.mjs --after` verified the fixed path: pending state appears, the button disables during the async prerequisite check, `No LLM connection is configured` remains inline after failure, and the button re-enables for deliberate retry. - `pnpm typecheck` passed. - `pnpm check` passed: architecture, frontend typecheck, Rust `cargo check --manifest-path src-tauri/Cargo.toml --workspace`, and docs. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Bunny review passed before PR open: focused UI diff, proof covers the core issue, no blocking findings. ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app/runtime, step by step. If an AI agent filled this out, verify it yourself before ticking boxes. --> - No required human-only verification for the core claim. The Playwright proof used the real Vite app with a stubbed remote runtime returning one conversation, no gallery images, and no LLM connections. ## 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 metadata changes needed; this is a small visible UI feedback fix. ## UI evidence <!-- Add before/after screenshots or recordings for visible UI changes. --> Before, the action remains enabled with no inline status: ![Before: no inline gallery illustrate status](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/issue-evidence/issue-1230-gallery-illustrate-status/issue-1230-before.png) After, pending state disables the action: ![After: gallery illustrate pending state](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/issue-evidence/issue-1230-gallery-illustrate-status/issue-1230-after-pending.png) After, the missing LLM connection failure persists inline: ![After: gallery illustrate inline failure](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/issue-evidence/issue-1230-gallery-illustrate-status/issue-1230-after.png) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Illustration functionality now supports asynchronous operations, allowing longer-running tasks to complete properly. * **Improvements** * Illustration controls now display pending status while processing and show error messages on failure. * Illustration button is disabled during operation to prevent duplicate requests. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1295?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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-22 04:12:31 +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#5020
No description provided.