Skip to content

feature:Implement Circle Details Screen - #1277

Merged
ONEONUORA merged 2 commits into
Fracverse:masterfrom
joshkirojohn212-jpg:zaps1161
Nov 25, 2026
Merged

ONEONUORA merged 2 commits into
Fracverse:masterfrom
joshkirojohn212-jpg:zaps1161

Conversation

@joshkirojohn212-jpg

Copy link
Copy Markdown
Contributor

closes #1161
closes #1160
closes #1159
closes #1158

Circle Preview Implementation

Summary

Added an end-to-end circle preview flow to the Zaps mobile app and backend.
The screen presents circle objectives, contribution requirements, membership
rules, visibility, current progress, and a join action when the server says the
user is eligible.

Mobile app

  • Added the dynamic Expo Router page at mobileapp/app/circles/[id].tsx.
  • The page loads circle details from the authenticated backend API and displays
    loading, unavailable, unauthorized, join-error, and member states.
  • The preview includes:
    • Circle description and objective
    • Contribution amount, frequency, and rules
    • Public/private visibility
    • Member count, optional member limit, and restrictions
    • Current contribution progress toward the goal
  • The Join Circle button is shown only when the server reports the user can
    join a public circle.
  • Added response validation and API functions in
    mobileapp/src/services/circleService.ts; API requests use the shared
    authenticated fetch client.

Backend and privacy

  • Added GET /api/circles/{id} and POST /api/circles/{id}/join, registered
    under the backend's authenticated routes.
  • Private-circle details are returned only to existing members. Other users
    receive a generic 404 response so the endpoint does not reveal whether the
    private circle exists.
  • Joining is restricted to public circles that are accepting members and have
    not reached their optional member limit.
  • The join operation locks the circle row while checking capacity and creating
    membership, preventing concurrent joins from exceeding the limit.
  • Monetary amounts are returned as decimal integer strings to avoid loss of
    precision in JavaScript.

Data model

The migration backend/migrations/20261124000000_create_circles.sql adds:

  • circles for objectives, contribution settings, visibility, restrictions,
    membership limits, and ownership
  • circle_memberships for membership and private-circle access checks
  • circle_contributions for calculating current progress

Progress is calculated as the sum of recorded contributions. A contribution
flow is not part of this change; future contribution processing must write
completed contribution records to this table.

API contract and tests

  • Documented the endpoints and response schemas in
    backend/docs/openapi.yaml.
  • Added focused mobile service tests in
    mobileapp/__tests__/circleService.test.ts.
  • Added backend tests for join eligibility in
    backend/src/api/circles.rs.

Validation status

  • Prettier checks passed for the new mobile files and touched documentation.
  • OpenAPI YAML parsed successfully with duplicate mapping keys rejected.
  • git diff --check passed.
  • Jest could not run because dependency installation failed: the existing
    @privy-io/expo-sdk package returned HTTP 404 from the npm registry.
  • Rust formatting/build/tests could not run because Cargo is unavailable in the
    environment.

Scope note

This repository did not previously contain a circle feature. This change adds
the individual preview route and supporting detail/join APIs, but does not add
a circle creation or discovery flow. The preview route requires an existing
circle ID and populated circle data.

@drips-wave

drips-wave Bot commented Nov 24, 2026

Copy link
Copy Markdown

@joshkirojohn212-jpg Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ONEONUORA ONEONUORA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ONEONUORA
ONEONUORA merged commit e26ac8e into Fracverse:master Nov 25, 2026
9 of 11 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

2 participants