Skip to content

Conversation

@pankajjs
Copy link

@pankajjs pankajjs commented Mar 29, 2025

Date: 29 March, 2025

Developer Name: @pankajjs


Issue Ticket Number

Description

This PR adds data model and examples of onboarding extension request in different state such as PENDING, APPROVED and REJECTED in readme file.

Doc- https://docs.google.com/document/d/17LAwNt_LijCR9HY5mHim5tGV70OkMkTETZEJ73n1q4w/edit?pli=1&tab=t.0

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

Test Coverage

Screenshot 1

Additional Notes

@coderabbitai
Copy link

coderabbitai bot commented Mar 29, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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.

Summary by CodeRabbit

  • Documentation
    • Introduced a new reference document detailing the expected format for onboarding extension requests.
    • The guide outlines the required structure and provides example JSON data for various request states, ensuring clarity on how to format and interpret different scenarios.

Walkthrough

This pull request introduces a README file for the onboarding extension request Firestore collection model. The document defines a JSON schema that outlines the structure for the collection, including fields such as id, type, userId, state, timestamps, and others. It further provides example JSON objects that illustrate the expected format for requests in the states of PENDING, APPROVED, and REJECTED.

Changes

Files Change Summary
onboarding-extension-requests/README.md Added a README that defines a JSON schema for a new Firestore collection model, including fields and example JSON data entries for each possible state value.

Assessment against linked issues

Objective Addressed Explanation
Add data model and examples for onboarding requests (#73)

Poem

I'm a bouncy bunny with a schema so neat,
Hopping through JSON fields on tiny, swift feet.
🥕 Carrots of code align in rows divine,
With PENDING, APPROVED, REJECTED all in a line.
CodeRabbit cheers this update with a joyful leap—hooray!
Happy hops and kudos as the data sings in the deep!


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 5

🔭 Outside diff range comments (1)
onboarding-extension-requests/README.md (1)

42-101: 💡 Verification agent

🧩 Analysis chain

Confirm JSON Example Consistency
The examples provided for the PENDING, APPROVED, and REJECTED states are clear and useful. However, note that these examples use "requestNumber" while the JSON schema defines the field as "requestedNumber". Please verify and align the field name across all sections of the document to ensure consistency.


Based on the verification, we found that the JSON schema uses "requestedNumber" whereas the examples in the documentation use "requestNumber". This discrepancy should be resolved to maintain consistency across the codebase and documentation.

Align JSON Field Naming for Consistency

  • In onboarding-extension-requests/README.md (lines 42-101), update the examples to use "requestedNumber" instead of "requestNumber" as defined by the JSON schema.
  • This change ensures consistency and reduces potential confusion during schema validation or integration testing.

🏁 Script executed:

#!/bin/bash
# Check for occurrences of "requestedNumber" in the repository to verify the JSON schema definition.
rg -n '"requestedNumber"' .

# Check for occurrences of "requestNumber" in the repository, particularly in documentation or examples.
rg -n '"requestNumber"' .

Length of output: 332


Align JSON Field Naming for Consistency
We've confirmed a naming mismatch between the JSON schema and the examples. The schema defines the field as "requestedNumber" (e.g., in onboarding-extension-requests/README.md line 18), while the JSON examples for the PENDING, APPROVED, and REJECTED states use "requestNumber". Please update the examples in the README file (lines 42–101) to use "requestedNumber" to match the schema definition.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f5be7c and d6c619c.

📒 Files selected for processing (1)
  • onboarding-extension-requests/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
onboarding-extension-requests/README.md

[grammar] ~31-~31: This is normally spelled as one word.
Context: ... | String | The message provided by super user while approving or rejecting request.| ...

(SUPER_COMPOUNDS)


[typographical] ~38-~38: Consider putting a comma before the abbreviation “i.e.”.
Context: ...type | String | The type of request i.e. ONBOARDING. ...

(IE_COMMA)

🪛 markdownlint-cli2 (0.17.2)
onboarding-extension-requests/README.md

2-2: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)


28-28: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


31-31: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


40-40: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


41-41: Multiple consecutive blank lines
Expected: 1; Actual: 3

(MD012, no-multiple-blanks)

🔇 Additional comments (1)
onboarding-extension-requests/README.md (1)

17-18:

Details

✅ Verification successful

Resolve Field Naming Inconsistency
There is an inconsistency between the JSON schema and the Fields table: the schema (line 18) uses "requestedNumber", whereas the Fields table (line 37) refers to it as "requestNumber". Please standardize the field name across the document to avoid confusion.

Also applies to: 37-38


#!/bin/bash
# Check occurrences of "requestedNumber" and "requestNumber" in the README.md file

echo "Occurrences of 'requestedNumber' in onboarding-extension-requests/README.md:"
rg "requestedNumber" -n onboarding-extension-requests/README.md

echo ""
echo "Occurrences of 'requestNumber' in onboarding-extension-requests/README.md:"
rg "requestNumber" -n onboarding-extension-requests/README.md

Could you please run the above script to confirm that the JSON schema (around lines 17-18) uses "requestedNumber" while the Fields table (around lines 37-38) refers to "requestNumber"? Once verified, the review comment can be rewritten as follows:

Field Naming Inconsistency – Standardize Field Name
The JSON schema (line 18) declares "requestedNumber", whereas the Fields table (line 37) uses "requestNumber". To avoid confusion, please update the document so that the field name is consistent throughout (e.g., update the Fields table to use "requestedNumber").

Comment on lines +1 to +3

### Onboarding Extension Request Firestore collection model

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider Adding a Top-Level Heading
While the file begins with a level-3 heading, markdown best practices (and tools such as markdownlint MD041) suggest that the first line should be a top-level (level-1) heading. For better structure and readability, consider replacing the current heading with a level-1 heading (e.g., # Onboarding Extension Request Firestore Collection Model).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2-2: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)

Comment on lines 30 to 32
| newEndsOn | number | New deadline of the onboarding task in millisecond |
| message | String | The message provided by super user while approving or rejecting request.|
| createdAt | Timestamp | Unix timestamp for the creation time of the request. |
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Standardize Terminology: "Superuser" Instead of "Super user"
In the Fields table (line 31), the description reads "The message provided by super user while approving or rejecting request." For consistency and clarity, consider combining it into a single word: "superuser".

🧰 Tools
🪛 LanguageTool

[grammar] ~31-~31: This is normally spelled as one word.
Context: ... | String | The message provided by super user while approving or rejecting request.| ...

(SUPER_COMPOUNDS)

🪛 markdownlint-cli2 (0.17.2)

31-31: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

| reason | String | The reason for the extension request. |
| requestedBy | String | The username of the user who created the request. |
| requestNumber | number | The current request number for onboarding task. |
| type | String | The type of request i.e. ONBOARDING. |
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Enhance Punctuation in Field Description
In the description for the type field (line 38), consider adding commas around "i.e." for clarity. For example, use: "The type of request, i.e., ONBOARDING."

🧰 Tools
🪛 LanguageTool

[typographical] ~38-~38: Consider putting a comma before the abbreviation “i.e.”.
Context: ...type | String | The type of request i.e. ONBOARDING. ...

(IE_COMMA)

Comment on lines 40 to 41


Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Clean Up Extra Blank Lines
There are multiple consecutive blank lines at lines 40–41. Removing the extra blank lines would improve the overall document formatting and readability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

40-40: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


41-41: Multiple consecutive blank lines
Expected: 1; Actual: 3

(MD012, no-multiple-blanks)

Comment on lines 4 to 8
```json
{
"id": "String",
"type": "String"
"userId": "String",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix JSON Syntax: Missing Comma After "type" Field
In the JSON schema block, the "type" field on line 7 is missing a trailing comma. This omission makes the JSON example invalid. Please add a comma after the "type": "String" entry.

-  "type": "String"
+  "type": "String",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```json
{
"id": "String",
"type": "String"
"userId": "String",

Copy link

@AnujChhikara AnujChhikara left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@iamitprakash iamitprakash left a comment

Choose a reason for hiding this comment

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

I need to understand few more things, would love to talk in VC before approving this

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.

Fix: add data model for onboarding extension request

5 participants