Skip to content

feat: add Duplicate Pool action (#91)#155

Open
Ebenezer199914 wants to merge 1 commit into
JointSave-org:mainfrom
Ebenezer199914:feat/duplicate-pool-91
Open

feat: add Duplicate Pool action (#91)#155
Ebenezer199914 wants to merge 1 commit into
JointSave-org:mainfrom
Ebenezer199914:feat/duplicate-pool-91

Conversation

@Ebenezer199914

Copy link
Copy Markdown
Contributor

Summary

Closes #91 — adds a Start New Cycle / Duplicate Pool action.

Changes

Conflict fixes

  • group-actions.tsx: removed duplicate imports, merged two conflicting partial component definitions into one clean export
  • group/[id]/page.tsx: removed duplicate Pool interface fields and stale creatorAddress prop

Feature

  • TargetForm and FlexibleForm: accept prefill?: DuplicatePrefill prop, initialising name, description, amount, and members from query-string params
  • e2e/duplicate-pool.spec.ts: covers all three pool types + pending-pool hide behaviour

Verification

  • pnpm exec tsc --noEmit → 0 errors

- Fix group-actions.tsx: remove duplicate imports and merge two
  conflicting partial component definitions into one clean export
- Fix group/[id]/page.tsx: remove duplicate Pool interface fields
  and stale creatorAddress prop on GroupActions
- Add prefill prop to TargetForm and FlexibleForm: pre-fills name,
  description, amount, and members from query-string params
- group-details.tsx already has the 'Start New Cycle / Duplicate Pool'
  button and create/[type]/page.tsx already parses the ?duplicate=1
  query params — wired end-to-end now that forms accept the prop
- Add e2e spec: duplicate-pool.spec.ts covers all three pool types
  and verifies the pending-pool hide behaviour

Closes JointSave-org#91
@Sendi0011 Sendi0011 self-requested a review June 28, 2026 06:39

@Sendi0011 Sendi0011 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.

Gm @Ebenezer199914 The prefill fix itself is solid — verified both forms handle the member list and pre-filled fields correctly, and tsc --noEmit passes clean. Since this branch predates #154, though, it had to independently work around the same group-actions.tsx issue that PR fixes — and in doing so, it drops the creatorAddress prop entirely (both from page.tsx and from GroupActions itself), which would silently remove the admin-only PDF export section for every pool.
We're merging #154 first since it handles that file correctly while preserving creatorAddress. Once that's in, could you rebase this onto the new main? Your target-form.tsx/flexible-form.tsx changes don't touch anything group-actions.tsx-related, so they should apply cleanly, and the regression should resolve itself once you're rebased onto the fixed version rather than needing a manual patch. Really like the prefill logic itself — nice work there.

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.

[Feature] Add a "Duplicate Pool" action to quickly recreate a pool with the same settings

2 participants