Commit Graph

12 Commits

Author SHA1 Message Date
sam b46703eaed remove blobbis 2026-04-30 13:19:22 +07:00
Alex Gleason 874010c4fe Store nsec in browser password manager via Credential Management API
Progressive enhancement using PasswordCredential (Chromium-only).
On sign-up, the nsec is offered to the browser's password manager
alongside the existing file download. The prompt appears while the
user is looking at their key on the download step. On login, stored
credentials are retrieved for one-tap login on supported browsers.

Safari/Firefox/iOS silently skip — existing flows are unchanged.
2026-04-10 21:49:14 -05:00
Alex Gleason f66ab92e51 Unify Shop/Inventory, remove Info modal and visibility, consolidate dev tools
- Combine Shop and Inventory into a single tabbed dialog (Shop tab
  with category sub-tabs, Inventory tab with item list and use flow)
- Remove BlobbiInfoModal entirely
- Move dev tools (Dev Hatch/Evolve, State Editor, Emotion Tester) into
  the bottom bar 'More' dropdown with yellow text, remove floating
  dev tools panel
- Remove 'visibleToOthers' / 'visible_to_others' concept from the
  entire codebase: types, interfaces, tag schemas, event construction,
  parsing, UI badges, dev editor, and documentation
2026-04-01 20:14:34 -05:00
filemon f5595b3477 feat(blobbi): implement hatch task system for egg incubation
Add task-based progression system for hatching Blobbi eggs:

- Extend BlobbiState with 'incubating' and 'evolving' states
- Add task tracking fields to BlobbiCompanion interface
- Create useStartIncubation hook to begin incubation process
- Create useHatchTasks hook to compute task progress from Nostr events
- Add HatchTasksPanel UI component showing 5 hatch tasks:
  - Create Theme (kind 36767)
  - Color Moment (kind 3367)
  - Change Avatar Shape (kind 0 with shape change)
  - Create Post with required prefix/hashtags
  - 7 Blobbi interactions
- Add BlobbiPostModal with enforced content requirements
- Add StartIncubationDialog confirmation dialog
- Auto-increment interaction counter in action hooks
- Gate hatch button visibility based on task completion
2026-03-18 16:44:38 -03:00
filemon 6e1a195615 Deprecate egg_temperature - eggs now use warmth prop fallback 2026-03-16 11:11:34 -03:00
filemon 452848f14f Remove shell_integrity - eggs now use standard health stat
BREAKING: shell_integrity is fully removed from the egg model.
Eggs now use the standard 3-stat model: health, hygiene, happiness.

Changes:
- Remove EggStats, EggMedicineResult types from blobbi-action-utils.ts
- Remove applyMedicineToEgg function (medicine now uses applyStat directly)
- Update useBlobbiUseInventoryItem to apply medicine health effect to egg health
- Update BlobbiActionInventoryModal to preview health changes for egg medicine
- Remove shell_integrity from ItemEffect in shop types
- Remove shellIntegrity from BlobbiEggData in types/blobbi.ts
- Remove EggStats, EggMedicineResult, applyMedicineToEgg from exports
- Add DEPRECATED_BLOBBI_TAG_NAMES set with 'shell_integrity'
- Update mergeBlobbiStateTagsForRepublish to filter out deprecated tags

Migration: Existing events with shell_integrity tags will have them
automatically removed on the next republish (any user interaction).

Egg stat model is now fully consistent:
- health, hygiene, happiness: active (decay + medicine)
- hunger, energy: fixed at 100
2026-03-16 00:20:33 -03:00
filemon f3e262bd3a fix(blobbi): respect user profile state in onboarding flow
- Fixed useBlobbiOnboarding to derive initial step from profile state
- Added useEffect to sync step when profile loads from cache/relay
- Added egg name customization via updatePreviewName() function
- Removed 'Maybe Later' skip option from adoption step
- Refactored BlobbiPage with cleaner state logic and debug logging
- Fixed TypeScript errors (unused vars, empty interface)

Resolves issue where onboarding always started on 'profile' step
even when user already had a profile, and adds name input to
egg preview before adoption.
2026-03-15 12:48:58 -03:00
filemon 251ea43e33 refactor: reorganize Blobbi shop into domain-scoped structure with list layout
- Move shop module to src/blobbi/shop/ for clear domain boundaries
- Rename components with Blobbi prefix for clarity:
  - ShopModal → BlobbiShopModal
  - InventoryModal → BlobbiInventoryModal
  - PurchaseDialog → BlobbiPurchaseDialog
  - usePurchaseItem → useBlobbiPurchaseItem
  - shop-items.ts → blobbi-shop-items.ts
  - shop.ts → shop.types.ts

- Convert shop UI from card grid to vertical list layout:
  - Replace ShopItemCard with BlobbiShopItemRow
  - Horizontal row layout: icon, name, category, effects, price, button
  - More compact and scannable design
  - Better mobile responsiveness
  - Easier to compare items at a glance

- Add blobbi-shop-utils.ts with helper functions:
  - formatEffectSummary() for compact effect display
  - getEffectCounts() for stat summaries
  - getPrimaryEffect() for tooltips/badges

- Folder structure:
  src/blobbi/shop/
    components/     (UI components)
    hooks/          (purchase hook)
    lib/            (catalog + utils)
    types/          (TypeScript types)

- Update all imports in BlobbiPage to use new paths
- Remove old generic shop paths (src/components/shop, etc.)
- Preserve all existing behavior and purchase flow
- No Lightning/sats/kind 40100/40101 (as specified)
- TypeScript strict, no any types used
2026-03-09 15:48:31 -03:00
filemon 37b8fc6752 feat: implement Blobbi Shop and Inventory system
- Add shop item catalog with 24 items (food, toys, medicine, hygiene, accessories)
- Create shop types: ShopItem, StorageItem, ItemEffect, PurchaseRequest
- Extend BlobbonautProfile with coins and storage fields
- Add storage tag parsing/serialization helpers for kind 31125
- Implement usePurchaseItem hook for atomic coin + storage updates
- Create ShopModal with category tabs and item grid
- Create PurchaseDialog with quantity selector and affordability checks
- Create InventoryModal to display purchased items
- Integrate shop and inventory into BlobbiPage footer
- Purchase flow: validates price, checks coins, stacks items, publishes single event
- Accessories marked as 'Coming Soon' (disabled state)
- No Lightning/LNURL/sats purchase flow (as specified)
- Only uses kind 31125 for profile persistence (no kind 40100/40101)
2026-03-09 15:32:03 -03:00
filemon 1f41478d53 wire baby rendering into the app with stage-aware visual component
- Add BlobbiBabyVisual component using baby-blobbi module for SVG resolution and customization
- Add BlobbiStageVisual component that routes rendering by life stage (egg/baby/adult)
- Update BlobbiPage to use BlobbiStageVisual for all Blobbi displays
- Uncomment BlobbiBabyData interface in types/blobbi.ts to fix type error
2026-03-09 12:27:16 -03:00
filemon bd71520cb5 add baby-blobbi file 2026-03-09 12:22:44 -03:00
Alex Gleason cfb5659020 Replace DomainFavicon with ExternalFavicon using configurable favicon URL template
The old DomainFavicon component had a multi-step fallback chain (HTML scraping,
direct URL guessing, then the configured provider) which meant the configurable
setting was almost never reached. The new ExternalFavicon component uses the
configured favicon URL template directly via RFC 6570 URI templates.

- Rename config field faviconProvider -> faviconUrl
- Add faviconUrl() utility with uri-templates for RFC 6570 support
- Remove local Favicon component from ProfileRightSidebar
- Update all consumers to use ExternalFavicon
2026-02-21 15:14:30 -06:00