Skip to content

Modified wrapper name of the message#18

Merged
grunch merged 1 commit intoMostroP2P:mainfrom
arkanoider:restore-wrapper
Aug 13, 2025
Merged

Modified wrapper name of the message#18
grunch merged 1 commit intoMostroP2P:mainfrom
arkanoider:restore-wrapper

Conversation

@arkanoider
Copy link
Copy Markdown
Contributor

@arkanoider arkanoider commented Aug 13, 2025

Changed wrapper of new command to restore

Summary by CodeRabbit

  • Documentation
    • Updated Restore Session documentation to use “restore” as the envelope key instead of “order” across client request, server response, and example sections.
    • Clarified that version, action, and payload structures remain unchanged, with orders and disputes still returned as before.
    • Improves consistency and reduces ambiguity for integrators implementing session restoration flows.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 13, 2025

Walkthrough

Renamed the top-level JSON envelope key from "order" to "restore" in three examples within Restore Session documentation: client request, server response, and example use case. Internal fields (version, action, payload) and payload contents remain unchanged.

Changes

Cohort / File(s) Summary
Restore Session docs
src/restore_session.md
Updated three JSON blocks to use "restore" instead of "order" as the top-level envelope key in request, response, and example; internal structure unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I twitch my ears at keys that soar,
From “order” old to “restore.”
A subtle hop, the payload stays,
Same fields dance in tidy arrays.
Carrot-confetti on the floor—
Docs aligned, we bound once more! 🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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
Copy Markdown
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

🔭 Outside diff range comments (2)
src/restore_session.md (2)

76-91: Inconsistent example: order status "dispute" conflicts with documented statuses and duplicates the dispute entry.

Earlier text enumerates order statuses (pending, active, fiat-sent, waiting-buyer-invoice, waiting-payment, settled-hold-invoice). "dispute" is not listed there; plus the same trade_index=4 appears in both orders and disputes arrays. Either remove the order entry for the disputed trade from the orders list or use a valid order status and avoid duplication. Recommend removal for clarity.

Apply this diff to fix the example JSON:

-        { "id": "ghi-789", "trade_index": 3, "status": "active" },
-        { "id": "xyz-999", "trade_index": 4, "status": "dispute" }
+        { "id": "ghi-789", "trade_index": 3, "status": "active" }

11-16: Add deprecation note for the old “order” wrapper in restore-session

All examples now use the "restore" key; no remaining docs reference "order" for restore-session. To avoid client confusion, please insert a brief compatibility note in src/restore_session.md right after the request example.

• File: src/restore_session.md (after line 16)
• Suggested one-liner:

> Note: The previous wrapper key `order` has been deprecated for `restore-session` requests in favor of `restore`.
🧹 Nitpick comments (2)
src/restore_session.md (2)

25-56: Consistent wrapper key in Response; consider documenting allowed top-level wrappers.

The rename is consistently applied in the response block. To reduce ambiguity across commands, add a short note or link listing all valid top-level envelope keys (e.g., order, restore, etc.) and their intended scopes.


7-7: Minor wording nit: “rumor’s content” → “Rumor content”.

To align with Nostr terminology and improve readability, suggest: “...with the following Rumor content:”

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between eb224f2 and f28e554.

📒 Files selected for processing (1)
  • src/restore_session.md (3 hunks)

Copy link
Copy Markdown
Member

@grunch grunch left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the update 👍🏽

@grunch grunch merged commit 3e16525 into MostroP2P:main Aug 13, 2025
1 check passed
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.

2 participants