gmail history list drops added-message thread IDs and labels from JSON
himalaya --json gmail history list --start-history-id <id> reduces each messagesAdded entry to its message ID. The output drops the message's thread ID and label IDs, although these fields are available in the underlying response.
In src/gmail/history/list.rs, GmailHistoryRecordOutput.messages_added is populated through message_ids(record.messages_added). This remains the case on the current default branch.
For an inbox-arrival watcher, retaining these fields lets consumers group arrivals by thread and inspect the labels supplied with each added message without fetching every message separately.
Expected: expose the added messages' id, optional thread-id, and label-ids in JSON and the generated schema, preserving the existing messages-added array and text output for compatibility. One additive approach is a messages-added-details array.
Olai has a working downstream patch in PR #611, with a schema check against the built binary. We can remove the patch once an upstream release retains these fields and we update our pin.
Source: pimalaya/himalaya