Skip to content

feat: bulk ops, advanced sort, creator messaging, duplicate detection - #841

Merged
Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
ice-man123:feature/bulk-sort-messaging-duplicates-810-811-812-813
Sep 28, 2026
Merged

Kingsman-99 merged 1 commit into
Stellar-split:mainfrom
ice-man123:feature/bulk-sort-messaging-duplicates-810-811-812-813

Conversation

@ice-man123

Copy link
Copy Markdown

Summary

This PR implements four features from the backlog, closing issues #810, #811, #812, and #813.


#810 — Bulk invoice operations (export, print, archive)

New: src/lib/bulkInvoiceOps.ts

  • exportInvoicesBulk(invoices, format) — downloads selected invoices as CSV or JSON
  • printInvoicesBulk(invoices) — opens a formatted, print-ready window with a Print / Save as PDF button
  • archiveInvoicesBulk / unarchiveInvoicesBulk — wrappers over the existing archive lib

Updated: src/components/BulkActionBar.tsx

  • Added a Print button
  • Replaced Export CSV with an Export ▾ dropdown offering CSV and JSON
  • All existing archive / unarchive / cancel / done actions preserved

#811 — Advanced sort options for invoice lists

Updated: src/lib/dashboardFilters.ts

  • 7 new DashboardSortId values: deadline-farthest, funded-pct-desc/asc, recipients-desc/asc, creator-asc/desc
  • SORT_OPTIONS entries carry a group tag; exported SORT_GROUPS for grouped rendering

New: src/components/invoices/AdvancedSortSelect.tsx

  • Grouped <select> with <optgroup> sections: Date, Deadline, Amount, Funding, Recipients, Creator

Updated: src/components/DashboardClient.tsx

  • Uses AdvancedSortSelect in place of the previous plain <select>

#812 — Creator messaging system for payer communication

New: src/lib/creatorMessages.ts

  • Full messaging API: postMessage, loadMessages, markThreadRead, countUnread, deleteMessage, resolveRole, formatMessageTime
  • localStorage-backed per-invoice threads (same pattern as InvoiceChat)

New: src/components/CreatorMessagePanel.tsx

  • Collapsible panel with unread badge, role labels (Creator/Payer/System), delete-own-message on hover, and clear permission messaging for non-participants

#813 — Invoice duplicate detection and merge

New: src/lib/invoiceDuplicates.ts

  • Exact and fuzzy duplicate detection via invoiceFingerprint
  • mergeInvoiceGroup(group, strategy) — hides duplicates in localStorage; strategies: keep-newest, keep-oldest, keep-largest
  • undoMerge, filterMerged, describeDifferences

New: src/components/DuplicateMergeModal.tsx

  • Lists duplicate groups by confidence (Exact / Fuzzy)
  • Per-group diff summary, strategy selector, and undo support

Checklist

  • Feature implemented for all four issues
  • Mobile-responsive (flex-wrap, max-h / overflow-y-auto)
  • Accessible (aria labels, roles, aria-expanded, aria-live)
  • TypeScript — all public APIs typed, no new any casts
  • No changes to tasks.md committed

Closes #810
Closes #811
Closes #812
Closes #813

…r-split#810 Stellar-split#811 Stellar-split#812 Stellar-split#813)

Stellar-split#810 — Bulk invoice operations (export, print, archive)
- Add src/lib/bulkInvoiceOps.ts with exportInvoicesBulk (CSV + JSON),
  printInvoicesBulk (opens print-ready window), archiveInvoicesBulk
- Extend BulkActionBar with a Print button and an Export dropdown
  that lets the user choose CSV or JSON format

Stellar-split#811 — Advanced sort options for invoice lists
- Extend DashboardSortId and SORT_OPTIONS in dashboardFilters.ts with
  7 new sort keys: deadline-farthest, funded-pct-desc/asc,
  recipients-desc/asc, creator-asc/desc
- Export SORT_GROUPS for grouped UI rendering
- Add AdvancedSortSelect component (grouped <optgroup> select)
- Wire AdvancedSortSelect into DashboardClient in place of plain <select>

Stellar-split#812 — Creator messaging system for payer communication
- Add src/lib/creatorMessages.ts: postMessage, loadMessages,
  markThreadRead, countUnread, deleteMessage, resolveRole, formatMessageTime
- Add CreatorMessagePanel component with collapsible panel, auto-scroll,
  unread badge, role labels, and delete-own-message support

Stellar-split#813 — Invoice duplicate detection and merge
- Add src/lib/invoiceDuplicates.ts: invoiceFingerprint, findExactDuplicates,
  findFuzzyDuplicates, findAllDuplicates, mergeInvoiceGroup, undoMerge,
  filterMerged, describeDifferences
- Add DuplicateMergeModal component with per-group expand/collapse,
  diff summary, strategy selector, and undo support
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

@ice-man123 is attempting to deploy a commit to the kingsman-99's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@ice-man123 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

@Kingsman-99
Kingsman-99 merged commit 1d3de2d into Stellar-split:main Sep 28, 2026
0 of 2 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