Skip to content

fix: gallery alts truncate on dotted API paths + version example prompt - #68

Merged
TMHSDigital merged 2 commits into
mainfrom
fix/gallery-alt-dotted-paths
Jul 19, 2026
Merged

TMHSDigital merged 2 commits into
mainfrom
fix/gallery-alt-dotted-paths

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

  • fix: Gallery index card alt no longer uses teaches.split('.')[0], which truncated 14/21 cards mid-identifier (bmesh.ops, bpy.context, …). Sentence split is period-followed-by-whitespace with a 160-char cap; assert_alts_survive_dotted_paths fails the build if the legacy form returns.
  • Regenerated docs/gallery/index.html — verified all 14 previously truncated alts are full in the HTML (incl. uv-layer-grid → bmesh.ops.create_grid).
  • docs: Track docs/new-example-prompt.md (removed from .gitignore); pin contact-sheet calibration set to armature-bend, damped-track-aim, bmesh-gear; require reading generated HTML alt/callout after regen, not only JSON source.

Test plan

  • python scripts/build_gallery.py exits 0
  • All 14 dotted-path alts longer than first . and not equal to legacy split
  • Assert probe: monkeypatched legacy card_alt → SystemExit
  • CI validate / drift

Made with Cursor

TMHSDigital and others added 2 commits July 19, 2026 08:36
teaches.split('.')[0] cut every bpy-style first sentence at bmesh.ops /
bpy.context / mesh.color_attributes; split on period-plus-whitespace with a
length cap and assert the build rejects the legacy form.

Co-authored-by: Cursor <cursoragent@cursor.com>
…gate

Track the agent prompt in-repo (was gitignored), pin the calibration set to
armature-bend / damped-track-aim / bmesh-gear, and require reading generated
HTML alt and callout text — not only gallery.json — after regen.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 19, 2026
@TMHSDigital
TMHSDigital merged commit 68d6fde into main Jul 19, 2026
9 checks passed
@TMHSDigital
TMHSDigital deleted the fix/gallery-alt-dotted-paths branch July 19, 2026 12:38
TMHSDigital added a commit that referenced this pull request Nov 3, 2026
…ests

build_gallery.py was 1,918 lines, half of it CSS and JS in Python string
literals, with a hand-rolled Markdown renderer whose only check was the
regenerate-and-diff gate, which is circular: a generator bug ships with its
output (PR #68's truncated alts did). tests/test_build_gallery.py pins
first_sentence (dotted API paths, abbreviations), slugify (dedupe, reserved
ids), render_inline and inline_code escaping, md_to_html tables/headings/
lists, check_alts, and card alt text equal to the source alt (falsified by
reintroducing the #68 split: 3 failures).

GALLERY_CSS, INDEX_HEADJS, INDEX_JS and DETAIL_JS now live under
scripts/site/gallery/, extracted from their runtime values; the regenerated
docs/gallery is byte-identical and the script is 1,019 lines.

Closes #528

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpkeXRvikhJZSVGBFM91Dv
Signed-off-by: TM Hospitality Strategies <TMHospitalityStrategies@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant