Skip to content

feat: expose inbound mini-app content - #4

Merged
Tom Tang (qwerzl) merged 2 commits into
mainfrom
agent/eng-2251-mini-app-content
Aug 13, 2026
Merged

feat: expose inbound mini-app content#4
Tom Tang (qwerzl) merged 2 commits into
mainfrom
agent/eng-2251-mini-app-content

Conversation

@qwerzl

@qwerzl Tom Tang (qwerzl) commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • update the Buf-generated Advanced iMessage client to the v11.3 schema
  • expose inbound Message.content.mini_app as stable Go domain types on MessageContent.MiniApp
  • preserve protobuf presence for optional app, URL, session, App Store, and layout fields
  • keep card media in the existing attachment surface and keep Apple's opaque payload archive private
  • cover both a complete released v11.3 catch-up frame and an identity-only mini-app
  • move the supported toolchain floor to Go 1.25 and test Go 1.25/1.26

Why

advanced-imessage-server v11.3.0 emits decoded public mini-app card fields, but the Go client was pinned to a pre-v11.3 schema and its domain conversion discarded that content. Consumers therefore could not recognize inbound mini-app messages.

This mirrors the generated TypeScript client update in advanced-imessage-ts#52 and enables the Spectrum receive mapping in spectrum-ts#236.

API impact

MessageContent gains an optional MiniApp *MiniAppContent field. The new domain structs contain only public semantic fields; generated protobuf types do not escape the conversion layer.

The latest generated Connect module requires Go 1.25, so the documented minimum and CI matrix now cover Go 1.25 and 1.26.

Validation

  • GOTOOLCHAIN=go1.25.7 go test ./...
  • GOTOOLCHAIN=go1.26.0 go test ./...
  • make check — tidy, vet, and race tests pass; golangci-lint was not installed and the repository target skipped it
  • make test-interop
  • fixed v11.3.0 CatchUpEventsResponse wire fixture maps all mini-app identity, URL, session, App Store, live-state, and visible layout fields

Summary by CodeRabbit

  • New Features

    • Added support for decoding MiniApp content in inbound messages.
    • MiniApp details can include app identity, live status, and optional card layout text.
  • Compatibility

    • Updated the minimum supported Go version to 1.25.
    • Continuous integration now validates Go 1.25 and 1.26.
  • Bug Fixes

    • Preserved absent optional MiniApp data without creating empty values.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bdc7733a-7c35-4083-a697-5b70f77f4709

📥 Commits

Reviewing files that changed from the base of the PR and between 6da9165 and b01cda9.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • README.md
  • conv_common.go
  • conv_message.go
  • conv_test.go
  • go.mod
  • types_message.go
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{go,md}

📄 CodeRabbit inference engine (AGENTS.md)

Write documentation for users rather than maintainers: explain purpose, usage, and relationships, avoid implementation-detail docs, and prefer example tests for documented samples.

Files:

  • README.md
  • conv_common.go
  • conv_message.go
  • conv_test.go
  • types_message.go
**/*.go

📄 CodeRabbit inference engine (AGENTS.md)

**/*.go: Treat exported interfaces as permanent: do not add methods, remove methods, or change signatures on exported interfaces once they are shipped in a stable release.
Prefer returning concrete structs and accepting interfaces in public APIs.
Use internal/ liberally for helpers and non-core functionality, and never expose internal types through an exported API.
Avoid unknown outputs: validate inputs strictly, clone slices and maps at API boundaries, return zero values on error unless a partial-result contract is documented, and specify or sort ordering in contracts.
Do not use global or package-level state; encapsulate state in types and prefer methods over top-level functions.
Prefer accepting dependencies rather than instantiating them directly; take io.Reader-style abstractions over concrete sources when appropriate, and provide convenience constructors only for common cases.
Accept interfaces for complex dependencies, and define custom interfaces with compile-time checks like var _ Iface = (*concrete)(nil) when needed.
Use upcasting for optional behaviors without changing an existing interface: define a new interface that embeds the old one plus new methods, then type-assert and fall back gracefully.
Use parameter objects or result objects for functions with three or more parameters or returns so optional fields can be added compatibly.
Use functional options only for sparse optional configuration when there are two or fewer required parameters, and never mix functional options with a parameter object in the same function.
Do not let goroutines grow unbounded; avoid one-goroutine-per-slice-item patterns, provide shutdown paths, and test for leaks with goleak.
Handle errors with errors.Is, errors.As, and %w wrapping; do not log-and-return, and avoid exporting error types unless necessary.
Use reflect sparingly and only in performance-insensitive paths.
Avoid FooManager-style names; choose the real domain noun for exported types and APIs.
A...

