Commit Graph
486 Commits
Author SHA1 Message Date
Alex Gleason 9e230f45d3 Upgrade all dependencies to latest versions
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.
2026-04-26 22:41:37 -05:00
Alex Gleason 4efc3c7273 Modernize ESLint setup to v10 with defineConfig
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.
2026-04-26 22:33:39 -05:00
Alex Gleason 75598c45b1 Tighten capacitor skill (434 -> 184 lines)
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.
2026-04-26 22:01:49 -05:00
Alex Gleason 924d430310 Update capacitor skill for Tailwind v4 safe-area plugin
The previous version pinned tailwindcss-safe-area to 0.8.0 and walked
through registering it in a tailwind.config.ts plugins array. mkstack
now ships Tailwind v4 with CSS-first config (@import "tailwindcss"
in src/index.css, no tailwind.config.ts), and the plugin's v1.x line
has switched from a JS plugin entry point to a plain CSS file consumed
via @import — using @plugin fails to resolve.

Updates:
- Install step now pulls the latest tailwindcss-safe-area (1.x) with
  a note that v3 projects still need 0.8.0 + plugins array.
- Step 3 replaces the tailwind.config.ts edit with an @import line in
  src/index.css, placed after @import "tailwindcss".
- Troubleshooting entries for WebView <140 and 'pt-safe does not
  exist' rewritten to reference the CSS import model.
- Utilities table refreshed to match the v4 README (adds border-*-safe,
  h-svh-safe/h-lvh-safe/h-vh-safe/h-fill-safe, start/end logical
  variants, and the safe/safe-none enable-disable toggles).
- safe-area-shim.css header updated to show the v4 import order
  (@import "tailwindcss-safe-area"; then @import "./safe-area-shim.css")
  instead of the old @tailwind utilities directive.
2026-04-26 22:00:13 -05:00
Alex Gleason e0f6a061b4 Tighten nostr-security skill (321 -> 152 lines)
Removes redundancy without losing substance:
- Drops the verbatim CSP meta tag (already in index.html) in favor of a
  prose summary of what's enforced and the style-src caveat.
- Collapses the 'three attack surfaces' table of contents; section
  headers already serve that purpose.
- Merges the §2 duplicate 'addressable events' example (covered by the
  bullet rules and the spoof example above).
- Consolidates the 'safe pattern' + 'mitigation' + 'rule of thumb'
  triad in §2 into one example and one guideline sentence.
- Tightens the NIP-72 walkthrough by removing narrative duplication
  between the prose and the code comments.
