Skip to content

feat: add farcaster to space profile #1402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 17, 2025

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jun 6, 2025

Summary

Closes: https://github.com/snapshot-labs/workflow/issues/565

Adds farcaster handle to space profile

How to test

  1. Go to an offchain/onchain settings
  2. The social links section should now have an additional "Farcaster" input
  3. You can save and update this field
  4. Go to the space overview page, the link should appear with the right icon in the list of social networks
  5. When creating a space, this new input should also be present

Notes

Depends on

Copilot

This comment was marked as outdated.

@wa0x6e wa0x6e force-pushed the feat-add-farcaster-to-space-profile branch from a5a3efc to ad17a48 Compare June 11, 2025 18:30
@wa0x6e wa0x6e requested a review from Copilot June 11, 2025 18:30
@wa0x6e wa0x6e marked this pull request as ready for review June 11, 2025 18:30
@wa0x6e wa0x6e requested a review from Sekhmet June 11, 2025 18:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for a new farcaster social handle across the UI, type definitions, GraphQL/API layers, and backend metadata handling so that farcaster can be displayed and saved in space profiles.

  • Introduce farcaster field in UI forms, settings composables, and GraphQL queries/mappings
  • Extend TypeScript types and API schema to include farcaster
  • Initialize and parse farcaster in backend IPFS handlers and add tests for metadata utils

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/ui/src/views/CreateSpaceSnapshotX.vue Added farcaster to initial space creation form data
apps/ui/src/views/CreateSpaceSnapshot.vue Included farcaster in default settings and formatted payload
apps/ui/src/types.ts Extended SpaceMetadata and Space types with farcaster
apps/ui/src/networks/offchain/api/types.ts Added farcaster to ApiSpace type
apps/ui/src/networks/offchain/api/queries.ts Queried farcaster in GraphQL SPACE_FRAGMENT
apps/ui/src/networks/offchain/api/index.ts Mapped farcaster in formatSpace for offchain API
apps/ui/src/networks/common/graphqlApi/queries.ts Queried farcaster for common GraphQL API
apps/ui/src/networks/common/graphqlApi/index.ts Mapped farcaster in common formatSpace
apps/ui/src/helpers/utils.ts Included farcaster in createErc1155Metadata
apps/ui/src/helpers/utils.test.ts Added test entries for farcaster in metadata utils
apps/ui/src/composables/useSpaceSettings.ts Integrated farcaster in settings composable (types, defaults, mappings)
apps/ui/src/components/FormSpaceProfile.vue Defined farcaster schema in social accounts definition
apps/api/src/schema.gql Added farcaster: String! to SpaceMetadataItem type
apps/api/src/starknet/ipfs.ts Initialized and parsed farcaster in StarkNet handler
apps/api/src/evm/ipfs.ts Same initialization/parsing for EVM handler
Comments suppressed due to low confidence (1)

apps/ui/src/composables/useSpaceSettings.ts:77

  • Consider adding unit tests for the farcaster field in useSpaceSettings to verify both default initialization and update mappings, ensuring this new property flows correctly through the composable.
  farcaster: '',

type: 'string',
title: 'Farcaster',
examples: ['Farcaster handle'],
maxLength: 256
Copy link
Preview

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

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

[nitpick] The magic number 256 for maxLength could be extracted into a constant or documented to clarify why farcaster handles allow a different length than other social handles.

Copilot uses AI. Check for mistakes.

Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

Can you extract API changes into separate PR? It takes quite a bit of time to resync API and UI would be broken until we can switch to synced instance, so we can't merge it at once.

@Sekhmet
Copy link
Member

Sekhmet commented Jun 13, 2025

Can you rebase this PR? Overall it looks good to me, but we will need to update production API before it can be merged. Hopefully new API will be released today.

@Sekhmet
Copy link
Member

Sekhmet commented Jun 16, 2025

This PR should now work with production APIs. Can you check if everything looks good?

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

tACK, tested on Snapshot and SX EVM/Starknet

@wa0x6e wa0x6e merged commit c947e5f into master Jun 17, 2025
6 checks passed
@wa0x6e wa0x6e deleted the feat-add-farcaster-to-space-profile branch June 17, 2025 11:52
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.

3 participants