fix(settings): improve clarity of picture-tag method label and warning (#1015)#1056
fix(settings): improve clarity of picture-tag method label and warning (#1015)#1056Miraeld wants to merge 27 commits into
Conversation
Ports the .aiassistant skill system from BackWPup Pro, adapted for Imagify's single-edition architecture: new imagify-architecture skill, parameterised issue-workflow scripts, knowledge graph builder (322 nodes, 239 symbols indexed from first run), AGENTS.md guardrails, and PHPCS compliance specs.
- Add .wp-env.json for Docker-based WordPress local environment - Add bin/dev-up.sh, bin/dev-down.sh, bin/dev-seed.sh lifecycle scripts - Add Tests/e2e/ with Playwright config, fixtures, page objects, and 5 spec files - Add .github/workflows/e2e.yml CI workflow with IMAGIFY_API_KEY secret support - Add .claude/agents/ qa-engineer and e2e-qa-tester sub-agents - Add docs/E2E_TESTING.md as canonical test architecture reference - Add AGENTS.md with project conventions for AI agents - Update .gitignore for E2E artifacts and local issue cache
Rename IMAGIFY_API_KEY to IMAGIFY_TESTS_API_KEY across all E2E scaffold files to match the secret already configured in the GitHub repository.
- Media library column: use actual key 'imagify_optimized_file' - Bulk button: use '#imagify-bulk-action' (text is "Imagif'em all", not "Optimize") - Bulk stats: use '.imagify-bulk-table' (always rendered) - Settings: rename optimization-level test (Imagify uses Lossless checkbox, not Normal/Aggressive/Ultra) and gate it + WebP test behind IMAGIFY_TESTS_API_KEY because those sections are hidden without a valid API key - Account: skip invalid-key test without IMAGIFY_TESTS_API_KEY (requires live API call to produce a bad-key rejection notice)
…tion
getByRole('button', { name: /save/i }) resolved to two elements ('Save
Changes' and 'Save & Go to Bulk Optimizer'), causing strict mode failures
in settings and account-connection specs. Use #submit instead.
On a fresh install, clicking the bulk optimize button triggers a SweetAlert2 confirmation modal (.imagify-before-bulk-infos) before launchAllProcesses() is called. The test was timing out waiting for .imagify-row-progress because the modal was never dismissed. Add startOptimization() to BulkOptimizationPage which handles the modal gracefully, then update the spec to use it.
Sources .env.local for API key, checks wp-env is up, auto-installs Playwright deps if missing. Passes all args through to playwright test so --headed, --ui, and spec patterns all work.
…eedback Imagify does not render a .notice-error on bad key submission. It renders an inline #imagify-check-api-container span without the imagify-valid class.
If the seed image failed to download (picsum.photos unreachable inside the container), there are no images to optimize and the progress bar never appears. Skip with a clear reason instead of timing out.
SweetAlert2 v6 uses .swal2-modal, v7+ uses .swal2-popup. The class-based selector was silently missing the modal. Use getByRole button name instead so the selector is version-agnostic.
…ulk test wp post meta delete only accepts one key at a time — passing multiple keys caused a silent failure. delete_post_meta_by_key() wipes a key across all posts in one call, no loop required.
…with e2e sections Merges chore/add-ai-assistant (coding guardrails, architecture rules, security, AI working protocol) with chore/e2e-setup (E2E testing §7, local dev §8 with test-e2e.sh, Playwright in tech stack). Also deduplicates /.TemporaryItems in .gitignore.
chore(e2e): scaffold Playwright E2E test infrastructure
…ude/agents Agents are not Claude Code-specific — any AI tool should be able to use them. The canonical location is now .aiassistant/agents/ alongside skills, specs, and the knowledge graph. .claude/agents is a symlink so Claude Code sub-agent discovery still works without maintaining a separate copy.
Clarifies that .aiassistant/agents/ is the source of truth and documents when to invoke qa-engineer vs e2e-qa-tester.
…y pipeline After PR creation (step 18), the workflow now automatically: - Invokes qa-engineer with the issue + PR number - qa-engineer selects validation strategies and delegates UI flows to e2e-qa-tester - e2e-qa-tester writes/runs Playwright tests and commits them back to the branch - Workflow only marks PR ready-for-review after READY TO MERGE is returned Adds a QA Pipeline section with a decision tree and direct invocation examples.
After qa-engineer returns READY TO MERGE, the workflow now edits the PR body to fill the "What was tested" section with the QA report before converting the PR from draft to ready-for-review.
Test Report — fix(settings): improve clarity of picture-tag method label and warning (#1015)Branch: Acceptance Criteria
Smoke Tests
Overall: ✅ PASS Blockers: None. Recommendations:
Automated Tests WrittenNew spec file committed to this branch at
All 4 tests pass locally ( READY TO MERGE Screenshots
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-0.10%) Diff coverage ✅ ∅ diff coverage (50.00%) Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (d23c0a9) 13940 48 0.34% Head commit (d7c1471) 13940 (+0) 48 (+0) 0.34% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#1056) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
- Replace the vague '(preferred)' label with '(CDN-compatible)' to accurately convey the technical reason for choosing the picture tag method (rewrite rules do not work with CDN). - Expand the warning message to explicitly list layout risks: themes, sliders, WooCommerce pages, galleries and the absence of coverage for background images. - Recommend falling back to rewrite rules for non-CDN sites. Resolves #1015
e398e50 to
d841272
Compare
Validates that: - The <picture> tags radio label reads "(CDN-compatible)" not "(preferred)" - The warning info box names sliders, WooCommerce, galleries, and background images - The rewrite-rules option is still present All 4 tests pass against the local wp-env stack on port 8888.
|
Manually checked, everything is fine. |
|
The issue I see here is that the copywriting changes have not been clearly defined nor validated by whoever would be responsible about it in the first place (product and/or marketing). We let the AI decide based on the issue description, but what is contained in it is only examples. |




Description
Fixes #1015
This change improves the clarity of the delivery-method selector in Imagify settings for next-gen image formats. The
<picture>tag method was labelled "(preferred)", which led users — especially first-time setup users — to choose it by default without understanding the layout risks. Support consistently receives tickets about broken layouts, missing images in sliders, WooCommerce pages, and galleries caused by this method.Two targeted copy changes are made to
views/part-settings-webp.php:Type of change
Detailed scenario
What was tested
Strategy C (Analysis) — wp-env was not reachable on port 8888; Strategies A (API) and B (Browser) were skipped.
views/part-settings-webp.php(preferred)to(CDN-compatible). Accurately reflects the technical reason (rewrite rules do not work with CDN) without implying universal superiority.Code quality:
esc_html__()wrapping pattern follows existing convention in this fileSmoke tests:
Tests/e2e/specs/settings.spec.tstests cover page load and save — none test label copy, so no existing tests are affectedHow to test
<picture>tags now reads "Use <picture> tags (CDN-compatible)" instead of "(preferred)".Affected Features & Quality Assurance Scope
Technical description
Documentation
Both changes are confined to
views/part-settings-webp.php:Use <picture> tags (preferred)Use <picture> tags (CDN-compatible)This is the preferred solution but some themes may break, so make sure to verify that everything seems fine.The pattern used (printf with esc_html__() format string and HTML tag arguments) follows the existing convention in this file.
New dependencies
None.
Risks
Mandatory Checklist
Code validation
Code style
Unticked items justification
Additional Checks
N/A — this is a UI copy change with no new logic.