Skip to content

docs: update advanced-imessage-ts documentation for v0.4.0#8

Open
photon-action-bot[bot] wants to merge 6 commits intomainfrom
docs/update-advanced-imessage-ts-v0.4.0
Open

docs: update advanced-imessage-ts documentation for v0.4.0#8
photon-action-bot[bot] wants to merge 6 commits intomainfrom
docs/update-advanced-imessage-ts-v0.4.0

Conversation

@photon-action-bot
Copy link
Copy Markdown
Contributor

Documentation Update: advanced-imessage-ts v0.4.0

This PR updates documentation for advanced-imessage-ts based on the v0.4.0 release.

Release Notes

New Features

  • Added cursor-based stream catch-up (495612f): stream events now include a cursor you can store, and messages.fetchMissed(cursor) lets you replay messages that arrived while you were disconnected in chronological order 🚀.
  • Added cursor-aware listing via messages.list({ afterCursor }), plus exported FetchMissedOptions, so resuming from a known position is simpler and doesn’t require custom catch-up logic.

Improvement

  • Updated the SDK/proto flow to pass stream cursors end-to-end (including list and subscribe requests/responses), which makes reconnect behavior more consistent.
  • Expanded DESIGN.md with a practical reconnect/catch-up example so teams can implement cursor persistence and recovery faster.

Version: 0.4.0


🤖 This PR was auto-generated by Claude Code via the update-docs action in buildspace.

@mintlify
Copy link
Copy Markdown

mintlify bot commented Apr 12, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Photon 🟢 Ready View Preview Apr 12, 2026, 1:30 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

github-actions bot and others added 2 commits April 13, 2026 06:53
Resolved conflicts:
- docs-src/advanced-kits/imessage/messages.mdx.vel: kept Vellum template syntax from main for MessageListOptions table (auto-generated), preserved PR's content changes (cursor fields, Stream catch-up section)
- pnpm-lock.yaml: accepted main's generated lockfile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Resolved merge conflicts after merging origin/main into this branch.

docs-src/advanced-kits/imessage/messages.mdx.vel: Main rewrote the file to use Vellum template syntax for the MessageListOptions table, while this PR had a hardcoded row for the new afterCursor field. Kept the Vellum template approach from main (auto-generates table from SDK types). All other PR content changes (cursor? fields in event types, new Stream catch-up section with fetchMissed()) were incorporated by git auto-merge.

pnpm-lock.yaml: Main's lockfile referenced @photon-ai/advanced-imessage@^0.1.0, but this PR's package.json uses ^0.4.0. Regenerated with pnpm install --no-frozen-lockfile.

Verified: pnpm lint and pnpm typecheck:docs both pass.

Resolve conflicts in package.json and pnpm-lock.yaml by preferring
main's dependency versions (@antfu/eslint-config ^4.19.0,
@photon-ai/advanced-imessage ^0.4.2) and lockfile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Resolved merge conflicts between docs/update-advanced-imessage-ts-v0.4.0 and main.

Conflicts found:

package.json

  • @antfu/eslint-config: PR had ^4.15.1, main had ^4.19.0 → kept main's newer version
  • @photon-ai/advanced-imessage: PR had ^0.4.0, main had ^0.4.2 → kept main's newer version

pnpm-lock.yaml

  • Accepted main's lockfile in full (generated file)

Resolution strategy: Preferred main's versions for dependency/lockfile files. No content files had conflicts.

Verification: pnpm install --frozen-lockfile ✅ | pnpm lint ✅ | pnpm typecheck:docs ✅

@github-actions
Copy link
Copy Markdown
Contributor

Merge conflict resolution

Status: The branch was already up to date with main — a previous merge commit (f9fff22) had already incorporated the changes from main.

The resolved state has:

  • package.json: Uses main's updated dependency versions (@antfu/eslint-config ^4.19.0, @photon-ai/advanced-imessage ^0.4.2)
  • pnpm-lock.yaml: Consistent with package.json

pnpm lint and pnpm typecheck:docs both pass.

Resolved conflict in messages.mdx.vel: kept origin/main's dynamic
Velocity template (SDK symbol-driven Accordion) for the event types
section rather than the PR's hardcoded table, as the template approach
is consistent with the rest of the file and auto-reflects SDK changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Merge conflict resolved

Conflicted file: docs-src/advanced-kits/imessage/messages.mdx.vel

Conflict: The "Event types" section under "Real-time events" had diverged between the PR and main.

  • PR branch had a hardcoded Markdown table listing each MessageEvent variant with their extra fields (including the new cursor? field from v0.4.0).
  • main had replaced that section with a dynamic Velocity template using {% set messageEvent = symbol("ts:@photon-ai/advanced-imessage#MessageEvent") %} to auto-generate an Accordion from the SDK's TypeScript symbols.

Resolution: Kept main's dynamic template approach. It is consistent with the pattern used throughout the rest of the file, automatically reflects any future SDK changes, and will include the cursor? fields added in v0.4.0 as long as they are present in the SDK's type definitions.

All checks passed after resolution: pnpm install --frozen-lockfile, pnpm lint, and pnpm typecheck:docs.

Both branches added declarations at the end of declarePreamble.
Merged by keeping all unique declarations from both sides:
- persistCursor (needed by PR's messages.mdx.vel)
- updateMapPin (needed by main's locations.mdx.vel)
Dropped the PR's duplicate `declare let cursor` (already declared as
`const cursor: string | undefined` earlier in the preamble).

Also fixed type error: added non-null assertion on cursor in the
fetchMissed options example, since cursor is string | undefined in
the preamble but fetchMissed expects string.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Merge conflict resolved

One conflict in advanced-kits/imessage/typecheck.config.ts (content conflict — both branches appended declarations to declarePreamble):

  • declare let cursor: string; (PR HEAD only): Dropped — cursor is already declared as const cursor: string | undefined earlier in the preamble. Keeping both would cause a TS redeclaration error.
  • declare function persistCursor(...) (PR HEAD): Kept — used in the PR's new stream catch-up example in messages.mdx.vel.
  • declare function updateMapPin(...) (origin/main): Kept — used in locations.mdx.vel from main.

Bonus fix: After merging, typecheck:docs caught a type error introduced by the conflict resolution — the standalone fetchMissed(cursor, ...) example was passing cursor: string | undefined to a parameter expecting string. Added a non-null assertion (cursor!) to the example in messages.mdx.vel.

pnpm lint and pnpm typecheck:docs both pass.

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.

0 participants