Skip to content

feat: stealth account labeling + personal organization (#20)#42

Open
JafetCHVDev wants to merge 4 commits into
wraith-protocol:developfrom
JafetCHVDev:feat/stealth-account-labeling
Open

feat: stealth account labeling + personal organization (#20)#42
JafetCHVDev wants to merge 4 commits into
wraith-protocol:developfrom
JafetCHVDev:feat/stealth-account-labeling

Conversation

@JafetCHVDev
Copy link
Copy Markdown

Stealth account labeling + personal organization
Closes #20

Summary
This PR implements client-side stealth address labeling on the Stellar Receive page, allowing users to assign private labels, organize with tags, search, hide/archive entries, and import/export their label data. All label data is stored exclusively in localStorage and never leaves the user's browser.

Changes
New files
src/lib/stealthLabels.ts — Pure TypeScript storage layer backed by localStorage, keyed per stealth address using the format ${walletPubkey}:${stealthAddress}. Handles CRUD operations, import/export with conflict detection, and a one-time privacy warning flag.
src/hooks/useStealthLabels.ts — React hook wrapping the storage layer with reactive state for seamless integration with the component tree.
src/components/PrivacyTooltip.tsx — One-time dismissible tooltip displayed on first label save: "Labels are stored only in this browser. Clear browser data = lose labels. Wraith never sees them."
src/components/ImportConflictModal.tsx — Modal for resolving conflicts when importing labels that already exist with different values. Provides "Keep Existing", "Overwrite All", and "Cancel" options.
Modified files
src/components/StellarReceive.tsx — Extended StellarStealthRow with inline label editing, tag management, and hide/unhide controls. Extended StellarReceive with search bar, tag filter chips, show hidden toggle, and import/export toolbar. All existing scanning, registration, and withdrawal logic is preserved unchanged.
Features
Inline editable labels — Click the pencil icon next to any stealth address to enter a label. Saves on blur or Enter. Labels are capped at 64 characters to prevent UI breakage.
Tag system — Add tags to any stealth address via the "+ tag" button. Click a tag chip to filter the list to that tag. Remove tags with the × button on hover.
Search — Text input at the top filters stealth addresses by label substring, tag, or address.
Hide / archive — Each row has a hide button (eye-off icon) to declutter the list. Hidden entries are still accessible via the "Show hidden" toggle.
Export / import — "Export" downloads all labels as a JSON file. "Import" opens a file picker, parses the JSON, and merges with conflict resolution if labels already exist.
Privacy warning — On the first label save, a one-time tooltip informs the user that labels are browser-local only.
Privacy & security
Labels are never attached to network requests, telemetry, error reporting, or Sentry breadcrumbs.
Storage is per-wallet — disconnecting and connecting a different wallet shows an empty label store.
Each label is stored as an individual localStorage entry keyed by ${walletPubkey}:${stealthAddress}.
Design
All UI additions follow the existing design system: dark monochrome palette, sharp corners (0 border radius), Space Grotesk headings, Inter body text, JetBrains Mono for code/addresses, and the established Tailwind token classes (surface, primary, outline-variant, etc.).

Testing
vite build passes with no errors.
prettier --check passes on all modified and new files.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@JafetCHVDev 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
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

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

@truthixify truthixify changed the base branch from main to develop June 1, 2026 15:48
@truthixify
Copy link
Copy Markdown
Contributor

The labeling primitives (stealthLabels.ts, useStealthLabels.ts, the import conflict modal, the privacy tooltip) are what #20 asked for. Rebase against develop; the diff shows it would revert recent merges in StellarSend/Receive (sponsored withdrawal from #29, validation from #13).

git fetch origin
git rebase origin/develop
git push --force-with-lease

Drop the StellarSend.tsx reverts during the rebase, layer your labeling-UI into the current develop StellarReceive.tsx alongside the existing rows. Thanks @JafetCHVDev.

…ol#20)

- Add localStorage-backed label storage keyed by walletPubkey:stealthAddress

- Add inline editable labels with pencil icon, save on blur/Enter, 64 char cap

- Add tag chips with click-to-filter and add/remove functionality

- Add search input filtering by label, tag, or address

- Add hide/archive per row with show hidden toggle

- Add export labels as JSON file download

- Add import labels with file picker and conflict resolution modal

- Add one-time privacy warning tooltip on first label save

- All labels are 100% client-side, never leak to network calls

- Storage is per-wallet isolated
…ReceiveView

Integrate stealth account labeling (labels, tags, search, hide/unhide,
import/export) into the refactored component structure from upstream/develop.
- Extend StellarMatchCard with optional label editing, tag management,
  hide/unhide, and privacy warning props
- Extend StellarReceiveView with optional search bar, tag filter chips,
  import/export buttons, hidden count toggle, and import conflict modal
- Rewrite StellarReceive.tsx to use useStealthLabels hook and pass
  labeling state through the new component props
- Keep upstream/develop's fee-bump sponsored withdrawal (wraith-protocol#29) and
  pre-send validation (wraith-protocol#13) intact
@JafetCHVDev JafetCHVDev force-pushed the feat/stealth-account-labeling branch from 6ba5879 to b5c8aab Compare June 1, 2026 22:18
@truthixify
Copy link
Copy Markdown
Contributor

The rebase is clean and the labeling work (stealthLabels.ts, useStealthLabels.ts, ImportConflictModal, PrivacyTooltip, integration into StellarReceive) is what #20 needs. One blocker though:

The new src/components/StellarMatchCard.tsx is encoded as UTF-16 LE (BOM 0xFFFE, null bytes between every character) instead of UTF-8. That breaks tsc and the Vite build. Probably a save-as side effect from Windows Notepad or similar.

Quick fix:

# convert in-place to UTF-8 (use whichever your system has)
iconv -f UTF-16LE -t UTF-8 src/components/StellarMatchCard.tsx > /tmp/m.tsx && mv /tmp/m.tsx src/components/StellarMatchCard.tsx
# strip the BOM if iconv didn't
sed -i.bak '1s/^\xEF\xBB\xBF//' src/components/StellarMatchCard.tsx && rm -f src/components/StellarMatchCard.tsx.bak
# verify
file src/components/StellarMatchCard.tsx   # should say "ASCII text" or "UTF-8 Unicode text"
git add src/components/StellarMatchCard.tsx
git commit -m "chore: re-encode StellarMatchCard.tsx as UTF-8"
git push

After that I'll merge. Everything else looks good. Thanks @JafetCHVDev.

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.

Stealth account labeling + personal organization

2 participants