Skip to content

feat(review): add a visible caption under each Visual/Scroll preview thumbnail - #6341

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
fix/visual-preview-image-downscale-caption
Jul 16, 2026
Merged

feat(review): add a visible caption under each Visual/Scroll preview thumbnail#6341
loopover-orb[bot] merged 1 commit into
mainfrom
fix/visual-preview-image-downscale-caption

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • The screenshot-table contract this bot enforces on contributors (see e.g. .claude/skills/metagraphed/SKILL.md's Phase B2 in JSONbored/metagraphed) requires "each image is a clickable thumbnail... with a one-line caption underneath." The bot's own Visual preview / Scroll preview tables never rendered one — the route/viewport/theme label existed only as an invisible alt attribute.
  • Adds a <br><sub>label</sub> line (the same label already used for alt) after each thumbnail, inside the same table cell (a literal newline would break the GFM table row). Purely additive to both buildBeforeAfterCollapsible and buildScrollPreviewCollapsible's cell() builders — every existing assertion about the <a>/<img> markup still matches unchanged.

This is one of two fixes for #6324; the image-downscaling half (the "before images are massive" file-size complaint) is a larger, separate change and will land in its own follow-up PR — this one alone doesn't fully resolve #6324, so it doesn't carry a closing keyword.

Test plan

  • All 25 pre-existing test/unit/visual-collapsible.test.ts assertions pass unchanged (the caption is purely additive)
  • 3 new tests: the caption renders visibly for both builders, and a dash (missing) cell emits no stray caption markup
  • Confirmed no other test file asserts on this markup shape
  • npm run typecheck clean
  • Full local npm run test:ci gate green

…thumbnail

Advances #6324

The screenshot-table contract this bot enforces on contributors (see e.g.
.claude/skills/metagraphed/SKILL.md's Phase B2 in JSONbored/metagraphed)
requires "each image is a clickable thumbnail... with a one-line caption
underneath". The bot's own Visual preview / Scroll preview tables never
rendered one -- the route/viewport/theme label existed only as an
invisible alt attribute.

Adds a <br><sub>label</sub> line (the same label already used for alt)
after each thumbnail, inside the same table cell (a literal newline would
break the GFM table row). Purely additive to both buildBeforeAfterCollapsible
and buildScrollPreviewCollapsible's cell() builders -- every existing
assertion about the <a>/<img> markup still matches unchanged.

This is one of two fixes for #6324; the image-downscaling half (the
"before images are massive" file-size complaint) is a separate, larger
change and will land in its own follow-up PR.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 16, 2026
@loopover-orb

loopover-orb Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-16 02:57:46 UTC

2 files · 1 AI reviewer · no blockers · readiness 88/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This adds a visible `<br><sub>label</sub>` caption under each thumbnail in both `buildBeforeAfterCollapsible` and `buildScrollPreviewCollapsible`, reusing the existing `attr()`-escaped label already used for the `alt` attribute, and is purely additive so pre-existing assertions on the `<a>`/`<img>` markup still match. The change correctly links to open issue #6324 (partial fix, explicitly not closing it), and the three new tests verify the visible caption renders for both builders and that the dash/missing case emits no stray `<br><sub>`.

Nits — 5 non-blocking
  • The doc comment in unified-comment-bridge.ts:458 is quite long (5 lines) for a one-line stylistic addition; could be trimmed to 1-2 lines since the rationale is already in the PR description.
  • Consider a shared helper for the `cell()` builder logic since it's now duplicated nearly identically across both functions, though this pre-dates this diff.
  • Consider extracting the common `<a>...<img>...</a><br><sub>...</sub>` cell template into a shared helper used by both `buildBeforeAfterCollapsible` and `buildScrollPreviewCollapsible` to avoid future drift between the two near-identical `cell()` functions.
  • test/unit/visual-collapsible.test.ts's new tests are well-scoped; consider also asserting the exact ordering (`<img>` before `<br><sub>`) rather than only substring containment, though current assertions are adequate.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6324
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 42 registered-repo PR(s), 34 merged, 443 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 42 PR(s), 443 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Partially addressed
The PR adds the visible one-line caption under each thumbnail (via <br><sub>label</sub>) matching the contributor contract, with tests covering desktop/mobile/scroll cells and confirming missing-cell markup is unaffected, but it explicitly does not address the image downscaling deliverable (real ~360-720px encode, separate thumb key, full-size link, hosted-mode parity) which is the other major hal

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 42 PR(s), 443 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Then work through the remaining 2 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 87ce263 into main Jul 16, 2026
15 checks passed
@loopover-orb
loopover-orb Bot deleted the fix/visual-preview-image-downscale-caption branch July 16, 2026 02:57
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.60%. Comparing base (f642d91) to head (29db944).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6341   +/-   ##
=======================================
  Coverage   95.60%   95.60%           
=======================================
  Files         597      597           
  Lines       47170    47170           
  Branches    15016    15016           
=======================================
  Hits        45098    45098           
  Misses       1290     1290           
  Partials      782      782           
Flag Coverage Δ
shard-1 43.98% <50.00%> (-0.18%) ⬇️
shard-2 36.78% <0.00%> (+0.39%) ⬆️
shard-3 32.30% <50.00%> (-0.15%) ⬇️
shard-4 34.40% <50.00%> (-0.17%) ⬇️
shard-5 31.80% <100.00%> (+0.02%) ⬆️
shard-6 45.29% <50.00%> (+0.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/review/unified-comment-bridge.ts 99.60% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Downscale display images and add visible captions to the Visual preview table

1 participant