Skip to content

Conversation

@Aviatorscode2
Copy link
Contributor

@Aviatorscode2 Aviatorscode2 commented Oct 10, 2025

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Contexts guides: overview, managing contexts, workflow usage, and debugging.
    • Added Inbox personalization guide demonstrating scoping, exact-match filtering, on‑the‑fly context creation, HMAC security guidance, and examples.
    • Updated Platform navigation and inbox metadata to surface Contexts and the Inbox-with-Context doc.
    • Expanded SDK and React docs with session-level context support (context, contextHash) and "Using Context" examples.

@linear
Copy link

linear bot commented Oct 10, 2025

@netlify
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for docs-novu ready!

Name Link
🔨 Latest commit f6705f2
🔍 Latest deploy log https://app.netlify.com/projects/docs-novu/deploys/68fbf98db7be5e0008d8d0d8
😎 Deploy Preview https://deploy-preview-983--docs-novu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds 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 context and contextHash.

Changes

Cohort / File(s) Summary
Platform navigation
content/docs/platform/meta.json
Inserted "workflow/contexts" into the Platform pages array to surface the new Contexts section.
Contexts metadata
content/docs/platform/workflow/contexts/meta.json
Added meta describing the "Contexts" section with pages manage-contexts and contexts-in-workflows.
Contexts docs (overview & usage)
content/docs/platform/workflow/contexts/index.mdx, content/docs/platform/workflow/contexts/contexts-in-workflows.mdx
New overview and workflow-usage pages explaining contexts, differences from payloads, {{context}} usage in templates, step conditions, observability, and examples.
Contexts management (CRUD/API)
content/docs/platform/workflow/contexts/manage-contexts.mdx
New management guide: context schema, formats, create/update/retrieve/list/delete semantics, just-in-time creation, limits, and API examples.
Inbox docs & meta
content/docs/platform/inbox/configuration/inbox-with-context.mdx, content/docs/platform/inbox/configuration/meta.json
Added inbox-with-context page and updated inbox meta ordering/description; docs cover exact-match Inbox filtering, on‑the‑fly creation, context prop usage, HMAC guidance, examples and visuals.
SDK docs (JS)
content/docs/platform/sdks/javascript/index.mdx
Documented context and contextHash properties for NovuOptions, added "Using Context" tab and examples showing instantiation and accessing novu.context / novu.contextKey.
React provider docs
content/docs/platform/sdks/react/hooks/novu-provider.mdx
Documented new context and contextHash props for NovuProvider, added "Using Context" example/tab and usage snippet with useNovu.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to SDK/React docs additions (content/docs/platform/sdks/javascript/index.mdx, content/docs/platform/sdks/react/hooks/novu-provider.mdx) for type and example correctness.
  • Verify nav/meta ordering and link correctness (content/docs/platform/meta.json, content/docs/platform/inbox/configuration/meta.json).
  • Review new MDX examples for accuracy and consistent terminology.

Possibly related PRs

Suggested reviewers

  • jainpawan21
  • DianaHackmamba
  • LetItRock

Poem

🐇 A hop, a note, a context found,

I stitched the docs into the ground.
Workflows hum and Inboxes sing,
Contexts tidy everything.
Tiny rabbit, big doc bound.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Docs for content page and CRUD operations for context" does refer to actual changes within the PR. The pull request includes documentation for CRUD operations (specifically manage-contexts.mdx covering create, update, retrieve, list, and delete operations) and multiple new documentation pages. However, the title only emphasizes the CRUD operations aspect and does not capture the primary scope of the PR, which is introducing comprehensive Contexts documentation across multiple platform areas including workflows, Inbox personalization, and SDK integration. While the title references a real part of the change, it fails to represent the breadth and main objective of adding foundational Contexts feature documentation.

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 72b6faa and 8d75fc6.

📒 Files selected for processing (2)
  • content/docs/platform/meta.json (1 hunks)
  • content/docs/platform/workflow/contexts.mdx (1 hunks)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 937af0e and 8defd4b.

📒 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

Copy link
Contributor

@ChmaraX ChmaraX left a 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3ffe7ac and 6fb394e.

⛔ Files ignored due to path filters (2)
  • public/images/workflows/resolved-context.png is excluded by !**/*.png
  • public/images/workflows/search-context-activityfeed.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • content/docs/platform/workflow/contexts.mdx (1 hunks)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 conditions

Also 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-corp

Also 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb394e and 6a609bf.

📒 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 examples

Examples 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6a609bf and fb7392f.

📒 Files selected for processing (1)
  • content/docs/platform/workflow/contexts.mdx (1 hunks)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6a609bf and fb7392f.

📒 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>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 with id properties 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 optional data), not bare strings or objects without id. 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

📥 Commits

Reviewing files that changed from the base of the PR and between fb7392f and a6ec1aa.

📒 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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:

  1. Adding bash identifier to all shell/API call examples, or
  2. 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

📥 Commits

Reviewing files that changed from the base of the PR and between a6ec1aa and 82ca9c0.

⛔ Files ignored due to path filters (5)
  • public/images/workflows/contexts/context.gif is excluded by !**/*.gif
  • public/images/workflows/contexts/create-context.png is excluded by !**/*.png
  • public/images/workflows/contexts/create-contexts.png is excluded by !**/*.png
  • public/images/workflows/contexts/delete-context.png is excluded by !**/*.png
  • public/images/workflows/contexts/delete.png is 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. ![Delete context](/...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

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:

  1. The content body was intentionally omitted and will be added in a follow-up commit
  2. A separate file with the actual content exists elsewhere
  3. 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:

  1. The index.mdx file is accessible via the directory root URL or parent navigation
  2. 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 82ca9c0 and e4f3589.

⛔ Files ignored due to path filters (2)
  • public/images/inbox/context-trigger.png is excluded by !**/*.png
  • public/images/inbox/context.png is 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between e4f3589 and 74b5e91.

📒 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

Aviatorscode2 and others added 3 commits October 22, 2025 00:41
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>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 74b5e91 and 5949cd6.

📒 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:

  1. Grammar error (line 62): "When a workflow with these exact context is triggered" should use "this exact context" (subject-verb agreement).
  2. 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5949cd6 and 7347e70.

📒 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/javascript with the text "Context". While the link may be appropriate for SDK context usage, the previous review suggested linking to /platform/workflow/contexts for 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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/overview or /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.

Comment on lines 66 to 71
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
Copy link
Contributor

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.

Comment on lines 32 to 34
- **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.
Copy link
Contributor

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/javascript which 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7347e70 and 5f64a99.

📒 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 applicationIdentifier may already serve this purpose. Before this documentation goes live, confirm that:

  • Context and applicationIdentifier serve distinct use cases (e.g., context for runtime filtering, applicationIdentifier for 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
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

@jainpawan21 jainpawan21 changed the base branch from main to feature/context October 26, 2025 15:36
@jainpawan21 jainpawan21 merged commit f1a4ce0 into feature/context Oct 26, 2025
1 check passed
@jainpawan21 jainpawan21 deleted the MRK-1074 branch October 26, 2025 16:25
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.

4 participants