Repository navigation
fix(UNFY-421): pick a thread's latest MMS from the rows its thread shows - #274
jake-dev-99 wants to merge 1 commit into
Conversation
The conversation list's latest-MMS query had no MMS-type filter, while the thread view keeps only user-visible types. Old builds saved sent MMS with no m_type and a millisecond date, which outranks every real row under `date DESC`, so those rows became the tile preview for threads whose view never shows them. Apply the thread view's `MmsMessageType.userVisibleValues` filter to the enrichment query, and declare `m_type` on the test fake's MMS table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewer's GuideImplementationFilter the conversation's latest-MMS lookup to the same user-visible message types as the thread view, preventing hidden MMS rows from supplying the preview.
TestsAdd regression coverage proving a malformed null-type MMS and a transport-only notification are skipped, and expose
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="lib/src/android/services/conversation_lookup.dart" line_range="451" />
<code_context>
final latestMmsFuture = MessageLookup.instance.listMms(
filter: MmsFilter(
threadId: base.threadId,
+ types: MmsMessageType.userVisibleValues,
excludeMessageBoxes: const [MessageBox.draft],
),
</code_context>
<issue_to_address>
**Latest MMS contract is underspecified**
Callers relying on the model documentation's promise of the most recent non-draft MMS do not receive transport-only or unknown-type rows; the field now returns only MMS types visible in the thread view.
Update the `latestMms` field documentation to say it is the most recent user-visible, non-draft MMS.
</issue_to_address>Sourcery assessment
Approved.
| final latestMmsFuture = MessageLookup.instance.listMms( | ||
| filter: MmsFilter( | ||
| threadId: base.threadId, | ||
| types: MmsMessageType.userVisibleValues, |
There was a problem hiding this comment.
⚪ Low · Latest MMS contract is underspecified
Callers relying on the model documentation's promise of the most recent non-draft MMS do not receive transport-only or unknown-type rows; the field now returns only MMS types visible in the thread view.
Update the latestMms field documentation to say it is the most recent user-visible, non-draft MMS.
Prompt for AI agents
In `lib/src/android/services/conversation_lookup.dart` at line 451:
**Latest MMS contract is underspecified**
Callers relying on the model documentation's promise of the most recent non-draft MMS do not receive transport-only or unknown-type rows; the field now returns only MMS types visible in the thread view.
Update the `latestMms` field documentation to say it is the most recent user-visible, non-draft MMS.
SZ Code ReviewVerdict: FAIL Review boundary
Findings1. Canon blocker
Finding The PR title Required fix Rename the PR to Auto-merge (shadow): eligible; the human still merges. |
There was a problem hiding this comment.
Reviewed head: df296bc099907d6279845180b0d3031c922d0de3
Comparison commit: 624ab60dcd6895c94ce2eaecf54422f4f8d86fb5
Revision: 1
SZ Code Review
Verdict: FAIL
Findings: 1
Review boundary
- Mode: full
- Scope: all
- Lifecycle: commit
- Base commit:
624ab60dcd6895c94ce2eaecf54422f4f8d86fb5 - Reviewed commit:
df296bc099907d6279845180b0d3031c922d0de3 - Reviewed changes: the whole branch since
624ab60dcd6895c94ce2eaecf54422f4f8d86fb5 - Revision: 1
- Review cycle: 1 of 3
- Pre-push authoritative: yes
Findings
1. Canon blocker
- Location:
reference/simple-zen-toolchain-architecture.md:115 - Evidence: documentation
- Canon document:
reference/simple-zen-toolchain-architecture.md
Finding
The PR title fix(UNFY-421): pick a thread's latest MMS from the rows its thread shows violates TCA-BRN-04, which requires the Linear issue identifier in brackets at the start.
Required fix
Rename the PR to [UNFY-421] Pick a thread's latest MMS from the rows its thread shows.
Fixes the conversation-list preview for threads whose newest MMS row is one the thread view hides (UNFY-421).
Cause.
ConversationLookup._enrichConversationpicked each thread's latest MMS with no MMS-type filter. The thread view keeps onlyMmsMessageType.userVisibleValues. Old builds saved sent MMS with nom_typeand a milliseconddate, which outranks every real row underdate DESC. Those rows became the tile preview for threads that never show them. The full investigation is on the Linear issue.Change.
userVisibleValuesfilter as the thread view.m_typerow with a millisecond date and a download notification are both skipped.m_type, the column the query now filters on.Not in this PR.
Verification.
flutter pub get,flutter analyze --no-fatal-warnings(no issues),flutter test(405 passed),./scripts/verify_mms_migration.shandflutter pub publish --dry-run(0 warnings)./sz-code-review, quick and full againstorigin/main: PASS, 0 findings.🤖 Generated with Claude Code
Summary by Sourcery
Align conversation-list MMS previews with thread visibility rules.
Bug Fixes:
Tests:
Summary by CodeRabbit