Skip to content
Merged

Main #105

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
71f018a
Add auto-login functionality and enhance account management in Genera…
fanyiy Oct 6, 2025
4132906
Update default value for sidebar collapsed state in storage utility
fanyiy Oct 6, 2025
c1db1c9
Show lightening invoice upon site visit
fanyiy Oct 6, 2025
bfaeb52
Adjust greeting message position on mobile
fanyiy Oct 6, 2025
0736ca5
Use drawers on mobile
fanyiy Oct 6, 2025
ab3cae4
Refactor TopUpPromptModal to use Drawer for mobile view
fanyiy Oct 6, 2025
1e13677
Fix button colors
fanyiy Oct 6, 2025
26f87c5
Add hydration check to TopUpPromptModal to prevent client-side render…
fanyiy Oct 6, 2025
7a9ea50
Add Enter key functionality to submit custom amount in TopUpPromptModal
fanyiy Oct 6, 2025
646f5c0
Fix drawer
fanyiy Oct 6, 2025
1a6eb69
removed cashu mint url and hid nsec from shown as plain text
sh1ftred Oct 7, 2025
ad56d27
fixed UI issues on mobile view in the models tab
sh1ftred Oct 8, 2025
d6adc69
removed unnecessary console logs
sh1ftred Oct 8, 2025
489baf0
fixed all chat conversations problems
sh1ftred Oct 8, 2025
a0b5640
Add Enter key functionality to various input fields
fanyiy Oct 11, 2025
5dbe474
Removed unnecessary files. and junk funcs
sh1ftred Oct 14, 2025
bf2a662
Before major refactoring.
sh1ftred Oct 15, 2025
74050aa
Fixed the bug where chat wasn't working at all cuz of thiniking.
sh1ftred Oct 15, 2025
956d5e8
top up now mentionslightning
sh1ftred Oct 16, 2025
d729461
Update chat bubble editor
fanyiy Oct 16, 2025
ecec6d9
Fix image display with streaming output
fanyiy Oct 21, 2025
1b83dd0
And file input support
fanyiy Oct 21, 2025
2b68547
feat: Phase 1 - Extract wallet feature module
sh1ftred Oct 15, 2025
20a15d0
docs: Add Phase 1 completion summary
sh1ftred Oct 15, 2025
67fd4c0
refactor: Update all import paths to use wallet feature module
sh1ftred Oct 15, 2025
3788a26
fix: Resolve TypeScript build errors in wallet feature
sh1ftred Oct 15, 2025
f57580f
refactor: Move BalanceDisplay to wallet feature
sh1ftred Oct 15, 2025
6a2bf78
Deleted older files and fixed the thinkingParser file deletion bug.
sh1ftred Oct 15, 2025
cd18ac6
moving both nip60 and local wallets to wallet component
sh1ftred Oct 16, 2025
4bce450
docs: Phase 1 complete - Wallet feature fully modular and production-…
sh1ftred Oct 16, 2025
1cc26c8
moving all functions into hooks.
sh1ftred Oct 19, 2025
cd0826e
LLMs are terrible at code management. removed ton of duplicated code.…
sh1ftred Oct 20, 2025
b04cfac
delete duplicated
sh1ftred Oct 20, 2025
f5a9131
Set up for unified spending.
sh1ftred Oct 20, 2025
3b3de77
Fix image display with streaming output
fanyiy Oct 21, 2025
54d0a5b
And file input support
fanyiy Oct 21, 2025
d982b6e
moving all functions into hooks.
sh1ftred Oct 19, 2025
b1ea229
LLMs are terrible at code management. removed ton of duplicated code.…
sh1ftred Oct 20, 2025
a767ce4
mint with balance is used if the current balance isn't enouygh. Refac…
sh1ftred Oct 23, 2025
73b2d5b
Fix image display with streaming output
fanyiy Oct 21, 2025
e60f3b4
And file input support
fanyiy Oct 21, 2025
f1e4918
moving all functions into hooks.
sh1ftred Oct 19, 2025
9710504
LLMs are terrible at code management. removed ton of duplicated code.…
sh1ftred Oct 20, 2025
142d138
Fix image display with streaming output
fanyiy Oct 21, 2025
4e43290
And file input support
fanyiy Oct 21, 2025
44faab1
add a commit saying we added more error codes and we're slowly moving…
sh1ftred Oct 23, 2025
cfb33f1
fixed build errors.
sh1ftred Oct 23, 2025
a3a158e
wip
fanyiy Oct 27, 2025
d03da1a
Add NWC support
fanyiy Oct 28, 2025
de2c0ae
Fix output image size
fanyiy Oct 30, 2025
5c29843
Add output image loading skeleton
fanyiy Oct 30, 2025
d7c6459
Adjust button positioning in ChatInput component for improved layout
fanyiy Oct 30, 2025
9cdead0
Move initial input bar position to bottom on mobile
fanyiy Oct 30, 2025
376206b
Fix topup modal closing on background click
fanyiy Oct 30, 2025
4161dbd
Downgrade @getalby/bitcoin-connect-react version
fanyiy Oct 30, 2025
a93e401
Fix build error
fanyiy Oct 30, 2025
000c9a3
Fix build error
fanyiy Oct 30, 2025
e239ca6
Merge pull request #96 from Routstr/nwc
fanyiy Oct 31, 2025
f53eba3
before applesauce migration for chat sync
sh1ftred Oct 27, 2025
97774c0
Switched to AppleSauce for chat history. Fixed the nip60 failed relay…
sh1ftred Nov 1, 2025
73ad5ec
added readme for MSW
sh1ftred Nov 2, 2025
0798296
Fixing up a few things in chat completions and cost calculations
sh1ftred Nov 2, 2025
f297c04
wip
fanyiy Nov 2, 2025
3ab2ad8
Merge branch 'nwc' into playwright
fanyiy Nov 2, 2025
af7c65d
Mocks are all tried and tested. Added retry logic for chat completion…
sh1ftred Nov 3, 2025
2c8c5c2
Fixed mintURL build issues
sh1ftred Nov 3, 2025
2909fa2
added login button to the onboarding screen
sh1ftred Nov 3, 2025
70e69ac
Add functionality to manage disabled providers in ModelsTab
sh1ftred Nov 3, 2025
f52f265
Merge pull request #101 from Routstr/2025-11-03-80fg-0b572
sh1ftred Nov 3, 2025
12eb9f8
Add playwright tests
fanyiy Nov 3, 2025
91d8a56
Merge branch 'main' into playwright
fanyiy Nov 3, 2025
2b6c67b
Merge pull request #102 from Routstr/playwright
fanyiy Nov 3, 2025
15e5868
Fix
fanyiy Nov 3, 2025
6888fc2
Added retry with diff provider for 500/502 errors. Removed / for old …
sh1ftred Nov 4, 2025
c9d03d6
major bug. smh msh msh
sh1ftred Nov 4, 2025
29e570d
fixed sending msat bug and some ui improvements in the api keys tab
sh1ftred Nov 5, 2025
4595f32
Add Minibits mint mock responses for /keysets and /info endpoints
sh1ftred Nov 5, 2025
9cbffa8
fixed the bug where model seelction was auto switch as we had differe…
sh1ftred Nov 5, 2025
c582269
also added refunds for 402 and combined 402/3/1/13 together.
sh1ftred Nov 5, 2025
93228c7
feat: add retry logic with pending balance refund
sh1ftred Nov 5, 2025
2282682
feat: add clickable QR code with zoom modal
sh1ftred Nov 5, 2025
ddb729e
Add 400 error scenario for invalid model ID in mock handlers
sh1ftred Nov 5, 2025
d3eb548
Fixed the 400 bug. but now randomly sometimes the model selected chan…
sh1ftred Nov 5, 2025
28095e7
Update TopUpPromptModal: Rename Wallet tab to NWC and add payment fun…
sh1ftred Nov 5, 2025
313e231
Upgrade to Next.js 16 and add NWC wallet manager
fanyiy Nov 6, 2025
91b736c
Update disconnect button
fanyiy Nov 6, 2025
ef1d95f
Mint unreachable error handling. For "Load failed".
sh1ftred Nov 6, 2025
b5bae05
Remove fade out effect for greeting message
fanyiy Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cursor/worktrees.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"setup-worktree": [
"npm install"
]
}
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,59 @@ Key directories:
- `utils/` and `lib/`: Utilities and integrations (Cashu, Nostr)
- `test/`: Scripts and docs for Lightning/regtest testing

## API Mocking with MSW

This project uses [Mock Service Worker (MSW)](https://mswjs.io/) for API mocking in development. This allows you to test error scenarios and edge cases without hitting the real backend.

### Testing the 413 Payload Too Large Error

To test the 413 error scenario:

1. **Start the development server:**
```bash
npm run dev
```

2. **Open the app in your browser** and wait for the service worker to initialize (check Network tab for `mockServiceWorker.js`).

3. **Enable the 413 mock scenario** in your browser console:
```javascript
localStorage.setItem('msw:scenario', '413');
// Optional: add latency delay
localStorage.setItem('msw:latency', '1500'); // milliseconds
```

4. **Refresh the page** and trigger a chat request. The API call to `v1/chat/completions` will return a 413 error with the payload:
```json
{
"error": {
"message": "Payload Too Large",
"code": "PAYLOAD_TOO_LARGE",
"status": 413
}
}
```

5. **Disable the mock** when done:
```javascript
localStorage.removeItem('msw:scenario');
localStorage.removeItem('msw:latency');
```

The mock handler is configured in `mocks/handlers.ts` and automatically starts in development mode via `components/ClientProviders.tsx`.

### Minibits Mint Mock Data

**⚠️ Warning:** If you encounter unusual mint errors for Minibits in development mode (e.g., keyset errors, unexpected responses), the cached mock data in `mocks/handlers.ts` may be outdated. The mock responses for `/v1/keysets` and `/v1/info` endpoints should be updated periodically to match the current Minibits mint state.

To update the mock data:
1. Fetch the latest data from the real mint:
```bash
curl https://mint.minibits.cash/Bitcoin/v1/keysets
curl https://mint.minibits.cash/Bitcoin/v1/info
```
2. Update the corresponding handlers in `mocks/handlers.ts` with the fresh responses.

## License

MIT
Loading