Skip to content

feat(style): implement audit v4 phase 7 style modes - #44

Merged
dhanyyudi merged 10 commits into
mainfrom
audit-v4-phase7-style-modes
May 3, 2026
Merged

dhanyyudi merged 10 commits into
mainfrom
audit-v4-phase7-style-modes

Conversation

@dhanyyudi

Copy link
Copy Markdown
Owner

Phase 7, style modes general purpose

@codex

Summary

Audit V4 Phase 7 adds explicit style modes for Single symbol, Categorized, and Graduated. The editor, runtime preview, and ZIP runtime now share parity for style mode semantics, category regeneration, graduated ranges, and legend output.

Changes

  • src/types/project.ts, src/lib/defaults.ts, src/lib/styleMode.ts, src/lib/projectHydration.ts, src/lib/projectUpdates.ts, src/lib/opfs.ts, src/lib/qgis2webParser.ts
    • add explicit mode discriminator, graduated schema, back-compat normalization, and parser mode detection.
  • src/components/Inspector/StyleTab.tsx, src/components/Inspector/CategorizedStylePanel.tsx, src/components/Inspector/GraduatedStylePanel.tsx
    • add Style mode switcher, single-symbol empty state, categorized regeneration, graduated numeric controls, and Generate ranges flow.
  • src/lib/graduatedBreaks.ts, src/lib/style.ts, src/runtime/runtime.ts
    • add shared graduated range generation and apply parity for editor, legend, runtime preview, and ZIP runtime styling.
  • scripts/smoke-fixture.ts, scripts/smoke-export.ts, tests/map-render.spec.ts
    • add schema and export guards, plus Phase 7 Playwright coverage for single, categorized, graduated, parity, and empty-value categorized lookup.
  • docs/screenshots/phase-7/
    • add fresh verification logs and screenshots.

Manual parity sweep

  • Imported fixture in editor and verified explicit Style mode selector appears.
  • Single symbol mode shows the guided empty state and falls back to one legend item.
  • Categorized mode can regenerate categories from a chosen field and exported config preserves category field and labels.
  • Graduated mode can generate numeric ranges, render distinct fills in editor, and preserve ranges plus fills in ZIP runtime.
  • Runtime preview and exported runtime both render with the same graduated symbology directionally.
  • No permanent runtime debug hook was left behind. scripts/smoke-export.ts explicitly guards against window.__q2wsStyleFor appearing in exported runtime.

Evidence

  • Build: docs/screenshots/phase-7/npm-run-build-20260503-123528.txt , PASS
  • Smoke fixture: docs/screenshots/phase-7/npm-run-smoke-fixture-20260503-123528.txt , PASS
  • Smoke export: docs/screenshots/phase-7/npm-run-smoke-export-20260503-123528.txt , PASS
  • Playwright: docs/screenshots/phase-7/npx-playwright-phase-7-20260503-123528.txt , PASS, 7 passed
  • Editor screenshot: docs/screenshots/phase-7/editor-20260503-123528.png
  • Runtime preview screenshot: docs/screenshots/phase-7/runtime-preview-20260503-123528.png
  • ZIP runtime screenshot: docs/screenshots/phase-7/runtime-20260503-123528.png
  • Console log: docs/screenshots/phase-7/console-20260503-123528.txt, 0 error, one legacy plugin warning about L.Mixin.Events
  • Network tile log: docs/screenshots/phase-7/network-tile-20260503-123528.json

QA checklist

  • npm run build
  • npm run smoke:fixture
  • npm run smoke:export
  • npx playwright test tests/map-render.spec.ts -g "phase 7"
  • Root log appended in ../AGENTS.MD and ../docs/agents/changelog/2026-05.md

Notes

  • Scope stays on style generality only. No rule-based styling, raster work, CRS work, or design-system expansion is included here.
  • Existing historical debug helpers in older tests were not refactored as part of this phase. The new compact parity coverage added in this phase avoids debug globals and verifies behavior through visible UI plus exported config.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
q2web-studio df2078b Commit Preview URL

Branch Preview URL
May 03 2026, 02:42 PM

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • I reviewed the trigger, PR metadata, and current PR comments. The trigger content is a Phase 7 PR summary and evidence log, not a new change request or reviewer action item requiring a follow-up code patch. No additional code changes were made in this run.
  • The only extra PR comment shown is a Cloudflare Workers deployment status update (“In progress”), which also does not request a code change.

Testing

  • ⚠️ No commands were run, because no repository changes were required for this follow-up pass.

View task →

@dhanyyudi

Copy link
Copy Markdown
Owner Author

@codex CI failure root cause was the new compact Phase 7 parity test doing three ZIP exports in one test while still using the default Playwright timeout budget. The failing step was page.waitForEvent("download"), not a style assertion mismatch. Fixed in 40a6ae9 by giving that one heavier parity test its own test.setTimeout(90_000), without changing global test timeouts. Local verification after the change: npm run smoke:map PASS, 52 passed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • I reviewed the trigger and PR context, and no additional follow-up patch is needed right now.
  • The trigger already documents the CI root cause and fix in commit 40a6ae9 (page.waitForEvent("download") timing out in the compact Phase 7 parity test), with the targeted timeout adjustment applied only to that heavy test case.
  • I did not create new code changes, commit, or PR in this pass.

Testing

  • cd /workspace/qgis2web-studio && git status --short && git log --oneline -n 3 (confirmed latest commit includes 40a6ae9 test(style): relax phase 7 parity timeout, and working tree is clean).

View task →

@dhanyyudi

Copy link
Copy Markdown
Owner Author

@codex Follow-up fix pushed in df2078b. Root cause was not just timeout budget. The compact Phase 7 parity test was performing repeated ZIP exports in one page state, and CI could finish an export path while the test was still waiting on the next download event. I changed the test to avoid repeated exports for single and categorized checks, keep those assertions in visible UI, and reserve one final export assertion for graduated runtime config. Local verification after this change: targeted Phase 7 compact parity test PASS and npm run smoke:map PASS, 52 passed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • I reviewed the trigger, PR info, and comment history. No additional code change is needed from my side right now.
  • The follow up fix you referenced is present at df2078b (test(style): avoid repeated exports in phase 7 parity test), following the earlier timeout scoped fix at 40a6ae9.
  • I did not make new edits, commit, or open a new PR in this pass, because the requested follow up has already been pushed and validated in the branch context.

Testing

  • cd /workspace/qgis2web-studio && git status --short && git log --oneline -n 5

View task →

@dhanyyudi
dhanyyudi merged commit 2a40754 into main May 3, 2026
2 checks passed
@dhanyyudi
dhanyyudi deleted the audit-v4-phase7-style-modes branch May 4, 2026 07:04
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