Skip to content

[P1][doc-drift] Streaming/event architecture described in ARCHITECTURE is not implemented #284

Closed

Description

@EVWorth

Context

ARCHITECTURE §5.2/§5.7 describe streaming query results and Tauri events: query_started, query_chunk, query_complete, query_error.

Problem

There is a single execute_query Tauri command that returns the full QueryResult after the query completes. No execute_stream, no chunk events, no progress events. A 1M-row result blocks in the JSON IPC payload until complete, defeating the design promise of streaming and likely OOMing the renderer.

Files

  • src-tauri/src/commands/mod.rs:157-181 (single execute_query)
  • src-tauri/crates/mas-core/src/query/executor.rs (blocking fetch_many)
  • src/lib/tauri-api.ts (only executeQuery wrapper)

Repro

Run SELECT * FROM large_table; on a 1M-row table — UI is unresponsive until the query returns full result, several seconds later.

Expected

Rows stream into the grid as they arrive, header info first, then row chunks via Tauri events. UI stays responsive.

Proposed fix

Scope L. Add execute_query_stream Tauri command emitting query_started / query_chunk / query_complete events with a handle. Frontend: resultStore accumulates chunks into the grid via the existing render path. Land test_large_result_set_streaming from TESTING_STRATEGY §4.

Acceptance

1M-row query streams chunks to the grid; renderer responsive throughout; total time ≤ 3s on test_db_large.

Needs human verify

Yes.

Activity

  1. added
    audit
    severity/p1
    kind/doc-drift
    area/editor
    on Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/editorauditkind/doc-driftseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions