Skip to content

Align CLI/MCP input contracts with real onEvent controls for joystick, rotary encoder, keypad, and SD card#2

Closed
Copilot wants to merge 15 commits intotestfrom
copilot/check-pico-micropython-circuitpython
Closed

Align CLI/MCP input contracts with real onEvent controls for joystick, rotary encoder, keypad, and SD card#2
Copilot wants to merge 15 commits intotestfrom
copilot/check-pico-micropython-circuitpython

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 23, 2026

component_input_schema still emitted generic/fallback templates for several interactive components, so CLI/MCP automation could send payloads that didn’t match actual component onEvent handlers. This change extends contract/template generation to produce event-accurate controls for additional components (beyond the MAX30102/LDR alignment).

  • Template synthesis from runtime event semantics

    • Added event-type-aware template generation for non-SET_ATTR controls:
      • string events: press, release, rotate-cw, rotate-ccw
      • object events: move (x/y defaults), input (value default)
      • SD operations: SD_MOUNT, SD_UNMOUNT, SD_FORMAT, SD_WRITE_FILE, SD_READ_FILE, SD_DELETE_FILE
  • Component-specific real controls

    • Membrane keypad now exposes concrete key events (press:1..D, release) instead of generic placeholders.
    • SD card now exposes operation-specific payload templates with realistic fields (path, data) for file actions.
  • Contract hygiene

    • Added duplicate prevention when UI-derived templates already cover an event type.
    • Kept existing manifest/UI-derived contract behavior and fallback path intact.
// Example schema output shape after change
{
  id: "joy1",
  type: "wokwi-analog-joystick",
  templates: [
    { type: "move", x: 0.5, y: 0.5 },
    "press",
    "release"
  ]
}

Copilot AI and others added 15 commits April 20, 2026 17:35
…n (ADC, PIO, SPI, I2C, UART)

Agent-Logs-Url: https://github.com/danish9661/Arduino-simulator/sessions/35b995e1-b1c1-45d0-a8f1-91cf6c124e95

Co-authored-by: danish9661 <110881758+danish9661@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-hw-studio-frontend-c6ne Error Error Apr 23, 2026 3:26am

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.

2 participants