Skip to content

Embed note transfer & USD into Exhale PDF; surface note claim status in verifier#333

Merged
kojibai merged 5 commits intomainfrom
codex/update-pdf-generation-for-exhale-note
Jan 31, 2026
Merged

Embed note transfer & USD into Exhale PDF; surface note claim status in verifier#333
kojibai merged 5 commits intomainfrom
codex/update-pdf-generation-for-exhale-note

Conversation

@kojibai
Copy link
Copy Markdown
Owner

@kojibai kojibai commented Jan 31, 2026

Motivation

  • Make Exhale note PDFs self-contained for verification by embedding the proof bundle, note transfer payload and USD value instead of exporting empty cover/attestation pages.
  • Ensure receipt PNG/PDF uploads to the verifier reveal the actual note value (Φ and USD) and expose whether a note has been claimed, preventing re-download of claimed note SVG.

Description

  • Add note transfer and USD fields to the printed proof pages by extending buildProofPagesHTML to accept valueUsd and noteSendJson, rendering a "Note Transfer (Exhale Payload)" block and showing Value USD in src/components/exhale-note/proofPages.ts.
  • Stop injecting the separate printed cover/attestation page and render only the proof pages (and raw sigil) in src/components/exhale-note/printer.ts so PDFs are compact and verification-ready.
  • Pass noteSendJson and valueUsd when rendering/printing/saving from the exhale UI in src/components/ExhaleNote.tsx.
  • Parse embedded note-send metadata from receipt PNGs/PDFs and populate verifier state via parsePdfForNoteSendMeta and PNG text-chunk handling in src/pages/VerifyPage.tsx so the verifier can use the note's declared Φ/USD values.
  • Prefer note-declared value when computing display metrics in VerifyPage, surface a claim badge (CLAIMED / UNCLAIMED) in the Proof header, and disable the note-SVG download button when the note is already claimed; UI styles added in src/pages/VerifyPage.css.
  • Add ledger lookup helper getSendRecordByNonce in src/utils/sendLedger.ts and use it in VerifyPage to determine whether a send has been confirmed (claimed).

