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
{{ message }}
Repository navigation
t27f: text wrap for VF_TEXT nodes in vc_render_s #13280
Course lesson_01 (Refs #13251) has 13 text nodes at 375 px that overflow their column.
Head 26 px Bold: ~24 chars/line (331 px effective width at 375 px card). Body 16 px Regular: ~40 chars/line.
Examples: PREDICT_WHAT 101 chars needs 5 lines; EXPLAIN_CELLS 122 chars needs 4 lines.
vcf_overflow_count reports all 13 nodes overflow in the debug renderer.
Expected heights with wrapping: hook scene ~296 px (now 153 px clipped); predict ~444 px (now 245 px clipped).
Requirements
In vc_render_s, for VF_TEXT nodes: measure text width using vt_text_width_q8 per glyph.
When text_width > node_width (from VfLayout), split at word boundaries into lines.
Each line height: OF_STRIP_H / OF_EM rounded up. Heading 26 px -> 36 px line height (1.4x); body 16 px -> 24 px (1.5x).
Node keeps its single text string value; the painter determines line count at render time.
VfLayout node height must account for the number of lines (pre-compute in vf_layout or add a wrap pass).
Content width formula at 375 px: card_w - 2card_padding - 2pad_x = 331 px.
Success Criteria
vcf_overflow_count returns 0 for all 7 course lesson_01 scenes at 375 px.
All existing vf_card.t27 and vf_card_tok.t27 tests continue to pass.
A new test in vf_card.t27 covers wrap at 331 px for a 60-char string at 16 px Regular.
Evidence from the lesson 1 frames the owner rejected on 2026-11-14 (epic #13251).
Measured on the 7 after frames at 375 px:
Sheet of the style host, text overflow by scene (hook, visual, predict, poke, explain, transfer, prove): 2, 2, 2, 1, 3, 1, 2. 13 nodes in total.
Hook scene: the strip x 360..373, y 16..152, which is the right card padding beside the heading, has mean 35.8 of 255 and max 255. 0 is expected. Measured with ImageMagick on the P6 frame.
The same residue is in all 7 after frames. Ink in that strip starts at y 75, 40, 75, 57, 81, 99, 99.
Cause, read from the code: vc_render_s paints each text node as one unwrapped line that runs past the right edge of the node (x 359) to the viewport edge. The wrap pass of the lesson host clears only the node box before it redraws the wrapped lines, so the part of the single line to the right of the box stays in the frame.
Two fixes:
This issue as written: wrap inside vc_render_s, so no line is painted past the box. Removes the residue for every host and brings the overflow count to 0.
Stopgap in the lesson host: the wrap pass clears to the inner right edge of the card. Smaller, lesson only, and the overflow count stays above 0.
Request to the writer of the T27F card files: which fix do you take, and when? Default: if this issue has no claim comment by 2026-11-15 00:00 UTC, the course loop takes fix 1 in specs/t27f/vf_card.t27 :: fn vc_render_s as one pane task and one PR, and edits none of the contract, layout, snapshot, theme or lesson style host files.
Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.
Activity
gHashTag commentedon Nov 14, 2026
Evidence from the lesson 1 frames the owner rejected on 2026-11-14 (epic #13251).
Measured on the 7 after frames at 375 px:
Cause, read from the code:
vc_render_spaints each text node as one unwrapped line that runs past the right edge of the node (x 359) to the viewport edge. The wrap pass of the lesson host clears only the node box before it redraws the wrapped lines, so the part of the single line to the right of the box stays in the frame.Two fixes:
vc_render_s, so no line is painted past the box. Removes the residue for every host and brings the overflow count to 0.Request to the writer of the T27F card files: which fix do you take, and when? Default: if this issue has no claim comment by 2026-11-15 00:00 UTC, the course loop takes fix 1 in
specs/t27f/vf_card.t27 :: fn vc_render_sas one pane task and one PR, and edits none of the contract, layout, snapshot, theme or lesson style host files.gHashTag commentedon Nov 14, 2026
claimed by course-v2-loop, 2026-11-15T00:00:00Z
gHashTag commentedon Nov 17, 2026
Spec created: specs/t27f/text_wrap.t27 (typecheck OK, 1 test pass).
gHashTag commentedon Nov 17, 2026
Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.
gHashTag commentedon Nov 17, 2026
Spec exists and passes typecheck + tests. M7 milestone complete.