[PR #1391] [MERGED] Fix summary popover settings #5060

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1391
Author: @Promansis
Created: 5/27/2026
Status: ✅ Merged
Merged: 5/27/2026
Merged by: @TheLonelyDevil9

Base: refactor ← Head: fix/issue-1362-summary-popover-settings


📝 Commits (1)

  • 1a76f63 Fix summary popover settings

📊 Changes

10 files changed (+589 additions, -95 deletions)

View changed files

📝 src/features/catalog/chats/hooks/use-chats.ts (+94 -12)
📝 src/features/modes/conversation/components/ConversationMessage.tsx (+77 -5)
📝 src/features/modes/roleplay/components/ChatRoleplaySurface.tsx (+6 -0)
📝 src/features/modes/shared/chat-ui/components/ChatMessage.tsx (+96 -22)
📝 src/features/modes/shared/chat-ui/components/SummaryPopover.tsx (+259 -53)
📝 src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts (+6 -1)
📝 src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts (+1 -1)
📝 src/shared/stores/ui.store.ts (+12 -0)
📝 src/shared/stores/ui/model.ts (+34 -0)
📝 src/shared/stores/ui/persistence.ts (+4 -1)

📄 Description

Linked issue

Closes #1362

Why this change

  • The chat summary popover needed persistent controls for choosing summary source, hiding summarized messages from AI context, and collapsing hidden messages without crossing conversation/roleplay boundaries.
  • Range summaries also need to use the full chat message count, not only the currently loaded paginated window, so selected ranges map to the intended message history.

What changed

  • Added persisted summary popover settings for source mode, context size, range bounds, hide-summarized behavior, and hidden-message collapse.
  • Extended manual summary generation to support explicit message ranges and to return summarized message IDs for optional bulk hiding.
  • Added hidden-message collapse controls to conversation and shared chat message UI.
  • Updated hidden-from-AI writes and reads to handle both hiddenFromAI and legacy hiddenFromAi.
  • Wired shared chat surface data to the existing chat message count query so range controls and message offsets use the full chat count.

Refactor impact

Primary owner:

shared mode UI, catalog chat hooks, shared UI store

Impact areas reviewed:

  • Conversation message rendering and hidden-message controls
  • Roleplay summary toolbar and shared chat message rendering
  • Shared chat surface count/offset consumers, including roleplay jump validation and game route loaded-vs-total checks
  • UI store persistence and migration for summary popover settings

Boundary notes:

  • Feature code continues to use catalog chat hooks and shared UI stores through existing feature/shared entrypoints.
  • No engine imports from React, Zustand, Tauri, shared API adapters, or feature internals were added.
  • No raw remote-runtime fetch or new raw feature-level Tauri call was added.

Pressure points touched:

  • shared mode UI
  • conversation message UI
  • roleplay surface summary button
  • shared UI store persistence

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

  • Agent-run verification completed: git diff --check, pnpm typecheck, pnpm check:architecture, and pnpm build.
  • pnpm build completed with existing Vite chunk/dynamic-import warnings.
  • Browser/Tauri manual verification was not completed.

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

UI evidence

Not captured.


🔄 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/1391 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 5/27/2026 **Status:** ✅ Merged **Merged:** 5/27/2026 **Merged by:** [@TheLonelyDevil9](https://github.com/TheLonelyDevil9) **Base:** `refactor` ← **Head:** `fix/issue-1362-summary-popover-settings` --- ### 📝 Commits (1) - [`1a76f63`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1a76f63afb88bbb703a249c4a5a2ecadf5976979) Fix summary popover settings ### 📊 Changes **10 files changed** (+589 additions, -95 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/chats/hooks/use-chats.ts` (+94 -12) 📝 `src/features/modes/conversation/components/ConversationMessage.tsx` (+77 -5) 📝 `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` (+6 -0) 📝 `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` (+96 -22) 📝 `src/features/modes/shared/chat-ui/components/SummaryPopover.tsx` (+259 -53) 📝 `src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts` (+6 -1) 📝 `src/features/modes/shared/chat-ui/hooks/use-chat-timeline-actions.ts` (+1 -1) 📝 `src/shared/stores/ui.store.ts` (+12 -0) 📝 `src/shared/stores/ui/model.ts` (+34 -0) 📝 `src/shared/stores/ui/persistence.ts` (+4 -1) </details> ### 📄 Description ## Linked issue Closes #1362 ## Why this change - The chat summary popover needed persistent controls for choosing summary source, hiding summarized messages from AI context, and collapsing hidden messages without crossing conversation/roleplay boundaries. - Range summaries also need to use the full chat message count, not only the currently loaded paginated window, so selected ranges map to the intended message history. ## What changed - Added persisted summary popover settings for source mode, context size, range bounds, hide-summarized behavior, and hidden-message collapse. - Extended manual summary generation to support explicit message ranges and to return summarized message IDs for optional bulk hiding. - Added hidden-message collapse controls to conversation and shared chat message UI. - Updated hidden-from-AI writes and reads to handle both `hiddenFromAI` and legacy `hiddenFromAi`. - Wired shared chat surface data to the existing chat message count query so range controls and message offsets use the full chat count. ## Refactor impact Primary owner: shared mode UI, catalog chat hooks, shared UI store Impact areas reviewed: - Conversation message rendering and hidden-message controls - Roleplay summary toolbar and shared chat message rendering - Shared chat surface count/offset consumers, including roleplay jump validation and game route loaded-vs-total checks - UI store persistence and migration for summary popover settings Boundary notes: - Feature code continues to use catalog chat hooks and shared UI stores through existing feature/shared entrypoints. - No engine imports from React, Zustand, Tauri, shared API adapters, or feature internals were added. - No raw remote-runtime fetch or new raw feature-level Tauri call was added. Pressure points touched: - shared mode UI - conversation message UI - roleplay surface summary button - shared UI store persistence ## Validation - [x] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `pnpm check:docs` passes locally - [x] `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 - Agent-run verification completed: `git diff --check`, `pnpm typecheck`, `pnpm check:architecture`, and `pnpm build`. - `pnpm build` completed with existing Vite chunk/dynamic-import warnings. - Browser/Tauri manual verification was not completed. ## 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 ## UI evidence Not captured. --- <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:51 +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#5060
No description provided.