Files:

  • conv_common.go
  • conv_message.go
  • conv_test.go
  • types_message.go
go.mod

📄 CodeRabbit inference engine (AGENTS.md)

Support only the current and previous Go minor versions.

Files:

  • go.mod
🧠 Learnings (4)
📚 Learning: 2026-06-24T07:58:36.513Z
Learnt from: CR
Repo: photon-hq/advanced-imessage-go PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-06-24T07:58:36.513Z
Learning: Treat breaking changes under Go compatibility rules as prohibited in stable releases, including renaming or removing exported entities, changing types or signatures, adding methods to exported interfaces, or changing documented behavior.

Applied to files:

  • README.md
📚 Learning: 2026-06-24T07:58:36.513Z
Learnt from: CR
Repo: photon-hq/advanced-imessage-go PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-06-24T07:58:36.513Z
Learning: Applies to go.mod : Support only the current and previous Go minor versions.

Applied to files:

  • README.md
📚 Learning: 2026-06-24T07:58:36.513Z
Learnt from: CR
Repo: photon-hq/advanced-imessage-go PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-06-24T07:58:36.513Z
Learning: Applies to **/*.go : Use `internal/` liberally for helpers and non-core functionality, and never expose internal types through an exported API.

Applied to files:

  • conv_common.go
📚 Learning: 2026-06-24T07:58:36.513Z
Learnt from: CR
Repo: photon-hq/advanced-imessage-go PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-06-24T07:58:36.513Z
Learning: Applies to **/*.go : Use qualified package names such as `httptest` or `zapcore` rather than generic names like `test` or `core` to avoid forcing named imports.

Applied to files:

  • conv_test.go
🔇 Additional comments (7)
types_message.go (1)

164-192: LGTM!

go.mod (1)

3-18: LGTM!

.github/workflows/ci.yml (1)

15-18: LGTM!

README.md (1)

15-15: LGTM!

conv_common.go (1)

38-40: LGTM!

conv_message.go (1)

109-113: LGTM!

Also applies to: 115-140, 142-169

conv_test.go (1)

4-9: LGTM!

Also applies to: 92-95, 97-148, 150-173


📝 Walkthrough

Walkthrough

The PR adds optional MiniApp data to decoded messages, maps protobuf metadata and layout fields, adds end-to-end coverage, and updates the project’s minimum Go version and dependency set to Go 1.25.

Changes

MiniApp message support

Layer / File(s) Summary
Message contract and compatibility baseline
types_message.go, go.mod, .github/workflows/ci.yml, README.md
The message model now exposes MiniApp metadata and layout types. The module, documentation, and CI target Go 1.25+.
MiniApp protobuf conversion
conv_common.go, conv_message.go
Message conversion maps optional MiniApp metadata, identifiers, live status, and layout fields while preserving nil values.
MiniApp mapping validation
conv_test.go
Tests decode serialized catch-up data and verify MiniApp fields, optional values, and absent MiniApp content.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to b01cd

The PR adds inbound mini-app content mapping and updates the supported Go toolchain, with validation covering the stated behavior; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CatchUpFixture
  participant Unmarshaller as proto.Unmarshal
  participant MessageConverter as messageContentFromProto
  participant MiniAppConverter as miniAppContentFromProto
  CatchUpFixture->>Unmarshaller: serialized catch-up event
  Unmarshaller->>MessageConverter: decoded message payload
  MessageConverter->>MiniAppConverter: optional MiniApp payload
  MiniAppConverter->>MessageConverter: converted MiniAppContent
Loading

Poem

I’m a rabbit with a tidy app,
Hopping through each message map.
Tiny fields now travel right,
Nil stays nil, and types stay light.
Go 1.25 guides the way.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: exposing inbound mini-app content through the Go API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/eng-2251-mini-app-content

Comment @coderabbitai help to get the list of available commands.

@qwerzl
Tom Tang (qwerzl) marked this pull request as ready for review August 13, 2026 05:04
Copilot AI lite review requested due to automatic review settings August 13, 2026 05:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qwerzl
Tom Tang (qwerzl) merged commit 8d90ef6 into main Aug 13, 2026
5 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