Skip to content

Remove airdrop#139

Merged
ianhe8x merged 2 commits into
masterfrom
remove-airdrop2
May 14, 2026
Merged

Remove airdrop#139
ianhe8x merged 2 commits into
masterfrom
remove-airdrop2

Conversation

@ianhe8x
Copy link
Copy Markdown
Contributor

@ianhe8x ianhe8x commented May 14, 2026

Summary by CodeRabbit

Release Notes

  • Chores

    • Enhanced deployment pipeline to ensure cache updates complete after S3 deployment finishes.
  • Refactor

    • Simplified airdrop display to focus on Layer 1 allocation data, streamlining the interface.

Review Change Stack

ianhe8x and others added 2 commits May 15, 2026 10:41
The airdrop-nft-backend API has been shut down. Remove userUnclaimedNfts,
userNfts, and userRedeemedNfts queries along with their associated UI
elements (redeem button, NFT table rows) and side effects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

📝 Walkthrough

Walkthrough

The PR contains two independent changes: CI/CD pipeline job ordering and a significant refactor of the Airdrop component. The workflow update adds explicit dependency sequencing between S3 deployment and CloudFront cache invalidation. The component refactor removes gift/redemption-related GraphQL queries and simplifies data flow to display only L1 airdrop records and user allocations.

Changes

CI/CD Pipeline Ordering

Layer / File(s) Summary
Job dependency ordering
.github/workflows/pipeline.yaml
clean_cloudfront_cache job now declares needs: deploy_to_s3 to enforce execution after S3 deployment completes.

Airdrop Component Simplification

Layer / File(s) Summary
L1 airdrop data initialization
src/components/Airdrop/Airdrop.tsx
Hook initialization reordered to prepare contracts before invoking useGetAirdropRecordsOnL1, with L1 result fields (loading, airdropRecords, refresh) extracted directly.
Rendering input and data flow
src/components/Airdrop/Airdrop.tsx
renderAsyncArray input simplified from merged gift/redemption queries to only accountAirdrop; data handler removes unclaimed/claimed/redeemed unpacking and rebuilds table from L1 records and sorted airdrops.
Claim button props simplification
src/components/Airdrop/Airdrop.tsx
AirdropClaimButton receives unlockSeriesIds={} instead of computed gift/redemption state, while l1AirdropIds remains sourced from L1 UNLOCKED records.

🐰 A CloudFront cache now queues with care,
While airdrops shed their gift-redemption affairs,
L1 data flows clean, no NFT flair,
The component's refactored with elegance rare—
Simplified logic floats through the air! ✨

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Remove airdrop' is vague and generic, failing to convey what specific airdrop functionality is being removed or the main context of the changes. Consider a more descriptive title such as 'Simplify Airdrop component to show only L1 allocations' or 'Remove redeemable NFT gift tracking from Airdrop component' to better communicate the primary change.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ 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 remove-airdrop2

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/Airdrop/Airdrop.tsx (1)

399-427: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't let the subgraph response block the L1 claim path.

renderAsyncArray is now keyed only off accountAirdrop, so a GraphQL failure exits through the error state before l1AirdropRecords can render. That makes the on-chain L1 allocation unusable during subgraph outages even when useGetAirdropRecordsOnL1() succeeds. Please keep the L1 table/button renderable as a fallback and treat the GraphQL data as additive.

🤖 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 `@src/components/Airdrop/Airdrop.tsx` around lines 399 - 427, The current
renderAsyncArray is keyed only on mergeAsync(accountAirdrop, { loading: false })
so GraphQL errors prevent the L1 claim UI from rendering; update the render
logic to treat subgraph data as additive by including the L1 fetch in the merged
async input (e.g., mergeAsync(accountAirdrop, l1AirdropRecords) or
mergeAsync(accountAirdrop, { l1: l1AirdropRecords })) or by changing the error
branch to still render the L1 section using l1AirdropRecords and l1Loading;
ensure references to renderAsyncArray, mergeAsync(accountAirdrop,...),
l1AirdropRecords, l1Loading and the existing data usage (currently data[0] /
airdropUsers) are adjusted so on-chain L1 table/button is always rendered as a
fallback when GraphQL fails.
🤖 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.

Outside diff comments:
In `@src/components/Airdrop/Airdrop.tsx`:
- Around line 399-427: The current renderAsyncArray is keyed only on
mergeAsync(accountAirdrop, { loading: false }) so GraphQL errors prevent the L1
claim UI from rendering; update the render logic to treat subgraph data as
additive by including the L1 fetch in the merged async input (e.g.,
mergeAsync(accountAirdrop, l1AirdropRecords) or mergeAsync(accountAirdrop, { l1:
l1AirdropRecords })) or by changing the error branch to still render the L1
section using l1AirdropRecords and l1Loading; ensure references to
renderAsyncArray, mergeAsync(accountAirdrop,...), l1AirdropRecords, l1Loading
and the existing data usage (currently data[0] / airdropUsers) are adjusted so
on-chain L1 table/button is always rendered as a fallback when GraphQL fails.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 52f39837-e2cd-4d1b-a259-fa9bb2d1aabb

📥 Commits

Reviewing files that changed from the base of the PR and between a2655c6 and fb269d5.

📒 Files selected for processing (2)
  • .github/workflows/pipeline.yaml
  • src/components/Airdrop/Airdrop.tsx

@ianhe8x ianhe8x merged commit cd58afe into master May 14, 2026
3 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