Skip to content

docs: document mp4_url on the session replay endpoint - #889

Merged
giordano-lucas merged 3 commits into
mainfrom
docs/document-replay-mp4-url
Aug 6, 2026
Merged

docs: document mp4_url on the session replay endpoint#889
giordano-lucas merged 3 commits into
mainfrom
docs/document-replay-mp4-url

Conversation

@giordano-lucas

@giordano-lucas giordano-lucas commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Document mp4_url (and the rest of the replay response) on the session recordings guide, including a REST curl example
  • Add an API Getting Started page for GET /sessions/{session_id}/replay that highlights mp4_url
  • Clarify ReplayResponse / agent replay docs and examples so the field is discoverable without inspecting a live response

Test plan

  • Preview docs and open Session recordings — confirm the new mp4_url section renders
  • Open API → Getting Started → Session Replay and verify the curl/response example
  • Confirm links from recordings → Session Replay and ReplayResponse resolve

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Documentation
    • Added a Session Replay API reference covering MP4 downloads, HLS streaming, response fields, expiration details, timing metadata, cURL usage, Python examples, and the OpenAPI playground.
    • Expanded recording and SDK guidance for using presigned MP4 URLs, HLS content, and replay downloads.
    • Updated navigation and LLM documentation indexes.
    • Enhanced replay examples to display the returned MP4 URL.

Call out the presigned MP4 URL in feature guides, ReplayResponse, and a
dedicated API page so clients do not have to discover it from live responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Project Status Preview Updated (UTC)
Nottelabs 🟢 Ready View Preview Aug 6, 2026, 1:04 PM

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

@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@giordano-lucas, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 833c918c-7384-4778-9af8-1e350a4a3c17

📥 Commits

Reviewing files that changed from the base of the PR and between 255d11b and 872890f.

📒 Files selected for processing (7)
  • docs/src/api-reference/using-session-replay.mdx
  • docs/src/docs.json
  • docs/src/features/agents/replay.mdx
  • docs/src/features/sessions/recordings.mdx
  • docs/src/llms.txt
  • docs/src/snippets/agents/replay/basic_replay.mdx
  • docs/src/testers/agents/replay/basic_replay.py
✨ 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 docs/document-replay-mp4-url

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown

Greptile Summary

This documentation-only PR makes mp4_url and the complete replay response more discoverable across the API guide, session recording guide, SDK reference, navigation, and examples.

  • Adds a Session Replay API getting-started page and navigation entry.
  • Expands replay response fields and REST examples in recording and SDK documentation.
  • Updates replay snippets and the generated tester source to print mp4_url.

Confidence Score: 4/5

The documentation contract should be corrected before merging because it tells clients that a nullable replay field is always present.

The new API page conflicts with the SDK model and existing type test by documenting expires_at as non-nullable, while the remaining links, navigation, and replay examples align with repository APIs.

Files Needing Attention: docs/src/api-reference/using-session-replay.mdx

Important Files Changed

Filename Overview
docs/src/api-reference/using-session-replay.mdx Adds the REST replay guide, but incorrectly presents nullable expires_at as a required string.
docs/src/features/sessions/recordings.mdx Expands recording documentation with replay fields, a REST example, and links to the new API guide.
docs/src/sdk-reference/misc/replayresponse.mdx Clarifies replay use cases and accurately documents the nullable SDK response fields.
docs/src/docs.json Registers the new Session Replay page under API Getting Started.
docs/src/testers/agents/replay/basic_replay.py Keeps the generated replay snippet source synchronized, but does not execute or validate the documented response contract.

Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
docs/src/api-reference/using-session-replay.mdx:40-42
**Preserve `expires_at` nullability**

When a replay response omits `expires_at` or returns null, this non-nullable field declaration tells clients they can safely perform string or date operations, causing runtime failures against a valid `ReplayResponse`.

```suggestion
<ResponseField name="expires_at" type="string | null">
  When the presigned URLs expire. Download promptly if you need a durable copy.
</ResponseField>
```

### Issue 2
docs/src/api-reference/using-session-replay.mdx:37-39
**Replay contract lacks automated coverage**

The new hand-maintained response contract has no executing unit or integration test, so field mismatches such as the incorrect `expires_at` nullability can reach the published documentation without automated detection.
- Add a comment if the PR does n... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "docs: document mp4_url on the session re..." | Re-trigger Greptile

Comment on lines +40 to +42
<ResponseField name="expires_at" type="string">
When the presigned URLs expire. Download promptly if you need a durable copy.
</ResponseField>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Preserve expires_at nullability

When a replay response omits expires_at or returns null, this non-nullable field declaration tells clients they can safely perform string or date operations, causing runtime failures against a valid ReplayResponse.

Suggested change
<ResponseField name="expires_at" type="string">
When the presigned URLs expire. Download promptly if you need a durable copy.
</ResponseField>
<ResponseField name="expires_at" type="string | null">
When the presigned URLs expire. Download promptly if you need a durable copy.
</ResponseField>
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/src/api-reference/using-session-replay.mdx
Line: 40-42

Comment:
**Preserve `expires_at` nullability**

When a replay response omits `expires_at` or returns null, this non-nullable field declaration tells clients they can safely perform string or date operations, causing runtime failures against a valid `ReplayResponse`.

