feat(chatelet): book a room and pay by Lightning (slice 2) #154
No reviewers
Labels
No labels
app:activities
app:chat
app:chatelet
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/chatelet-booking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 2 of the chatelet guest UI (#141): book a room and pay by Lightning.
Book on the room page opens a dialog: guest count, optional contact and note, then the extension holds the dates and returns the invoice. The dialog shows the QR with copy / open-in-wallet / pay-from-LNbits-wallet and polls until it settles, then shows the confirmation. useBookingFlow mirrors events' useTicketPurchase.
Booking needs a Nostr identity (the extension DMs check-in details to the guest pubkey), so anonymous guests go through /login?redirect= and come back to the room with their dates. Both login pages now honour that param. Guest checkout without an account is a later slice.
The invoice screen polls chatelet's keyless GET /api/v1/public/bookings/{id} (aiolabs/chatelet#19) and waits for the booking to reach confirmed, so "booked" means the extension's paid listener has actually run. If the hold expires or is declined before payment the dialog shows a "Dates released" screen instead of spinning.
Tested against bohm's native LNbits with the chatelet#19 branch loaded: anonymous bounce, login, hold, wallet payment, confirmation; the extension logs the booking as confirmed.
Deploy order: chatelet#19 must be in the catalog and upgraded on aio-demo before this reaches staging, or the dialog polls a 404.
Mirror the extension's BookingRequestData / Booking / BookingQuote models and add the two calls slice 2 needs: POST /bookings (hold + invoice) and an anonymous settlement poll on LNbits core's GET /api/v1/payments/{hash}. Chatelet's own booking read needs a wallet key, so the invoice is what the guest can watch until a public booking-status endpoint lands on the extension. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>Switch the invoice screen's poll from LNbits core's payment status to chatelet's new keyless GET /api/v1/public/bookings/{id} (chatelet#18). The dialog now waits for the booking to reach confirmed — meaning the extension's paid listener has actually run — and shows a 'Dates released' screen when the hold expires or is declined before payment instead of spinning forever. Needs chatelet >= the build that ships the endpoint on the target instance (staging must be upgraded before this reaches dev). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>