Skip to content

Remove indexedDbStorage.ts #68

Description

@ForestMars

When the codebase moved to db.ts as the storage adapter with three structurally separated stores, the legacyindexedDbStorage.ts file was converted into a compatibility shim rather than deleted, because callers still depended on it.

The shim re-exports polyglotDb as db and wraps it in a thin class that preserves the old call surface (getChats, saveChat, deleteChat, listConversations, loadConversation). It exists purely to avoid updating callers.

We're getting rid of it because it serves no protocol purpose anymore. The shim's deleteChat calls polyglotDb.deleteResource(id) with one argument, which is the old signature that doesn't write a deletion record, exactly the bug the two-argument atomic deleteResource(id, record) was introduced to fix. Any caller going through the shim is bypassing Invariant 5 and Invariant 6 silently. Keeping it alive means keeping a path open that breaks the protocol every time it's used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions