@@ -240,12 +240,20 @@ Remove the demo toggle (and these affordances' tuning) once the treatment is dec
240240## User-defined segment boundaries
241241
242242Segments were previously fixed to verses (rebuilt from USJ on every load). Users can now define
243- their own segment boundaries: an ** Edit segment boundaries** view toggle exposes per-slot ** merge**
244- (combine a segment into the one before it) and ** split** (start a new segment at a token) controls,
245- and linking a phrase across a verse boundary pulls the adjacent segment's ** edge** token into the
246- focused segment (only the immediate adjacent-edge link buttons are active for this). Boundaries are
247- stored as a delta from the default verse segmentation on the draft and carried to the project on
248- Save; discontiguous segments are not supported.
243+ their own segment boundaries, with no dedicated edit mode:
244+
245+ - Hovering the gap between two token groups reveals a ** split** control (start a new segment at
246+ the next token), or a ** merge** control when the gap is a segment boundary (combine the segment
247+ into the one before it — this appears in the continuous strip, where adjacent segments share a
248+ row).
249+ - In the segment list, an always-visible ** merge** button sits between adjacent segment rows.
250+ - Linking a phrase across a verse boundary pulls the adjacent segment's free ** edge** token into
251+ the focused segment (only the immediate adjacent-edge link buttons are active for this).
252+
253+ Boundaries are stored as a delta from the default verse segmentation on the draft and carried to
254+ the project on Save. The only structural rule is contiguity: a segment is a contiguous run of the
255+ book's tokens, so discontiguous segments are unrepresentable and only whole contiguous chunks can
256+ move between adjacent segments.
249257
250258Decisions made during development that we'd like reviewed:
251259
@@ -276,26 +284,35 @@ Decisions made during development that we'd like reviewed:
276284 draft dirty (lighting the tab ` ● ` ), exactly like a gloss edit. Confirm this is desired, or whether
277285 boundary edits should be treated differently from analysis edits.
278286
279- 5 . ** Boundary editing is a transient mode.** The ** Edit segment boundaries** toggle is local UI
280- state (off on reload), not a persisted project setting, since it changes what the link slots do
281- rather than a display preference. Confirm this is the right treatment.
282-
283- 6 . ** Chapter superscriptions are a hard wall (interim).** A chapter heading (a ` d ` descriptive
284- title, e.g. a Psalm superscription) is extracted as a synthetic ** verse 0** segment that sits in
285- document order between the previous chapter's last verse and the new chapter's verse 1. As an
286- interim fix, verse 0 is treated as a ** hard wall** : no merge, split, move, or cross-segment link
287- may touch either of its boundaries, so its tokens always stay together and no neighboring token
288- is ever pulled into or across it. The cost is a lost capability — you ** cannot currently draw a
289- segment boundary that spans a superscription** (e.g. group the end of one chapter with the start
290- of the next when a heading sits between them). The stated goal is for verse 0 to be _ invisible_ to
291- boundary redrawing (a redraw acts on the real verses on either side as if the superscription
292- weren't there, while the heading stays its own intact segment), but that conflicts with the
293- contiguous-run segment model and needs a design decision before implementation. Options and the
294- recommendation are worked out in
295- [ design-verse-0-agnostic-segmentation.md] ( design-verse-0-agnostic-segmentation.md ) . Two questions
296- for stakeholders:
297- - Is the hard wall acceptable as the shipped behavior for now, or is spanning-a-superscription a
298- blocker that must be resolved before release?
299- - When a segment _ does_ eventually absorb tokens across a superscription, ** where should the
300- heading render and how should its free translation be handled?** (This parallels item 3 above —
301- "Free translation when merging.")
287+ 5 . ** Boundary controls are always available (no edit mode).** There is no separate
288+ boundary-editing mode: the merge/split controls share the gaps with the phrase link icons,
289+ revealed on hover (and the segment list's between-row merge buttons are always visible). This
290+ keeps the UI simple but places a scissors one small icon away from a link button. Both actions
291+ are cheaply reversible (merge undoes split and vice versa, and boundary edits never harm
292+ phrases — see item 7). Two questions:
293+ - Is hover-reveal discoverable enough for the in-gap controls, or should they be always visible
294+ there too? (An always-visible variant is a small change; we can ship both behind a view toggle
295+ for field comparison if useful.)
296+ - Is the misclick risk (scissors next to link icon) acceptable in practice?
297+
298+ 6 . ** Chapter superscriptions are ordinary segments.** A chapter heading (a ` d ` descriptive title,
299+ e.g. a Psalm superscription) is extracted as a synthetic ** verse 0** segment that sits in
300+ document order between the previous chapter's last verse and the new chapter's verse 1. Verse 0
301+ participates in boundary editing like any other segment: it can be merged into the previous
302+ chapter's last verse, absorb the verse after it, or be split. This means a user can deliberately
303+ (or accidentally) fold a Psalm title into verse text; the edit is always reversible by splitting
304+ the heading back out. Two questions:
305+ - Is "heading merges like any verse" acceptable, or should merging a superscription warn or be
306+ prevented? (An earlier build treated verse 0 as a hard wall that no edit could touch; that
307+ protection was removed in favor of uniform, predictable behavior.)
308+ - When a heading is merged into a neighbor, its free translation follows the hide-and-restore
309+ behavior of item 3 — confirm that parallels hold for headings too.
310+
311+ 7 . ** Boundaries that would cut a phrase.** The stored model accepts any contiguous re-segmentation,
312+ including one that lands a boundary in the middle of an existing phrase; when that happens the
313+ straddled phrase is ** force-broken** — split at the boundary (a one-token side becomes a free
314+ token again). The token-chip views never offer such an edit (the split control hides and the
315+ cross-segment pull disables at boundaries that would cut a phrase), so today force-breaking can
316+ only be triggered by future surfaces that re-segment without showing phrases. Confirm that
317+ silent force-breaking (no confirmation prompt) is acceptable for those surfaces, given the
318+ alternative is a phrase spanning two segments, which the editing model forbids.
0 commit comments