-
Couldn't load subscription status.
- Fork 111
Docs for content page and CRUD operations for context #983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for docs-novu ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds documentation, navigation metadata, and SDK/React docs to introduce session and workflow "Contexts": new workflow context pages and management docs, Inbox integration docs, and SDK/React options for Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant TriggerSvc as Trigger Service
participant ContextAPI as Context Store/API
participant Workflow as Workflow Engine
participant Template as Template Renderer
participant Inbox as Inbox Component
participant Activity as Activity Feed
rect rgb(235,245,255)
note left of Client #e8f0ff: Client triggers event with optional contexts and HMAC
Client->>TriggerSvc: trigger(event, payload, contexts, contextHash)
TriggerSvc->>ContextAPI: create/ensure contexts (just-in-time)
ContextAPI-->>TriggerSvc: context ids
end
rect rgb(245,255,235)
TriggerSvc->>Workflow: start workflow(runId, contextRefs)
Workflow->>ContextAPI: fetch context objects
ContextAPI-->>Workflow: context data
Workflow->>Template: render templates with {{context}}
Template-->>Workflow: rendered content
Workflow->>Inbox: deliver notification (includes context refs/resolved context)
end
rect rgb(255,245,235)
Workflow->>Workflow: evaluate step conditions using contexts
Workflow->>Activity: record run (context refs included)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/platform/meta.json(1 hunks)content/docs/platform/workflow/contexts.mdx(1 hunks)
Co-authored-by: DianaHackmamba <[email protected]>
Co-authored-by: DianaHackmamba <[email protected]>
Co-authored-by: DianaHackmamba <[email protected]>
Co-authored-by: DianaHackmamba <[email protected]>
Co-authored-by: DianaHackmamba <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
content/docs/platform/workflow/contexts.mdx (1)
108-108: Remove quotes around UI tab name.Line 108 still wraps the Step Conditions tab label in quotes. Please drop the quotes to match the UI copy the reader will see.
- You can use context variables in the "Step conditions" tab of a workflow step to add conditional logic to your notifications. + You can use context variables in the Step Conditions tab of a workflow step to add conditional logic to your notifications.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/docs/platform/workflow/contexts.mdx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Lint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, it looks good to me.
I would maybe suggest thinking about explaining the concept using some "Recipes" for usecases we know our customers need. Mainly because context is not much of a feature in itself but rather enabler for more complex scenarios. I think @ComBarnea has a list of potential context usecases from customer meetings which could help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
public/images/workflows/resolved-context.pngis excluded by!**/*.pngpublic/images/workflows/search-context-activityfeed.pngis excluded by!**/*.png
📒 Files selected for processing (1)
content/docs/platform/workflow/contexts.mdx(1 hunks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (7)
content/docs/platform/workflow/contexts.mdx (7)
8-8: Grammar: “behavior in workflows”, not “to workflows”.Tighten the intro sentence.
-_Contexts_ are flexible, user-defined data objects that help you organize and personalize your notifications. They let you attach metadata, such as tenant, region, or app details, and enable contextual behavior to workflows, notifications, and other entities across Novu. +_Contexts_ are flexible, user-defined data objects that help you organize and personalize your notifications. They let you attach metadata, such as tenant, region, or app details, and enable contextual behavior in workflows, notifications, and other entities across Novu.
14-14: Heading consistency: pluralization and sentence case.Align headings with earlier capitalization guidance.
-## How context works +## How contexts work-## Manage context +## Manage contexts-### Create a Context +### Create a context-### Using context in step conditions +### Use contexts in step conditionsAlso applies to: 136-136, 140-140, 106-106
99-104: Style: prefer “Alternatively:” over standalone “Or”.Minor wording polish.
-Or +Alternatively:
177-186: Add language identifiers to code fences for proper syntax highlighting.Improve readability by tagging blocks.
-``` +```javascript await novu.trigger('welcome-email', {-``` +```http GET /v2/contexts/:type/:id-``` +```http GET /v2/contexts/tenant/acme-corp-``` +```http DELETE /v2/contexts/:type/:id-``` +```http DELETE /v2/contexts/tenant/acme-corpAlso applies to: 228-236, 274-276, 280-282
155-155: Numbered list indent: align step 5 with previous steps.The extra leading spaces can break list rendering.
- 5. Click **Create context** to save the context. +5. Click **Create context** to save the context.
196-196: Page name consistency: “Contexts page”.Use the plural to match the sidebar item.
-3. Click on the context you wish to edit from the context list on the Context page. +3. Click the context you wish to edit from the list on the Contexts page.
266-268: Tighten delete flow phrasing; avoid comma splice and “...” UI text.Clear, action-focused steps.
-3. Click on the **...** icon on the row of the context you want to remove. -4. Click **Delete context**, a menu will appear. -5. Click **Delete context**. +3. Click the ellipsis icon (…) on the row of the context you want to remove. +4. Click **Delete context**; a confirmation dialog appears. +5. Confirm by clicking **Delete context**.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/docs/platform/workflow/contexts.mdx(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
- GitHub Check: Build and Lint
🔇 Additional comments (3)
content/docs/platform/workflow/contexts.mdx (3)
109-135: Verified that all referenced images exist.
1-6: Navigation entry exists in Platform meta.json. Found"workflow/contexts"in content/docs/platform/meta.json.
41-52: Standardize or document context shapes across trigger examplesExamples currently mix flat keys, nested
{id, data}objects, and shorthand strings. Either:
- Standardize all trigger examples to a single canonical context schema, or
- Explicitly document supported context shapes, their merging/override rules, and mapping to persisted Context entities
Confirm the officially supported trigger payload shapes and resolution behavior.
Co-authored-by: DianaHackmamba <[email protected]>
Co-authored-by: DianaHackmamba <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
content/docs/platform/workflow/contexts.mdx (1)
16-19: Rephrase the “Imagine” setup.Previous feedback asked us to avoid “Imagine …” constructions in doc prose. Please switch to a direct, declarative lead-in (e.g., “Consider a subscriber…” or “A single subscriber …”) to stay aligned with our docs voice.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/docs/platform/workflow/contexts.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/platform/workflow/contexts.mdx
[grammar] ~142-~142: There might be a mistake here.
Context: ...a Context You can create a new context via Novu dashboard or API, when you want to...
(QB_NEW_EN)
[grammar] ~144-~144: There might be a mistake here.
Context: ...our environment. #### Create a context via dashboard Use the dashboard to manuall...
(QB_NEW_EN)
[grammar] ~149-~149: There might be a mistake here.
Context: ...rd 2. Click Contexts on the sidebar. 3. Click Create context. 4. Complete th...
(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ...data it holds. #### Retrieve a context via dashboard 1. Log in to the Novu dashbo...
(QB_NEW_EN)
[grammar] ~221-~221: There might be a mistake here.
Context: ... view the list of all existing contexts. 3. Click any context entry to see its detai...
(QB_NEW_EN)
[grammar] ~241-~241: There might be a mistake here.
Context: ...r ID. #### List or search for contexts via dashboard 1. Log in to the Novu dashbo...
(QB_NEW_EN)
[grammar] ~244-~244: There might be a mistake here.
Context: ...s** on the sidebar to view all contexts. 3. Use the search bar to filter by context ...
(QB_NEW_EN)
[grammar] ~262-~262: There might be a mistake here.
Context: ...alyze. #### Delete a context via dashboard 1. Log in to the Novu dashbo...
(QB_NEW_EN)
[style] ~267-~267: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...w of the context you want to remove. 4. Click Delete context, a menu will appear....
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[grammar] ~267-~267: There might be a mistake here.
Context: ... Delete context, a menu will appear. 5. Click Delete context. #### Delete a...
(QB_NEW_EN)
[style] ~268-~268: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...elete context**, a menu will appear. 5. Click Delete context. #### Delete a cont...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Lint
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (2)
content/docs/platform/workflow/contexts.mdx (2)
177-186: Fix just-in-time context example payload structure.The JIT example uses string literals for context values (
tenant: 'acme-corp',app: 'jira'), but should use objects withidproperties to match the API requirements shown in the Create via API section. This prevents the example from working as written.Apply this diff:
await novu.trigger('welcome-email', { to: '[email protected]', payload: { userName: 'John' }, context: { - tenant: 'acme-corp', // Created automatically if it doesn't exist - app: 'jira' + tenant: { + id: 'acme-corp' + }, + app: { + id: 'jira' + } } });
41-64: Fix context payload structure in trigger examples to match API requirements.The examples show incorrect context structure. Each context key should be an object with
id(and optionaldata), not bare strings or objects withoutid. Compare to the Create via API section (lines 161–171), which shows the correct shape.Apply this diff to fix both trigger examples:
// Notion Email notification await novu.trigger('new-email-received', { to: '[email protected]', payload: { title: 'You have 1 new email' }, context: { - app: 'notion-email', + app: { + id: 'notion-email', + data: { + branding: { + logo: "url_for_email_logo.png" + } + } + } - branding: { - logo: "url_for_email_logo.png" - } } }); // Notion Calendar notification await novu.trigger('new-calendar-event', { to: '[email protected]', payload: { title: 'You have a new meeting invite' }, context: { - app: 'notion-calendar', + app: { + id: 'notion-calendar', + data: { + branding: { + logo: "url_for_calendar_logo.png" + } + } + } - branding: { - logo: "url_for_calendar_logo.png" - } } });
🧹 Nitpick comments (1)
content/docs/platform/workflow/contexts.mdx (1)
267-268: Reduce repetitive "Click" sentence starts in Delete section.Lines 267–268 begin successive steps with "Click," which is flagged by style checkers. Combine or reword to improve readability.
Apply this diff to reduce repetition:
3. Click on the **...** icon on the row of the context you want to remove. -4. Click **Delete context**, a menu will appear. -5. Click **Delete context**. +4. Select **Delete context** from the menu that appears. +5. Confirm the deletion by clicking **Delete context**.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/docs/platform/workflow/contexts.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/platform/workflow/contexts.mdx
[grammar] ~144-~144: There might be a mistake here.
Context: ...our environment. #### Create a context via dashboard Use the dashboard to manuall...
(QB_NEW_EN)
[grammar] ~149-~149: There might be a mistake here.
Context: ...rd 2. Click Contexts on the sidebar. 3. Click Create context. 4. Complete th...
(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ...data it holds. #### Retrieve a context via dashboard 1. Log in to the Novu dashbo...
(QB_NEW_EN)
[grammar] ~221-~221: There might be a mistake here.
Context: ... view the list of all existing contexts. 3. Click any context entry to see its detai...
(QB_NEW_EN)
[grammar] ~241-~241: There might be a mistake here.
Context: ...r ID. #### List or search for contexts via dashboard 1. Log in to the Novu dashbo...
(QB_NEW_EN)
[grammar] ~244-~244: There might be a mistake here.
Context: ...s** on the sidebar to view all contexts. 3. Use the search bar to filter by context ...
(QB_NEW_EN)
[grammar] ~262-~262: There might be a mistake here.
Context: ...alyze. #### Delete a context via dashboard 1. Log in to the Novu dashbo...
(QB_NEW_EN)
[style] ~267-~267: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...w of the context you want to remove. 4. Click Delete context, a menu will appear....
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[grammar] ~267-~267: There might be a mistake here.
Context: ... Delete context, a menu will appear. 5. Click Delete context. #### Delete a...
(QB_NEW_EN)
[style] ~268-~268: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...elete context**, a menu will appear. 5. Click Delete context. #### Delete a cont...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Build and Lint
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
🔇 Additional comments (3)
content/docs/platform/workflow/contexts.mdx (3)
1-12: Front-matter and constraints look good.The description correctly describes the page content, and the constraint callout clearly states the five-context limit and 64KB per-context-data cap.
73-110: Subsections formatting is now correct.The "How to use contexts" subsections are properly formatted with headings and de-indented content. The code examples are correctly fenced.
111-135: Observability section is clear and well-structured.Good coverage of searching workflow runs and verifying resolved context via API traces. The step-by-step instructions are easy to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
content/docs/platform/workflow/contexts/manage-contexts.mdx (1)
69-94: Verify code block syntax for shell examples.The code blocks at lines 69-79 and 112-120 use triple backticks with "bash" identifier, but lines 85-94 and other API examples use plain triple backticks without language identifier. For consistency and syntax highlighting, consider:
- Adding
bashidentifier to all shell/API call examples, or- Creating a uniform format across all code blocks
This is a minor formatting consistency issue but worth standardizing.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
public/images/workflows/contexts/context.gifis excluded by!**/*.gifpublic/images/workflows/contexts/create-context.pngis excluded by!**/*.pngpublic/images/workflows/contexts/create-contexts.pngis excluded by!**/*.pngpublic/images/workflows/contexts/delete-context.pngis excluded by!**/*.pngpublic/images/workflows/contexts/delete.pngis excluded by!**/*.png
📒 Files selected for processing (6)
content/docs/platform/inbox/configuration/inbox-with-context.mdx(1 hunks)content/docs/platform/inbox/configuration/meta.json(1 hunks)content/docs/platform/workflow/contexts/contexts-in-workflows.mdx(1 hunks)content/docs/platform/workflow/contexts/index.mdx(1 hunks)content/docs/platform/workflow/contexts/manage-contexts.mdx(1 hunks)content/docs/platform/workflow/contexts/meta.json(1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/docs/platform/workflow/contexts/manage-contexts.mdx
[style] ~175-~175: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...w of the context you want to remove. 4. Click Delete context, a menu will appear....
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~177-~177: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...mages/workflows/contexts/delete.png) 5. Click Delete context. 
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[grammar] ~1-~1: Hier könnte ein Fehler sein.
Context: --- pageTitle: 'Using contexts for Inbox personalization' title: 'Inbox with context' description: 'Learn how to use the data object to extend in-app notifications with custom metadata.' icon: 'Table' ---
(QB_NEW_DE)
content/docs/platform/workflow/contexts/index.mdx
[grammar] ~16-~16: Ensure spelling is correct
Context: ...er records or complex workarounds. For exampl, if you have a single subscriber entity...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
🔇 Additional comments (6)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (1)
1-6: Missing documentation content body.The file contains only frontmatter with no MDX body content. While the front matter metadata is correct, users navigating to this page will not find any actual documentation. Verify whether:
- The content body was intentionally omitted and will be added in a follow-up commit
- A separate file with the actual content exists elsewhere
- The documentation should be backfilled before merging
content/docs/platform/inbox/configuration/meta.json (1)
4-4: Navigation update is correct.The addition of "inbox-with-context" to the pages array properly surfaces the new documentation page in the sidebar navigation. The cross-reference to the MDX file is correct.
content/docs/platform/workflow/contexts/meta.json (1)
1-6: Verify the documentation structure and index page routing.The meta.json file references two pages (manage-contexts and contexts-in-workflows), but the directory also contains an index.mdx file. Verify that:
- The index.mdx file is accessible via the directory root URL or parent navigation
- This aligns with the documentation site's routing conventions
content/docs/platform/workflow/contexts/index.mdx (1)
1-71: Comprehensive and well-structured feature overview.The documentation clearly explains the Context feature, differentiates it from payloads, and provides practical code examples and use cases. The problem/solution narrative effectively illustrates why contexts are needed.
content/docs/platform/workflow/contexts/contexts-in-workflows.mdx (1)
1-78: Well-written guide with clear examples and cross-references.The documentation provides practical guidance on using contexts within templates and step conditions, with good visual structure and cross-references to related documentation.
Verify that the referenced image assets exist:
/images/workflows/contexts/context.gif(line 45)/images/workflows/context-step-conditions.png(line 52)/images/workflows/search-context-activityfeed.png(line 68)/images/workflows/resolved-context.png(line 79)content/docs/platform/workflow/contexts/manage-contexts.mdx (1)
1-192: Comprehensive and well-organized CRUD documentation.The documentation systematically covers all context management operations through both dashboard UI and API endpoints, with clear examples and proper API endpoint formatting. The structure (dashboard followed by API) is consistent and user-friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (1)
8-8: Consider removing self-referential links to the current page.Lines 8, 14, and 40 repeatedly link back to the current page (
/platform/inbox/configuration/inbox-with-context) using the<Method>component. Since this documentation is already on that page, these self-references are redundant and may create unnecessary visual clutter. Consider replacing them with plain text references to<Inbox />or removing the links altogether.Also applies to: 14-14, 40-40
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
public/images/inbox/context-trigger.pngis excluded by!**/*.pngpublic/images/inbox/context.pngis excluded by!**/*.png
📒 Files selected for processing (2)
content/docs/platform/inbox/configuration/inbox-with-context.mdx(1 hunks)content/docs/platform/inbox/configuration/meta.json(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: PR Checks
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[error] 48-48: ESLint MDX parsing error: Parsing error: '>' expected. (from ESLint on MDX)
🪛 LanguageTool
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[grammar] ~62-~62: Ensure spelling is correct
Context: ... }, }} /> ``` When a workflow with these exact context is trigger, as seen below...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
🔇 Additional comments (2)
content/docs/platform/inbox/configuration/meta.json (1)
4-5: LGTM!The navigation metadata is properly updated to surface the new Inbox context documentation. The addition of "inbox-with-context" to the pages array and the reordering to place "icons" at the end maintains a logical progression. The description accurately reflects the expanded feature coverage.
Verify that the page slug "inbox-with-context" matches the actual filename and MDX frontmatter configuration in the new documentation file.
content/docs/platform/inbox/configuration/inbox-with-context.mdx (1)
44-60: Fix grammar error on line 62: "context is trigger" should be "context is triggered".Line 62 has a subject-verb agreement error. Change "When a workflow with these exact context is trigger" to "When a workflow with these exact context is triggered" (or alternatively: "When a workflow with these exact contexts are triggered").
The code block at lines 44-60 is syntactically correct and does not exhibit the claimed ESLint MDX parsing error.
Likely an incorrect or invalid review comment.
content/docs/platform/inbox/configuration/inbox-with-context.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/platform/sdks/javascript/index.mdx(3 hunks)content/docs/platform/sdks/react/hooks/novu-provider.mdx(4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-09T13:28:47.834Z
Learnt from: jackall3n
PR: novuhq/docs#929
File: content/docs/platform/sdks/react-native/hooks/novu-provider.mdx:48-53
Timestamp: 2025-08-09T13:28:47.834Z
Learning: In the novu/react-native and novu/react packages, the NovuProvider component uses the prop name `subscriber` (not `subscriberId`) to pass the subscriber identifier. This is consistent across all documentation examples and the actual implementation.
Applied to files:
content/docs/platform/sdks/react/hooks/novu-provider.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
🔇 Additional comments (4)
content/docs/platform/sdks/javascript/index.mdx (2)
29-35: Context and contextHash fields properly documented.The new fields are appropriately added to the NovuOptions TypeTable with clear descriptions. The contextHash description correctly notes the HMAC requirement.
83-106: Using Context example is well-structured and helpful.The example clearly demonstrates context instantiation, property access, and the contextKey behavior with helpful console log comments showing expected output.
content/docs/platform/sdks/react/hooks/novu-provider.mdx (2)
27-34: Context props properly documented with clear descriptions.The context and contextHash fields are consistently formatted and appropriately describe their purpose and HMAC requirement.
84-84: Align documentation link paths between JavaScript and React SDKs.The JavaScript SDK example (line 84) links to
/platform/inbox/customization-and-configuration/inbox-with-context, while the React example (line 92) links to/platform/inbox/configuration/inbox-with-context. These should be consistent.Verify which path is correct and update both files to use the same canonical URL path.
Also applies to: 92-92
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (1)
62-62: Fix grammar error: subject-verb agreement.Line 62 has a grammatical error: "When a workflow with these exact context is trigger" should be "When a workflow with these exact context is triggered".
Apply this diff:
-When a workflow with these exact context is trigger, as seen below +When a workflow with these exact context is triggered, as seen below
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
content/docs/platform/inbox/configuration/inbox-with-context.mdx(1 hunks)content/docs/platform/workflow/contexts/index.mdx(1 hunks)content/docs/platform/workflow/contexts/manage-contexts.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- content/docs/platform/workflow/contexts/manage-contexts.mdx
- content/docs/platform/workflow/contexts/index.mdx
🧰 Additional context used
🪛 GitHub Actions: PR Checks
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[error] 48-48: MDX lint failed. Parsing error: '>' expected.
🪛 LanguageTool
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[grammar] ~62-~62: Ensure spelling is correct
Context: ... }, }} /> ``` When a workflow with these exact context is triggered, as seen bel...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (1)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (1)
44-60: **** The claimed critical MDX parsing error at line 48 cannot be verified—the code block syntax is valid and properly formatted for MDX. However, two actual issues remain:
- Grammar error (line 62): "When a workflow with these exact context is triggered" should use "this exact context" (subject-verb agreement).
- Missing link (line 70): The Callout references "Novu SDK Context documentation" as plain text but should link it to the corresponding SDK documentation page (similar to how the line 76 Callout links to
[Prepare for Production](/platform/inbox/prepare-for-production)).Likely an incorrect or invalid review comment.
content/docs/platform/inbox/configuration/inbox-with-context.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/platform/inbox/configuration/inbox-with-context.mdx(1 hunks)content/docs/platform/sdks/react/hooks/novu-provider.mdx(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- content/docs/platform/sdks/react/hooks/novu-provider.mdx
🧰 Additional context used
🪛 GitHub Actions: PR Checks
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[error] 48-48: ESLint MDX parsing error in inbox-with-context.mdx: Parsing error: '>' expected.
🪛 LanguageTool
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[grammar] ~62-~62: Ensure spelling is correct
Context: ... }, }} /> ``` When a workflow with these exact context is triggered, as seen bel...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
🔇 Additional comments (2)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (2)
70-70: Verify the Callout link destination and text clarity.The Callout at line 70 now links to
/platform/sdks/javascriptwith the text "Context". While the link may be appropriate for SDK context usage, the previous review suggested linking to/platform/workflow/contextsfor conceptual context documentation. Additionally, the link text "Context" alone is vague—consider whether "JavaScript SDK documentation" or a more specific label would better guide readers.Confirm that this link is intended to teach "how to use context with the Novu SDKs" as stated, or update to point to the appropriate contexts overview page if needed.
44-60: Remove the ESLint parsing error concern—it does not exist in the current file.The code block at lines 44–60 is syntactically valid TypeScript/JSX and contains no parsing errors. Line 48 (
subscriber="SUBSCRIBER_ID") is correct JSX syntax, and the closing/>tag is properly positioned. The review comment's claim about a "Parsing error: '>' expected" does not match the actual file content.However, the file does contain a separate issue: multiple self-referential links to the current page at lines 8, 14, 40, and 66 all href to
/platform/inbox/configuration/inbox-with-context(the current page itself). This is unusual for documentation and should be corrected to link to appropriate target pages or removed if they serve no purpose.Likely an incorrect or invalid review comment.
| icon: 'Package' | ||
| --- | ||
|
|
||
| _Contexts_ let you scope each <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method> instance to a specific environment, tenant, or app within your product. When combined with workflow-level contexts, they ensure that each <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method> displays only the notifications relevant to that specific context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or correct self-referential links to the current page.
Lines 8, 14, 40, and 66 all use <Method href="/platform/inbox/configuration/inbox-with-context"> which links to the current page. Self-referential links don't provide value to readers. Either:
- Remove the
<Method>wrapper and use plain text for the component name, or - Link to a related conceptual page (e.g.,
/platform/inbox/overviewor/platform/workflow/contexts)
Example fix for line 8:
-_Contexts_ let you scope each <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method> instance to a specific environment, tenant, or app within your product. When combined with workflow-level contexts, they ensure that each <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method> displays only the notifications relevant to that specific context.
+_Contexts_ let you scope each {`<Inbox />`} instance to a specific environment, tenant, or app within your product. When combined with workflow-level contexts, they ensure that each {`<Inbox />`} displays only the notifications relevant to that specific context.Also applies to: 14-14, 40-40, 66-66
🤖 Prompt for AI Agents
In content/docs/platform/inbox/configuration/inbox-with-context.mdx around lines
8, 14, 40, and 66, replace the self-referential <Method
href="/platform/inbox/configuration/inbox-with-context">...</Method> wrappers
with either plain text component names (e.g., `<Inbox />`) or change the href to
a more useful target such as `/platform/inbox/overview` or
`/platform/workflow/contexts`; update each occurrence so the link no longer
points to the current page and preserves surrounding punctuation and formatting.
| Here are some ways that you can use contexts: | ||
|
|
||
| - **Multi-tenancy and app routing**: Use a tenant or app context to dynamically alter notification content, branding, or logic for different customers or applications from a single workflow. | ||
| - **Shared chat credentials**: For chat providers like Slack or MS Teams, store workspace-level credentials (for example, a bot token) in a context. This allows multiple subscribers within that workspace to receive notifications without each subscriber needing to store the shared token. | ||
| - **A/B testing**: Pass a campaign identifier in a context (for example, campaign: 'new-welcome-email-v2'). Use this in a condition step to split users into different notification paths and measure which performs better. | ||
| - **Data residency and compliance**: Use a region context to tag notifications with their origin. This can help in applying data retention policies or filtering data for compliance audits. No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was listed as "Other potential use-cases" in the DX guide just to hint what we could do with it in the future, not that it works right away - e.g. "Shared chat credentials" this is not yet implemented.
I would suggest listing actual customer use-cases / recipes, as I suggested in the last review.
| - **Dynamic tenants or organizations**: When users join or switch organizations. | ||
| - **Per-environment views**: Isolating notifications for staging, production, or preview. | ||
| - **Feature-specific dashboards**: Where each section of your app has its own notification scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is accurate use of context - to distinguish Inbox per environment and organization we already use applicationIdentifier
…rather do findOrCreate,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (2)
8-8: Remove self-referential links to the current page.Lines 8, 14, 42, 68, and 80 wrap
<Inbox />and<Inbox/>with<Method href="/platform/inbox/configuration/inbox-with-context">links pointing to the current page. These self-referential links provide no navigation value and should be removed.Apply this diff to remove the self-referential wrappers:
-_Contexts_ let you scope each <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method> instance to a specific environment, tenant, or app within your product. When combined with workflow-level contexts, they ensure that each <Method href="/platform/inbox/configuration/inbox-with-context">{`<Inbox />`}</Method> displays only the notifications relevant to that specific context. +_Contexts_ let you scope each {`<Inbox />`} instance to a specific environment, tenant, or app within your product. When combined with workflow-level contexts, they ensure that each {`<Inbox />`} displays only the notifications relevant to that specific context.Apply the same approach to lines 14, 42, 68, and 80.
Also applies to: 14-14, 42-42, 68-68, 80-80
72-72: Fix Callout link target.The Callout references context documentation but links to
/platform/sdks/javascriptwhich is incorrect. Based on the page structure and prior review feedback, this should link to the contexts overview.Apply this diff:
-<Callout>To learn how to use context with the Novu SDKs, visit the <Method href="/platform/sdks/javascript">{`Context`}</Method> documentation.</Callout> +<Callout>To learn how to use context with the Novu SDKs, visit the <Method href="/platform/workflow/contexts">{`Context`}</Method> documentation.</Callout>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/docs/platform/inbox/configuration/inbox-with-context.mdx(1 hunks)content/docs/platform/workflow/contexts/manage-contexts.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- content/docs/platform/workflow/contexts/manage-contexts.mdx
🧰 Additional context used
🪛 GitHub Actions: PR Checks
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[error] 50-50: ESLint MDX parsing error in inbox-with-context.mdx at line 50: '>' expected.
🪛 LanguageTool
content/docs/platform/inbox/configuration/inbox-with-context.mdx
[grammar] ~64-~64: Ensure spelling is correct
Context: ... }, }} /> ``` When a workflow with these exact context is triggered, as seen bel...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - docs-novu
- GitHub Check: Header rules - docs-novu
- GitHub Check: Pages changed - docs-novu
🔇 Additional comments (2)
content/docs/platform/inbox/configuration/inbox-with-context.mdx (2)
1-80: Verify context design aligns with existing tenant/environment isolation mechanisms.A past reviewer (ChmaraX) questioned whether using contexts is the right approach to distinguish Inbox per environment and organization, noting that
applicationIdentifiermay already serve this purpose. Before this documentation goes live, confirm that:
- Context and
applicationIdentifierserve distinct use cases (e.g., context for runtime filtering,applicationIdentifierfor app-level routing)- The documentation accurately reflects when to use each approach
- There's no overlap or redundancy in the feature set
Please clarify the design intent and update documentation if needed to prevent user confusion about when to use contexts versus
applicationIdentifier.
50-50: Verify ESLint error locally with full project setup.Direct file inspection shows the code at line 50 is syntactically correct—the
applicationIdentifier="APPLICATION_IDENTIFIER"attribute is valid JSX within a properly formed ```typescript code block. The sandbox environment lacks the project's ESLint configuration, preventing verification of the reported parsing error.The syntax appears sound, but the ESLint error may be specific to your project's configuration or build pipeline. Please run the linter locally with your full project setup to confirm whether this is a genuine blocking issue or a false positive. If the error persists, inspect the exact error message to identify whether it stems from MDX-specific rules, quote escaping, or JSX parsing configuration.
| /> | ||
| ``` | ||
|
|
||
| When a workflow with these exact context is triggered, as seen below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix subject-verb number agreement.
Line 64 reads "When a workflow with these exact context is triggered" but should use plural "contexts" to match the concept of multiple key-value pairs.
Apply this diff:
-When a workflow with these exact context is triggered, as seen below
+When a workflow with these exact contexts is triggered, as seen below🧰 Tools
🪛 LanguageTool
[grammar] ~64-~64: Ensure spelling is correct
Context: ... }, }} /> ``` When a workflow with these exact context is triggered, as seen bel...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
In content/docs/platform/inbox/configuration/inbox-with-context.mdx around line
64, fix the subject-verb agreement by changing "When a workflow with these exact
context is triggered" to use the plural noun "contexts" (i.e., "When a workflow
with these exact contexts is triggered") so the sentence correctly refers to
multiple key-value pairs; update the text accordingly and run a quick
spell/grammar check on nearby sentences for consistency.
Summary by CodeRabbit