Skip to content

Integrated Intear Wallet#435

Merged
Ebube111 merged 1 commit intostagingfrom
intear
Aug 5, 2025
Merged

Integrated Intear Wallet#435
Ebube111 merged 1 commit intostagingfrom
intear

Conversation

@Ebube111
Copy link
Copy Markdown
Collaborator

@Ebube111 Ebube111 commented Aug 5, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a rich text editor for campaign descriptions.
    • Added project name and description fields to campaign creation.
    • Displayed framework version in app metadata and console banner.
    • Enhanced profile configuration with add/update/remove for funding sources, repositories, and smart contracts.
    • Added recipient selection UI for campaign creation.
    • Included account links for fee recipients in donation summaries.
    • Added loading skeletons and spinners for improved UI feedback.
  • Improvements

    • Migrated campaign data fetching to a new API indexer, updating all related components and hooks.
    • Updated campaign cards, banners, and carousel items to use new data structures and improved description rendering.
    • Extended campaign schema to allow longer descriptions (up to 500 characters).
    • Improved campaign progress bar logic with a unified "ended" state.
    • Enhanced profile and campaign settings with more detailed information and better data handling.
    • Improved repository input handling and removal in profile configuration.
    • Updated wallet selector to support Intear Wallet.
  • Bug Fixes

    • Fixed fee bypass checkbox visibility logic in donation confirmation.
    • Corrected campaign form logic to allow explicit fee exemption.
  • Chores

    • Updated dependencies for wallet selector and introduced TipTap editor packages.
    • Changed package name and version.
  • Refactor

    • Simplified and consolidated campaign hooks and data models.
    • Refactored campaign creation to support social profile setup and batch transactions.

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
potlock-next-app 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 10:39am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces extensive enhancements and refactoring across the campaign management system. It adds new API client types and hooks for campaigns, integrates a rich text editor for campaign descriptions, updates campaign creation to support project profiles, and migrates campaign data fetching to an indexer-based approach. Numerous UI components and form flows are modified to accommodate these changes.

Changes

Cohort / File(s) Change Summary
API Client & Config Additions
src/common/api/indexer/internal/client.generated.ts, src/common/api/indexer/hooks.ts, src/common/api/indexer/internal/config.ts
Adds comprehensive campaign-related types, paginated responses, and hooks for campaign and donation endpoints. Introduces a staging config for API calls.
Campaign Creation & Project Profiles
src/common/contracts/core/campaigns/client.ts, src/common/contracts/core/campaigns/interfaces.ts, src/entities/campaign/hooks/forms.ts, src/entities/campaign/models/schema.ts
Refactors campaign creation to support project profile setup with conditional multi-tx logic. Adds optional project fields to campaign interfaces and schemas.
Rich Text Editor Integration
src/common/ui/form/components/richtext.tsx, src/common/ui/form/components/index.ts, package.json
Adds a new RichTextEditor component using TipTap, exports it, and updates dependencies.
Campaign UI Refactor (Indexing, Types, Description Rendering)
src/entities/campaign/components/CampaignBanner.tsx, src/entities/campaign/components/CampaignCard.tsx, src/entities/campaign/components/CampaignCarouselItem.tsx, src/entities/campaign/components/CampaignsList.tsx, src/entities/campaign/components/CampaignSettings.tsx, src/entities/campaign/components/CampaignProgressBar.tsx, src/entities/campaign/components/editor.tsx, src/entities/campaign/hooks/useCampaigns.ts, src/pages/campaigns.tsx, src/pages/profile/[accountId]/campaigns.tsx
Migrates campaign data fetching to indexer hooks, updates types and field access, switches description rendering to HTML (with link navigation prevention), and improves progress/status logic. Adds recipient selection and project prompts in editor.
UI Utilities & Constants
src/common/lib/datetime.ts, src/common/lib/string.ts, src/common/constants.ts
Adds timestamp conversion and HTML truncation utilities. Exposes and logs framework version.
Wallet Selector Support
src/common/blockchains/near-protocol/client.ts, package.json
Adds Intear Wallet support and dependencies for new wallet selectors.
Account Profile Components
src/entities/_shared/account/components/AccountProfileLink.tsx, src/entities/_shared/account/components/card.tsx, src/entities/_shared/account/components/profile-images.tsx
Updates profile link truncation logic to use CSS, adds live update support to profile image components, and passes live prop through card.
Donation & Fee Display Enhancements
src/features/donation/components/modal-confirmation-screen.tsx, src/features/donation/components/summary.tsx
Adjusts fee bypass checkbox logic and adds fee recipient account links in donation summary.
Profile Configuration Refactor
src/features/profile-configuration/components/AddFundingSourceModal.tsx, src/features/profile-configuration/components/contracts-section.tsx, src/features/profile-configuration/components/editor.tsx, src/features/profile-configuration/components/funding-sources.tsx, src/features/profile-configuration/components/repositories-section.tsx, src/features/profile-configuration/hooks/forms.ts
Refactors repository and funding source management to support add/update/remove handlers, improves input state, and removes modal-based smart contract editing.
Miscellaneous UI Improvements
src/pages/index.tsx, src/layout/profile/components/summary.tsx
Adds skeleton loading placeholders and spinner for loading states in stats and profile summary.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CampaignEditor
    participant RichTextEditor
    participant APIIndexer
    participant ContractClient
    participant SocialDB

    User->>CampaignEditor: Fill campaign form (with rich text description)
    CampaignEditor->>RichTextEditor: Set/get description content
    User->>CampaignEditor: Submit form
    alt New campaign for self with project details
        CampaignEditor->>SocialDB: Set social profile (if needed)
        CampaignEditor->>ContractClient: Register project in registry
        CampaignEditor->>ContractClient: Create campaign (batch tx)
    else Standard campaign creation
        CampaignEditor->>ContractClient: Create campaign (single tx)
    end
    ContractClient-->>CampaignEditor: Return campaign object
    CampaignEditor->>APIIndexer: Fetch campaign data
    APIIndexer-->>CampaignEditor: Return indexed campaign details
    CampaignEditor-->>User: Show campaign page with HTML-rendered description
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90 minutes

Possibly related PRs

  • #429: Contains identical changes to package.json, rich text editor, campaign creation with project profiles, and optional project fields.
  • #430: Overlaps in campaign creation, interfaces, rich text integration, wallet selector, and campaign UI refactor.
  • #433: Introduces the same campaign API client types, hooks, staging config, and rich text editor changes.

Suggested reviewers

  • carina-akaia
  • Prometheo
  • Jikugodwill

Poem

In fields of code where campaigns bloom,
A rabbit hops with Tiptap's plume.
Descriptions rich, profiles new,
Indexer fetches all we do.
Project names and banners bright—
Hop along, the future’s light!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12a0ef6 and 0921d8d.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (37)
  • package.json (4 hunks)
  • src/common/api/indexer/hooks.ts (2 hunks)
  • src/common/api/indexer/internal/client.generated.ts (9 hunks)
  • src/common/api/indexer/internal/config.ts (1 hunks)
  • src/common/blockchains/near-protocol/client.ts (4 hunks)
  • src/common/constants.ts (4 hunks)
  • src/common/contracts/core/campaigns/client.ts (3 hunks)
  • src/common/contracts/core/campaigns/interfaces.ts (1 hunks)
  • src/common/lib/datetime.ts (1 hunks)
  • src/common/lib/string.ts (1 hunks)
  • src/common/ui/form/components/index.ts (1 hunks)
  • src/common/ui/form/components/richtext.tsx (1 hunks)
  • src/entities/_shared/account/components/AccountProfileLink.tsx (1 hunks)
  • src/entities/_shared/account/components/card.tsx (1 hunks)
  • src/entities/_shared/account/components/profile-images.tsx (2 hunks)
  • src/entities/campaign/components/CampaignBanner.tsx (9 hunks)
  • src/entities/campaign/components/CampaignCard.tsx (4 hunks)
  • src/entities/campaign/components/CampaignCarouselItem.tsx (4 hunks)
  • src/entities/campaign/components/CampaignProgressBar.tsx (5 hunks)
  • src/entities/campaign/components/CampaignSettings.tsx (9 hunks)
  • src/entities/campaign/components/CampaignsList.tsx (4 hunks)
  • src/entities/campaign/components/editor.tsx (10 hunks)
  • src/entities/campaign/hooks/forms.ts (5 hunks)
  • src/entities/campaign/hooks/useCampaigns.ts (1 hunks)
  • src/entities/campaign/models/schema.ts (2 hunks)
  • src/features/donation/components/modal-confirmation-screen.tsx (1 hunks)
  • src/features/donation/components/summary.tsx (5 hunks)
  • src/features/profile-configuration/components/AddFundingSourceModal.tsx (3 hunks)
  • src/features/profile-configuration/components/contracts-section.tsx (4 hunks)
  • src/features/profile-configuration/components/editor.tsx (8 hunks)
  • src/features/profile-configuration/components/funding-sources.tsx (3 hunks)
  • src/features/profile-configuration/components/repositories-section.tsx (1 hunks)
  • src/features/profile-configuration/hooks/forms.ts (4 hunks)
  • src/layout/profile/components/summary.tsx (3 hunks)
  • src/pages/campaigns.tsx (4 hunks)
  • src/pages/index.tsx (3 hunks)
  • src/pages/profile/[accountId]/campaigns.tsx (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch intear

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

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Ebube111 Ebube111 changed the base branch from main to staging August 5, 2025 10:39
@Ebube111 Ebube111 self-assigned this Aug 5, 2025
@Ebube111 Ebube111 merged commit 01df50e into staging Aug 5, 2025
1 of 6 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Aug 12, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Sep 25, 2025
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