Skip to content

Fix mark read/unread error and show report-only message bodies - #4

Merged
RangelReale merged 2 commits into
masterfrom
claude/content-not-showing-error-iyh74k
Sep 28, 2026
Merged

RangelReale merged 2 commits into
masterfrom
claude/content-not-showing-error-iyh74k

Conversation

@RangelReale

Copy link
Copy Markdown
Contributor

Problem

  • Marking a message read failed with Expected type "MessageStatusEnum", found "READ": createMessageStatusInBatch only accepts DELETED / ARCHIVED.
  • Report-only messages (e.g. a daily menu) showed "(no content)": their body is an attached report, not content.

Changes

  • Read/unread now use updateRecipientInBatch with READ / AS_UNREAD (+ deleteNotification: true, legacyMode: false), as the official web app does. Delete still uses createMessageStatusInBatch (DELETED).
  • Message detail is read through the inbox entity (node(entityId).message(id)), requesting rendered (HTML) and reports. The detail screen shows rendered (falling back to content) and each report as a card of field/value rows. Falls back to the old MessageQuery if the new query is rejected.
  • ReportResult.displayValue handles string, array and JSON-encoded-array values; results are filtered to the inbox entity when a report has per-recipient answers.
  • docs/API.md: documents both mutations, the UpdateRecipientStatus / MessageStatusEnum values, the recipient-view query, Report / ReportResult models, and the findings in §10.1.

Verification

  • ./gradlew testDebugUnitTest lintDebug assembleDebug passes; new unit tests cover the mutations, the entity query, its fallback and report value shapes.
  • Mutation enum values validated against the live schema; the new detail query checked read-only against a live account (report-only message returns the report; regular messages return rendered == content). The read/unread mutation itself has not yet been exercised on a live account.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GhkhBACvvZ7yVYXuyKhLad


Generated by Claude Code

- Read/unread now use updateRecipientInBatch (READ / AS_UNREAD), as the
  web app does. createMessageStatusInBatch only accepts DELETED/ARCHIVED,
  so "READ" failed with "Expected type MessageStatusEnum".
- The detail screen reads the message through the inbox entity, like the
  web app, and shows the server-rendered HTML (`rendered`) and attached
  reports as field/value cards. Report-only messages (e.g. daily menu)
  had an empty `content` and showed "(no content)". Falls back to the
  plain MessageQuery if the new query is rejected.
- docs/API.md: document both mutations, the enums, reports and findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GhkhBACvvZ7yVYXuyKhLad
Live check: a report-only message has null content/rendered, report
results with null entityId and CHECK values as JSON arrays; normal
messages return rendered == content. Add a test for that shape and mark
the findings live-verified in docs/API.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GhkhBACvvZ7yVYXuyKhLad
@RangelReale
RangelReale merged commit 1afdcf9 into master Sep 28, 2026
2 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.

2 participants