Skip to content

feat: responsive image + theme signing + migrate CLI + CI refine + WP migration verification - #487

Merged
tayebmokni merged 4 commits into
mainfrom
feat/final-cleanup-misc
May 26, 2026
Merged

feat: responsive image + theme signing + migrate CLI + CI refine + WP migration verification#487
tayebmokni merged 4 commits into
mainfrom
feat/final-cleanup-misc

Conversation

@tayebmokni

Copy link
Copy Markdown
Contributor

Closes #47, #139, #174, #192, #199, #231, #254.

Summary

Test plan

  • apps/web typecheck passes
  • vitest run responsive-image — 12 / 12 pass
  • go test ./migrate/ — pkgmigrate tests pass (To zero-target validation included)
  • go test ./cli/gonext/cmd/migrate/ — CLI tests pass (to-subcommand validation included)
  • python3 -c 'import yaml; yaml.safe_load(...)' on both workflow files
  • CI runs both workflows on this PR

tib0o0o and others added 4 commits May 26, 2026 23:48
Renders a `<picture>` with one `<source>` per format (AVIF first, then
WebP, then JPEG/PNG fallbacks) and a fallback `<img>` so capable
browsers pick the modern format while older clients fall through.

Pairs with packages/go/media/imageproc/srcset.go on the server side —
accepts the same wire shape (PictureSource = { srcset, type }) that
the media API emits alongside the canonical src.

Two ergonomic call sites:
  - sources={variants}  - full payload from the API
  - widths={[256,1024]} - convenience for migrators (synthesises a
    `?w=N` srcset)

Defaults to loading=lazy + decoding=async; priority flips both for
above-the-fold paints. Includes width/height passthrough so the
browser can reserve the layout space and avoid CLS.

Closes #47

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
New .github/workflows/theme-publish.yml mirrors the plugin signing
flow from #130. On a tag push of `theme/<slug>/vX.Y.Z` the workflow
builds a zipped theme bundle, signs it with cosign keyless (Fulcio
OIDC binds the signature to the workflow's identity), and attaches
the bundle + signature + cert chain to the GitHub release.

Themes are simpler than plugins — no WASM, no capability surface to
diff — so the pipeline is leaner, but the chain of trust is identical:
operators verify with `cosign verify-blob` against the workflow OIDC
issuer before installing.

Closes #139

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
The remaining migrate CLI subcommand from #231. `up`, `down`,
`status`, `wp`, `verify`, and `replacements` were already in place;
this adds a `to <version>` command that migrates up or down to reach
a specific schema version (matching the migration filename prefix).

Implementation:
  - packages/go/migrate.To(ctx, cfg, logger, target) wraps
    migrate.Migrate(target) under the same advisory lock used by
    Run/Down/Status so concurrent boots from multiple replicas
    serialise correctly.
  - target=0 is rejected — to roll back ALL migrations, use
    `migrate down 0` where the destructive intent is explicit.
  - CLI parses the positional arg as a non-zero positive integer
    (matches the NNNNNN_*.{up,down}.sql filename convention).

Tests cover the validation surface (zero target, missing arg, extra
args, non-numeric input) at both the package and CLI layers.

Closes #231

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
Refine the CI workflow per #254. Path-filter granularity was already
in place (the changes job at the top scopes go/web/docs/dashboards/
openapi to relevant subtrees); this builds on that with:

  - **Test sharding**: split go test into 2 shards by partitioning
    the workspace's first-party modules deterministically across two
    runners. Sharding by module (not by test) keeps the per-shard
    setup cost amortised — each shard syncs the workspace once.

  - **Coverage gate**: each shard writes per-module atomic-mode
    coverage profiles; a follow-up `test-go-coverage` job downloads
    them, merges into a single profile, and fails the build if the
    project-wide total drops below 80%.

The coverage gate is `continue-on-error: true` so it doesn't block PRs
while the codebase catches up to the threshold — same pattern as
`bundle-budget`. A follow-up issue will flip it to required on the
branch protection rule once we're consistently green.

Closes #254

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Tayeb Mokni <tayeb.mokni@gmail.com>
@tayebmokni
tayebmokni enabled auto-merge (squash) May 26, 2026 21:52
@tayebmokni
tayebmokni merged commit 82c2365 into main May 26, 2026
12 of 17 checks passed
@tayebmokni
tayebmokni deleted the feat/final-cleanup-misc branch May 26, 2026 21:53
This was referenced May 26, 2026
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.

Responsive image helper (<picture> + srcset)

2 participants