feat(docs): Add sequence diagrams and expand open source issues (#652, #664) - #725
Conversation
- Adds Freighter pledge and refund sequence diagrams with PNG fallbacks (ritik4ever#652) - Expands OPEN_SOURCE_ISSUES.md to 20+ issues with difficulty tags (ritik4ever#664)
|
@temitope-007 is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@temitope-007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ARCHITECTURE_DIAGRAMS.md`:
- Around line 400-409: Update both transaction sequence diagrams around the
pledge and refund flows to include wallet/network validation, transaction
construction, simulation, preparation/assembly, Freighter signing and approval,
submission, and final-status polling before showing success. Align the diagram
actors and ordering with the lifecycle implemented by the pledge and refund
service flows, replacing any direct Frontend-to-RPC success path that omits
these stages.
- Around line 396-398: Update the Mermaid participants in the affected diagrams,
including the refund diagram, to declare aliases such as Participant1 for
“Freighter Wallet” and Participant2 for “Soroban RPC.” Replace those multi-word
participant names in all message references with their aliases, while preserving
the displayed labels and existing diagram behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aeaf6e24-c37b-466d-a325-81d76af2319e
📒 Files selected for processing (2)
ARCHITECTURE_DIAGRAMS.mdOPEN_SOURCE_ISSUES.md
| participant Freighter Wallet | ||
| participant Soroban RPC | ||
| participant Smart Contract |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
# Extract and render the two newly added Mermaid blocks.
awk '
/^```mermaid$/ { block++; out=sprintf("/tmp/architecture-diagram-%d.mmd", block); next }
/^```$/ && out { close(out); out=""; next }
out { print > out }
' ARCHITECTURE_DIAGRAMS.md
for file in /tmp/architecture-diagram-*.mmd; do
npx --yes `@mermaid-js/mermaid-cli` -i "$file" -o "${file%.mmd}.svg"
doneRepository: ritik4ever/stellar-goal-vault
Length of output: 703
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf 'Files matching ARCHITECTURE_DIAGRAMS.md:\n'
fd -a 'ARCHITECTURE_DIAGRAMS\.md$' . || true
printf '\nRelevant diagram section:\n'
sed -n '370,435p' ARCHITECTURE_DIAGRAMS.md
printf '\nMMD files extracted:\n'
awk '
/^```mermaid$/ { block++; out=sprintf("/tmp/architecture-diagram-%d.mmd", block); next }
/^```$/ && out { close(out); out=""; next }
out { print > out }
' ARCHITECTURE_DIAGRAMS.md
find /tmp -maxdepth 1 -name 'architecture-diagram-*.mmd' -print -exec sh -c 'echo "--- $1"; sed -n "1,220p" "$1"' sh {} \;Repository: ritik4ever/stellar-goal-vault
Length of output: 2740
🌐 Web query:
Mermaid sequenceDiagram participant alias multi word label documentation participant Alice as Alice
💡 Result:
In Mermaid sequence diagrams, you can define an alias for a participant to display a multi-word label using the as keyword [1][2]. The syntax allows you to use a concise identifier for internal logic while showing a descriptive, multi-word label in the rendered diagram [1][3]. The syntax is: participant as For example, if you want the identifier "Alice" to display as "Alice Smith" or "Primary User": sequenceDiagram participant A as Alice Smith participant B as Primary User A->>B: Hello You can also use this syntax alongside participant stereotype configurations [1][4]: participant API@{ "type": "boundary" } as Public API When using aliases, the identifier (e.g., "A" or "API" in the examples above) is used throughout the rest of your sequence diagram to represent that participant [2]. If you define an alias both via the as keyword and within an inline JSON configuration object, the external as syntax takes precedence [1][4].
Citations:
- 1: https://github.com/mermaid-js/mermaid/blob/develop/docs/syntax/sequenceDiagram.md
- 2: https://www.mintlify.com/mermaid-js/mermaid/diagrams/sequence-diagram
- 3: https://mermaid.ai/open-source/syntax/sequenceDiagram.html
- 4: feat : add alias support for new participant syntax mermaid-js/mermaid#7136
Use aliases for multi-word Mermaid participants.
Declare Participant1 as Freighter Wallet and Participant2 as Soroban RPC, then reference Participant1/Participant2 in the messages. Without aliases, multi-word identifiers may not be parsed reliably as participant IDs across GitHub diagrams.
Also applies to the refund diagram participants.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ARCHITECTURE_DIAGRAMS.md` around lines 396 - 398, Update the Mermaid
participants in the affected diagrams, including the refund diagram, to declare
aliases such as Participant1 for “Freighter Wallet” and Participant2 for
“Soroban RPC.” Replace those multi-word participant names in all message
references with their aliases, while preserving the displayed labels and
existing diagram behavior.
| User->>Frontend: Click "Pledge" & Enter Amount | ||
| Frontend->>Freighter Wallet: Request Signature (XDR) | ||
| Freighter Wallet-->>User: Prompt for Approval | ||
| User->>Freighter Wallet: Approve Transaction | ||
| Freighter Wallet-->>Frontend: Return Signed Transaction | ||
| Frontend->>Soroban RPC: Submit Transaction | ||
| Soroban RPC->>Smart Contract: Execute Pledge | ||
| Smart Contract-->>Soroban RPC: Transaction Success (Events) | ||
| Soroban RPC-->>Frontend: Return TxHash & Success | ||
| Frontend-->>User: Display Success Notification |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Align both diagrams with the actual transaction lifecycle.
The pledge implementation first builds, simulates, prepares, and then signs the transaction before submission (frontend/src/services/freighter.ts:314-451). The refund implementation also validates the wallet/network, simulates and assembles, signs through Freighter, sends, and polls for final success (frontend/src/services/soroban.ts:41-133). Add these stages—especially Freighter signing and final-status polling—to avoid documenting an incorrect direct Frontend → RPC flow.
Also applies to: 424-430
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ARCHITECTURE_DIAGRAMS.md` around lines 400 - 409, Update both transaction
sequence diagrams around the pledge and refund flows to include wallet/network
validation, transaction construction, simulation, preparation/assembly,
Freighter signing and approval, submission, and final-status polling before
showing success. Align the diagram actors and ordering with the lifecycle
implemented by the pledge and refund service flows, replacing any direct
Frontend-to-RPC success path that omits these stages.
Description
This PR addresses two documentation enhancements for the repository:
ARCHITECTURE_DIAGRAMS.md. Both diagrams include PNG fallbacks as requested.OPEN_SOURCE_ISSUES.mdfrom a few ideas to 21 well-defined contribution opportunities, complete with title, difficulty, estimated effort, files to modify, and tags. Exactly 5 of these issues are marked asgood first issue.Acceptance Criteria Met
good first issue.Closes #652
Closes #664
Summary by CodeRabbit