GRI-2133: render in-slide build steps, flag unsupported effects #296

Merged
vivy merged 3 commits from feature/GRI-2133-pptx-object-animations into dev 2026-11-17 02:10:55 +00:00
Member

What

forge #197: "PowerPoint: play animations inside slides (object animations)".
Implements against both acceptance tests landed on GRI-2156/dev:

  1. a_deck_with_object_animations_shows_its_build_steps_over_time
    (crates/server/src/pptx_video.rs, ignored — needs real
    soffice/pdftoppm/ffmpeg, not installed on this dev box).
  2. the_189_upload_note_is_removed_only_for_a_fully_supported_deck
    (crates/server/tests/pptx_video_acceptance_integration.rs, now
    unignored — runs with the fake soffice/pdftoppm/ffmpeg trio, passes).

How

  • Each visible slide's <p:timing> tree is parsed into an ordered list of
    click effects (ClickEffect): Entrance/Exit/Emphasis/Path, or
    Unsupported { tag } for anything this cannot render (a presetClass="media"
    Play Sound/Video trigger, an unrecognised presetClass, or a motion path
    that isn't a straight line).
  • A slide with 2+ build steps gets rendered as N extra frames instead of
    one: for each step, the whole .pptx is copied with that slide's XML
    rewritten (entering/exited shapes removed, an unplayed motion path's
    shape shifted back to its pre-move position) and every other slide
    forced show="0", then run through the existing
    render_fallback_pages (soffice/pdftoppm) pipeline to get one PNG.
    Timeline is generalised (build_expanded) to splice these frames into
    the ffmpeg xfade join: hard cuts between build-step frames of the same
    slide, the normal transition only at slide boundaries.
  • join_slides_into_mp4 now returns Result<Vec<String>, PptxVideoError>
    — the deck-level unsupported-effect tags (empty when every effect in the
    deck is one this module draws) — instead of Result<(), _>.
  • New MediaView.unsupported_effects: Option<Vec<String>>, backed by a new
    media.unsupported_effects text[] column (migration 0013), set from
    join_slides_into_mp4's return value via resolve_pending_as_video.
    The client keys the #189 "animations are not shown" note on this field —
    contract agreed with Astraea on GRI-2156/forge #197 comment 14410.

Known limitation

Emphasis effects (colour/size changes) are recognised (count toward
step_count, not tagged unsupported) but not drawn — a <p:by> relative
colour shift has no absolute end value in the XML to render without
re-implementing PowerPoint's own colour math. Documented on ClickEffect::Emphasis.

Test plan

  • cargo test -p server --lib pptx_video — 43 passed, 2 ignored (one
    pre-existing real-tool test, one newly-relevant real-tool test this
    dev box cannot run — no poppler-utils installed here).
  • cargo test -p server --test pptx_video_acceptance_integration — 7
    passed, including the newly-unignored the_189_upload_note_… test.
  • cargo test -p server --test media_acceptance_integration — 6
    passed, 1 pre-existing ignore (poppler-utils).
  • cargo clippy --workspace --all-targets --locked -- -D warnings — clean.
  • cargo fmt --check — clean.
  • ./scripts/local-gates.sh --rust-only — every gate passed.
## What forge #197: "PowerPoint: play animations inside slides (object animations)". Implements against both acceptance tests landed on GRI-2156/dev: 1. `a_deck_with_object_animations_shows_its_build_steps_over_time` (`crates/server/src/pptx_video.rs`, ignored — needs real soffice/pdftoppm/ffmpeg, not installed on this dev box). 2. `the_189_upload_note_is_removed_only_for_a_fully_supported_deck` (`crates/server/tests/pptx_video_acceptance_integration.rs`, now unignored — runs with the fake soffice/pdftoppm/ffmpeg trio, passes). ## How - Each visible slide's `<p:timing>` tree is parsed into an ordered list of click effects (`ClickEffect`): `Entrance`/`Exit`/`Emphasis`/`Path`, or `Unsupported { tag }` for anything this cannot render (a `presetClass="media"` Play Sound/Video trigger, an unrecognised `presetClass`, or a motion path that isn't a straight line). - A slide with 2+ build steps gets rendered as N extra frames instead of one: for each step, the whole `.pptx` is copied with that slide's XML rewritten (entering/exited shapes removed, an unplayed motion path's shape shifted back to its pre-move position) and every *other* slide forced `show="0"`, then run through the existing `render_fallback_pages` (`soffice`/`pdftoppm`) pipeline to get one PNG. `Timeline` is generalised (`build_expanded`) to splice these frames into the `ffmpeg xfade` join: hard cuts between build-step frames of the same slide, the normal transition only at slide boundaries. - `join_slides_into_mp4` now returns `Result<Vec<String>, PptxVideoError>` — the deck-level unsupported-effect tags (empty when every effect in the deck is one this module draws) — instead of `Result<(), _>`. - New `MediaView.unsupported_effects: Option<Vec<String>>`, backed by a new `media.unsupported_effects text[]` column (migration 0013), set from `join_slides_into_mp4`'s return value via `resolve_pending_as_video`. The client keys the #189 "animations are not shown" note on this field — contract agreed with Astraea on GRI-2156/forge #197 comment 14410. ## Known limitation Emphasis effects (colour/size changes) are recognised (count toward `step_count`, not tagged unsupported) but not drawn — a `<p:by>` relative colour shift has no absolute end value in the XML to render without re-implementing PowerPoint's own colour math. Documented on `ClickEffect::Emphasis`. ## Test plan - [x] `cargo test -p server --lib pptx_video` — 43 passed, 2 ignored (one pre-existing real-tool test, one newly-relevant real-tool test this dev box cannot run — no poppler-utils installed here). - [x] `cargo test -p server --test pptx_video_acceptance_integration` — 7 passed, including the newly-unignored `the_189_upload_note_…` test. - [x] `cargo test -p server --test media_acceptance_integration` — 6 passed, 1 pre-existing ignore (poppler-utils). - [x] `cargo clippy --workspace --all-targets --locked -- -D warnings` — clean. - [x] `cargo fmt --check` — clean. - [x] `./scripts/local-gates.sh --rust-only` — every gate passed.
GRI-2133: render in-slide build steps as extra MP4 frames, flag unsupported effects
All checks were successful
CI / the pre-push hook (pull_request) Successful in 5s
CI / cargo fmt (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 12s
CI / cargo deny (pull_request) Successful in 20s
CI / cargo deny advisories (pull_request) Successful in 57s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 1m17s
CI / frontend-web (pull_request) Successful in 1m10s
CI / cargo test (pull_request) Successful in 4m0s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
2bcf973147
Forge #197: entrance, exit and emphasis effects, plus a straight-line
motion path, read from a slide's <p:timing> tree and rendered as extra
frames within that slide's own dwell time (option 1 from GRI-2043),
instead of the slide's single final-state image. An effect this cannot
draw (a Play Sound/Video trigger, a curved motion path, an unrecognised
presetClass) is collected into a deck-level tag list and returned from
join_slides_into_mp4, threaded through to a new MediaView.unsupported_effects
field the client keys the #189 upload note on.

Per GRI-2156's acceptance tests (now unignored, both merged into dev
before this): a_deck_with_object_animations_shows_its_build_steps_over_time
and the_189_upload_note_is_removed_only_for_a_fully_supported_deck.
vivy requested changes 2026-11-16 23:33:42 +00:00
Dismissed
vivy left a comment

Request changes — one blocking point, one follow-up.

Blocking: an emphasis effect is reported as supported, but it is not drawn.
ClickEffect::Emphasis counts toward step_count and returns no unsupported_tag, while render_stage_xml leaves the XML unchanged for it. So a deck whose only animations are emphasis effects (colour/size change) gets unsupported_effects = NULL, and the #189 "animations are not shown" note is removed — but the screen shows no animation at all. Worse, each emphasis step adds an extra frame that is identical to the one before, so the slide just holds longer.

The note exists to tell the uploader what the screen will not show. "Recognised but not drawn" is "not shown". Fix:

  • tag emphasis as unsupported (e.g. emphasis) until it is really drawn, and
  • do not make a build-step frame for it (no duplicate frame).
  • add a test: a deck with only an emphasis effect keeps the note.

Same rule for an Entrance/Exit/Path whose spid could not be read: it is left as is today without a tag. It should be tagged too (e.g. unsupported_effect), so the note stays.

Follow-up (not blocking this PR): nothing in frontend-web/src reads unsupported_effects yet, so the panel shows no note either way. Say on forge #197 who does the panel part, or add it here.

Otherwise: CI 7/7 green, up to date with dev, migration has a rollback. Good work on the expanded timeline.

Request changes — one blocking point, one follow-up. **Blocking: an emphasis effect is reported as supported, but it is not drawn.** `ClickEffect::Emphasis` counts toward `step_count` and returns no `unsupported_tag`, while `render_stage_xml` leaves the XML unchanged for it. So a deck whose only animations are emphasis effects (colour/size change) gets `unsupported_effects = NULL`, and the #189 "animations are not shown" note is removed — but the screen shows no animation at all. Worse, each emphasis step adds an extra frame that is identical to the one before, so the slide just holds longer. The note exists to tell the uploader what the screen will not show. "Recognised but not drawn" is "not shown". Fix: - tag emphasis as unsupported (e.g. `emphasis`) until it is really drawn, and - do not make a build-step frame for it (no duplicate frame). - add a test: a deck with only an emphasis effect keeps the note. Same rule for an Entrance/Exit/Path whose `spid` could not be read: it is left as is today without a tag. It should be tagged too (e.g. `unsupported_effect`), so the note stays. **Follow-up (not blocking this PR):** nothing in `frontend-web/src` reads `unsupported_effects` yet, so the panel shows no note either way. Say on forge #197 who does the panel part, or add it here. Otherwise: CI 7/7 green, up to date with `dev`, migration has a rollback. Good work on the expanded timeline.
Review #526 on PR #296: an emphasis is read but never drawn, so counting
it as supported removed the #189 note for a deck the screen does not
actually animate, and its no-op render duplicated the previous build-step
frame. Same gap for an entrance/exit/motion-path effect with no readable
spid. Both kinds now report an unsupported tag and are excluded from
step_count, so render_stage_xml only spends a frame on a click it can
actually draw.
Merge remote-tracking branch 'origin/dev' into feature/GRI-2133-pptx-object-animations
All checks were successful
CI / the pre-push hook (pull_request) Successful in 4s
CI / install.sh client upgrade (pull_request) Successful in 16s
CI / cargo fmt (pull_request) Successful in 7s
CI / cargo clippy (pull_request) Successful in 1m27s
CI / cargo deny (pull_request) Successful in 21s
CI / cargo deny advisories (pull_request) Successful in 23s
CI / repository boundary (pull_request) Successful in 5s
CI / frontend-web (pull_request) Successful in 1m15s
CI / cargo test (pull_request) Successful in 3m47s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
ecc0ca4698
vivy approved these changes 2026-11-17 02:10:52 +00:00
vivy left a comment

Review #526 is fixed in eee9453. An emphasis, and an entrance, exit or motion path with no readable spid, now report a tag and spend no frame. render_stage_xml counts only effects that render, so later clicks keep the right stage number. The tests cover the emphasis tag, the step count of 3 and the case with no spid. The head is up to date with dev, and the 7 required checks pass. Approved.

Review #526 is fixed in eee9453. An emphasis, and an entrance, exit or motion path with no readable spid, now report a tag and spend no frame. `render_stage_xml` counts only effects that render, so later clicks keep the right stage number. The tests cover the emphasis tag, the step count of 3 and the case with no spid. The head is up to date with dev, and the 7 required checks pass. Approved.
vivy merged commit e1cc06e1d1 into dev 2026-11-17 02:10:55 +00:00
vivy deleted branch feature/GRI-2133-pptx-object-animations 2026-11-17 02:10:56 +00:00
Author
Member

CI green again on ecc0ca46 after merging origin/dev (#297's no-emphasis fixture). All 11 checks pass, including both GRI-2156 acceptance tests. Review #526's fixes are included. Ready for another look.

CI green again on ecc0ca46 after merging origin/dev (#297's no-emphasis fixture). All 11 checks pass, including both GRI-2156 acceptance tests. Review #526's fixes are included. Ready for another look.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!296
No description provided.