Skip to content

feat: add debug logs and quick examples to creative testing - #56

Merged
bokelley merged 10 commits into
mainfrom
bokelley/creative-testing-improvements
Oct 20, 2025
Merged

bokelley merged 10 commits into
mainfrom
bokelley/creative-testing-improvements

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Background

Users were experiencing unclear error messages and a lack of guidance when using the creative testing feature. Specifically, validation errors were opaque and there was no easy way to populate fields for quick testing.

Changes

  • Added a "Debug Logs" section to creative-testing.html: This section displays request/response details, including protocol-level communication, timestamps, and formatted JSON.
  • Enhanced error handling in creative-testing.html: Error messages are now more visible, displayed for 10 seconds, and logged to the browser console. Synthetic debug log entries are created for errors where no logs are returned.
  • Implemented "Quick Examples" dropdown in creative-testing.html: Provides pre-filled asset data for scenarios like "Nike Air Max Shoes" and "Coffee Brand Campaign", simplifying testing.
  • Updated collectAssets() in creative-testing.html: Ensures assets are formatted correctly according to AdCP schema (e.g., wrapping text content in {"content": "..."}).
  • Modified "Build Creative" button logic in creative-testing.html: Button is now hidden for non-generative formats (those without output_format_id or a generation_prompt asset).
  • Updated server-side API endpoints (src/server/server.ts):
    • /api/creative/list-formats now retrieves and returns debug logs from the ADCPClient.
    • Error responses from /api/creative/preview-creative and /api/creative/build-creative now include debug_logs and timestamps.
    • Added stack traces to server logs for better error diagnosis.
  • Adjusted Media Buy Testing logic (index.html): Ensures brand_manifest is sent as a properly formatted object or URL to prevent validation errors.

Testing

  • Load formats using https://creative.adcontextprotocol.org/mcp and verify debug logs appear.
  • Select a generative creative format (e.g., "Medium Rectangle - AI Generated") and confirm "Build Creative" button is visible.
  • Select a non-generative format and confirm "Build Creative" button is hidden.
  • Select a "Quick Example" (e.g., "Nike Air Max Shoes") and verify all relevant fields are populated correctly.
  • Attempt to preview or build a creative with an example and observe debug logs for success or failure details.
  • Test with an agent that returns an error (e.g., https://api.openads.ai) and verify the error message and debug logs are displayed.
  • Verify brand_manifest handling in Media Buy testing by using plain text and ensuring it's correctly wrapped.

@bokelley bokelley changed the title Add debug logs and quick examples to creative testing feat: add debug logs and quick examples to creative testing Oct 20, 2025
bokelley and others added 5 commits October 20, 2025 06:44
- Add debug logs display to creative testing UI
- Add one-click example creatives (Nike, Coffee, Tech, Fashion)
- Fix Build Creative button visibility for generative formats
- Improve error messages and debug output
- Fix brand_manifest validation for non-URL strings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The CI workflows were failing due to transient npm registry errors
(503 Service Unavailable, 502 Bad Gateway). Added retry logic with
up to 3 attempts for npm install commands.

Changes:
- Add triple-retry with fallback for npm ci in main CI pipeline
- Add triple-retry for commitlint dependency installation
- Use --prefer-offline and --no-audit flags to reduce network issues

Fixes intermittent CI failures caused by npm registry instability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The npm registry is experiencing severe outages (503/504/502 errors).
Added delays between retry attempts to give the registry time to recover:
- Retry 1: immediate
- Retry 2: 30 second delay
- Retry 3: 60 second delay

This prevents all 3 retries from hitting the same outage window.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@bokelley
bokelley force-pushed the bokelley/creative-testing-improvements branch from ca92c4a to aeb4861 Compare October 20, 2025 10:44
bokelley and others added 5 commits October 20, 2025 06:48
- Update sync-schemas.ts to include creative namespace tasks
- Generate types for build_creative and preview_creative
- Update creative-testing.html to handle new schema structure:
  - Change output_format_id → output_format_ids (array)
  - Support new preview response format with previews[].renders[]
  - Display multiple renders with dimensions and roles
  - Support companion ads and multi-placement formats

Schema changes (v2.0.0):
- Added renders array to Format with role and dimensions
- Preview response: outputs → renders, output_id → render_id
- Removed format_id and hints from preview renders
- Changed output_format_id to output_format_ids (array)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add changeset-check job that runs on PRs
- Validates that changesets exist when library code is modified
- Checks src/lib/, package.json, and schema generation scripts
- Blocks PRs without changesets from being merged
- Publish dry run now depends on changeset check passing

This ensures proper version management and prevents releasing
changes without documented version bumps.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update generated version file to match package.json version.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Resolve version conflict - accept main branch version 2.2.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@bokelley bokelley mentioned this pull request Oct 20, 2025
@bokelley
bokelley merged commit 244f639 into main Oct 20, 2025
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