Skip to content

refactor(desktop): remove the e2e-only Daily Review archive store #3108

Closed

Description

@Astro-Han

Problem

Daily Review archives are owned by Runtime Host through openInteractiveDailyReviewAuthorityForWrite. That writer updates workflow_daily_review_state, workflow_daily_review_archives, and workflow_daily_review_authority_state.revision together.

Desktop still ships a second writer, apps/desktop/src/main/daily-review-archive-store.ts. It opens the same SQLite tables directly and does not touch the authority revision. Production Desktop does not use it. Preload / renderer read archives through Host daily-review.query.

The only consumer is the e2e fixture:

  • apps/desktop/src/main/e2e-fixture.ts (module-daily-review)
  • apps/desktop/src/main/e2e-fixture/scenarios-settings.ts (createDailyReviewArchiveStore → putArchive)

A test-only Desktop store that shares Host tables but not Host revision is a second write authority. It can seed rows the Host later reads without going through the owner that maintains revision.

Desired outcome

Desktop no longer owns a Daily Review store. The e2e fixture seeds archives through the existing storage / Host writer. Production Desktop remains a Host client.

Alternatives or workarounds

Keep the Desktop store so fixtures can write rows without starting a Host mutate. The storage authority already writes the same rows and is the natural test entrance.

Acceptance

  • apps/desktop/src/main/daily-review-archive-store.ts is removed
  • The module-daily-review fixture seeds through the storage Daily Review writer or a Host mutate, not a Desktop store
  • Production preload / renderer still read archives only through Host daily-review.query
  • Repo-wide search shows no Desktop writer of workflow_daily_review_*
  • Desktop build, typecheck, focused tests, and Biome pass

Non-goals

  • Changing Daily Review product behavior or Host protocol
  • Moving Daily Review ownership out of storage / Runtime Host
  • Redesigning the Daily Review UI

Related

  • Host / storage authority: packages/storage/src/daily-review-authority.ts
  • Production read path: apps/desktop/src/preload/preload.ts (daily-review.query)

Verified on main at eea5cd870.


This issue was identified during a simplification audit and prepared with AI assistance (Pi / grok-4.6). A human contributor reviewed the analysis and owns the submission.

Activity

  1. added
    enhancement
    on Aug 16, 2026
  2. 1625567290 commented on Aug 16, 2026

    @1625567290
    Contributor

    I'm working on this. I'll remove daily-review-archive-store.ts and seed the module-daily-review fixture through the storage Daily Review writer so Desktop stays a Host client.

    Grok is assisting with the implementation; I will review the change and remain the human contributor of record.

    简体中文对照

    我来处理。删除 daily-review-archive-store.ts,让 module-daily-review fixture 走 storage Daily Review writer,Desktop 只做 Host 客户端。

    Grok 协助实现;我会审阅改动,并作为 human contributor of record。

  3. added a commit that references this issue on Aug 16, 2026
    cdf023d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions