Skip to content

Fill the mock backend's gaps found in the UX review #785

Closed

Description

@EVWorth

The October UX review ran on the mock backend (src/dev/mock/, from #780). Each area hit a state it could not show.

Missing scenarios

  • Error injection. There is no way to make a command fail. Reviewers wrapped __TAURI_INTERNALS__.invoke by hand. A URL switch such as ?mock=connected&fail=get_foreign_keys,save_connection_profile would make every error state reviewable.
  • Connections:
    • a lost connection or failing health check (the red tab, "Lost — retrying (n)");
    • a wrong-password or timeout connect (the pool-timeout path);
    • a MariaDB server that connects;
    • a read-write production profile, needed for the production guard dialogs and the agent DDL checkbox.
  • Validation: save_connection_profile and test_connection accept ports outside 1–65535.
  • App state:
    • check_for_updates always reports up to date (no "update available", "downloading" or error);
    • keyring_available is always true and startup_problems is always empty.
  • Data:
    • fewer than 100 history entries, so paging can't be tested;
    • shop has no events;
    • the SQLite fixture has no view;
    • the Users tab is empty, so CreateUser, ChangePassword and EditUser can't be seen with data.
  • Agent:
    • no production or staging approval;
    • no schema-change, propose_edit or open_draft request;
    • no concurrent approvals;
    • no harness with installed: false;
    • no session with toolsAvailable: false.
  • Schema writes: the designer's ALTERs aren't reflected in later schema reads, so the refresh after Apply can't be checked. The mock also accepts invalid SQL such as CREATE TABLE orders ().
  • Timing: the first backup and import progress event arrives immediately, so the "no indicator before the first event" gap can't be seen.

Mock bugs

  • After a backup, the console fills with [TAURI] Couldn't find callback id …: progress events keep being emitted to listeners that were removed. The emitter should stop once the dialog unlistens or the job ends.
  • A restore against read-only production with "Stop on error" off reports partiallyApplied: true with 0 statements run.

Workflow

vite.config.ts only ignores src-tauri/** when watching. A script written into scripts/ while the dev server runs, such as a Playwright helper, triggers a full page reload, which wiped mid-turn agent states during the review. Add **/scripts/** to server.watch.ignored.

Activity

  1. added
    enhancement
    on Oct 21, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions