Skip to content

chore: cleanups#136

Merged
JoE11-y merged 2 commits intomainfrom
stellar-integrations
Apr 19, 2026
Merged

chore: cleanups#136
JoE11-y merged 2 commits intomainfrom
stellar-integrations

Conversation

@JoE11-y
Copy link
Copy Markdown
Contributor

@JoE11-y JoE11-y commented Apr 19, 2026

Summary by CodeRabbit

  • New Features

    • Enhanced trade advertisement cards with improved metadata visibility and scrollable content sections.
  • Improvements

    • Updated default chain and token selection behavior in the bridge interface.
    • Adjusted ad card title interactions.
  • Style

    • Improved wallet integration UI layering for better visual hierarchy.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

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

Project Deployment Actions Updated (UTC)
proof-bridge-frontend Ready Ready Preview, Comment Apr 19, 2026 9:46pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@JoE11-y has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 17 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 17 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c134dd9e-6ef8-45ea-b660-510dc83ac302

📥 Commits

Reviewing files that changed from the base of the PR and between 8ef72d1 and e549bfa.

📒 Files selected for processing (2)
  • .gitignore
  • apps/frontend/components/bridge-ui/BridgeTab.tsx
📝 Walkthrough

Walkthrough

This PR introduces deployment configuration templates, refactors the deployment script with centralized environment handling, adjusts frontend chain and token selection logic (adding Sepolia support), modifies UI components for metadata display and link handling, updates CI workflows and .gitignore patterns, and adjusts Stellar contract deployment fallback behavior.

Changes

Cohort / File(s) Summary
GitHub Actions & Repository Configuration
.github/workflows/backend-relayer-e2e.yml, .gitignore
Removed comment lines in E2E workflow; expanded .gitignore with deployment env patterns, seed config, docs directory, and pitch-related files.
Frontend Chain & Token Selection
apps/frontend/lib/chains.ts, apps/frontend/components/bridge-ui/BridgeTab.tsx
Added SEPOLIA_CHAIN_ID constant and updated BridgeTab to prefer Sepolia for default chain selection; added PROOFBRIDGE_TOKEN_SYMBOLS to prefer specific tokens (PB, PBT, PROOFBRIDGE).
Frontend UI Styling & Components
apps/frontend/app/globals.css, apps/frontend/components/bridge-ui/TradeAd.tsx, apps/frontend/components/dashboard/AdCard.tsx
Added z-index rule for Stellar wallets kit; refactored TradeAd metadata display into separate scrollable section; removed explorer link from AdCard title.
Deployment Configuration Files
scripts/deploy/.env.evm.example, scripts/deploy/.env.stellar.example
Added example environment configuration files documenting required and optional deployment variables for EVM and Stellar chains.
Deployment Script Refactoring
scripts/deploy/deploy-contracts.sh
Refactored to use centralized CHAIN_ENV_FILE map with run_in_chain() helper for conditional environment sourcing and execution across chains.
Stellar Contract Deployment
contracts/stellar/deploy/src/stellar-cli.ts
Removed --source argument from SAC fallback deployment command (stellar contract id asset).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 Whiskers twitch as chains align,
Sepolia gleams in config's design,
We shuffle deployment files with care,
And UI components dance through air,
Hopping between frontend and script divine! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'chore: cleanups' is vague and generic, using non-descriptive terms that do not clearly convey the specific changes made in this changeset. Replace with a more specific title that describes the main change, such as 'chore: add Sepolia chain support and refactor deployment scripts' or similar, to clearly communicate the primary purpose of the PR.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stellar-integrations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (6)
apps/frontend/components/bridge-ui/TradeAd.tsx (1)

321-325: Consider preserving line breaks in the description.

props.metadata.description is rendered directly inside a <div>, so any newlines authored by the merchant will collapse into a single line of text. If descriptions are expected to be multi-line (the max-h-[150px] overflow-y-auto scroll container suggests longer content), add whitespace-pre-wrap (or whitespace-pre-line) so the formatting is preserved.

✂️ Proposed tweak
-            {props.metadata?.description && (
-              <div className="font-perfectly-nineties text-[15px] italic leading-relaxed text-grey-50 border-l-2 border-primary/60 pl-3 max-h-[150px] overflow-y-auto">
+            {props.metadata?.description && (
+              <div className="font-perfectly-nineties text-[15px] italic leading-relaxed text-grey-50 border-l-2 border-primary/60 pl-3 max-h-[150px] overflow-y-auto whitespace-pre-wrap">
                 {props.metadata.description}
               </div>
             )}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/frontend/components/bridge-ui/TradeAd.tsx` around lines 321 - 325, The
description div in TradeAd.tsx is collapsing merchant newlines; update the JSX
that renders props.metadata.description (the <div className="..."> wrapping
props.metadata.description) to include a whitespace utility (e.g., add
"whitespace-pre-wrap" or "whitespace-pre-line" to the className) so authored
line breaks are preserved while keeping the existing sizing/overflow behavior.
apps/frontend/components/dashboard/AdCard.tsx (1)

19-22: Remove unused explorer_urls map and related imports.

The explorer_urls map at lines 19-22 and the hederaTestnet/sepolia imports (line 9) are no longer referenced in this file. Remove them to keep the module clean.

Proposed cleanup
-import { hederaTestnet, sepolia } from "viem/chains"
@@
-const explorer_urls: Record<string, string> = {
-  [hederaTestnet.id]: hederaTestnet.blockExplorers.default.url,
-  [sepolia.id]: sepolia.blockExplorers.default.url,
-}
-
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/frontend/components/dashboard/AdCard.tsx` around lines 19 - 22, Remove
the unused explorer_urls constant and the unused hederaTestnet and sepolia
imports from AdCard.tsx: delete the explorer_urls Record<string,string>
declaration and remove hederaTestnet and sepolia from the import list (and any
now-unused import lines), then run the TypeScript/ESLint fixes to ensure no
remaining unused-symbol warnings; references to explorer_urls, hederaTestnet,
and sepolia identify the items to remove.
scripts/deploy/.env.evm.example (1)

1-33: Consider documenting secret-file hygiene.

Since the real (copied) .env.sepolia file will contain EVM_ADMIN_PRIVATE_KEY, it's worth suggesting chmod 600 scripts/deploy/.env.sepolia after cp, similar to how deploy-contracts.sh already does chmod 600 on the generated seed config. This is a nice-to-have for folks following the copy/paste instructions verbatim.

 #   cp scripts/deploy/.env.evm.example scripts/deploy/.env.sepolia
+#   chmod 600 scripts/deploy/.env.sepolia
 #   $EDITOR scripts/deploy/.env.sepolia
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/deploy/.env.evm.example` around lines 1 - 33, Add a one-line note to
the .env example advising users to restrict permissions on the copied secret
file (e.g., after running the shown cp command) by running chmod 600 on the
resulting file containing EVM_ADMIN_PRIVATE_KEY; reference the same cp
invocation used in the example and optionally mirror the existing chmod 600
behavior used in deploy-contracts.sh to make the hygiene recommendation
explicit.
scripts/deploy/deploy-contracts.sh (1)

110-123: Refactor looks solid; a couple of polish notes.

  1. Silence SC1090 explicitly. The static-analysis hint flags the non-constant source. A scoped shellcheck directive inside the helper keeps the rest of the file clean:
 run_in_chain() {
   local chain="$1" cmd="$2"
   local env_file="${CHAIN_ENV_FILE[$chain]:-}"
   (
     if [[ -n "$env_file" && -f "$env_file" ]]; then
-      set -a; source "$env_file"; set +a
+      # shellcheck disable=SC1090
+      set -a; source "$env_file"; set +a
     fi
     cd "$ROOT_DIR/contracts/$chain/deploy" && eval "$cmd"
   )
 }
  1. CHAIN_ENV_FILE is hardcoded to evm/stellar only. Chain validation at Lines 87-92 accepts any contracts/<name>/deploy/package.json, so adding a third chain later would silently run with no env file sourced (since ${CHAIN_ENV_FILE[$chain]:-} just yields empty). Either worth a comment noting the invariant, or generalize the flag parsing to accept --<chain>-env dynamically. Not blocking for this PR.

  2. Silent env-file miss. When --evm-env/--stellar-env is passed but the path doesn't exist, the -f "$env_file" guard silently skips sourcing. That can mask typos and lead to deploys against the wrong defaults. Consider failing fast when env_file is non-empty but not a file:

     if [[ -n "$env_file" && -f "$env_file" ]]; then
+      :
+    elif [[ -n "$env_file" ]]; then
+      log "env file not found: $env_file"; exit 2
+    fi
+    if [[ -n "$env_file" && -f "$env_file" ]]; then
       # shellcheck disable=SC1090
       set -a; source "$env_file"; set +a
     fi

(Or collapse into one conditional.)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/deploy/deploy-contracts.sh` around lines 110 - 123, The helper
run_in_chain currently sources a non-constant file (triggering SC1090) and
silently skips when a provided env_file is missing; update
run_in_chain/CHAIN_ENV_FILE so you add a scoped ShellCheck directive to silence
SC1090 for the source line, and change the sourcing logic: if env_file is
non-empty then check -f and source it, otherwise emit a clear error (via
echo/processLogger and exit non-zero) so missing/mis-typed env paths fail fast;
keep the rest of the subshell/cd/eval behavior intact and reference
CHAIN_ENV_FILE, run_in_chain, and env_file when making the change.
scripts/deploy/.env.stellar.example (1)

16-18: Minor doc wording nit.

STELLAR_NETWORK is a Stellar CLI network name/alias (resolved to a passphrase by the CLI), not a passphrase itself. The phrasing "network passphrase target" can read as if users should paste a passphrase string here. Consider:

-# Stellar network passphrase target. `testnet` | `futurenet` | `mainnet`
-# or a custom network registered via `stellar network add`.
+# Stellar CLI network name. `testnet` | `futurenet` | `mainnet`
+# or a custom network registered via `stellar network add`.
 STELLAR_NETWORK=testnet
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/deploy/.env.stellar.example` around lines 16 - 18, The comment notes
the wording is misleading: update the example env comment so it clarifies that
STELLAR_NETWORK is a Stellar CLI network name/alias (resolved to a passphrase by
the CLI) rather than the passphrase itself; edit the comment lines above
STELLAR_NETWORK in the scripts/deploy/.env.stellar.example to replace "Stellar
network passphrase target" with wording like "Stellar CLI network name/alias
(e.g. testnet, futurenet, mainnet) — the CLI resolves this to the network
passphrase" and ensure the existing example value STELLAR_NETWORK=testnet
remains unchanged.
.gitignore (1)

14-18: Consider scoping personal/local-only ignores out of the shared .gitignore.

  • docs/ is a very broad ignore at repo root. If anyone later adds a docs/ directory at the top level (architecture notes, ADRs, generated docs, etc.), it will be silently untracked. If there's a specific generated docs/ folder you want ignored, consider scoping it (e.g., contracts/*/docs/ or a more specific path), or adding a !docs/.gitkeep + !docs/**/*.md pattern if intentional.
  • pitch_deck_notes.md, pitch_deck_rework.md, and proofbridge_pitch.pdf look like contributor-local artifacts rather than files every contributor needs to ignore. Those are usually better placed in .git/info/exclude or a global ~/.gitignore_global so they don't pollute the repo's ignore rules.

Not blocking — just flagging intent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 14 - 18, The shared .gitignore currently contains
broad or personal entries (the top-level "docs/" directory and files
"pitch_deck_notes.md", "pitch_deck_rework.md", "proofbridge_pitch.pdf") that may
hide repository-wide assets or are contributor-local; narrow the ignore scope by
replacing or scoping "docs/" to the specific generated path(s) needed (e.g.,
target subfolder patterns like contracts/*/docs/ or a more specific path) or add
negation rules if you intend to keep some docs tracked, and move the personal
files (pitch_deck_notes.md, pitch_deck_rework.md, proofbridge_pitch.pdf) out of
the project .gitignore into contributor-local ignores such as .git/info/exclude
or a global ~/.gitignore_global so they don’t affect other contributors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/frontend/components/bridge-ui/BridgeTab.tsx`:
- Around line 78-85: The effect in useEffect resets selectedTokenId on every
tokens update, overwriting a user selection; update the logic in the effect that
reads tokens?.data to first check whether the current selectedTokenId (from
state) still exists in the refreshed list and only change state if it does not
exist or is falsy — otherwise keep it; if no selection exists, fall back to
finding the preferred token via PROOFBRIDGE_TOKEN_SYMBOLS or use list[0], and
call setSelectedTokenId only in those fallback cases (reference useEffect,
tokens, selectedTokenId, setSelectedTokenId, PROOFBRIDGE_TOKEN_SYMBOLS).

In `@apps/frontend/components/bridge-ui/TradeAd.tsx`:
- Around line 330-339: In TradeAd.tsx update the placeholder Link for the
"Terms" text (the Link element wrapping "Terms") so it does not point to
href="#" — either set it to the real route (e.g. "/terms" or the app's canonical
terms URL) or remove/replace the anchor with non-clickable text (span) until the
route exists; ensure you modify the Link usage (and import if you remove it) so
the disclaimer no longer contains a dead link.

---

Nitpick comments:
In @.gitignore:
- Around line 14-18: The shared .gitignore currently contains broad or personal
entries (the top-level "docs/" directory and files "pitch_deck_notes.md",
"pitch_deck_rework.md", "proofbridge_pitch.pdf") that may hide repository-wide
assets or are contributor-local; narrow the ignore scope by replacing or scoping
"docs/" to the specific generated path(s) needed (e.g., target subfolder
patterns like contracts/*/docs/ or a more specific path) or add negation rules
if you intend to keep some docs tracked, and move the personal files
(pitch_deck_notes.md, pitch_deck_rework.md, proofbridge_pitch.pdf) out of the
project .gitignore into contributor-local ignores such as .git/info/exclude or a
global ~/.gitignore_global so they don’t affect other contributors.

In `@apps/frontend/components/bridge-ui/TradeAd.tsx`:
- Around line 321-325: The description div in TradeAd.tsx is collapsing merchant
newlines; update the JSX that renders props.metadata.description (the <div
className="..."> wrapping props.metadata.description) to include a whitespace
utility (e.g., add "whitespace-pre-wrap" or "whitespace-pre-line" to the
className) so authored line breaks are preserved while keeping the existing
sizing/overflow behavior.

In `@apps/frontend/components/dashboard/AdCard.tsx`:
- Around line 19-22: Remove the unused explorer_urls constant and the unused
hederaTestnet and sepolia imports from AdCard.tsx: delete the explorer_urls
Record<string,string> declaration and remove hederaTestnet and sepolia from the
import list (and any now-unused import lines), then run the TypeScript/ESLint
fixes to ensure no remaining unused-symbol warnings; references to
explorer_urls, hederaTestnet, and sepolia identify the items to remove.

In `@scripts/deploy/.env.evm.example`:
- Around line 1-33: Add a one-line note to the .env example advising users to
restrict permissions on the copied secret file (e.g., after running the shown cp
command) by running chmod 600 on the resulting file containing
EVM_ADMIN_PRIVATE_KEY; reference the same cp invocation used in the example and
optionally mirror the existing chmod 600 behavior used in deploy-contracts.sh to
make the hygiene recommendation explicit.

In `@scripts/deploy/.env.stellar.example`:
- Around line 16-18: The comment notes the wording is misleading: update the
example env comment so it clarifies that STELLAR_NETWORK is a Stellar CLI
network name/alias (resolved to a passphrase by the CLI) rather than the
passphrase itself; edit the comment lines above STELLAR_NETWORK in the
scripts/deploy/.env.stellar.example to replace "Stellar network passphrase
target" with wording like "Stellar CLI network name/alias (e.g. testnet,
futurenet, mainnet) — the CLI resolves this to the network passphrase" and
ensure the existing example value STELLAR_NETWORK=testnet remains unchanged.

In `@scripts/deploy/deploy-contracts.sh`:
- Around line 110-123: The helper run_in_chain currently sources a non-constant
file (triggering SC1090) and silently skips when a provided env_file is missing;
update run_in_chain/CHAIN_ENV_FILE so you add a scoped ShellCheck directive to
silence SC1090 for the source line, and change the sourcing logic: if env_file
is non-empty then check -f and source it, otherwise emit a clear error (via
echo/processLogger and exit non-zero) so missing/mis-typed env paths fail fast;
keep the rest of the subshell/cd/eval behavior intact and reference
CHAIN_ENV_FILE, run_in_chain, and env_file when making the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c4b538ca-df43-437c-9c8a-5729ab162a5d

📥 Commits

Reviewing files that changed from the base of the PR and between 0e1b8e3 and 8ef72d1.

📒 Files selected for processing (11)
  • .github/workflows/backend-relayer-e2e.yml
  • .gitignore
  • apps/frontend/app/globals.css
  • apps/frontend/components/bridge-ui/BridgeTab.tsx
  • apps/frontend/components/bridge-ui/TradeAd.tsx
  • apps/frontend/components/dashboard/AdCard.tsx
  • apps/frontend/lib/chains.ts
  • contracts/stellar/deploy/src/stellar-cli.ts
  • scripts/deploy/.env.evm.example
  • scripts/deploy/.env.stellar.example
  • scripts/deploy/deploy-contracts.sh
💤 Files with no reviewable changes (1)
  • .github/workflows/backend-relayer-e2e.yml

Comment thread apps/frontend/components/bridge-ui/BridgeTab.tsx
Comment thread apps/frontend/components/bridge-ui/TradeAd.tsx
@JoE11-y JoE11-y merged commit d3dd434 into main Apr 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant