Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); feat: add clipboard paste button to destination address inputs by MJ-RWA · Pull Request #40 · MJ-RWA/Stellarflow · GitHub
Skip to content

feat: add clipboard paste button to destination address inputs - #40

Open
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste
Open

feat: add clipboard paste button to destination address inputs#40
MJ-RWA wants to merge 1 commit into
mainfrom
feat/clipboard-paste

Conversation

@MJ-RWA

@MJ-RWAMJ-RWA commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added a reusable destination address field with clipboard paste support.
    • Valid addresses are accepted automatically with success feedback; invalid entries show clear error notifications.
    • Added the enhanced address field to scheduled payments and send workflows.
  • Bug Fixes
    • Improved destination address validation messaging.
    • Send actions remain unavailable until a valid address is entered.

@vercel

vercelBot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
stellarflowReadyReadyPreviewAug 5, 2026 7:25am

@coderabbitai

coderabbitaiBot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "path_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
📝 Walkthrough

Walkthrough

The PR adds a controlled AddressInput with clipboard paste validation, notifications, and error display. SchedulePage and SendPage use it for destination address entry.

Changes

Address input integration

Layer / File(s)Summary
Address input behavior
apps/src/components/AddressInput.tsx
Adds controlled input updates, clipboard reading, Stellar address validation, paste-button UI, success and error toasts, and optional error rendering.
Destination form integration
apps/src/pages/SchedulePage.tsx, apps/src/pages/SendPage.tsx
Replaces destination text inputs with AddressInput. SendPage preserves validation and uses the shorter Invalid Stellar address message.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant User
participant AddressInput
participant ClipboardAPI
participant Toast
User->>AddressInput: Click paste button
AddressInput->>ClipboardAPI: Read clipboard text
ClipboardAPI-->>AddressInput: Return clipboard text
AddressInput->>AddressInput: Trim and validate address
AddressInput->>Toast: Show success or error notification
Loading

Possibly related issues

Possibly related PRs

  • MJ-RWA/Stellarflow#39 — Both PRs update SendPage destination address validation and send-button behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the addition of a clipboard paste button to destination address inputs.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/clipboard-paste

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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@apps/src/components/AddressInput.tsx`:
- Around line 16-20: Replace the structural G-prefix and length checks with one
shared Stellar SDK address validator across AddressInput.tsx:16-20,
SchedulePage.tsx:108, and SendPage.tsx:121-123. Apply it to clipboard input,
manual input, scheduled destination saves, and pre-send validation so malformed
addresses are rejected before onChange, storage, or buildSendTx; preserve the
existing success and error behaviors.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a71030bf-1efe-4268-a15b-c188db335410

📥 Commits

Reviewing files that changed from the base of the PR and between aa256dd and 33c3397.

📒 Files selected for processing (3)
  • apps/src/components/AddressInput.tsx
  • apps/src/pages/SchedulePage.tsx
  • apps/src/pages/SendPage.tsx

Comment on lines +16 to +20
if (trimmed.startsWith('G') && trimmed.length === 56) {
onChange(trimmed);
toast.success('Address pasted');
} else {
toast.error('Clipboard does not contain a valid Stellar address');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bashset -euo pipefail
# Inspect the declared Stellar SDK and existing validation helpers.
fd -H -t f '^package\.json$'. -x sh -c 'echo "--- $1"; jq -r ".dependencies, .devDependencies" "$1" | grep -i stellar || true' _ {}
fd -t f '^stellar\.(ts|tsx)$' apps/src/lib \
-x ast-grep outline {} --items all
rg -n -C3 'StrKey|isValidEd25519PublicKey|decodeAddress|buildSendTx|startsWith\(.G.\)|length !== 56' apps/src

Repository: MJ-RWA/Stellarflow

Length of output: 5570


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "starts G, len", len(bad_prefix), "matches false positives")print("bad_len", bad_len, "len", len(bad_len), "matches false positives")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22419


🏁 Script executed:

#!/bin/bashset -euo pipefail
echo"--- AddressInput.tsx"
cat -n apps/src/components/AddressInput.tsx
echo"--- SendPage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SendPage.tsx | cat -n
echo"--- SchedulePage.tsx relevant section"
sed -n '1,150p' apps/src/pages/SchedulePage.tsx | cat -n
echo"--- scheduler/stellar relevant sections"
sed -n '1,80p' apps/src/hooks/useScheduler.ts | cat -n
sed -n '1,90p' apps/src/lib/stellar.ts | cat -n
echo"--- read-only behavioral probe: clipboard structural validator accepts invalid base32 StrKeys"
python3 - <<'PY'import stringprefix = "G"choices = [c.upper() for c in string.ascii_uppercase[:4]] + list(string.digits)bad_prefix = "A" + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40])))bad_len = prefix + "".join(choice for choice in choices[:30]) * 2print("prefix+length-only matches 'G'+ 55 base32 chars:", prefix + "".join(choice for choice in choices[:40]) + ("G" * (55 - len(choices[:40]))) in [prefix + c for c in choices] * 55)print("any G-prefix 56-character string made only of base32 chars is accepted:", True)print("bad_prefix", bad_prefix, "len", len(bad_prefix), "starts G false positive")print("bad_len", bad_len, "len", len(bad_len), "false positive")PY

Repository: MJ-RWA/Stellarflow

Length of output: 22400


Use one protocol-level Stellar address validator.

AddressInput only checks G... and length before calling onChange, so malformed base32 StrKeys can be accepted. SendPage uses the same structural check and can reach buildSendTx with an invalid destination. SchedulePage stores any nonempty destination before execution. Use a shared Stellar SDK validator for clipboard input, manual input, scheduled saves, and pre-send validation.

📍 Affects 3 files
  • apps/src/components/AddressInput.tsx#L16-L20 (this comment)
  • apps/src/pages/SchedulePage.tsx#L108-L108
  • apps/src/pages/SendPage.tsx#L121-L123
🤖 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 `@apps/src/components/AddressInput.tsx` around lines 16 - 20, Replace the
structural G-prefix and length checks with one shared Stellar SDK address
validator across AddressInput.tsx:16-20, SchedulePage.tsx:108, and
SendPage.tsx:121-123. Apply it to clipboard input, manual input, scheduled
destination saves, and pre-send validation so malformed addresses are rejected
before onChange, storage, or buildSendTx; preserve the existing success and
error behaviors.

Sign up for freeto 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.

1 participant

@MJ-RWA