Skip to content

Consolidate api::types and models type duplication #11

@dmwyatt

Description

@dmwyatt

Overview

The codebase has ~14 parallel type definitions across src/api/types.rs and src/models.rs that are nearly identical, with SQLite acting as an implicit mapping layer between them. This creates maintenance burden, bugs (see PR #124), and no meaningful abstraction.

See #126 for the full investigation and detailed type inventory.

Strategy

Three incremental PRs, each independently valuable:

  1. Dead code cleanup + fix under-specified API types (size: S) — Remove always-None fields, add explicit fields to TranscriptUtterance and RecipeConfig, kill extra.get() hacks
  2. Type consolidation (size: M) — Merge ~14 type pairs into one set of domain types. Cleaner after step 1 since API types will already be properly specified
  3. Explicit storage layer (size: S) — Make transformations (TipTap → markdown, chat_url extraction) more visible as storage-layer concerns

Sub-issues

  • #126 — Investigation (complete)
  • #230 — Step 1: Clean up dead fields and fix under-specified API types
  • #231 — Step 2: Consolidate to single set of domain types
  • #232 — Step 3: Make storage layer transformations explicit

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio: p2Medium priority, normal queuesize: lLarge, multiple daysstatus: readyReady to be worked ontype: choreMaintenance, refactoring, dependencies

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions