Discard unreadable books when the host starts a draft over

オープン
#573 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

Start by reading the host New and Open paths introduced by prerequisite issue #453, then inspect DraftRepository and its tests. Confirm that New and Open clear unreadableShards before writing, while opening a session remains load-only; add flag-on tests showing that no book remains unreadable and edits to it apply.

索引モデルが issue の本文から書いたものです。

説明

Part of Phase 4 (#427). Needs 4a (#453). Blocks 4b (#454).

Background

A draft book whose stored analysis can't be read (a torn write, or outside damage) is kept as stored and never written over (#475).

On the WebView write path:

  • An edit that reaches the book stays on screen, but writes leave that book out.
  • Save to an existing project is refused. Save As leaves the book out.
  • New and Open discard the book. This is how the user recovers.

That discard lives in whole-draft saveDraft, through replaceAll's discardUnreadable option. 4c deletes both.

On the host path:

  • apply refuses any edit that reaches such a book (#486).
  • A discard keeps the book's stored analysis and shows the book empty (#524).
  • Opening a session only loads; it never discards. This matches main, which discards only on saves that start the draft over.
  • 4a brings New and Open to the host, but doesn't cover this case.

So on the host path nothing gets the user out yet.

Scope

  • Host New and Open discard each unreadable book, so later writes treat it like any other book.
    • In DraftRepository today, this is clearing unreadableShards before the write.
  • Do it in whatever path 4a gives New and Open, not through replaceAll.
  • Opening a session stays load-only.

Why it blocks 4b

4b ships the host path by default. Without this issue, a user with an unreadable book has no way out on the default path, short of the rollback release.

Done when

  • With the flag on, New or Open on a draft with an unreadable book leaves no book unreadable, and edits that reach the book apply.
  • Tests cover this on the flag-on path.

Then

  • Remove "Books whose stored analysis can't be read" from 4c's body.
主要言語
TypeScript
スター
2
フォーク
0
平均マージ
1日 10時間
マージ済み PR(30日)
74

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sillsdev/interlinearizer-extension のほかの issue

sillsdev/interlinearizer-extension の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。