Skip to content

feat(dev): DS-H-07b shot.mjs motion, dpr and video - #1694

Merged
mergify[bot] merged 8 commits into
mainfrom
claude/ds-h-07b
Oct 18, 2026
Merged

mergify[bot] merged 8 commits into
mainfrom
claude/ds-h-07b

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Das Werkzeug shot.mjs kann jetzt für die Abnahme der Probe-Halle den Bewegungsmodus (Ruhig, Lebendig, Aus), die Bewegungsreduktion des Betriebssystems, 125-%- und 150-%-Skalierung, eine Wartezeit vor dem Bild und ein Video aufnehmen. Ohne die neuen Optionen sind Aufruf und Ausgabe genau wie vorher. Die eigentliche Abnahme (sechs Bilder, zwei Videos) läuft erst, wenn auch die Galerie-Seite (DS-H-07a) da ist.

Plan-ID: DS-H-07b

Report

Change (235 changed lines incl. tests, no seam): scripts/dev/shot.mjs, scripts/dev/shot.test.mjs, new fixture scripts/dev/fixtures/shot-motion.html, scripts/dev/README.md, one new PLAN row (DS-H-07b).

Options (all in --help; none existed before, --theme included):

  • --theme light|dark: only that scheme (default both).
  • --motion calm|lively|off: stores projecta.settings.motionMode before load (mirror of src/design/motion/motionMode.ts; calm removes the key); PNG name gets -<mode>. The report gets motionApplied (data-motion on <html> and the live prefers-reduced-motion match per scheme).
  • --reduced: with --motion, emulates OS reduced motion (reducedMotion: "reduce"), name gets -reduced.
  • --dpr <n> (0.5-4): deviceScaleFactor; PNG is n x 1440x900, name gets -dpr<n>.
  • --wait <ms> (0-60000): wait before the screenshot.
  • --video <s> (1-120): recordVideo per scheme, saved as <slug>-<scheme>.webm next to the PNGs; the file covers load time plus <s> seconds after the shot.
  • Bad values exit 2 (usage error), before any browser starts.

Design decision to check: the old script always emulates reduced motion. That stays when --motion is absent, so existing shots are unchanged. With --motion the emulation is no-preference (otherwise Lebendig would look like Aus because the OS setting wins in the app); --reduced switches it back. Hence --reduced alone changes nothing.

Red -> green: commit 9e721ed (tests only) was red at the merge base: node --test scripts/dev/shot.test.mjs fails 7 new tests (unknown options exit 2). Head: all green. bash scripts/ci/red-first.sh exit 0 (7 Test-First trailers, one per test; the unknown-values test passes on the base too and carries no trailer).

Evidence

  • node --test scripts/dev/shot.test.mjs scripts/lib/dev-shot.test.mjs exit 0, 17/17 pass.
  • bash scripts/ci/gates.sh lane prepush exit 0 (unmasked), worktree = this branch, HEAD b910f48.
  • Manual proof on the server: node scripts/dev/shot.mjs --route /fixture --fixture scripts/dev/fixtures/shot-motion.html --out <tmp> --theme light --motion lively --dpr 1.5 --video 3 exit 0. file on the PNG: PNG image data, 2160 x 1350 (= 1.5 x 1440x900). The webm starts with the EBML header; there is no ffprobe on the server, so Playwright's bundled ffmpeg -i gave Duration: 00:00:04.68 ... Video: vp8, 1440x900, 25 fps (3 s plus about 1.7 s load).

Architecture drift: none.

NICHT ABGEDECKT

  • Windows half: #[cfg(windows)] tests and a Windows run of the script; the Windows lane runs only in the merge queue.
  • No run against the real app or the gallery page (07a); the full acceptance set is Root's job after 07a and 07b merge.
  • The pixel-exactness at 125 %/150 % ("no blur") is not checked by the script; it needs a look at the real images.
  • No ffprobe on the server; the video duration was read via Playwright's ffmpeg.
  • The --wait test compares PNG bytes around a 1.2 s timer in the fixture, so it is timing-based (generous margin: wait 1.6 s).

Review: pending, Root commissions (tier B, one independent non-Anthropic reviewer). Author family: Anthropic.

🤖 Generated with Claude Code on the ProjectA server worker

Conflict resolution (18.10.)

  • Merged origin/main at f3fb146 (merge commit, no rebase, no force-push). Previous head: b910f48.
  • Files touched: docs/PLAN.md only (one conflict hunk: adjacent rows; kept the DS-H-07a row from main and this PR's DS-H-07b row, wording unchanged, each once).
  • New head SHA: 637e354 (git ls-remote matches).
  • npx vitest run src/design src/i18n: exit 0 (47 files, 248 tests)
  • npm run typecheck: exit 0
  • node scripts/contrast-check.mjs: exit 0
  • node scripts/plan-check.mjs --offline: exit 0
  • git diff origin/main...HEAD --stat: only this PR's 5 files (PLAN.md, scripts/dev/README.md, shot.mjs, shot.test.mjs, fixtures/shot-motion.html)
  • bash scripts/ci/gates.sh lane prepush: first run exit 1, only fe-test, two timeouts (Shell.test.tsx, renderBudget.test.tsx) at server load average ~49; both files pass alone (exit 0); --from fe-test lane prepush then exit 0 (fe-test, hq-test, denkraum, clippy, rust-suite green). Earlier gates were green in the first run.
  • Push: first attempt failed in the pre-push hook, the repeat exit 0.
  • NICHT ABGEDECKT: unchanged; the #[cfg(windows)] tests are not covered on Linux, the Windows lane runs in the merge queue.
  • Review: pending, Root checks the resolution delta.

Review round 1 (18.10.)

Reviewer: Codex gpt-6-astra (OpenAI), verdict "approve with conditions"; Root verified and accepted both findings. New head SHA: 0cbe3f2 (git ls-remote matches).

ID Source Severity Finding Disposition
R1694-F1 Codex review medium --theme dark --check-tab: the tab check ran only for the light scheme, so report.tab stayed null and the run exited 1 accepted. Red test 86aa62a (--theme dark supports --check-tab, exit 1 at that commit), fix 1155d56: the check runs on the first captured scheme
R1694-F2 Codex review medium --wait test did not prove the late change was captured (the fixture had a continuously rotating element) accepted, 2276a7d: static fixture with one delayed white-to-black background flip; the test reads the first PNG pixel and expects white without --wait and black with --wait 1600. 0cbe3f2 keeps the historical test name (red-first)

Size: git diff --shortstat origin/main...HEAD: 5 files, 253 insertions, 10 deletions = 263 changed lines (limit 400 for a review fix round).

Evidence (all in this worktree, exit codes unmasked)

  • node --test scripts/dev/shot.test.mjs scripts/lib/dev-shot.test.mjs: exit 0
  • bash scripts/ci/red-first.sh: exit 0 (the new test is red at the red commit, green at head)
  • npm run typecheck: exit 0
  • node scripts/contrast-check.mjs: exit 0
  • node scripts/plan-check.mjs --offline: exit 0
  • bash scripts/ci/gates.sh lane prepush: exit 0
  • Push: git push -u origin claude/ds-h-07b exit 0, verified with git ls-remote.

NICHT ABGEDECKT: unchanged; the #[cfg(windows)] tests and a Windows run of the script are not covered on Linux, the Windows lane runs in the merge queue. The --wait test is still timing-based (1.2 s timer in the fixture, wait 1.6 s), now with a pixel assertion.

Review: pending, Root checks the delta (tier B).

🤖 Generated with Claude Code on the ProjectA server worker

Root review disposition and acceptance (head 0cbe3f2)

Tier B (dev evidence tool scripts/dev/shot.mjs, no app runtime effect). Author family: Anthropic (Claude Sonnet server job). The reviews come from other families:

  • earlier free kilo runs (Cohere, Laguna) gave no verdict and do not count;
  • Codex gpt-6-astra (OpenAI), round 1 on b910f48, run by Root from the PC: "approve with conditions";
  • server Codex gpt-6.1-sol (OpenAI) on 637e354 (after the conflict merge): "request changes";
  • Codex gpt-6-astra delta review 637e354..0cbe3f2: "APPROVE", no findings.
ID Source Sev Finding Disposition
R1694-F1 / C1 Codex PC + server medium --theme dark --check-tab always failed (shot.mjs:167) Accepted; red test 86aa62a, fix 1155d56 (tab check on the first captured scheme); confirmed by the delta review
R1694-F2 / T1 Codex PC + server medium --wait test passed through a rotating fixture Accepted; static fixture + pixel assertion 2276a7d, test name kept 0cbe3f2; delta review confirms it is not vacuous
R1694-C2 server Codex medium --motion only sets the global mode; the gallery hall page reads its own mode from the hash (Gallery.tsx:94,102) Not a tool defect. The hash query ?page=hall&motion=…&set=… is the agreed DS-H-07a interface. Root's evidence run passes the mode in the route AND --motion/--reduced for the OS setting. Follow-up: document this in the shot usage text later.
R1694-P1 server Codex medium PLAN row not "Erledigt"; demands "Subscription + OpenRouter" reviews Rejected. No "Erledigt" before the merge (PLAN-CLEAN-5 / plan:sync flip it). Tier B needs one non-author review, and OpenRouter is not used.
R1694-P2 server Codex medium DS-H-07 / DS-H-07a rows stale Out of scope; PLAN-CLEAN-5

Conflict merge 637e354 checked by Root: the non-PLAN diff is identical to b910f48; PLAN has only the own row. Size: +253/-10 in 5 files.

Decision: accept. Bound to head 0cbe3f2; a later push voids it.

Cuarroc and others added 3 commits October 17, 2026 06:45
…ed, --dpr, --wait, --video

Failing first: shot.mjs does not know these options yet.

Test-First: scripts/dev/shot.test.mjs::--dpr 1.5 writes a png at 1.5x size with a dpr suffix
Test-First: scripts/dev/shot.test.mjs::--motion lively stores the motion mode before load
Test-First: scripts/dev/shot.test.mjs::--motion calm leaves the app without a stored motion mode
Test-First: scripts/dev/shot.test.mjs::--reduced emulates reduced motion
Test-First: scripts/dev/shot.test.mjs::--theme dark writes only the dark png
Test-First: scripts/dev/shot.test.mjs::--wait delays the screenshot until a late frame is visible
Test-First: scripts/dev/shot.test.mjs::--video writes a webm

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds --theme, --motion calm|lively|off (stored before load, mirror of
motionMode.ts), --reduced, --dpr, --wait and --video. Without the new
options, calls and output are unchanged.

Test-First: scripts/dev/shot.test.mjs::--dpr 1.5 writes a png at 1.5x size with a dpr suffix
Test-First: scripts/dev/shot.test.mjs::--motion lively stores the motion mode before load
Test-First: scripts/dev/shot.test.mjs::--motion calm leaves the app without a stored motion mode
Test-First: scripts/dev/shot.test.mjs::--reduced emulates reduced motion
Test-First: scripts/dev/shot.test.mjs::--theme dark writes only the dark png
Test-First: scripts/dev/shot.test.mjs::--wait delays the screenshot until a late frame is visible
Test-First: scripts/dev/shot.test.mjs::--video writes a webm

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No-Test: plan text only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Cuarroc

Cuarroc commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

BLOCKIERT (review, Root 07:22): two independent free review runs on head b910f48 gave no verdict — Cohere north-mini-code (kilo auto-rejected a tool call the model tried to run), Laguna s-2.1 (empty answer). Per the review gate neither counts. Resume condition: one valid non-Anthropic verdict on b910f48 (retry later when the lanes are quiet, or the Ollama pair after 2026-11-01). The package itself is complete (prepush exit 0, manual proof in the report).

@mergify

mergify Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@Cuarroc Dieser PR hat einen Konflikt mit main und kann nicht in die Merge-Queue. Bitte main hineinmergen (kein Rebase, kein Force-Push) und den Konflikt loesen; das Label conflict verschwindet danach von selbst.

@mergify mergify Bot added the conflict label Oct 17, 2026
Conflict resolution only: docs/PLAN.md keeps the DS-H-07a row from main
and the DS-H-07b row of this PR.

No-Test: merge of main, conflict resolution only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mergify mergify Bot removed the conflict label Oct 18, 2026
Cuarroc and others added 4 commits October 18, 2026 19:08
Review R1694-F1: the tab check ran only for the light scheme, so a dark-only
run left report.tab null and exited 1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…scheme

Review R1694-F1: with --theme dark the check was skipped and the run failed.

Test-First: scripts/dev/shot.test.mjs::--theme dark supports --check-tab

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…c fixture

Review R1694-F2: the fixture had a continuously rotating element, so differing
PNG bytes did not prove the late change was captured. The fixture is now static
with one delayed background flip; the test reads the first pixel with and
without --wait.

No-Test: adds coverage for existing behaviour (review R1694-F2)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The earlier Test-First trailer names this test; the rename broke red-first.

No-Test: test rename only, behaviour unchanged

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 18, 2026 17:46
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 18, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T17:49:07.481439Z 0cbe3f2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Cuarroc

Cuarroc commented Oct 18, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

queue

☑️ This pull request is already queued

@Cuarroc

Cuarroc commented Oct 18, 2026

Copy link
Copy Markdown
Owner Author

Root auto-queue: head 0cbe3f2 unchanged since review-ok, all checks green. @Mergifyio queue

@mergify
mergify Bot merged commit 3d9abbe into main Oct 18, 2026
25 checks passed
@mergify

mergify Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 14 minutes 16 seconds in the queue, including 13 minutes 44 seconds running CI.

Required conditions to merge
  • check-success = gates (linux)
  • check-success = gates (windows)
  • check-success = red-first
  • github-review-approved [🛡 GitHub repository ruleset rule main-pr-required-checks]
  • label != do-not-merge
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (linux)
    • check-neutral = @github-actions/gates (linux)
    • check-skipped = @github-actions/gates (linux)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/gates (windows)
    • check-neutral = @github-actions/gates (windows)
    • check-skipped = @github-actions/gates (windows)
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-success = @github-actions/red-first
    • check-neutral = @github-actions/red-first
    • check-skipped = @github-actions/red-first
  • any of [🛡 GitHub repository ruleset rule main-pr-required-checks]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

@mergify
mergify Bot deleted the claude/ds-h-07b branch October 18, 2026 18:12
@mergify mergify Bot removed the queued label Oct 18, 2026
Cuarroc added a commit that referenced this pull request Oct 18, 2026
Conflict in docs/PLAN.md resolved by keeping this PR's rows and taking the
new DS-H-07b row from main unchanged.

No-Test: merge of main, conflict resolution only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cuarroc added a commit that referenced this pull request Oct 18, 2026
…d rows

Keep both sides of docs/PLAN.md; set DS-X-28 (#1704), DS-H-07b (#1694) and
DS-X-32 (#1702) to Erledigt, update the DS-H-07 parent status and the user
section (R1708-P3, R1708-P4).

No-Test: plan text only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant