You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@community.apache.org by "rbowen (via GitHub)" <gi...@apache.org> on 2026/05/22 20:26:23 UTC

[I] ponymail-mcp: search_list renders undefined" for email fields when quick=true [comdev]

rbowen opened a new issue, #9:
URL: https://github.com/apache/comdev/issues/9

   ## Summary
   
   When calling `search_list` with `quick=true`, the email rendering loop produces `undefined` for subject, from, and ID fields. Using `emails_only=true` instead works correctly.
   
   ## Steps to Reproduce
   
   1. Call `search_list` with parameters:
      - `list`: `dev`
      - `domain`: `iceberg.apache.org`
      - `timespan`: `lte=7d`
      - `quick`: `true`
   
   2. Observe that all email entries render as:
   ```
   - **undefined**
     From: undefined | Date: 2026-05-15 | ID: undefined
   ```
   
   3. For comparison, call the same endpoint with `emails_only=true` instead of `quick=true` — subjects, senders, and IDs are populated correctly.
   
   ## Expected Behavior
   
   Email fields (`subject`, `from`, `id`/`mid`) should be populated when rendering the emails section, or the emails section should be skipped entirely when `quick=true` (since the purpose of quick mode is to return stats only).
   
   ## Root Cause (Likely)
   
   In `index.js`, the email rendering code accesses `e.subject`, `e.from`, and `e.id || e.mid`. When PonyMail's `/api/stats.lua` responds in quick mode, it appears to return email objects with a different structure (or omits those fields entirely), resulting in `undefined` values.
   
   ## Suggested Fix
   
   Either:
   1. **Skip the emails section when `quick=true`** — since the caller is explicitly requesting stats-only, rendering empty emails is confusing.
   2. **Guard the email fields** — e.g. `e.subject || "(no subject)"` and similar fallbacks, and skip rendering entries where all fields are missing.
   
   Option 1 is simplest:
   ```javascript
   // In the search_list handler, after building stats:
   if (!quick && data.emails) {
     // render emails section
   }
   ```
   
   ## Environment
   
   - ponymail-mcp v1.0.0
   - MCP SDK ^1.12.1
   - PonyMail endpoint: https://lists.apache.org
   
   Disclaimer: AI-assisted triage using Amazon Quick.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@community.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] ponymail-mcp: search_list renders undefined" for email fields when quick=true [comdev]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #9: ponymail-mcp: search_list renders undefined" for email fields when quick=true
URL: https://github.com/apache/comdev/issues/9


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@community.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org