Testing

  • No automated tests were executed for this change in this rollout. All modifications were code-level edits and committed; a local build / type-check and runtime verification should be performed before release.

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
phi-network-5aii Ready Ready Preview, Comment Jan 31, 2026 1:41am

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23869222b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +977 to +980
const noteSendRecord = useMemo(
() => (noteSendMeta ? getSendRecordByNonce(noteSendMeta.parentCanonical, noteSendMeta.transferNonce) : null),
[noteSendMeta],
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recompute claim status after ledger updates

The claim badge and SVG download state are derived from noteSendRecord, but this value is memoized only on noteSendMeta. When markConfirmedByNonce updates the send ledger after a receipt is verified, noteSendMeta doesn’t change, so the memo never recomputes and the UI continues to show UNCLAIMED (and keeps the download enabled) until the user reloads or reselects the receipt. Consider recomputing the ledger lookup on each render or keying the memo off a ledger version/state change so the claim status reflects the confirmation immediately.

Useful? React with 👍 / 👎.

@kojibai kojibai merged commit b48141c into main Jan 31, 2026
2 checks passed
kojibai added a commit that referenced this pull request Jan 31, 2026
## Release v42.7.0 — ExhaleNote Receipts, Claims, and Proof-Safe Exports

This release rolls up everything shipped after **v42.6.0** into a clean minor bump. The headline: **ExhaleNote is now “receipt-grade”**—custom amounts, USD visibility, proof-bundle metadata carried through exports, PDF/PNG reliability upgrades, and a full **claim/unclaim + registry sync** loop so notes can be treated like portable value objects (not just UI). ([GitHub][1])

---

## ✨ Highlights

* **Custom amount ExhaleNote flow** + safer “send reservation” behavior when editing amounts. ([GitHub][2])
* **USD value shown on ExhaleNotes** (making receipts legible to non-Φ-native viewers). ([GitHub][1])
* **Exports upgraded**: proof bundle metadata included in ExhaleNote exports, and verification links/QRs now resolve correctly to the verifier. ([GitHub][1])
* **Receipt outputs hardened**: PDF rendering/parsing fixes (including large proof bundles), plus PNG download path improvements. ([GitHub][2])
* **Claim system shipped**: claim/unclaim mechanics + claim status propagation (local sigil registry + remote/global registry sync). ([GitHub][2])
* **UI declutter**: proof/signature controls hidden where they don’t belong in ExhaleNote upload contexts. ([GitHub][2])

---

## 🚀 What shipped

### 1) ExhaleNote value + receipt UX

* Add **USD value** to ExhaleNote outputs and related receipt metadata. ([GitHub][1])
* Add **custom ExhaleNote sends** + receipt metadata (supports user-chosen amount flows). ([GitHub][2])
* Fix re-export behavior so sending/exporting stays correct after edits (and reset reservations properly on amount changes). ([GitHub][2])

### 2) Proof-carrying exports + verifier link correctness

* ExhaleNote exports now include **proof bundle metadata** (so exported artifacts remain self-describing and verifiable). ([GitHub][1])
* QR + verify link construction fixed and hardened:

  * “Fix ExhaleNote QR to use verifier URL”
  * “Derive full verify URL for note QR”
  * “Fix verify URLs in note PDFs”
  * “Fix exhale note QR verify link” ([GitHub][1])

### 3) PDF pipeline hardening (real-world proof sizes)

* Fixes for **PDF rendering and verification issues**. ([GitHub][2])
* PDF parsing hardened to handle **large proof bundles** safely. ([GitHub][2])
* Restored/maintained correct receipt composition (e.g., cover page restoration) and ensured verification fields are populated/locked consistently on render. ([GitHub][2])

### 4) ExhaleNote claim/unclaim + registry synchronization

* Implement **unclaim → claim** function (so ownership state can be intentionally changed, not just inferred). ([GitHub][2])
* Claim state is now:

  * **Marked on SVG download**
  * **Persisted in sigil registry**
  * **Synced from remote registry**
  * **Broadcast to global registry**
  * Refreshed with ledger updates ([GitHub][2])

### 5) Scanning + UI polish

* Fix QR scanning issues and tighten the end-to-end scan → verify loop. ([GitHub][2])
* Hide signature/proof buttons for ExhaleNote where they caused confusion or implied actions that shouldn’t exist in that context. ([GitHub][2])

---

## ✅ Merged PRs included in this release (since v42.6.0)

* #327 — Update ExhaleNote for verify page ([GitHub][1])
* #328 — Add USD value to ExhaleNote ([GitHub][1])
* #329 — Custom amount flow for ExhaleNote ([GitHub][2])
* #330 — Fix re-export to handle send properly ([GitHub][2])
* #331 — Fix PDF rendering and verification issues ([GitHub][2])
* #332 — Handle large proof bundles in PDF parsing ([GitHub][2])
* #333 — Update PDF generation for ExhaleNote ([GitHub][2])
* #334 — Implement unclaim-to-claim function ([GitHub][2])
* #335 — Update ExhaleNote to PNG download ([GitHub][2])
* #336 — Fix QR code scanning issue ([GitHub][2])
* #338 — Hide signature/proof buttons for ExhaleNotes ([GitHub][2])

---

## 🧩 Dev / Ops Notes

* This release includes multiple patch bumps along the way (v42.6.1 → v42.6.9) that track incremental shipping; **v42.7.0** is the consolidated “clean cut” minor that captures the whole ExhaleNote receipt/claim/export hardening wave. ([GitHub][1])
* No breaking routing changes indicated in the commit history; this is primarily a **capability + correctness** upgrade across exports, PDFs, QR/verify paths, and claim state propagation. ([GitHub][2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant