@@ -90,7 +90,7 @@ Decisions made during development that we'd like reviewed:
9090## User-defined segment boundaries
9191
9292Segments were previously fixed to verses (rebuilt from USJ on every load). Users can now define
93- their own segment boundaries: a ** Edit segment boundaries** view toggle exposes per-slot ** merge**
93+ their own segment boundaries: an ** Edit segment boundaries** view toggle exposes per-slot ** merge**
9494(combine a segment into the one before it) and ** split** (start a new segment at a token) controls,
9595and linking a phrase across a verse boundary pulls the adjacent segment's ** edge** token into the
9696focused segment (only the immediate adjacent-edge link buttons are active for this). Boundaries are
@@ -104,11 +104,16 @@ Decisions made during development that we'd like reviewed:
104104 scriptio continua (Chinese, Thai, …) and for cases where the USFM implied a different break.
105105 Should the separator be configurable per project/writing system, or derived from the source?
106106
107- 2 . ** Split-segment baseline display.** A segment created by splitting a verse currently keeps the
108- ** whole verse's** baseline text (token offsets unchanged; the invariant holds trivially). In the
109- baseline-text display mode this duplicates the verse text under each half. The alternative is to
110- trim each half's baseline to just its tokens' span (cleaner, but drops edge whitespace and
111- punctuation). Current choice: keep the full-verse baseline for simplicity and safety.
107+ 2 . ** Split-segment baseline display.** A segment created by splitting a verse currently keeps only
108+ the baseline text spanning ** its own tokens** — ` buildSegment ` slices the verse baseline from the
109+ first token's ` charStart ` to the last token's ` charEnd ` and shifts each token's offsets into the
110+ new string, so the ` baselineText.slice(charStart, charEnd) === surfaceText ` invariant still holds.
111+ The trade-off is that any whitespace or punctuation sitting between the split boundary and the
112+ adjacent token's edge is dropped from both halves (e.g. the space at position 5 between "Alpha"
113+ and "beta" in "Alpha beta." belongs to neither half). The alternative — keeping the whole verse's
114+ baseline text under each half — avoids dropping edge characters but duplicates the verse text in
115+ the baseline-text display mode. Current choice: trim each half to its own span, accepting the
116+ dropped edge whitespace.
112117
1131183 . ** Free translation when merging.** A segment's free translation is keyed by segment id. An
114119 untouched or merged segment keeps the ** leading** verse's id (so its free translation survives);
@@ -124,3 +129,23 @@ Decisions made during development that we'd like reviewed:
1241295 . ** Boundary editing is a transient mode.** The ** Edit segment boundaries** toggle is local UI
125130 state (off on reload), not a persisted project setting, since it changes what the link slots do
126131 rather than a display preference. Confirm this is the right treatment.
132+
133+ 6 . ** Chapter superscriptions are a hard wall (interim).** A chapter heading (a ` d ` descriptive
134+ title, e.g. a Psalm superscription) is extracted as a synthetic ** verse 0** segment that sits in
135+ document order between the previous chapter's last verse and the new chapter's verse 1. As an
136+ interim fix, verse 0 is treated as a ** hard wall** : no merge, split, move, or cross-segment link
137+ may touch either of its boundaries, so its tokens always stay together and no neighboring token
138+ is ever pulled into or across it. The cost is a lost capability — you ** cannot currently draw a
139+ segment boundary that spans a superscription** (e.g. group the end of one chapter with the start
140+ of the next when a heading sits between them). The stated goal is for verse 0 to be _ invisible_ to
141+ boundary redrawing (a redraw acts on the real verses on either side as if the superscription
142+ weren't there, while the heading stays its own intact segment), but that conflicts with the
143+ contiguous-run segment model and needs a design decision before implementation. Options and the
144+ recommendation are worked out in
145+ [ design-verse-0-agnostic-segmentation.md] ( design-verse-0-agnostic-segmentation.md ) . Two questions
146+ for stakeholders:
147+ - Is the hard wall acceptable as the shipped behavior for now, or is spanning-a-superscription a
148+ blocker that must be resolved before release?
149+ - When a segment _ does_ eventually absorb tokens across a superscription, ** where should the
150+ heading render and how should its free translation be handled?** (This parallels item 3 above —
151+ "Free translation when merging.")
0 commit comments