Skip to content

feat(split): add save/load templates with address-book autocomplete - #174

Open
JohnOluB wants to merge 1 commit into
wraith-protocol:developfrom
JohnOluB:feat/155-batch-templates-address-book
Open

feat(split): add save/load templates with address-book autocomplete#174
JohnOluB wants to merge 1 commit into
wraith-protocol:developfrom
JohnOluB:feat/155-batch-templates-address-book

Conversation

@JohnOluB

Copy link
Copy Markdown
Contributor

Closes #155

Status: Draft / blocked

Started implementation and hit two gaps between the issue's assumed
starting state and what's actually in the repo. Opening this early to
surface them rather than guessing at replacement logic.

Blocker 1 — src/lib/stellar/batchSend.ts does not exist

StellarSplit.tsx imports from it:

import { parseCsvRows, validateRows, sendBatch, MAX_BATCH_ROWS } from '@/lib/stellar/batchSend';

src/lib/ currently only contains explorer.ts. This looks like either
a branch mismatch on my end or a file missing from this checkout —
can someone confirm which branch/commit #155 was filed against?

This blocks the template feature directly: loading a saved template
needs to re-validate rows through the same path CSV paste uses, and I
don't want to reimplement validateRows from scratch and risk it
silently diverging from the real validation rules.

Blocker 2 — no existing address-book autocomplete to reuse

Acceptance criteria says the combobox should use "the ARIA pattern
already established in address-book send autocomplete." I checked:

  • src/store/contactsStore.tsx exists (useContacts()), but nothing
    in the app currently consumes it
  • src/components/StellarSend.tsx (the actual send UI) uses a plain
    text input with a manual paste button — no combobox, no
    autocomplete, no useContacts import
  • No role="combobox" / aria-activedescendant usage anywhere in src/
  • No headless-UI/combobox library in package.json (Radix, Headless UI,
    downshift, react-aria are all absent)

So there's no existing pattern to reuse yet. Happy to build the first
hand-rolled ARIA combobox for this (matching the plain-Tailwind,
no-dependency style of the rest of the app) — just flagging that it'll
be new, not reused, so review expectations match.

Plan once unblocked

  • src/store/splitTemplatesStore.tsx — Context + localStorage,
    mirroring contactsStore.tsx's pattern (done locally, ready to push)
  • Save-as-template control on StellarSplit.tsx
  • Template list on load (rename / delete / duplicate)
  • Per-row combobox sourced from contactsStore
  • Export/import as JSON, round-trippable with address-book export format
  • Load-template restores exact row set and amounts
  • Export → import round-trip test
  • Templates survive reload

Questions for maintainers

  1. Is batchSend.ts missing from this branch, or was it never committed?
  2. Should the combobox be net-new, or is there a WIP branch/PR with the
    address-book autocomplete that I should build on top of instead?

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@JohnOluB is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@JohnOluB 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

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.

Batch send templates and address-book integration

1 participant