Skip to content

Test the real Tauri-to-daemon seam end-to-end #1499

Closed

Description

@malibio

Overview

The shipping app path is Svelte → TauriAdapter.invoke() → the Tauri command layer → gRPC/UDS → the daemon → libsql. There are ~104 Tauri commands and the e2e suite exercises none of that path — the existing e2e tests go through the dev-proxy (HTTP) path, and the "integration" test for Tauri commands is mock-on-mock (it asserts a vi.fn() returned what it was told to return).

Problem Statement

The path the shipping app actually uses is untested at every layer, and it is exactly the seam where the optimistic-vs-echo state races occur. Synchronous mock-adapter unit tests cannot reproduce an out-of-order daemon echo.

Proposed Solution

Extend DaemonTestHarness (which already spawns a real headless daemon + real SQLite in a temp dir) to drive the Tauri command layer end-to-end; replace the mock-on-mock test with a real seam test. Governed by ADR-048. Cover the priority flows: node CRUD round-trip; optimistic-edit-vs-echo race; indent/outdent + rapid-Enter ordering; ai-chat send→idle with a stub model; startup readiness + degraded state; model-download terminal state incl. cancel; cross-window hierarchy sync. Include a commits-per-edit assertion (type a word → exactly one UpdateNode, version +1).

Acceptance Criteria

  • DaemonTestHarness drives the Tauri command layer against a real headless daemon
  • The mock-on-mock Tauri-commands test is replaced with a real seam test
  • The priority flows above are covered
  • A commits-per-edit test asserts exactly one UpdateNode per coalesced edit
  • Runs headless in CI

Technical Specifications

Reference Files

  • packages/desktop-app/src/tests/e2e/*, daemon-harness.ts, tauri-commands.test.ts
  • Decision: ADR-048

Related Issues

Activity

  1. malibio commented on Jul 6, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 148 test files passed, 3963 tests passed.

  2. self-assigned this
    on Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions