Skip to content

fix(media): flow_diagram pads to 16:9 at native size, never downscales#2901

Merged
chubes4 merged 1 commit into
mainfrom
fix/flow-diagram-no-downscale
Jul 13, 2026
Merged

fix(media): flow_diagram pads to 16:9 at native size, never downscales#2901
chubes4 merged 1 commit into
mainfrom
fix/flow-diagram-no-downscale

Conversation

@chubes4

@chubes4 chubes4 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Follow-up to feat(media): flow_diagram renders 16:9 by default, scales to fit #2900. That change made flow_diagram fit a fixed 1200x675 canvas by downscaling the diagram, which cost resolution and shrank nodes.
  • This renders the diagram at native size and pads the canvas out to a 16:9 aspect ratio around it. Nothing is ever downscaled. A 4-node flow now produces ~1700x957 (crisp) instead of a shrunk 1200x675.
  • A named preset applies its aspect ratio at native content scale; explicit width/height grows to the content rather than clipping.

Why

A diagram has a natural size. Fitting an aspect ratio should pad around the content, not shrink it. Downscaling was the wrong default and made featured images softer than necessary.

Test plan

  • Smoke test updated: asserts the default is ~16:9 by aspect ratio, that content renders wider than 1200 (i.e. not downscaled), that a preset applies its ratio, and that an explicit small canvas grows to content without clipping. 17/17 pass locally on PHP 8.3.6.
  • Verified visually at native 1700x957.

The template was shrinking the diagram to fit a fixed 1200x675 canvas,
costing resolution and making nodes smaller than needed. It now renders
the diagram at full native size and pads the canvas out to a 16:9 aspect
ratio around it (a 4-node flow becomes ~1700x957). A named preset applies
its aspect ratio at native scale; explicit width/height grows to content
instead of clipping. No content is ever downscaled.

Smoke test updated to assert aspect ratio + native-size behavior.
@chubes4 chubes4 force-pushed the fix/flow-diagram-no-downscale branch from 779f9e6 to b3f9f15 Compare July 13, 2026 23:22
@homeboy-ci

homeboy-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine

Lint

review lint — passed

ℹ️ Full options: homeboy self docs commands/lint
Deep dive: homeboy review lint data-machine --changed-since b2db7dc

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-review-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-review-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/29292863685

Test

review test — passed

ℹ️ Auto-fix lint issues: homeboy refactor data-machine --from lint --write
ℹ️ Collect coverage: homeboy test data-machine --coverage
ℹ️ Save test baseline: homeboy test data-machine --baseline
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy self docs commands/test
Deep dive: homeboy review test data-machine --changed-since b2db7dc

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-review-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-review-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/29292863685

Audit

review audit — passed

  • audit — 45 finding(s)
  • Total: 45 finding(s)

Deep dive: homeboy review audit data-machine --changed-since b2db7dc

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-review-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-review-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/29292863685
Tooling versions
  • Homeboy CLI: homeboy 0.283.1+10b6335515eb+b3f9f153
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 3fed6017
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 33bcd47 into main Jul 13, 2026
5 checks passed
@chubes4 chubes4 deleted the fix/flow-diagram-no-downscale branch July 13, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant