Data layer: Backend behind the seam
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 28/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp, typescript
調査の方向性
Start with #584's C# repository and the existing seam, then read the suite's undo group and EditHistory for how undo and redo are currently exercised. The proposal leaves key design questions open, including Discard behavior and milestone scope. Done means a session runs on the C# repository behind a flag with undo and redo, while today's storage remains the default.
索引モデルが issue の本文から書いたものです。
説明
This is an evolving post-Phase-5 proposal, not final decisions.
WebView sees: Nothing. Releasable because: the C# repository runs only behind a flag; today's storage stays the default.
Proposed direction
The CRDT store would keep no drafts: every edit persists. Save would go away. Undo and redo would use the CRDT's own history. Discard would stay in some form, with bookkeeping outside the CRDT if needed.
Scope
Plug #584's C# repository in behind the seam. Whether this is Phase 7 of the Host-owned data layer milestone or opens the next milestone is open (below).
The C# repository passes the suite's required group (#597) with none of these settled. They matter once a session runs on it.
⚠️ Field-level changes (#642) and the revert built on them (#627) are the C# design worth settling early. Undo, redo, and Discard all build on them.
| Piece | What it takes | Where it stands | Side |
|---|---|---|---|
| Field-level changes (#642) | Send creates, field patches, and deletes instead of whole-record puts | Every apply replaces whole records today, so the later commit wins every field, a teammate's included | C# and TS |
| Undo and redo through the CRDT's history (#627) | Undo writes a new commit that sets back only the fields the edit changed, undeletes what it deleted, and brings back the links that went with it (#641). Undo can't reach past an incoming commit that touched its records | Harmony can't remove a commit, so a revert follows the same last-writer-wins rules as any edit. Open: whether undo overwrites a teammate's later change to the same field. FW Lite has no undo over Harmony to reuse | C# for the undelete; TS for EditHistory and the suite |
| Deletes that cascade (#641) | Have apply reply with what changed, cascades included |
#628 refuses local edits that would cascade. #597's project delete and synced commits still cascade with nothing reported | C# and TS |
Session open and discards without exportAll (#588) |
Read the scope record and a query instead of the whole draft | Matters once the backend is in C#, where the whole draft would cross PAPI. #597's readAll command is that read, for the conformance suite |
TS |
| Record timestamps (#630) | Keep what a put carries, as DraftRepository does; stamp the commit time, as #584 does; or both, with creates keeping their timestamps and field changes (#642) getting the commit time |
Undo would no longer need a put's timestamps; imports, and Save As if it survives, still rely on them. The suite's required group leaves timestamps out of its comparisons, and a DraftRepository test pins today's behavior |
Either: a small C# change, or TS changes to what relies on it |
| Scope record (boundaries, languages) (#629) | Map it onto #597's InterlinearProject entity, or stay in today's storage |
#597's entity carries the name, description, target project, analysis languages (added and removed by name), and one segmentation delta with no split by book. CSharpRepository still refuses a change set carrying the scope record |
TS for the mapping; C# if the entity's shape changes |
Also needed before a session runs on it:
- #618: settle which source ids can name a database file.
- #521: re-anchor tie-breaks stop depending on the order lookups return links in.
Done when:
- A session runs on the C# repository behind a flag, undo and redo included, with today's storage still the default.
- Sync (#256) is either settled, with where shared data lives and how it works with Send/Receive decided, or explicitly deferred: #256 moves off this issue to a later milestone, with a comment here saying so.
Before the C# repository becomes the default
| Question | Proposal | Why it waits |
|---|---|---|
| Discard | Revert this client's commits since a point, newest first, with their commit ids kept in host storage outside the CRDT | Needs the revert above, and the Discard point (open questions) |
| Save, Save As, the unsaved mark | Save would go. The unsaved mark could become "commits since the Discard point" | Follows from Discard; Save As is open |
| New | Would create the interlinear project at once (#597's createProject), since apply refuses a project its source's database doesn't store and there is no draft to hold work before it exists |
Follows from dropping drafts |
| Seam calls for drafts | Split AnalysisRepository so replaceAll, exportForCopy, markClean, and the unsaved mark sit apart from the store calls |
Follows from dropping drafts. CSharpRepository already throws on these |
Later
| Question | Options | Why it waits | When |
|---|---|---|---|
| Shared data and Send/Receive (#256) | Where shared interlinear data lives, and how it works with Send/Receive | Its answer shapes how the CRDT store syncs; the investigation waits on Phase 5 (#428) | Before sync ships |
| Re-anchor passes | Stored as commits, or derived on read | Only matters once two clients sync the same store | Before sync ships |
| Rules that span records (one approved link per word) | Resolve on read, as CountApprovals already does with PrefersLink, or at merge |
Only a merge can break them | Before sync ships |
| Shards for projects | Likely never needed | Only if drafts go away before the CRDT store replaces them | If at all |
| When data stops being disposable | Pick the moment on purpose | Once a shared, synced store ships, schema changes need migrations and the change-set shape gets much harder to change | Before the first synced store ships |
Open questions
- Where does Discard rewind to: session open, a marker the user sets, or the last sync? Does its list of commits survive a restart?
- Does Save As survive, as copying a project to a new one, or go with Save? A copy would mint new record ids, since #597 refuses a put under an id stored in another project.
- If Save survives in any form, is there an autosave setting, so work reaches the project without Save (from #119)? If every edit persists, this goes away.
- Does closing the Interlinear tab or Paratext warn about unsaved changes (from #284)? With no Save, there may be nothing to warn about.
- Should this be Phase 7 of the Host-owned data layer milestone, or open the next milestone? Its done-when goes past the current milestone's.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 0
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 105
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/interlinearizer-extension のほかの issue
-
Update menu items対応中かも @imnasnainaec が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
sillsdev/interlinearizer-extension#613 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sillsdev/interlinearizer-extension#548 ·
メンテナーはふだん 1 日以内に返信
-
Make it clear that a stale analysis is re-applied to a word chosen in the text対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sillsdev/interlinearizer-extension#537 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
sillsdev/interlinearizer-extension#515 ·
メンテナーはふだん 1 日以内に返信
-
Re-anchor a session's book when the view first opens it対応中かも @alex-rawlings-yyc が今日担当しました。 オープン
sillsdev/interlinearizer-extension#645 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
sillsdev/interlinearizer-extension の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
binding:python bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
coollabsio/orbit#72 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
bug needs-triage potential-regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws/aws-sdk-js-v3#8408 ·
メンテナーはふだん 1 日以内に返信