Skip to content

docs(website): add onRequest and onWebSocket to lifecycle overview#4546

Open
NathanFlurry wants to merge 1 commit intomainfrom
docs/lifecycle-fetch-websocket
Open

docs(website): add onRequest and onWebSocket to lifecycle overview#4546
NathanFlurry wants to merge 1 commit intomainfrom
docs/lifecycle-fetch-websocket

Conversation

@NathanFlurry
Copy link
Copy Markdown
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 1, 2026

🚅 Deployed to the rivet-pr-4546 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-inspector 😴 Sleeping (View Logs) Web Apr 1, 2026 at 7:24 pm
website 😴 Sleeping (View Logs) Web Apr 1, 2026 at 7:21 pm
frontend-cloud 😴 Sleeping (View Logs) Web Apr 1, 2026 at 7:21 pm
mcp-hub ✅ Success (View Logs) Web Apr 1, 2026 at 7:11 pm
ladle ❌ Build Failed (View Logs) Web Apr 1, 2026 at 7:11 pm
kitchen-sink ❌ Build Failed (View Logs) Web Apr 1, 2026 at 7:11 pm

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

PR Review

Summary: Adds onRequest and onWebSocket entries to the lifecycle overview table of contents — a good catch, as these handlers were fully documented in the Lifecycle Hooks section but missing from the top-level state-transition overview.

Looks Good

  • Consistent formatting with the existing lifecycle entries (bold header + inline path description + numbered steps).
  • The /actors/{actorName}/http/* path for onRequest is confirmed correct — it matches the existing description in onRequest's hook section (line 581 of the same file).
  • Placement between On Inbound Action Invoke and On Inbound Queue Publish is logical.

Minor Questions / Suggestions

  1. WebSocket path accuracy — The entry uses /actors/{actorName}/ws/*. This pattern doesn't appear anywhere else in the documentation (the websocket-handler.mdx doc doesn't state the URL explicitly, and http-api.mdx is still a TODO stub). Worth double-checking this path against the actual router implementation before merging to avoid documenting an incorrect URL.

  2. "On Fetch Request" label — The other entries use verb phrases describing the trigger: "On Connect", "On Disconnect", "On Inbound Action Invoke", "On Inbound Queue Publish". The label "On Fetch Request" slightly breaks that pattern — "On HTTP Request" or "On Inbound HTTP Request" would be more consistent. That said, "Fetch" does accurately reflect the underlying fetch/Request/Response API used, so this is a judgment call.

  3. Single-step lists — The new entries each have only one step. For symmetry, consider whether any middleware steps (auth, routing) happen before onRequest/onWebSocket that are worth listing — but if there's nothing meaningful to add, single-step is fine.

Overall this is a clean, low-risk improvement to the docs. The path accuracy point (#1) is the only thing worth verifying before merge.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 1, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4546

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4546

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4546

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4546

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4546

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4546

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4546

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4546

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4546

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4546

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4546

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4546

commit: 3e8ce9e

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