- Drops the 'Remember: decode npub' aside (nip19-routing skill's job).

The pre-merge checklist, the sanitizeUrl/sanitizeCssString helpers,
the spoof-vs-authors example, and the full NIP-72 query sequence are
all preserved verbatim.
2026-04-26 21:57:54 -05:00
Alex Gleason bc0206c911 Drop 'Encourage NIP-07/NIP-46' framing from nostr-security skill
The previous subsection ranked login methods by safety, which misstates
the threat: NIP-07 extensions have their own attack surface (malicious
or compromised extensions can silently sign arbitrary events) and NIP-46
relies on a separate signer's security posture. Either way, an XSS on
the app's origin can ask an active signer to sign anything, drain funds
via zap requests, or scrape DMs as they're decrypted.

Replace with a single sentence noting that remote-signer flows don't
change the XSS mitigation story — same defenses apply regardless of
login method.
2026-04-26 21:56:17 -05:00
Alex Gleason 7de955ff87 Lead with XSS threat model in Nostr security guidance
The single most important thing to understand about a web Nostr client
is that nsec keys live in plaintext in localStorage, so any XSS =
permanent, unrecoverable key theft. The previous framing led with
author filtering (important but lower-stakes) and only mentioned XSS
implicitly via URL sanitization.

Restructures both the AGENTS.md section and the nostr-security skill
so the key-storage reality and XSS mitigations come first, CSP is
explained as defense-in-depth (with a walkthrough of the existing
index.html policy), and author filtering becomes section 3 — still
important, but secondary to script-injection prevention.

Also adds a 'no dangerouslySetInnerHTML' rule and a CSP hygiene rule
to the top-level checklist so those blockers surface before any
sanitization detail.
2026-04-26 21:55:25 -05:00
Alex Gleason 03ffbdaa44 Add nostr-security skill and trim AGENTS.md section
The skill consolidates three attack surfaces for Nostr event data:
author filtering on trust-sensitive queries, URL sanitization before
rendering event-sourced links/images, and CSS injection prevention
when interpolating event data into styles. The latter two were
previously undocumented in mkstack — imported and adapted from the
Ditto project's guidance, generalized to reference sanitizeUrl and
sanitizeCssString helpers as patterns to implement (mkstack doesn't
ship them yet) rather than existing imports.

AGENTS.md's Nostr Security Model now fits in a bulleted rule list
plus a single spoof-vs-authors example, with a pointer to the skill
for the full NIP-72 moderation walkthrough and sanitization details.
2026-04-26 21:52:42 -05:00
Alex Gleason 4217e553df Nest Loading and Empty States under Design Standards in AGENTS.md
Moves the section below the design rules list and demotes it from ## to
### so it reads as a subsection rather than a standalone top-level topic.
2026-04-26 21:50:53 -05:00
Alex Gleason a1619c1dab Extract testing guidance into a dedicated skill
Moves the 'don't write tests unless asked' policy and the Vitest +
TestApp setup example out of AGENTS.md into .agents/skills/testing/.
AGENTS.md keeps a short pointer so the 'always run the test script'
rule stays top-level while the test-authoring details load on demand.

Also adds a hook-testing example (renderHook + TestApp wrapper) and
notes for running vitest directly during iteration.
2026-04-26 21:50:26 -05:00
Alex Gleason bb24cb458b Patch lockfile to resolve npm audit advisories
Bumps transitive lodash and unhead versions within existing semver
ranges, clearing 2 moderate and 1 high advisory (GHSA-r5fr-rjxr-66jc,
GHSA-f23m-r3pf-42rh, GHSA-95h2-gj7x-gx9w).
2026-04-26 21:47:45 -05:00
Alex Gleason 66410edb60 Remove unused dependencies
None of these were imported in src/ or referenced in any config file:
- @fontsource-variable/inter, @hookform/resolvers, react-intersection-observer,
  date-fns (only appeared in skill doc stubs)
- @tailwindcss/typography (no tailwind config, no @plugin import)
2026-04-26 21:46:45 -05:00
Alex Gleason ae0a857299 Enable TypeScript strict mode and drop deprecated baseUrl
tsconfig: remove the deprecated `baseUrl` (paths already use relative `./src/*`), flip strict to true, and drop the now-redundant individual linting flags that were only there to partially relax the old non-strict config.

useNostrPublish: tighten the mutation input type to a proper EventTemplate (Pick kind+content, Partial tags+created_at) so its UseMutationResult generics match the call sites under strict mode.
2026-04-26 21:42:33 -05:00
Alex Gleason b868c445d5 Bump react, vite, and tailwind to latest
Update package.json caret ranges so the declared minimums match the currently-latest releases: react & react-dom 19.2.5, vite 8.0.10. tailwindcss and @tailwindcss/vite are already on 4.2.4.
2026-04-26 21:39:28 -05:00
Alex Gleason 1a27af0212 Apply @tailwindcss/upgrade canonical class migrations
Ran `npx @tailwindcss/upgrade`. Bumps tailwindcss and @tailwindcss/vite to 4.2.x and migrates arbitrary-value syntax to the canonical v4 shorthands (e.g. translate-x-[var(--x)] \u2192 translate-x-(--x), whitespace cleanups inside calc()).
2026-04-26 21:38:20 -05:00
Alex Gleason 8a02a177f4 Silence fast-refresh warnings and modernize toast
Extract non-component exports (cva variants, contexts, hooks, constants) into sibling *-variants.ts / *-utils.ts files so every .tsx exports only components. This clears the react-refresh/only-export-components warnings introduced when regenerating the shadcn v4 components.

Affected:
- badge, button, toggle, navigation-menu, tabs: variants extracted
- form: FormFieldContext, FormItemContext, useFormField extracted
- sidebar: SIDEBAR_* constants, SidebarContext, useSidebar, sidebarMenuButtonVariants extracted
- calendar, pagination: updated to import buttonVariants from button-variants

Also upgrade toast.tsx to React 19 idioms: drop forwardRef + ElementRef + ComponentPropsWithoutRef in favor of ref-as-prop + React.ComponentProps, add data-slot attributes, replace z-[100] with z-100, and extract toastVariants to toast-variants.ts.

Includes canonical-class cleanups in chart, checkbox, command, context-menu, and drawer (e.g. min-w-[8rem] \u2192 min-w-32, data-[inset] \u2192 data-inset, [&_[cmdk-*]] \u2192 **:[[cmdk-*]]).
2026-04-26 21:37:26 -05:00
Alex Gleason 7e6ee840fe Regenerate shadcn/ui components for v4
Replace the v3-authored shadcn components with their new-york-v4 equivalents via `npx shadcn add --overwrite`. The new components use the `radix-ui` meta-package, inline `cva` variants, `data-slot` attributes, and the v4 aria-invalid/focus-ring patterns.

Also:
- Remove now-unused @radix-ui/react-* packages (only react-toast is kept for the preserved toast/toaster).
- Delete orphaned *-variants.ts / *-utils.ts files (variants are inline in v4).
- Drop duplicate src/hooks/use-mobile.ts; sidebar now imports the existing useIsMobile hook.
- Rewrite src/index.css in the shadcn v4 idiom: raw hsl() values on --background etc., with @theme inline remapping to --color-*. Switch --sidebar-background to --sidebar to match the new sidebar classes.
- Keep toast.tsx, toaster.tsx, and qrcode.tsx untouched.
2026-04-26 21:27:30 -05:00
Alex Gleason edf1b1df49 Remove unused components.json
The shadcn CLI config file isn't referenced by the build, tests, or runtime — only by `npx shadcn add`, which we don't rely on.
2026-04-26 20:52:03 -05:00
Alex Gleason f0a92e5475 Upgrade to Tailwind CSS v4
Migrate from v3's JS config + PostCSS to v4's CSS-first setup using the @tailwindcss/vite plugin. Theme tokens move into @theme inline in src/index.css, tailwindcss-animate is replaced by tw-animate-css, and the container utility is redeclared via @utility. A compatibility layer preserves v3's default border color so existing shadcn/ui components render unchanged. Also exclude .agents/** (and other non-source dirs) from the Vitest run.
2026-04-26 20:51:29 -05:00
Alex Gleason b5043195d9 Remove skill list from AGENTS.md
The skill tool already provides a list of available skills with
descriptions, so enumerating them in AGENTS.md is redundant. Inline
"load the X skill" pointers next to related sections are kept \u2014
they serve as contextual cross-references, not a directory.
2026-04-26 20:44:31 -05:00
Alex Gleason 9617964e69 Split AGENTS.md into skills; compress design and query prose
Extract five topic areas into loadable skills: file-uploads,
nostr-encryption, theming, nip19-routing, nostr-relay-pools. Trim the
shadcn component enumeration, hook list, NostrMetadata type dump, and
Design Standards prose down to concrete rules. AGENTS.md shrinks from
1147 to 409 lines (~64%) while preserving the security model, core
hook usage, routing, loading/empty state, and git/test policies.
2026-04-26 20:43:22 -05:00
Alex Gleason 90e9045829 Shrink AccountSwitcher trigger to match starpoint
Starpoint achieves a more compact trigger via className descendant
selectors on LoginArea (h-10, p-1 pr-2.5, gap-2, w-8 h-8 avatar, no
name label). Apply those values as the component's default instead of
requiring every call site to override them.

Drops the md+ name label \u2014 the display name still shows inside the
dropdown. Also removes the 'stable file' warning header since this is
now an actively-maintained component.
2026-04-26 20:36:10 -05:00
Alex Gleason fc34ae02d4 Unify login/signup into single AuthDialog with 'Join' button
LoginArea now shows a single 'Join' button instead of separate 'Log in'
and 'Sign Up' buttons. The button opens a unified AuthDialog ported from
espy with steps: welcome \u2192 generate \u2192 secure \u2192 profile \u2192 login \u2192 connect.

The welcome step lets the user choose 'Create new account' or 'I already
have an account', so no functionality is lost \u2014 extension login,
nostrconnect QR flow, bunker URI, and secret-key file upload are all
preserved. Styling uses the template's neutral shadcn look rather than
espy's gradients, and copy is generic (no product branding).

Deletes LoginDialog.tsx and SignupDialog.tsx; updates AGENTS.md to
describe the new single-button behavior.
2026-04-26 20:16:14 -05:00
Alex Gleason 83c0ed42af Simplify nostr-comments skill and add 3-dots actions menu
- Drop the outer Card wrapper, title, and counter from CommentsSection; it
  now renders as a lightweight space-y-6 container matching starpoint.
- Drop the Card wrapper and 'Adding to the discussion' label from
  CommentForm; use a rounded Textarea + right-aligned 'Post' button.
- Add a per-comment 3-dots menu with 'Open in Ditto' (opens nevent on
  ditto.pub) and 'Delete' (NIP-09 kind 5, shown only for own comments,
  confirmed via AlertDialog, optimistically removes from the cached
  useComments result via queryClient.setQueriesData).
- Remove the obsolete title prop from SKILL.md docs and examples.
2026-04-26 20:09:29 -05:00
Alex Gleason 76dc27a513 Add nip85-stats skill for NIP-85 Trusted Assertion stats 2026-04-26 20:03:42 -05:00
Alex Gleason 3866c0a119 Use tailwindcss-safe-area plugin in capacitor skill
Replaces the hand-rolled safe-area CSS utilities with the
tailwindcss-safe-area Tailwind plugin (same approach Shakespeare uses),
which gives us a richer utility set plus offset / or variants:

  pt-safe, pb-safe, px-safe, p-safe, mt-safe, inset-safe,
  top-safe, bottom-safe, h-dvh-safe, min-h-dvh-safe,
  pt-safe-offset-4 (safe area + 1rem),
  pb-safe-or-8 (max of safe area and 2rem),
  scroll-p-safe, border-t-safe, and more.

Critically, the SKILL.md now pins the plugin version per Tailwind
major \u2014 the plugin changed its registration API between 0.x and
1.x to match Tailwind's own v3\u2192v4 transition:

  Plugin 0.8.0  \u2192 Tailwind 3.x  (add to plugins: array in config)
  Plugin >=1.0  \u2192 Tailwind 4.x  (@import in main CSS, not @plugin)

mkstack ships Tailwind 3.4.x, so install targets 0.8.0 specifically.
Using @latest on a Tailwind 3 project silently produces no utilities
at all \u2014 documented in both the setup section and troubleshooting.

Also documents the Android WebView <140 caveat: Chromium bug 40699457
causes env(safe-area-inset-*) to return 0. Capacitor's SystemBars
plugin (insetsHandling: 'css', already preset in our capacitor.config.ts
template) works around it by injecting --safe-area-inset-* CSS variables,
but tailwindcss-safe-area uses env() directly and can't see them.
Two fixes:
  1. preferred: target WebView 140+ (Aug 2025+, auto-updated on any
     active Android >=7 via Play Services)
  2. fallback: new files/safe-area-shim.css that redeclares the common
     utilities with var(--safe-area-inset-*, env(..., 0px)) so the
     SystemBars-injected variables win. Copy to src/ and @import after
     @tailwind utilities; if targeting older Android fleets.

Changes:
- Remove files/safe-area.css (hand-rolled utilities)
- Add files/safe-area-shim.css (optional Android <140 override)
- SKILL.md: new step 3 'Register the Tailwind Safe-Area Plugin'
  inserted between 'Copy Skill Files' and 'Edit capacitor.config.ts';
  subsequent steps renumbered 4\u201310
- SKILL.md: 'Install Dependencies' adds the Tailwind plugin with a
  version matrix table and explicit v3-pinning rationale
- SKILL.md: 'Using the APIs \u2192 Safe-area utilities' rewritten with
  a real-world usage cheatsheet mapping plugin classes to use cases
- SKILL.md: expanded troubleshooting with three new safe-area
  entries (Android env-0 WebView<140, 'pt-safe doesn't exist' =
  plugin not registered or wrong major version, iOS missing
  viewport-fit=cover)

Validated: full stack staged into src/ + package.json (including
[email protected] and tailwind.config.ts plugins
registration). npm run test passes with only the 6 pre-existing
baseline errors; reverted cleanly.
2026-04-26 19:53:28 -05:00
Alex Gleason f927a00dcf Add capacitor skill for native iOS/Android builds
Provides the cross-platform primitives needed to wrap the mkstack web app
as a native iOS and Android binary using Capacitor, modeled on how Ditto
integrates the framework.

Each helper works unconditionally on every platform \u2014 native builds
use the real Capacitor plugin, web falls back to an equivalent browser
API:

- haptics: impactLight/Medium/Heavy, notificationSuccess/Warning/Error,
  selectionChanged \u2014 taptic engine on native, navigator.vibrate() on
  web, silent no-op where neither exists
- downloadTextFile / openUrl \u2014 @capacitor/filesystem and native
  share sheet on native, <a download> and window.open on web
- secureStorage + useSecureLocalStorage \u2014 iOS Keychain / Android
  KeyStore adapter with automatic migration of existing plaintext values
  from localStorage on first native read, plus an async-aware React hook
  that exposes a 'ready' flag
- DeepLinkHandler \u2014 listens for Capacitor appUrlOpen and forwards
  into React Router navigation
- bootstrapNative() \u2014 hides the iOS keyboard accessory bar and keeps
  the system-bar icon style in sync with the active CSS theme via
  MutationObserver on both the <html> class and the theme-vars style
  element; detects dark background from theme class or computed body
  luminance
- safe-area CSS utilities \u2014 .safe-area-top/-bottom/-left/-right
  padding classes plus .safe-area-inset-top/-bottom positional variants,
  preferring --safe-area-inset-* CSS vars (injected by the SystemBars
  plugin on Android) over env(safe-area-inset-*) so Chromium <140 on
  Android Just Works
- capacitor.config.ts template \u2014 preconfigured with androidScheme
  https, ios contentInset never, SystemBars insetsHandling css; placeholder
  appId / appName / scheme ready to be customized
- patch-cap-config.mjs \u2014 post-cap-sync hook that restores
  packageClassList entries for local (non-SPM) native plugin classes so
  they get registered at startup

SKILL.md documents the full setup sequence: install the nine
@capacitor/* + capacitor-secure-storage-plugin packages, copy files
into src/, paste the CSS snippet into index.css, edit capacitor.config.ts
identity fields, add viewport-fit=cover, wire bootstrapNative() into
main.tsx and DeepLinkHandler into AppRouter, npx cap add android / ios,
build, sync, run. Also covers common follow-ups (custom plugins, icons,
splash, push, deep-link verification, credential manager integration)
and troubleshooting (safe-area zero on Android, navigation no-op, keychain
orphaning, keyboard accessory bar timing, custom theme detection).

Validated: all files staged into src/ + deps installed \u2014 npm run
test passes with only the 6 pre-existing baseline errors (template
FIXMEs + missing index.html manifest/meta), then cleanly reverted.
2026-04-26 19:48:23 -05:00
Alex Gleason 0b220f250a Upgrade note-content skill with advancements from Ditto
Replaces the minimal NoteContent component with the full-featured
version from ~/Projects/ditto, and bundles the helper modules and
minimal companion stubs needed to make it work standalone.

New capabilities:
- BOLT11 lightning-invoice detection (renders LightningInvoiceCard)
- Inline image / video / audio / webxdc embeds with MIME detection
- Consecutive images grouped into an ImageGallery with shared Lightbox
- NIP-94 imeta-declared media appended when absent from content
- Embedded nevent / naddr cards, with relay and author hints pulled
  from q tags; supports naddr1 fragments embedded in external URLs
- Bare and @-prefixed NIP-19 identifiers (no nostr: prefix required)
- Line-end-aware link rendering: URLs at the end of a line become
  preview cards, mid-sentence URLs stay inline
- Trailing-punctuation stripping on URLs so 'see https://x.com.'
  links correctly
- wss:// relay URLs routed to /r/<encoded>
- Unicode-aware hashtag regex (matches non-ASCII letters)
- NIP-30 custom emoji via :shortcode: with per-event and viewer-wide
  fallback collections (useCustomEmojis)
- Flag emoji linkified to /i/iso3166:<CC>
- 'Emoji-only' posts auto-rendered at large size
- dir="auto" for RTL content
- Whitespace normalization around block embeds
- disableEmbeds / disableMediaEmbeds / disableNoteEmbeds /
  hideEmbedImages props for recursive embed cards and preview
  contexts

New bundled files:
- lib/: mediaUrls.ts, sanitizeUrl.ts, imeta.ts, customEmoji.ts,
  getDisplayName.ts, avatarShape.ts, countries.ts
- hooks/: useCustomEmojis.ts (stub), useBlossomFallback.ts (stub),
  useProfileUrl.ts (stub)
- components/: LinkEmbed, EmbeddedNote, EmbeddedNaddr,
  LightningInvoiceCard, VideoPlayer, AudioVisualizer, WebxdcEmbed,
  ImageGallery + Lightbox, ProfileHoverCard, CustomEmoji \u2014 all
  minimal but functional stubs; each file documents how to upgrade
  to a richer implementation

SKILL.md rewritten with full file list, upgrade paths for each
stub, routing expectations, and a patterns-to-render table.

Validated: tsc --noEmit clean, vitest run passes all 5 NoteContent
tests, vite build succeeds \u2014 when all skill files are staged
into src/ alongside the component.
2026-04-26 19:38:31 -05:00
Alex Gleason c067e87f2c Add note-content skill for rich text rendering of Nostr notes
Moves src/components/NoteContent.tsx and its test file into a new
note-content skill at .agents/skills/note-content/. The component
linkifies URLs, hashtags, and Nostr URIs (npub/nprofile/note/nevent)
inside plaintext event content, and was previously imported only by
the comments and DM stacks that have already been extracted/removed.

Also removes the 'Rendering Rich Text Content' section from
AGENTS.md since NoteContent is no longer part of the default
template surface. The new SKILL.md documents the expected /:nip19
and /t/:hashtag routes and the existing template hooks it relies on
(useAuthor, genUserName).
2026-04-26 18:04:43 -05:00
Alex Gleason 353551342b Add relay-management skill for NIP-65 relay list UI
Moves src/components/RelayListManager.tsx into a new
relay-management skill at .agents/skills/relay-management/, with a
SKILL.md covering installation, NIP-65 background, and how the
component hooks into the existing AppContext / NostrSync / kind
10002 publishing already present in the core template.

AGENTS.md's 'Relay Management' section keeps the NIP-65 sync
description but drops the RelayListManager usage example, pointing
at the new skill instead.
2026-04-26 18:00:11 -05:00
Alex Gleason bc97f82d3e Add edit-profile skill for Nostr profile editing form
Moves src/components/EditProfileForm.tsx into a new edit-profile
skill at .agents/skills/edit-profile/, with a SKILL.md covering
installation, the kind 0 fields it edits (name, about, picture,
banner, website, nip05, bot), and the existing template hooks it
plugs into (useCurrentUser, useNostrPublish, useUploadFile,
useToast).

Also removes the 'Nostr Edit Profile' section from AGENTS.md since
the component is no longer part of the default template surface.
2026-04-26 17:59:17 -05:00
Alex Gleason 0d5a415bac Extract Shakespeare AI hook into the ai-chat skill
Moves src/hooks/useShakespeare.ts into
.agents/skills/ai-chat/files/hooks/useShakespeare.ts and prepends
setup instructions to the existing SKILL.md.

Also removes the useShakespeare bullet from AGENTS.md since the hook
is no longer part of the default template surface.
2026-04-26 17:58:22 -05:00
Alex Gleason 29913ef530 Extract comment system into the nostr-comments skill
Moves the NIP-22 (kind 1111) commenting stack out of src/ and into
.agents/skills/nostr-comments/files/ \u2014 useComments, usePostComment,
and the Comment / CommentForm / CommentsSection components.

Updates the existing SKILL.md with a setup preamble explaining how
to copy the files back into src/ when a project needs comment
functionality. No dependency changes were required; the skill only
uses packages already present in the template.
2026-04-26 17:57:46 -05:00
Alex Gleason c6be6355a7 Remove direct messaging from the codebase
Deletes the entire DM stack \u2014 DMProvider, DMContext, the dm/ UI
components, useDMContext, useConversationMessages, the dm* library
modules, pages/Messages.tsx, and the nostr-direct-messages skill.
Also drops the idb dependency, which was only used by the DM
IndexedDB message store.

The implementation was complex and tightly coupled; removing it
clears the way for a future, cleaner approach if DM support is
needed again.
2026-04-26 17:57:05 -05:00
Alex Gleason 9e2599502d Extract NWC and Lightning zap code into an nwc skill
Moves NWC wallet connection (useNWC, NWCContext, WalletModal) along with
the WebLN wallet detection (useWallet) and NIP-57 zap stack (useZaps,
ZapButton, ZapDialog) out of src/ and into .agents/skills/nwc/ as an
opt-in skill. Removes NWCProvider from App.tsx and TestApp.tsx, drops
the NWC-only dependencies (@getalby/sdk, @webbtc/webln-types) from
package.json, and updates AGENTS.md to stop referencing the extracted
hooks and components.

The new SKILL.md explains how to reinstall the dependencies, copy the
files back into src/, and wire up NWCProvider when a project actually
needs Lightning wallet and zap functionality.
2026-04-26 17:48:46 -05:00
Alex Gleason 59c32c845c Add mandatory commit instruction to AGENTS.md
Require that every completed task end with a git commit, without waiting
for the user to ask. Committing is part of completing the task.
2026-04-26 00:58:25 -05:00
Alex Gleason 4044d586db Upgrade Radix UI packages to fix infinite render loop with React 19
@radix-ui/react-popper 1.2.4 had a useEffect with no dependency array
that called setState on every render, causing an infinite loop. Fixed
in 1.2.8 by tracking the previous anchor in a ref.
2026-03-28 02:31:41 -05:00
Alex Gleason 01889d1207 Upgrade Vite and Nostrify 2026-03-28 00:43:37 -05:00
Alex Gleason dcfdbf9e47 Upgrade to React 19
- react, react-dom: ^18.3.1 -> ^19.2.4
- @types/react, @types/react-dom: ^18.3.1 -> ^19.x
- react-day-picker: ^8.10.1 -> ^9.14.0 (rewrite calendar.tsx for v9 API)
- vaul: ^0.9.3 -> ^1.1.2
- Fix RefObject<T> type in ZapDialog for React 19 type changes
2026-03-28 00:13:05 -05:00
Alex Gleason cb52a18d09 Add NIP-42 relay authentication support
Sign kind 22242 AUTH events automatically when relays send challenges.
Uses a signer ref pattern so the pool doesn't need to be recreated
when the user logs in/out or switches accounts.
2026-03-25 02:14:41 -05:00
Alex Gleason 699a3acb85 Upgrade Nostrify 2026-03-25 01:47:45 -05:00
Alex Gleason 1caf9dabcb feat: add client-initiated NIP-46 (nostrconnect://) login support
Upgrade to @nostrify/[email protected] and implement the nostrconnect:// login flow:
- QR code display on desktop, deep link on mobile
- Copy URI button, retry on timeout, abort on dialog close
- Bunker URI manual input as fallback under the Remote Signer tab
- Add QRCodeCanvas component using the existing qrcode dependency
2026-03-24 16:21:15 -05:00
Alex Gleason 9af2db39f2 Upgrade to Vite 8
Way faster builds!
2026-03-20 15:51:52 -05:00
Alex Gleason 1cf1ad94b2 .claude/skills/ -> .agents/skills/ 2026-03-12 12:51:56 -05:00
Alex Gleason e67f5158b7 Standardize Nostr filter limit to 15 in AGENTS.md examples 2026-03-11 18:28:22 -05:00
Alex Gleason 32ba132ae5 Add plausible-analytics skill 2026-03-11 14:48:17 -05:00
Alex Gleason ba892fdd54 Fix iOS Safari auto-zoom on input focus by ensuring 16px minimum font size on mobile 2026-03-07 11:38:12 -06:00
Alex Gleason c88350270a Update nostr-comments skill to include full scope of NIP-73 commenting 2026-02-24 13:25:26 -06:00
Alex Gleason b39bd0b7b7 Support NIP-73 hashtag identifiers 2026-02-24 11:55:40 -06:00
Alex Gleason 4a87514a06 Remove github test workflow 2026-02-23 19:13:34 -06:00