Preview: make the cursor sync line-aware (what each line creates/uses) + editor feedback #59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dogfooding the live preview (#53): it loads and roughly follows the cursor, but the sync feels coarse and semantically thin. Three related gaps, all pointing at the same missing capability — a line-aware preview that knows what the current source line does.
What's off
Step-granular, jumps. Sync maps the cursor line to the
steppanel it sits in (stepAtLineoverbeloch:edges[].span). Moving within a step does nothing; it only changes at step boundaries, so it feels like it jumps. Fine for the MVP, but coarse.No editor-side feedback. You only see the active step in the preview panel, not in the editor. A gutter marker / line decoration for the step (or construction) the preview is currently showing would close the loop.
The preview doesn't show what the current line creates or uses. This is the big one. On a line like
._pq1 = cross --(.d ._mb) --(.a .c)the preview gives no hint that this line creates._pq1and uses._mb. The construction selector is a single global list, and forcube-root.belit lists only.s— because:._mb,._pq1,._pq2,._rs1,._rs2,._mb,._mt) are filtered out ofbeloch:named_pointsbyfold_emit(is_temp);pq/vm/rsare all also creases, so the auxiliary-only overlay filter (correctly, for rendering) drops them;a/b/c/dare corners, also dropped.So the one surviving auxiliary construction is
.s. The auxiliary-only filter is right for what to draw (avoid double-drawing creases/corners), but "what does this line build/reference" is a different concern that should include temps, creases, and corners with their roles.Desired
A cursor-aware, line-level preview:
What it needs
beloch:edges[]have.span,.sources,.name; named bindings have spans. A per-line "creates/uses" index could be emitted (or derived).Deferred polish/enhancement, captured from the first dogfooding session. Relates to the live-preview slice (#53).