```suggestion
<ResponseField name="expires_at" type="string | null">
  When the presigned URLs expire. Download promptly if you need a durable copy.
</ResponseField>
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

The SDK docs hook regenerates this page from types; keep hand-written
mp4_url guidance on the feature and API pages instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/api-reference/using-session-replay.mdx`:
- Line 9: Update the documentation for GET /sessions/{session_id}/replay to
state that closed sessions may temporarily return 404 while replay generation is
in progress, and instruct direct REST clients to retry 404 responses until the
presigned URLs are available.
- Line 11: The documentation must clearly treat ReplayResponse.mp4_url as
nullable: in docs/src/api-reference/using-session-replay.mdx lines 11 and 52-55,
describe playlist_content as the HLS fallback and require checking mp4_url
before replay.download(); in docs/src/features/sessions/recordings.mdx lines 18,
42-52, and 131-137, remove guaranteed-MP4 wording, mark both representations
nullable, and present HLS as an available alternative; in
docs/src/sdk-reference/misc/replayresponse.mdx lines 9-11, require checking
mp4_url before download(path); and in docs/src/features/agents/replay.mdx lines
35-37, state that MP4 downloading is available only when mp4_url is present.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0f1edf11-379c-49e4-ba11-5a71bf2bf9d3

📥 Commits

Reviewing files that changed from the base of the PR and between 255d11b and d4a71e5.

📒 Files selected for processing (8)
  • docs/src/api-reference/using-session-replay.mdx
  • docs/src/docs.json
  • docs/src/features/agents/replay.mdx
  • docs/src/features/sessions/recordings.mdx
  • docs/src/llms.txt
  • docs/src/sdk-reference/misc/replayresponse.mdx
  • docs/src/snippets/agents/replay/basic_replay.mdx
  • docs/src/testers/agents/replay/basic_replay.py


<AgentMdNotice />

`GET /sessions/{session_id}/replay` returns presigned URLs for the session recording after the session has ended.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document replay generation delay.

A closed session can still return 404 while replay generation runs. The SDK handles this by polling. Tell direct REST clients to retry 404 responses until the replay is ready.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/api-reference/using-session-replay.mdx` at line 9, Update the
documentation for GET /sessions/{session_id}/replay to state that closed
sessions may temporarily return 404 while replay generation is in progress, and
instruct direct REST clients to retry 404 responses until the presigned URLs are
available.


`GET /sessions/{session_id}/replay` returns presigned URLs for the session recording after the session has ended.

The field most clients need is **`mp4_url`**: a time-limited presigned URL for the MP4 file. Use it to download or share the recording from any HTTP client (webhooks, CI, non-Python SDKs). Check `expires_at` for when the URL stops working.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not treat mp4_url as guaranteed.

ReplayResponse.mp4_url is nullable. tests/integration/sdk/test_sessions.py lines 51-55 accept an HLS-only response. ReplayResponse.download() raises ValueError when mp4_url is absent. State this condition and direct users to check mp4_url before downloading.

  • docs/src/api-reference/using-session-replay.mdx#L11-L11: Describe mp4_url as optional and name playlist_content as the streaming fallback.
  • docs/src/api-reference/using-session-replay.mdx#L52-L55: Require an mp4_url check before replay.download().
  • docs/src/features/sessions/recordings.mdx#L18-L18: Do not state that every replay response includes an MP4 URL.
  • docs/src/features/sessions/recordings.mdx#L42-L52: Mark both replay representations as nullable.
  • docs/src/features/sessions/recordings.mdx#L131-L137: Do not describe HLS as optional relative to a guaranteed MP4 URL.
  • docs/src/sdk-reference/misc/replayresponse.mdx#L9-L11: Require an mp4_url check before download(path).
  • docs/src/features/agents/replay.mdx#L35-L37: State that MP4 download is available only when mp4_url is present.
📍 Affects 4 files
  • docs/src/api-reference/using-session-replay.mdx#L11-L11 (this comment)
  • docs/src/api-reference/using-session-replay.mdx#L52-L55
  • docs/src/features/sessions/recordings.mdx#L18-L18
  • docs/src/features/sessions/recordings.mdx#L42-L52
  • docs/src/features/sessions/recordings.mdx#L131-L137
  • docs/src/sdk-reference/misc/replayresponse.mdx#L9-L11
  • docs/src/features/agents/replay.mdx#L35-L37
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/api-reference/using-session-replay.mdx` at line 11, The
documentation must clearly treat ReplayResponse.mp4_url as nullable: in
docs/src/api-reference/using-session-replay.mdx lines 11 and 52-55, describe
playlist_content as the HLS fallback and require checking mp4_url before
replay.download(); in docs/src/features/sessions/recordings.mdx lines 18, 42-52,
and 131-137, remove guaranteed-MP4 wording, mark both representations nullable,
and present HLS as an available alternative; in
docs/src/sdk-reference/misc/replayresponse.mdx lines 9-11, require checking
mp4_url before download(path); and in docs/src/features/agents/replay.mdx lines
35-37, state that MP4 downloading is available only when mp4_url is present.

Match ReplayResponse typing so clients do not assume a always-present string.

Co-authored-by: Cursor <cursoragent@cursor.com>
@giordano-lucas
giordano-lucas merged commit 128f3d8 into main Aug 6, 2026
14 of 15 checks passed
@giordano-lucas
giordano-lucas deleted the docs/document-replay-mp4-url branch August 6, 2026 13:14
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Coverage

Tests Skipped Failures Errors Time
791 32 💤 4 ❌ 0 🔥 7m 22s ⏱️

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.

1 participant