Rendex: add Markdown rendering, content extraction, render links, and Watch suite#21270
Rendex: add Markdown rendering, content extraction, render links, and Watch suite#21270Dan425953 wants to merge 4 commits into
Conversation
…er links, and full Watch suite Builds on PipedreamHQ#21065 (Rendex app + Render to Image). Adds the rest of the Rendex API surface: - Actions: Render Markdown, Extract Content, Create Render Link, and the Watch suite — Create / Get / Update / Delete / Run Watch + List Watch Runs - Source: New Change Detected (watch-change polling trigger) - App: watch / extract / render-link / markdown propDefinitions + helper methods (a strict superset of the merged app; Render to Image is unchanged) Package 0.1.0 -> 0.2.0. New components at 0.0.1. No new dependencies (@pipedream/platform already present), so the lockfile is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
📝 WalkthroughWalkthroughExtends the Rendex integration to v0.2.0 with new watch, rendering, account, and artifact actions, a polling source for detected changes, and supporting app client props and REST wrappers. ChangesRendex v0.2 – Watches, Rendering & Source
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
🤖 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 `@components/rendex/actions/create-render-link/create-render-link.mjs`:
- Around line 4-83: The Create Render Link action is missing the required
annotations metadata, which is causing lint failures. Update the exported action
object in create-render-link.mjs to include an annotations block with the
correct values for this operation: destructiveHint false, openWorldHint true,
and readOnlyHint false. Place it alongside the other top-level action fields so
the linter can validate the action semantics.
In `@components/rendex/actions/create-watch/create-watch.mjs`:
- Around line 3-8: The Create Watch action is missing the required annotations
metadata, causing lint to fail. Update the exported object in create-watch.mjs
to include an annotations object with readOnlyHint set to false, destructiveHint
set to false, and openWorldHint set to true, since the action makes an external
Rendex API call. Use the default export for the rendex-create-watch action as
the place to add it.
In `@components/rendex/actions/delete-watch/delete-watch.mjs`:
- Around line 3-29: The exported action component in rendex-delete-watch is
missing the required annotations object. Add an annotations field to the default
export with the correct hints for this DELETE action: destructiveHint set to
true, openWorldHint set to true, and readOnlyHint set to false. Keep the rest of
the Delete Watch action structure and its run behavior unchanged.
In `@components/rendex/actions/extract-content/extract-content.mjs`:
- Around line 3-52: The Extract Content action is missing the required
annotations metadata, which breaks the action-annotations lint rule. Add an
annotations object to the default export in extract-content.mjs and set the
semantic hints appropriately for a read-only extraction action: readOnlyHint
true, destructiveHint false, and openWorldHint true. Use the existing action
object structure around rendex-extract-content and keep the change aligned with
other action components that already include annotations.
In `@components/rendex/actions/get-watch/get-watch.mjs`:
- Around line 3-8: The exported action object in rendex-get-watch is missing the
required annotations block, which is causing the lint failure. Add an
annotations object to the default export for the Get Watch action and set it to
readOnlyHint: true, destructiveHint: false, and openWorldHint: true, since this
operation only reads data from the Rendex API. Keep the change within the action
definition so the metadata stays aligned with the existing key/name/description
export.
In `@components/rendex/actions/list-watch-runs/list-watch-runs.mjs`:
- Around line 3-8: The exported action object in List Watch Runs is missing the
required annotations metadata and is failing lint; update the default export in
rendex-list-watch-runs to include an annotations object with readOnlyHint set to
true, destructiveHint set to false, and openWorldHint set to true, since this
action only reads watch run data from the Rendex API.
In `@components/rendex/actions/run-watch/run-watch.mjs`:
- Around line 3-8: The exported action metadata in rendex-run-watch is missing
the required annotations object, which is causing lint failures. Update the
default export in run-watch.mjs to include annotations alongside key, name,
description, version, and type, and set readOnlyHint to false, destructiveHint
to false, and openWorldHint to true since this action triggers an external
Rendex API watch run. Ensure the annotations are placed on the action object
itself so the component metadata is semantically correct.
In `@components/rendex/actions/update-watch/update-watch.mjs`:
- Around line 3-8: The default export for the Update Watch action is missing the
required annotations object, which is causing lint failures. Add an annotations
block to the exported action metadata in the Update Watch component and set
readOnlyHint to false, destructiveHint to false, and openWorldHint to true so it
accurately reflects this non-destructive update operation.
In `@components/rendex/rendex.app.mjs`:
- Around line 42-55: The watchId options provider in the options() method is
hard-capped at the first 100 watches, so older records cannot be selected.
Update this async options() implementation to support load-more pagination using
the existing cursor concept by accepting prevContext or page and passing the
appropriate cursor/continuation into listWatches. Keep the current label/value
mapping, but make sure each call can return the next page of watches so actions
and sources reusing watchId can browse beyond the first page.
In `@components/rendex/sources/new-change-detected/new-change-detected.mjs`:
- Line 7: Update the source description in the new-change-detected module so it
matches the lint-required prefix: change the wording in the description field to
start with “Emit new” instead of “Emit a new”. Use the description string in
new-change-detected.mjs as the target location and keep the rest of the message
unchanged.
- Around line 39-71: Both _watchIds() and _changedRuns() stop after the first
100 results, so they can miss watches or changed runs and still let the poller
advance its cursor. Update these methods in new-change-detected.mjs to paginate
through all pages from rendex.listWatches and rendex.listRuns (using the
existing page/limit response shape), accumulating all IDs/items before
returning. Make sure the polling flow only advances lastTs after all qualifying
items from every page have been collected and emitted.
🪄 Autofix (Beta)
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: ASSERTIVE
Plan: Pro
Run ID: cf24a6fc-a5a6-45d0-89b5-d7c938f763c8
📒 Files selected for processing (12)
components/rendex/actions/create-render-link/create-render-link.mjscomponents/rendex/actions/create-watch/create-watch.mjscomponents/rendex/actions/delete-watch/delete-watch.mjscomponents/rendex/actions/extract-content/extract-content.mjscomponents/rendex/actions/get-watch/get-watch.mjscomponents/rendex/actions/list-watch-runs/list-watch-runs.mjscomponents/rendex/actions/render-markdown/render-markdown.mjscomponents/rendex/actions/run-watch/run-watch.mjscomponents/rendex/actions/update-watch/update-watch.mjscomponents/rendex/package.jsoncomponents/rendex/rendex.app.mjscomponents/rendex/sources/new-change-detected/new-change-detected.mjs
…atch lists - Add required `annotations` (readOnly/destructive/openWorld hints) to all 8 watch + render-link + extract actions, fixing the action-annotations lint errors. - Bump render-to-image 0.0.1 -> 0.0.2 (it imports the modified app file). - Fix the source description prefix to "Emit new ...". - Paginate watch + run lists via `nextCursor` in the New Change Detected source and the watchId async-options (load-more), so accounts with >100 watches or >100 runs/poll are fully covered and the cursor advances correctly.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@components/rendex/sources/new-change-detected/new-change-detected.mjs`:
- Around line 50-56: The watch and run polling helpers are not using the source
execution context, so Rendex requests fall back to the app instance instead of
the source run context. Update _watchIds() and _scanWatch() in
new-change-detected.mjs to accept and forward $, then pass it into
rendex.listWatches() and rendex.listRuns() so _makeRequest() uses the correct
execution context for every polling call.
🪄 Autofix (Beta)
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: ASSERTIVE
Plan: Pro
Run ID: b3ab19dc-d6b3-4435-bc48-0cd06dd86168
📒 Files selected for processing (11)
components/rendex/actions/create-render-link/create-render-link.mjscomponents/rendex/actions/create-watch/create-watch.mjscomponents/rendex/actions/delete-watch/delete-watch.mjscomponents/rendex/actions/extract-content/extract-content.mjscomponents/rendex/actions/get-watch/get-watch.mjscomponents/rendex/actions/list-watch-runs/list-watch-runs.mjscomponents/rendex/actions/render-to-image/render-to-image.mjscomponents/rendex/actions/run-watch/run-watch.mjscomponents/rendex/actions/update-watch/update-watch.mjscomponents/rendex/rendex.app.mjscomponents/rendex/sources/new-change-detected/new-change-detected.mjs
| const { data } = await this.rendex.listWatches({ | ||
| params: { | ||
| status: "all", | ||
| limit: 100, | ||
| cursor, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
APP_FILE=$(fd -p 'rendex.app.mjs' components/rendex)
SOURCE_FILE=$(fd -p 'new-change-detected.mjs' components/rendex/sources)
echo "== _makeRequest default context in app helper =="
sed -n '181,191p' "$APP_FILE"
echo
echo "== source call sites =="
sed -n '45,85p' "$SOURCE_FILE"Repository: PipedreamHQ/pipedream
Length of output: 1903
🏁 Script executed:
#!/bin/bash
set -euo pipefail
APP_FILE=$(fd -p 'rendex.app.mjs' components/rendex)
SOURCE_FILE=$(fd -p 'new-change-detected.mjs' components/rendex/sources)
echo "== app helper context =="
sed -n '160,215p' "$APP_FILE"
echo
echo "== all rendex app method call sites with explicit $ = ="
rg -n "rendex\.(listWatches|listRuns)\(" components/rendex -n -A2 -B2
echo
echo "== other helper patterns in rendex app =="
rg -n "_makeRequest\(\{|axios\(\$," components/rendex/rendex.app.mjs -n -A3 -B3Repository: PipedreamHQ/pipedream
Length of output: 5247
🏁 Script executed:
#!/bin/bash
set -euo pipefail
SOURCE_FILE=$(fd -p 'new-change-detected.mjs' components/rendex/sources)
echo "== source run signature and emitted events =="
sed -n '1,180p' "$SOURCE_FILE"
echo
echo "== source-specific guideline checks in repo =="
rg -n "async run\(|\$emit\(|dedupe: \"unique\"|annotations" components/rendex/sources/new-change-detected/new-change-detected.mjs components/rendex -n -A2 -B2Repository: PipedreamHQ/pipedream
Length of output: 15326
Thread the source execution context into Rendex requests.
_watchIds() and _scanWatch() call listWatches() / listRuns() without $, so _makeRequest() falls back to the app instance instead of the source run context. Pass { $, ... } through both helpers so the shared axios wrapper uses the execution context on every polling request.
🤖 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 `@components/rendex/sources/new-change-detected/new-change-detected.mjs` around
lines 50 - 56, The watch and run polling helpers are not using the source
execution context, so Rendex requests fall back to the app instance instead of
the source run context. Update _watchIds() and _scanWatch() in
new-change-detected.mjs to accept and forward $, then pass it into
rendex.listWatches() and rendex.listRuns() so _makeRequest() uses the correct
execution context for every polling call.
Sources: Coding guidelines, Path instructions
…unt/list/artifact actions - Render to Image + Create Render Link: surface the full capture param surface (viewport, fullPage, darkMode, device presets, selector, cookies, headers, css/js, PDF options, etc.). Render Link omits geo (the API rejects geo on render links). - Create/Update Watch: add renderParams (fullPage, selector, ignoreText, minTextChars, suppressWhilePresent, uaMode). - New actions: List Watches, Get Account, Create Artifact (nested branding).
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@components/rendex/actions/create-render-link/create-render-link.mjs`:
- Around line 193-204: The cookie parsing in create-render-link.mjs still
accepts JSON primitives because the current `this.cookies.map(...)` only parses
strings and never verifies the result shape. Update the cookie normalization
logic in the create-render-link action to validate each parsed item is a
non-array object before assigning to `cookies`, and throw the existing
ConfigurationError when any entry is not a valid cookie object. Use the
`this.cookies` parsing block and the `ConfigurationError` path as the place to
enforce this check.
In `@components/rendex/actions/render-to-image/render-to-image.mjs`:
- Around line 207-218: The cookie parsing in render-to-image.mjs currently
accepts any valid JSON, so primitives like "false" can slip through as cookie
entries. Update the cookie handling in the render-to-image action to validate
each parsed item is a non-array object before assigning to data.cookies, and
reject anything else with ConfigurationError. Use the existing cookie parsing
block in the renderToImage flow to keep the check close to the JSON.parse logic
and ensure only object-shaped cookies are sent downstream.
In `@components/rendex/actions/update-watch/update-watch.mjs`:
- Around line 116-122: The watch filter mapping in the update action is dropping
explicit empty arrays by converting `ignoreText` and `suppressWhilePresent` to
`undefined`, which prevents clearing stored values. Update the
`update-watch.mjs` action to pass these fields through directly in the request
payload, preserving `[]` when the user explicitly clears them, and rely on the
axios client to omit only true `undefined` values. Use the existing
`this.ignoreText` and `this.suppressWhilePresent` properties in the payload
assembly so PATCH can clear those watch settings.
In `@components/rendex/rendex.app.mjs`:
- Around line 286-290: The `headers` prop description in `rendex.app.mjs` is
missing a concrete JSON example, so agents can’t tell the expected object shape.
Update the `headers` field’s `description` to explicitly show an inline JSON
object example for `headers`, using the existing `headers` prop definition as
the anchor, and keep it focused on the expected key-value format rather than a
docs link or alternate representations.
🪄 Autofix (Beta)
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: ASSERTIVE
Plan: Pro
Run ID: 986669e0-5421-47b5-8b44-0b4bfce45044
📒 Files selected for processing (8)
components/rendex/actions/create-artifact/create-artifact.mjscomponents/rendex/actions/create-render-link/create-render-link.mjscomponents/rendex/actions/create-watch/create-watch.mjscomponents/rendex/actions/get-account/get-account.mjscomponents/rendex/actions/list-watches/list-watches.mjscomponents/rendex/actions/render-to-image/render-to-image.mjscomponents/rendex/actions/update-watch/update-watch.mjscomponents/rendex/rendex.app.mjs
…ed watch lists, headers example - render-to-image / create-render-link: reject non-object cookie entries (JSON primitives like "true"/"123" no longer slip through) with the existing ConfigurationError. - update-watch / create-watch: pass ignoreText / suppressWhilePresent through directly so an explicit [] clears the stored list (axios omits only undefined). - rendex.app.mjs: add a concrete JSON example to the headers prop description.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/rendex/rendex.app.mjs (1)
38-41: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winDocument the expected
watchIdformat.
The watch to act on.is too vague for a reused ID prop. Add a concrete example and say where agents can get the value, e.g. from List Watches or a prior watch response.🤖 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 `@components/rendex/rendex.app.mjs` around lines 38 - 41, The watchId prop description is too vague, so update the watchId field in the rendex.app.mjs schema to clearly document the expected format. Add a concrete example of a valid watchId and mention that agents can obtain it from the List Watches action or a prior watch response, keeping the wording aligned with the existing watchId definition.Sources: Coding guidelines, Path instructions
🤖 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.
Outside diff comments:
In `@components/rendex/rendex.app.mjs`:
- Around line 38-41: The watchId prop description is too vague, so update the
watchId field in the rendex.app.mjs schema to clearly document the expected
format. Add a concrete example of a valid watchId and mention that agents can
obtain it from the List Watches action or a prior watch response, keeping the
wording aligned with the existing watchId definition.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6ac78ca2-1091-499c-92b7-7a452631c3bf
📒 Files selected for processing (5)
components/rendex/actions/create-render-link/create-render-link.mjscomponents/rendex/actions/create-watch/create-watch.mjscomponents/rendex/actions/render-to-image/render-to-image.mjscomponents/rendex/actions/update-watch/update-watch.mjscomponents/rendex/rendex.app.mjs
WHY
Follow-up to #21065 (which added the Rendex app + Render to Image). This adds the rest of the Rendex API surface so the integration reaches feature parity with the Rendex SDKs/MCP server.
WHAT
Actions (8 new)
Source (1 new)
App
Notes for review
0.1.0 → 0.2.0; each new component is0.0.1.@pipedream/platformalready present), sopnpm-lock.yamlis unchanged.node --check; component keys are unique; everypropDefinition/method referenced by a component is defined on the app.Summary by CodeRabbit