Skip to content

Add catalog-wide edits, unsaved-change discards and previewRemovals #448

Closed

Description

@imnasnainaec

Part of Phase 3 (#426) of the data layer plan.

Catalog-wide edits, including the analysis-keyed writeAnalysisMorphemes and confirmAnalysisMorphemes, and unsaved-change discards, with parity tests; an unsaved-change discard's reply carries hasFreeTranslations beside the ChangeSet; previewRemovals.

Done when: its commands, writeAnalysisMorphemes and confirmAnalysisMorphemes included, pass their parity tests, an unsaved-change discard's reply gives hasFreeTranslations as main computes it, and previewRemovals names the records useGlossClearReclaims and useStaleLocationReclaims do.

Depends on: 3d (#443), 3h (#447).

From the plan

API

Call Kind Request Response Replaces today Issue
Commands by intent (writeGloss, approveAnalysisForToken, createPhrase, ...) command session, intent arguments ChangeSet, plus touched pool buckets Dispatch plus whole-draft saveDraft 3d to 3i
previewRemovals query session, a command by intent with its arguments Ids of the records the command would remove useGlossClearReclaims, useStaleLocationReclaims 3i

Cross-book answers

Answer Today Planned Freshness Issue
Records a write drops Runs the reducer on a copy of the store previewRemovals in the host On demand 3i
hasFreeTranslations Scans every segment analysis Returned by openSession, and beside the ChangeSet in an unsaved-change discard's reply; recomputed on New, Open and both unsaved-change discards, as on main At session open and after an unsaved-change discard 3a, 3i

Activity

  1. imnasnainaec commented on Oct 21, 2026

    @imnasnainaec
    ContributorAuthor

    ⛏️ Decide whether a host wipe releases a draft book whose stored analysis can't be read. Since #475, a WebView wipe doesn't: the shard stays until New or Open. Parity tests should pin whichever is chosen.

  2. alex-rawlings-yyc commented on Oct 23, 2026

    @alex-rawlings-yyc
    Contributor

    From #486: a wipe through apply keeps the shard of a book whose stored analysis couldn't be read. That book loads as empty, so the wipe has none of its records to delete and apply doesn't refuse it; the shard stays as stored, as on the WebView path since #475. apply can't clear such a book; only a save that starts the draft over (discardUnreadable) can.

  3. alex-rawlings-yyc commented on Oct 26, 2026

    @alex-rawlings-yyc
    Contributor

    Two Phase 3 PRs leave reducers for 3i that this issue doesn't name:

    #511 exports reclaimIfUnlinked from tokenCommands.ts for reuse.

    I suggest adding both to the scope line and "Done when", so #426's "every reducer ... has a command" stays checkable from here.

  4. changed the title [-][3i] Add catalog-wide edits, wipes and previewRemovals[/-] [+]Add catalog-wide edits, unsaved-change discards and previewRemovals[/+] on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions