Skip to content

Campaign SEO Fix#449

Merged
Ebube111 merged 3 commits intostagingfrom
c-seo-fix
Aug 18, 2025
Merged

Campaign SEO Fix#449
Ebube111 merged 3 commits intostagingfrom
c-seo-fix

Conversation

@Ebube111
Copy link
Copy Markdown
Collaborator

@Ebube111 Ebube111 commented Aug 18, 2025

Summary by CodeRabbit

  • New Features

    • Rich text editor for descriptions.
    • Campaign pages use SEO-friendly static generation with dynamic titles/descriptions.
    • Added INTEAR and UNITY NEAR wallet support.
    • Campaign browsing gains status filters and indexer-powered data.
    • Loading skeletons for posts/feed; new PostCardSkeleton.
    • Profile configuration: add/update funding sources; add/remove repositories and smart contracts.
    • New campaign creation can auto-create a profile and register in the public goods list.
  • Enhancements

    • Status-aware campaign progress bar; improved min-target indicator.
    • Better account name truncation and fee summaries with recipient links.
    • Campaign cards/banners reflect new time/amount formats and render HTML descriptions.
  • Bug Fixes

    • Centered progress bar minimum marker.
  • Chores

    • Package rename and version bump.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Renames package, bumps version, adds wallet and Tiptap deps. Introduces indexer-based campaign types/endpoints/hooks and staging config. Adds rich text editor, HTML utilities, and UI updates. Implements multi-transaction campaign creation. Refactors campaign components to new data model/status. Adds SEO-aware RootLayout and static generation for campaign pages. Updates profile configuration flows.

Changes

Cohort / File(s) Summary
Package metadata & deps
package.json
Rename to @potlock/frontend; version 2.1.1; add @near-wallet-selector/intear-wallet, @near-wallet-selector/unity-wallet, and Tiptap packages.
Indexer client, hooks, config
src/common/api/indexer/internal/client.generated.ts, src/common/api/indexer/hooks.ts, src/common/api/indexer/internal/config.ts
Add campaign types, pagination shapes, status enum, and SWR hooks (useV1Campaigns*, useV1Campaign*); add staging config; new useCampaigns/useCampaign wrappers.
NEAR wallet integration
src/common/blockchains/near-protocol/client.ts
Register INTEAR and UNITY wallets in selector (with project metadata).
App metadata/version
src/common/constants.ts
Export FRAMEWORK_VERSION from package.json; extend APP_METADATA with version; log banner on startup.
Campaign contract flow
src/common/contracts/core/campaigns/client.ts, src/common/contracts/core/campaigns/interfaces.ts
Add optional project_* fields; implement multi-tx create flow (social profile + list registration + campaign) when creating own project.
Utilities
src/common/lib/datetime.ts, src/common/lib/string.ts
Add toTimestamp, stripHtml, and truncateHtml helpers.
Form components
src/common/ui/form/components/index.ts, src/common/ui/form/components/richtext.tsx
Export and implement RichTextEditor (Tiptap-based) with toolbar, link, char limit.
Account components (live profile)
src/entities/_shared/account/components/AccountProfileLink.tsx, src/entities/_shared/account/components/card.tsx, src/entities/_shared/account/components/profile-images.tsx
CSS-based truncation with title tooltip; add live prop to cover/picture and wire into profile hook.
Campaign core components (data model/status refactor)
src/entities/campaign/components/CampaignBanner.tsx, .../CampaignCard.tsx, .../CampaignCarouselItem.tsx, .../CampaignProgressBar.tsx, .../CampaignSettings.tsx
Switch to indexer Campaign model (on_chain_id, token.account, start_at/end_at, net_raised_amount); pass status to progress bar; HTML description rendering; updated routing/ids and time handling.
Campaign lists, editor, hooks, schema, constants
src/entities/campaign/components/CampaignsList.tsx, src/entities/campaign/components/editor.tsx, src/entities/campaign/hooks/useCampaigns.ts, src/entities/campaign/hooks/forms.ts, src/entities/campaign/models/schema.ts, src/entities/campaign/utils/constants.ts
Indexer-backed fetching with status filter/tags; RichTextEditor in editor; optional project_* fields; schema description max 500 and new fields; CAMPAIGN_STATUS_OPTIONS added.
Progress UI tweak
src/common/ui/layout/components/atoms/progress.tsx
Center min-value arrow via translateX(-50%).
Posts and feed skeletons
src/entities/post/components/PostCard.tsx, src/entities/post/components/PostCardSkeleton.tsx, src/entities/post/index.ts, src/pages/feed/index.tsx
Restyled PostCard; add PostCardSkeleton and export; use skeletons while loading feed.
Donation UI
src/features/donation/components/modal-confirmation-screen.tsx, src/features/donation/components/summary.tsx
Always show referral fee bypass when percentage > 0; show AccountProfileLink for fee recipients.
Profile configuration flows
src/features/profile-configuration/components/AddFundingSourceModal.tsx, .../contracts-section.tsx, .../editor.tsx, .../funding-sources.tsx, .../repositories-section.tsx, src/features/profile-configuration/hooks/forms.ts
Add callbacks for add/update/delete funding sources; switch contracts section to add/remove callbacks; repositories add update/remove callbacks; expose new form handlers via useProfileForm; useEnhancedForm.
Layouts & discovery
src/layout/components/root-layout.tsx, src/layout/campaign/components/layout.tsx, src/layout/components/project-discovery.tsx, src/layout/profile/components/summary.tsx
RootLayout uses APP_METADATA fallbacks; campaign layout injects dynamic title/description; discovery empty-state tweak; profile summary adds Spinner loading state.
Campaign pages (SSG + SEO)
src/pages/campaign/[campaignId]/index.tsx, .../leaderboard.tsx, .../settings.tsx
Add getStaticPaths/getStaticProps (blocking fallback, 300s revalidate); wrap pages in RootLayout with SEO props; use on_chain_id paths.
Pages: campaigns/home/profile
src/pages/campaigns.tsx, src/pages/index.tsx, src/pages/profile/[accountId]/campaigns.tsx
Switch to indexer.useCampaigns; export FeaturedCampaigns; gate homepage campaigns by ENV_TAG; use Spinner/Skeleton; profile campaigns page updated to indexer model.

Sequence Diagram(s)

sequenceDiagram
  participant UI as CampaignEditor
  participant Form as Form State
  participant Chain as NEAR Contracts
  participant Social as Social DB
  participant Lists as Public Goods Registry

  UI->>Form: Submit create_campaign(args)
  alt New project by owner (project_name && recipient==owner)
    UI->>Social: set(profile) with calculated deposit
    UI->>Lists: register_batch(list_id) (+0.05N)
    UI->>Chain: create_campaign(args) (+0.021N)
  else
    UI->>Chain: create_campaign(args) (+0.021N)
  end
Loading
sequenceDiagram
  participant UI as CampaignComponents
  participant Indexer as Indexer Hooks
  participant API as Indexer API

  UI->>Indexer: useCampaigns({owner?, status?, page})
  Indexer->>API: GET /v1/campaigns
  API-->>Indexer: PaginatedCampaignsResponse
  Indexer-->>UI: {results, page, page_size}

  UI->>Indexer: useCampaign({campaignId})
  Indexer->>API: GET /v1/campaigns/{id}
  API-->>Indexer: Campaign
  Indexer-->>UI: Campaign
Loading
sequenceDiagram
  participant Next as Next.js SSG
  participant API as Indexer API

  Next->>API: GET /v1/campaigns?page=1&page_size=50
  API-->>Next: {results:[{on_chain_id,...}]}
  Note over Next: Build paths with on_chain_id<br/>fallback: blocking
  Next->>API: GET /v1/campaigns/{id}
  API-->>Next: Campaign
  Next-->>Next: getStaticProps({seoTitle, seoDescription, seoImage})
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested reviewers

  • Prometheo
  • Jikugodwill
  • carina-akaia

Poem

A nibble of code, a hop through the night,
I stitched new hooks with tip-tappy delight.
Campaigns now index, pages prebuild,
Wallets unite and forms are refilled.
With fluffy commits and carrots of lore,
This rabbit ships features—then asks for more. 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 12a0ef6 and 5e29297.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (49)
  • 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/common/ui/layout/components/atoms/progress.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 (7 hunks)
  • src/entities/campaign/components/CampaignSettings.tsx (9 hunks)
  • src/entities/campaign/components/CampaignsList.tsx (5 hunks)
  • src/entities/campaign/components/editor.tsx (10 hunks)
  • src/entities/campaign/hooks/forms.ts (5 hunks)
  • src/entities/campaign/hooks/useCampaigns.ts (2 hunks)
  • src/entities/campaign/models/schema.ts (2 hunks)
  • src/entities/campaign/utils/constants.ts (1 hunks)
  • src/entities/post/components/PostCard.tsx (5 hunks)
  • src/entities/post/components/PostCardSkeleton.tsx (1 hunks)
  • src/entities/post/index.ts (1 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/campaign/components/layout.tsx (3 hunks)
  • src/layout/components/project-discovery.tsx (2 hunks)
  • src/layout/components/root-layout.tsx (3 hunks)
  • src/layout/profile/components/summary.tsx (3 hunks)
  • src/pages/campaign/[campaignId]/index.tsx (1 hunks)
  • src/pages/campaign/[campaignId]/leaderboard.tsx (1 hunks)
  • src/pages/campaign/[campaignId]/settings.tsx (1 hunks)
  • src/pages/campaigns.tsx (5 hunks)
  • src/pages/feed/index.tsx (2 hunks)
  • src/pages/index.tsx (7 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 c-seo-fix

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.
    • 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.
  • 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 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/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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 18, 2025 12:34
@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 18, 2025

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

Project Deployment Preview Comments Updated (UTC)
potlock-next-app Building Building Preview Comment Aug 18, 2025 0:35am

@Ebube111 Ebube111 merged commit cd837d5 into staging Aug 18, 2025
1 of 5 checks passed
This was referenced Sep 22, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jan 13, 2026
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