Discard unreadable books when the host starts a draft over

Cerrado
#573 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
2
Forks
0
Merge medio
1 d 8 h
PR fusionados (30 d)
83

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sillsdev/interlinearizer-extension

Todos los issues de sillsdev/interlinearizer-extension

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.