Skip to content

Fix search_list rendering "undefined" email fields when quick=true#14

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-search-list-quick-undefined
May 31, 2026
Merged

Fix search_list rendering "undefined" email fields when quick=true#14
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-search-list-quick-undefined

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 31, 2026

Closes #9.

In quick mode, PonyMail's /api/stats.lua returns email objects without subject/from/id, so search_list's emails loop rendered each entry as:

- **undefined**
  From: undefined | Date: 2026-05-15 | ID: undefined

quick is documented as stats-only (and emails_only exists for email summaries), so this skips the emails section entirely when quick=true. The subject/from/id fields are also guarded with fallbacks ((no subject), (unknown sender), (no id)) so a sparse entry can never render as undefined.

Verified live against dev@iceberg.apache.org (the exact repro from the issue):

  • quick=true → now returns stats only (Hits: 76, archive range), no broken emails section.
  • emails_only=true → still renders populated subjects, senders, and IDs.

Tests: 43/43 pass; prek clean.

Fixes apache#9. In quick mode, PonyMail's /api/stats.lua returns email objects
without subject/from/id, so the emails section rendered each entry as
"- **undefined**  From: undefined | ID: undefined". Quick mode is documented
as stats-only (emails_only exists for email summaries), so skip the emails
section entirely when quick=true. The subject/from/id fields are also guarded
with fallbacks so a sparse entry never renders as "undefined".

Verified live against dev@iceberg.apache.org (the reported repro): quick=true
now returns stats only; emails_only=true still renders populated subjects,
senders, and IDs.

Generated-by: Claude Code 2.1.158 (Claude Opus 4.8)
@potiuk potiuk merged commit 355b97a into apache:main May 31, 2026
8 checks passed
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.

ponymail-mcp: search_list renders undefined" for email fields when quick=true

1 participant