You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix code-review findings across segmentation persistence and boundary
editing
Persistence: Open now loads a project's stored segmentation (validated)
into
the draft, and Save As / Overwrite send segmentationJson alongside the
analysis, so custom boundaries survive the full save/open loop instead
of
being silently wiped. markSynced compares both the analysis and
segmentation
snapshots, so a boundary edit made during a save round-trip keeps the
draft
dirty.
Boundary edits: the cross-segment pull anchors the moved boundary on the
next
word token (merging wholly when only trailing punctuation remains), so a
pull
can no longer strand a punctuation-only segment or record a punctuation
ref
in addedStarts. Former boundaries are exposed as a word-anchored map so
punct-initial verses show the restore tick and split back to the exact
default boundary. Boundary controls disable while a phrase mode is
active,
closing a path that could restore a phrase spanning two segments.
Segment window: an explicit segmentationVersion signal (threaded from
the
loader) replaces the verse-key inference, so a merge absorbing the
active
verse no longer flashes a recenter fade and a re-tokenized book
recenters
again.
Performance: the loader's book/formerBoundaries memos key on version
counters
(plus isDraftLoading for the initial load) instead of the draft
identity, so
gloss autosaves no longer re-run full-book resegmentation; the
not-mid-phrase
guard is a straddled-boundary set precomputed once per phrase-link
change,
replacing per-slot link scans and store subscriptions.
Cleanups: useBookIndexes owns segmentOrder/fullTokenOrder/wordRefByOrder
in
its single pass; autosaveDraft unifies the analysis/segmentation
autosave
pipelines; ContinuousView shares one holdCentered loop and reuses
commitPendingActiveSegment; saveAnalysis's command schema documents
segmentationJson; user-questions.md describes the shipped always-visible
boundary controls.
0 commit comments