Skip to content

Pay links, the Commune phone app, and motion for the web app - #39

Merged
EmotiveImpact merged 7 commits into
mainfrom
claude/project-thread-cnl0tu
Oct 12, 2026
Merged

EmotiveImpact merged 7 commits into
mainfrom
claude/project-thread-cnl0tu

Conversation

@EmotiveImpact

@EmotiveImpact EmotiveImpact commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #38 (phone layout and Home Direction B). Merge #38 first; this PR then retargets to main on its own. Three parts: pay links for the web app, the native phone app, then motion for the web app.

1. Pay links (web)

Before: "How people pay you" saved your Monzo, PayPal or bank details in your own browser only. Nobody in the commune ever saw them, and the pay window said "Payment links are not connected yet."

After: each person saves how they like to be paid in Settings or Profile, under How people pay you. When someone owes them and taps "I've sent it" (from Settle, Money or Home's "I've paid" next step), the dialog shows those details first. Monzo and PayPal open with the amount already filled in, Revolut opens their profile, and bank details have a Copy details button. After paying in their own app, they report it in Commune and the bill payer confirms it, exactly as before. Commune still never moves money. Only people in a commune with you can see your details, and leaving a commune stops sharing them there.

How

  • Migration 0042_pay_links.sql: a member_pay_links table with RLS and no grants. my_pay_links, set_pay_link and remove_pay_link are SECURITY DEFINER and validate every field (pasted links and @NAMEs reduce to the username; UK sort codes 6 digits, account numbers 8). Other members' links reach the client only through payLinks in commune_snapshot (full snapshots, not summaries), and only for active members. Apply after 0041.
  • Routes in the local API and the hosted client: GET /pay-links, PUT /pay-links/:provider, DELETE /pay-links/:provider.
  • apps/web/src/data/payLinks.ts builds the links; apps/web/src/ui/PayLinks.tsx holds the payer view and the editor. When paying from Home in a commune that isn't open, the dialog loads that commune's full record so its links show. The old browser-only payMethods state is kept for Home: open on where you stand and the next step (Direction B), with the phone top bar and side menu #38's preference tests; nothing on screen reads it.

Tests: infra/neon/tests/pay_links.sql and grants.sql pass with every migration through 0042. Local API pay-links.mjs, smoke, payment-reports, money-lifecycle and workflows pass on a disposable API. At 390px, Home and Settle show "Open Monzo" pointing at https://monzo.me/samokafor/16.00?d=Printer%20ink.

2. The phone app (apps/native)

Before: the repo had only older Expo experiments that don't use Commune's data.

After: a native iPhone and Android app built from the approved phone design. Home has your standing on the dark band with the next step raised over it, your communes, Needs you (grouped by due date, Show more), Waiting on others and Since you last looked. Hub, Expenses, Settle and More (the fifth tab the design panel chose for iPhone) follow. "I've paid" opens a sheet with the bill payer's pay links first, then records the payment. Also: confirm or "Not received", nudge, mark a chore done, add an expense split equally, edit your own pay links, notifications, light and dark.

It runs on demo data kept on the phone (Maya's three communes), or against the local API when EXPO_PUBLIC_COMMUNE_API is set. It is not connected to hosted Neon yet: that needs Neon Auth sign-in from a phone, which is the next piece.

How

  • Expo 54 with expo-router, React Native 0.81, the same versions as apps/mobile-v2. No new design system: the design language tokens in src/ui/theme.ts.
  • src/lib/derive.ts works out every figure from the same snapshots the web app reads. Totals are kept per currency. Every command goes to the same database functions with a request id.
  • It keeps its own pnpm-lock.yaml and is excluded from the workspace (!apps/native), so the web CI install and root lockfile are unchanged.

Tests: tsc passes; 8 vitest tests cover needs and bands, per-currency totals, report then confirm, and pay link URLs. An Expo web export at 390px was clicked through with demo data (light and dark) and against a disposable local API.

3. Motion: "Recorded, and they know" (web)

Before: dialogs, menus and rows changed in a single paint. After recording or confirming a payment, the success line appeared at the top of Settle, often off screen. There were four different ways of saying "done", and several touch targets were under 44 px.

After: the Medium direction from the motion panel, chosen on 12 Oct. Every recording act gets one toast near the thumb, worded as a recording ("Recorded. Sam will confirm your £16.00."). It stays 6 s, or 9 s when it offers Undo, and pauses on hover or focus. There is no Undo on a confirmed payment or a nudge. A changed row answers in place with a brief sage wash, and finished rows fold away over 250 ms. On a phone, dialogs rise as bottom sheets; from 600 px they stay centred. Reaching all square plays a short "clearing" once per commune per day. Switching commune cross-fades and says "Showing X." Home shows a skeleton in its own shape on first load. Busy buttons keep full colour and say "Recording…", "Confirming…" or "Reminding…". The record dialog's amount error sits beside Amount. Nothing waits for an animation, and everything is still under reduced motion.

How

  • Motion tokens --motion-short/medium/long (150, 250, 400 ms) and --ease-standard, all zero under prefers-reduced-motion. Hover state layer 8%, pressed 12%. Hit areas are 44 px, with the drawn size kept.
  • A shared toast host replaces the per-screen success lines. Dialogs, scrim and menu now animate their exit.

Changes to approved behaviour: bottom sheets on phone; add expense closes with a toast and View; the nudge Done page is gone; Settle's status line shows errors only; Operations and Hub feedback use the shared toast; the confirm button reads "Confirm Jordan's £21.60"; the toast no longer adds "No payment was taken by Commune."

Not yet converted: Funds and Recurring keep their old feedback.

Tests (whole PR, web): tsc, all 71 vitest files (696 tests) and vite build pass on 8fe87cb.

Needs the owner

  • Releasing the web part needs migrations through 0042 applied to Neon before the matching web build goes live. Nothing hosted was touched.
  • Bank details are visible to everyone in a shared commune. That is what was asked for, but it is worth a deliberate yes.
  • The motion changes to approved behaviour listed above need a yes.
  • Putting the phone app in the App Store or Play Store needs an Apple and Google developer account and hosted sign-in first.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TFug6Zkjw7p11FxL3guDfE

@vercel

vercel Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
commune-web Error Error Oct 12, 2026 1:59am UTC

Copy link
Copy Markdown
Owner Author

The Vercel commune-web preview shows Error. This is the same failure as the earlier draft PRs on this project. It comes from the commune4/commune-web project's settings or its Neon integration, not from the code. The same app built cleanly as a separate Vercel project on 11 October. Locally on this branch, tsc, all 24 web test files and vite build pass. No GitHub Actions run has started on this commit yet.


Generated by Claude Code

Each person can save how they like to be paid. People who share a commune
with them see these when they owe them, from Settle, an expense or Home's
next step: Monzo and PayPal open with the amount filled in, Revolut opens
their profile, and bank details can be copied. Commune still never moves
money; the payer reports it as before.

Saved through SECURITY DEFINER functions in migration 0042 with no direct
table grant, and shared only with active members through the full
snapshot. Built on the phone layout branch (PR #38).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TFug6Zkjw7p11FxL3guDfE
@EmotiveImpact
EmotiveImpact force-pushed the claude/project-thread-cnl0tu branch from bc89419 to 39b5a84 Compare October 11, 2026 19:29
@EmotiveImpact
EmotiveImpact changed the base branch from main to claude/project-thread-msvimz October 11, 2026 19:30
A native iPhone and Android app built from the approved phone design:
Home Direction B, the five-tab bar with More, and the "I've paid" sheet
with the bill payer's pay links. It runs on demo data kept on the phone,
or against the local API, using the same snapshots and database commands
as the web app. Totals stay per currency and payments stay claims until
the bill payer confirms them.

It keeps its own lockfile outside the pnpm workspace so the web CI
install is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TFug6Zkjw7p11FxL3guDfE
@EmotiveImpact EmotiveImpact changed the title Bring back pay links: Monzo, PayPal, Revolut and bank details Pay links (Monzo, PayPal, Revolut, bank) and the Commune phone app Oct 11, 2026

Copy link
Copy Markdown
Owner Author

CI on 1652b99 (and 39b5a84 before it) is red, but no code ran. All three jobs (Web app; Database, local API and worker; Secret scan) failed within two seconds with runner_id: 0, and no logs exist. That means GitHub Actions never assigned a runner. It is the same stoppage seen on #34 and #35, so it is not caused by this PR.

Locally, every suite passed on this head: web, local API, the SQL tests including migration 0042, and the phone app's typecheck and tests.

This session isn't allowed to re-run jobs (403), so please use "Re-run all jobs" on run 38170739663 and check the account's Actions minutes. I'm keeping the PR watched until it is green.

The Vercel commune-web preview error is the known project setting issue on that account.


Generated by Claude Code

Home can open "I've sent it" for a share in any commune, but a commune
that isn't open is held only as a summary, which has no pay links, so the
dialog showed none. The dialog now reads that commune's full record.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TFug6Zkjw7p11FxL3guDfE
…ayers

Three durations and one curve in shared.css, with one reduced-motion rule
that sets all three to 0ms. Dialogs become a bottom sheet below 600px and
stay centred with a pinned top edge from 600px; a copy plays each exit so
focus returns at once. Adds the shared toast, busy buttons with a late
spinner, 8% and 12% state layers, 44px phone header targets and photos that
fade up once decoded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TFug6Zkjw7p11FxL3guDfE
Recording a repayment, confirming, nudging, marking a task done (with Undo),
adding an expense and switching commune each end in one fixed line near the
thumb. Rows wash and cross-fade or fold into place, the commune switch
cross-fades, Home gets a skeleton and the all-square clearing, and the
receipt dialogs link their errors to fields with useFormError.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TFug6Zkjw7p11FxL3guDfE
@EmotiveImpact EmotiveImpact changed the title Pay links (Monzo, PayPal, Revolut, bank) and the Commune phone app Pay links, the Commune phone app, and motion for the web app Oct 12, 2026
The schema dump check failed because schema.sql was not regenerated
after 0042_pay_links.sql. Regenerated with infra/neon/dump-schema.sh.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014ztcMYgKXTHtHy5mLuVbKK
@EmotiveImpact
EmotiveImpact changed the base branch from claude/project-thread-msvimz to main October 12, 2026 02:02
@EmotiveImpact
EmotiveImpact marked this pull request as ready for review October 12, 2026 02:02
@EmotiveImpact
EmotiveImpact merged commit 1c6a721 into main Oct 12, 2026
3 of 7 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T02:03:27.755201Z 274fd10 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch had an error being deployed

1 failed deployment
Preview — 274fd101 Deployed Oct 12, 2026 by vercel[bot]
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.

2 participants