[PR #1955] [MERGED] Fix projected paged message reads #5356

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1955
Author: @cha1latte
Created: 6/2/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-1932-paged-message-projection


📝 Commits (1)

  • 939da67 Fix projected paged message reads

📊 Changes

3 files changed (+447 additions, -8 deletions)

View changed files

📝 src-tauri/crates/storage/src/lib.rs (+309 -4)
📝 src-tauri/src/commands/storage/commands/entities.rs (+136 -3)
📝 src-tauri/src/http_dispatch.rs (+2 -1)

📄 Description

Linked issue

Closes #1932

Why this change

  • Projected paged storage_list(messages) reads were taking the full-row page path before projection, so timeline/page reads could still parse heavy unrequested message payloads before narrowing the response.

What changed

  • Added a projected paged message reader for pretty message collection files.
  • Routed projected messages lists with filters.chatId and limit/before through the projected page reader while leaving full paged reads on the existing path.
  • Tightened pretty nested-object end detection so selected nested projections can skip deeper unrequested objects correctly.
  • Extended command and remote dispatch tests for projected paged message reads, cursor behavior, swipe materialization, and /api/invoke routing.

Refactor impact

Primary owner:

  • Rust storage

Impact areas reviewed:

  • Chat timeline paged message reads
  • Runtime/world-state projected message reads that use the same storage_list(messages) command shape
  • Remote runtime /api/invoke dispatch for storage_list
  • Existing full paged message reads

Boundary notes:

  • Product behavior remains in the Rust storage/command boundary.
  • Embedded Tauri and remote dispatch still share storage_list_inner.
  • No React, engine, schema, dependency, auth, prompt-pipeline, import/export, or UI changes.

Pressure points touched:

  • src-tauri/crates/storage/src/lib.rs
  • src-tauri/src/commands/storage/commands/entities.rs
  • src-tauri/src/http_dispatch.rs

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • cargo test --manifest-path src-tauri\Cargo.toml --lib storage_list_projected passed.
  • cargo test --manifest-path src-tauri\Cargo.toml -p marinara-storage list_messages_for_chat_page passed.
  • cargo test --manifest-path src-tauri\Cargo.toml --lib dispatch_storage_list_uses_projected_message_reads passed.
  • cargo check --manifest-path src-tauri\Cargo.toml passed.
  • pnpm check passed.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed locally.
  • No manual verification needed for the core claim; this is a non-UI storage read-path fix.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; no new user-discoverable feature or workflow.

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

  • N/A; this is a non-UI storage read-path fix.

🔄 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/1955 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1932-paged-message-projection` --- ### 📝 Commits (1) - [`939da67`](https://github.com/Pasta-Devs/Marinara-Engine/commit/939da679cd2e660271ed24f49538eff523f0facc) Fix projected paged message reads ### 📊 Changes **3 files changed** (+447 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/crates/storage/src/lib.rs` (+309 -4) 📝 `src-tauri/src/commands/storage/commands/entities.rs` (+136 -3) 📝 `src-tauri/src/http_dispatch.rs` (+2 -1) </details> ### 📄 Description ## Linked issue Closes #1932 ## Why this change - Projected paged `storage_list(messages)` reads were taking the full-row page path before projection, so timeline/page reads could still parse heavy unrequested message payloads before narrowing the response. ## What changed - Added a projected paged message reader for pretty message collection files. - Routed projected `messages` lists with `filters.chatId` and `limit`/`before` through the projected page reader while leaving full paged reads on the existing path. - Tightened pretty nested-object end detection so selected nested projections can skip deeper unrequested objects correctly. - Extended command and remote dispatch tests for projected paged message reads, cursor behavior, swipe materialization, and `/api/invoke` routing. ## Refactor impact Primary owner: - Rust storage Impact areas reviewed: - Chat timeline paged message reads - Runtime/world-state projected message reads that use the same `storage_list(messages)` command shape - Remote runtime `/api/invoke` dispatch for `storage_list` - Existing full paged message reads Boundary notes: - Product behavior remains in the Rust storage/command boundary. - Embedded Tauri and remote dispatch still share `storage_list_inner`. - No React, engine, schema, dependency, auth, prompt-pipeline, import/export, or UI changes. Pressure points touched: - `src-tauri/crates/storage/src/lib.rs` - `src-tauri/src/commands/storage/commands/entities.rs` - `src-tauri/src/http_dispatch.rs` ## Validation - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `cargo test --manifest-path src-tauri\Cargo.toml --lib storage_list_projected` passed. - `cargo test --manifest-path src-tauri\Cargo.toml -p marinara-storage list_messages_for_chat_page` passed. - `cargo test --manifest-path src-tauri\Cargo.toml --lib dispatch_storage_list_uses_projected_message_reads` passed. - `cargo check --manifest-path src-tauri\Cargo.toml` passed. - `pnpm check` passed. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed locally. - No manual verification needed for the core claim; this is a non-UI storage read-path fix. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; no new user-discoverable feature or workflow. ## 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 - N/A; this is a non-UI storage read-path fix. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:33 +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#5356
No description provided.