Drop the Stacks/Dork CLI, the nonexistent npm run deploy, the expired
Vercel demo links and the outdated stack versions. Document the scripts,
why a fresh copy fails npm test, the agent skills and deployment.
Drop the Netlify _redirects file, the GitLab CI and GitHub Pages deploy
configs, and the .vscode settings. Generated apps pick their own host and
editor.
Any web page can open a custom-scheme URL, and `DeepLinkHandler` turns
that into a `navigate()` call — so a route that acts on mount (publishing,
following, paying, deleting) is an action any website can fire silently,
with no user intent beyond a tap on an unrelated page. The `appUrlOpen`
event gives no way to tell a verified universal link from a custom scheme,
so the destination has to be treated as attacker-chosen.
Document the constraint where it will be read, rather than filtering to
`https:` in the component: this skill documents custom schemes as a
supported setup, and filtering would silently break them.
`getFeeRates` coerced the remote response with `Math.ceil(data['1'] || 1)`.
`||` only catches falsy values, so a missing key was safe but a truthy
non-number — `{"1": "5"}`, `{"1": {"fee": 5}}`, what an API-version
mismatch produces — yielded NaN.
NaN then passed every downstream guard, because they are all `<` / `>=`
comparisons and every comparison with NaN is false: no change output was
added, the balance check passed, nothing threw, and the UI showed
"Fee 0" because `!NaN` is true. The wallet built a valid, broadcastable
transaction paying its entire balance to miners.
Sanitize each rate to a finite number in [1, 5000], and make `estimateFee`
throw on a non-finite rate rather than propagate NaN into the builder.
The LNURL-pay endpoint is chosen by the recipient, so a hostile author
decides what invoice their zappers are handed — including how much it
charges. Nothing in the old flow ever read the invoice: `useZaps` passed
the string straight to `sendPayment` or WebLN, so a user who approved
776 sats could be billed 5,000,000 with no indication anything was off.
Decode the BOLT11 and require it to charge exactly the approved amount
before any wallet is touched, and re-assert in `sendPayment` so no future
caller can bypass the check. Amountless invoices are rejected outright.
Resolving the endpoint moves off `nip57.getZapEndpoint`, which discards
the `minSendable`/`maxSendable` bounds and the `metadata` string needed
to confirm the invoice was issued for this request; `lib/lnurlPay.ts`
keeps them and pins both the LNURL and its callback to HTTPS. Building
the callback query with `URLSearchParams` also fixes comments
containing `&`, `+` or `#` corrupting the request under `encodeURI`.
npm audit reported 9 vulnerabilities (6 high, 2 moderate, 1 low),
including a react-router open redirect and DoS, a vite server.fs.deny
bypass, path traversal in postcss sourcemap loading, and a batch of
undici request/cache handling issues.
All fixes fell within existing semver ranges, so package.json is
untouched and only the lockfile moves: react-router 7.18.2, vite 8.2.1,
postcss 8.5.26, nanoid 3.3.18, undici 7.29.0, valibot 1.4.2,
@babel/core 7.29.7, brace-expansion 5.0.9.
npm audit now reports 0 vulnerabilities.
relay.damus.io is shutting down; the nostr-relay-pools and
relay-management skills still used it as an illustrative URL, which
would teach a dead relay to anything generating code from them.
Use relay.ditto.pub instead. The relay group example already listed
nos.lol, so ditto avoids duplicating an entry there.
relay.damus.io is shutting down at the end of July 2026. It ships in
APP_RELAYS, so every app bootstrapped from MKStack would include a dead
relay out of the box. Swap in nos.lol, keeping read: false / write: true
so the outbox strategy is unchanged.
Also refresh the AGENTS.md copy of the default relay list, which had
drifted from src/lib/appRelays.ts and still named damus.
Closes#22
Returning true unconditionally for wrap kinds also skipped the event id
(content hash) check. The id is what we index and dedupe on, so it must
still match the event's contents. Recompute the hash and compare it while
continuing to skip only the redundant outer signature verification.
The outer signature on a NIP-59 gift-wrap (1059/21059) is cryptographically
meaningless to the client: wraps are signed by a single-use ephemeral key
(direct invites) or, in Concord V2, by a group-shared derived stream key any
member can sign with, so the outer sig establishes no sender identity.
Authenticity comes from NIP-44 authenticated encryption plus the inner seal
signature check and rumor-pubkey/id bindings in the decrypt path.
Pass a kind-scoped verifyEvent to NRelay1 that skips the Schnorr verify for
wrap kinds only while keeping full verification for every other kind, whose
identity does rest on its outer signature.
- AGENTS.md: describe ui components as React 19 ref-as-prop function
components using data-slot and the unified radix-ui package
- theming skill: register fonts and color tokens via @theme in
src/index.css (no tailwind.config.ts); fix color values to use the
hsl() wrapper that matches the real index.css
- ai-chat skill: import VisuallyHidden from the unified radix-ui package
- nwc skill: convert ZapDialog/WalletModal forwardRef to ref-as-prop
- edit-profile skill: drop React.FC in favor of plain function typing
Match Agora's wording in the AuthDialog welcome step and generate
step title to be more explicit that accounts are Nostr accounts:
- 'Create new account' -> 'Create a new Nostr account'
- 'I already have an account' -> 'Log in to an existing account'
- 'Create account' (step title) -> 'Create a Nostr account'
addLogin appends to the end of the logins array, but the current user
is logins[0]. So when an already-logged-in user opened "Add another
account" and chose any login method, the new account silently landed
at the back of the queue while the prior account remained current.
Most damaging on the signup path: login.nsec(nsec) was called before
the profile step, then publishEvent({ kind: 0, ... }) signed kind 0
metadata with the *previous* user's signer — overwriting their profile.
- useLoginActions: wrap each addLogin in addAndActivate, which also
calls setLogin(login.id) to promote the new login to logins[0].
- AuthDialog.finishSignup: defensive guard that verifies the active
signer matches the just-generated nsec before publishing kind 0;
refuse and toast otherwise. Belt and suspenders against any future
regression in the switch logic.
- Add a targeted regression test for the auto-switch behavior.
While the kind-0 metadata query for logged-in accounts is in flight, we
were rendering the genUserName-derived animal name (and its first
letter as the avatar fallback) before falling back to the real display
name once the profile arrived. That made the AccountSwitcher trigger
flash a meaningless 'Brave Otter' / 'B' before settling on the real
identity.
Expose isLoading from useLoggedInAccounts and, while it is still true
and we have no metadata.name yet, render Skeletons in place of:
- the avatar fallback letter (in the AccountSwitcher trigger and the
other-accounts dropdown rows),
- the displayed name in the dropdown rows.
Once the query settles, behavior is unchanged: a real name renders if
present, otherwise the genUserName fallback fills in.
When the user has no NIP-65 write relays configured, getRelayUrls() was
building the nostrconnect:// URI with a single relay (wss://relay.ditto.pub).
Fall back to the full APP_RELAYS write list instead so the remote signer
has more connection options during the handshake.
Extract the default relay list into src/lib/appRelays.ts as a single
source of truth, shared between App.tsx (defaultConfig) and
useLoginActions.ts (nostrconnect fallback).
Ignore .agents skill bundles from eslint (template files not part of
the build), enable eslint --cache and tsc --incremental so warm re-runs
skip unchanged files.
When a user tapped "Open signer app", the dialog previously stayed
frozen on the same screen — same button, same copy-URI fallback, no
feedback — until the login either succeeded (and the dialog dismissed)
or timed out after two minutes. With slow or flaky signers (Amber's
current listening-REQ bug being the immediate trigger, but any NIP-46
signer that takes more than a second or two to respond hits the same
hole) this looked indistinguishable from a hang. Users retapped the
button, closed the dialog, gave up.
Now the dialog swaps the QR / Open signer app area for a centered
spinner with a live status line as the handshake advances:
- "Waiting for signer connection…" while the signer app has the user
and we're listening on kind 24133 for the connect-ack.
- "Getting public key…" once the connect-ack arrives and we're
issuing the NIP-46 get_public_key RPC.
On mobile the swap happens synchronously when the user taps "Open
signer app" so they see the progress state the moment they return
from the signer. On desktop the QR stays visible through the
awaiting-connect phase (they may still be scanning with a different
device) and only swaps in once the signer has acknowledged.
The progress view includes a Cancel link that aborts the in-flight
subscription and regenerates fresh connect params.
Also fix a related effect-lifecycle bug: the listening effect
previously depended on `onClose` and `isWaitingForConnect`. Since
parents pass inline arrow functions for onClose, the effect re-ran
on every parent render and its cleanup flipped a local `cancelled`
flag — if the signer's response arrived on a re-rendered instance,
the success branch silently swallowed the login. The effect now
depends only on `nostrConnectParams` with stable refs for
onClose/login, gates the success branch on `controller.signal.aborted`
instead of a teardown flag, and handles cancellation explicitly in
the dialog-close and retry paths.
The handshake phases are surfaced via the new `onStatus` callback on
`NLogin.fromNostrConnect` in @nostrify/react 0.6.0. Bumps
@nostrify/react to ^0.6.0.
Also switches the fallback relay used for NIP-46 communication from
wss://relay.damus.io to wss://relay.ditto.pub. Only applies when the
user has no writable relays in their metadata.
Incidental cleanup while editing the dialog: the Copy URI button and
the "Open your signer app to connect." / "Scan with your signer app."
caption lines are removed. The primary Open signer app button is
self-explanatory on mobile, and the QR on desktop doesn't need a
caption.
Blossom servers now live in AppConfig alongside the NIP-65 relay list:
- blossomServerMetadata (BUD-03 server list) and useAppBlossomServers flag
- src/lib/appBlossom.ts provides APP_BLOSSOM_SERVERS defaults
(blossom.ditto.pub, blossom.dreamith.to, blossom.primal.net),
parseBlossomServerList, and getEffectiveBlossomServers
- NostrSync hydrates the user's kind 10063 event on login
- useUploadFile reads effective servers from config
Bumps every dependency to its current latest, including several majors
(react-router-dom 6→7, lucide-react 0.x→1.x, tailwind-merge 2→3,
typescript 5→6, jsdom 26→29, @unhead/react 2→3, @nostrify/react 0.4→0.5,
@types/node 22→24 to match the Node 24 runtime).
Drops the deprecated @unhead/addons package in favor of importing
InferSeoMetaPlugin directly from unhead/plugins.
package-lock.json regenerated from a clean node_modules to prune stale
transitive entries.
Replaces the deprecated `tseslint.config(...)` helper with ESLint core's
`defineConfig()` (available since ESLint 9.22, recommended in 10.x) and
upgrades the lint stack to the latest majors:
eslint 9.39 -> 10.2
@eslint/js 10.0 -> 10.0
typescript-eslint 8.0 -> 8.59
eslint-plugin-react-hooks 5.1 -> 7.1
eslint-plugin-react-refresh 0.4 -> 0.5
@html-eslint/{eslint-plugin,parser} 0.41 -> 0.59
globals 15.9 -> 17.5
Config changes:
- Use `defineConfig` + `globalIgnores()` instead of `tseslint.config`.
- Adopt `reactHooks.configs.flat.recommended` (adds React Compiler rules:
purity, refs, set-state-in-effect, etc.).
- Adopt `reactRefresh.configs.vite` (matches the Vite setup exactly).
- Adopt `@html-eslint` `flat/recommended` (adds indent, quotes,
use-baseline, require-closing-tags, etc.).
- Disable `@html-eslint/use-baseline` for the `rel="manifest"` false
positive.
Custom rule fixes for ESLint 10:
- `context.getSourceCode()` -> `context.sourceCode`
- `context.getFilename()` -> `context.filename`
Code fixes for the stricter new presets:
- NostrProvider: lazy-init NPool via `useState(() => new NPool(...))` and
move `ref.current = x` assignments into effects to satisfy the new
`react-hooks/refs` rule.
- useIsMobile: drop the redundant setState-in-effect by initialising
`useState` from the media query synchronously.
- AuthDialog: move `loginRef.current = login` into an effect.
- sidebar.tsx: derive skeleton width from `useId()` instead of
`Math.random()` so the render is pure.
- index.html: reindent to 4 spaces to satisfy `@html-eslint/indent`.
- .agents/skills/**: add `{ cause: err }` to `throw new Error(...)` calls
inside catch blocks (new `preserve-caught-error` rule) and a handful
of targeted `eslint-disable` comments for legitimate external-system
sync / state-reset-on-prop-change patterns.
The six intentional template failures (missing manifest, missing title /
description / OG tags, two FIXME comments) are unchanged -- they're the
template's way of nudging downstream users to fill the site in.
Re: "someday maybe tseslint won't be needed" -- still in the future.
ESLint 10 now loads `eslint.config.ts` natively (via jiti or Node's
`--experimental-strip-types`), but that only parses the config file. For
linting .ts/.tsx source you still need @typescript-eslint/parser and its
rules, which the `typescript-eslint` package bundles together. So the
"typescript" prefix is gone from rule names in practice, but the package
stays.
The skill was the longest in the repo; most of the bulk was narrative
duplication of content that already ships in the JSDoc headers of the
files users copy in. Material changes:
- Drop the per-package bullet list (17 lines of 'what is @capacitor/*')
in favor of a single-line pointer to Capacitor's own docs.
- Drop the 'Using the APIs' section (~110 lines of Haptics /
Download / SecureStorage / useSecureLocalStorage walkthroughs). Each
source file has thorough @example blocks in its JSDoc — the skill
now shows a short import+call tour and directs readers to the file
headers for the rest.
- Collapse the three 'Files Provided by This Skill' tables (source /
project-root / optional) into one table with inline notes. Same
information, a third of the vertical space.
- Merge the former ten setup steps into seven: trivial steps like 'run
npx cap add/sync/open' are one code block now; removed the cap:sync
package.json snippet (a convenience script the user can trivially
add themselves).
- Shrink the safe-area utilities table to a bulleted highlight list
with a link to the plugin README for the full utility surface.
- Replace the four standalone safe-area example snippets with a single
four-line example block.
- Trim troubleshooting to the five most common issues, noting that the
remaining edge cases (secureStorage per-bundle-id behavior, custom-
theme status-bar sync) are documented in the relevant file headers.
No API changes, no Tailwind-v4 regressions — all the instructions from
the previous revision are preserved or pushed down into the copied
files' JSDoc where they belong.