Config-driven gate rule: require a before/after screenshot table on visual/frontend PRs
Problem. UI/visual PRs without before/after screenshots are unreviewable at a glance and waste review cycles. We want a PR that changes UI to be auto-closed (with a clear reason) unless it includes a proper before/after screenshot table. This must be config-driven and opt-in per repo (per our modular-not-hardcoded rule) — not special-cased for any one repo.
Proposed setting (.gittensory.yml + dashboard parity)
gate:
requireScreenshotTable:
enabled: true # default false
whenLabels: [frontend, visual] # only enforce when the PR carries one of these labels
whenPaths: ["apps/ui/**", "src/**/*.tsx"] # OR path-based trigger (either matches)
action: close # close | request-changes | comment
Detection (deterministic, no AI needed)
A PR "has a screenshot table" when its body contains a markdown table whose cells embed images ( or <img ...>), i.e. a | ... | table region with at least one image markup and at least one before + one after column/row marker. Reject when:
- the PR is in scope (label or path match) AND
- the body has no image-bearing markdown table, OR images are pasted outside any table (large inline images with no table), OR images are committed to the repo (added image files in the diff under the UI paths) rather than uploaded to the PR.
Action on violation
close: close the PR with a templated comment = the screenshot contract (the exact table template + rules) so the contributor can reopen/resubmit correctly.
- Make the templated reason itself config-driven (a
messages.screenshotContract override) so each repo can tune wording.
Interim (before the code feature ships)
The private per-repo review config on the VPS (/opt/gittensory/gittensory-config/JSONbored__metagraphed*/review/) is read live at review time — add the screenshot requirement to the review instructions there so the AI review at least flags non-compliant visual PRs immediately, while this deterministic auto-close rule is built.
Deliverables
maintainer-only. Requested for metagraphed-ui / the metagraphed monorepo (apps/ui), but must be generic.
Config-driven gate rule: require a before/after screenshot table on visual/frontend PRs
Problem. UI/visual PRs without before/after screenshots are unreviewable at a glance and waste review cycles. We want a PR that changes UI to be auto-closed (with a clear reason) unless it includes a proper before/after screenshot table. This must be config-driven and opt-in per repo (per our modular-not-hardcoded rule) — not special-cased for any one repo.
Proposed setting (
.gittensory.yml+ dashboard parity)Detection (deterministic, no AI needed)
A PR "has a screenshot table" when its body contains a markdown table whose cells embed images (
or<img ...>), i.e. a| ... |table region with at least one image markup and at least one before + one after column/row marker. Reject when:Action on violation
close: close the PR with a templated comment = the screenshot contract (the exact table template + rules) so the contributor can reopen/resubmit correctly.messages.screenshotContractoverride) so each repo can tune wording.Interim (before the code feature ships)
The private per-repo review config on the VPS (
/opt/gittensory/gittensory-config/JSONbored__metagraphed*/review/) is read live at review time — add the screenshot requirement to the review instructions there so the AI review at least flags non-compliant visual PRs immediately, while this deterministic auto-close rule is built.Deliverables
gate.requireScreenshotTableconfig (yml + dashboard) resolved in the config layer (yml > DB > default off)close/request-changes/commentaction + config-driven templated reasonmaintainer-only. Requested for metagraphed-ui / the metagraphed monorepo (
apps/ui), but must be generic.