Global Lantern Lighting & Scheduling โ Implementation Summary โ
Implementation Date: January 3, 2026
Feature Status: โ
Complete
Overview โ
Expanded the Lantern Hub with full multi-step flows for lighting lanterns globally (not just from venue detail view) and scheduling future lights. Refactored existing form components to be reusable and composable.
What Was Built โ
New Components โ
VenuePicker - Venue selection interface
- List and map view modes
- Search and category filtering
- Shows active lantern counts
- Reusable for both immediate and scheduled lighting
LightLanternForm - Interest & mood form
- Extracted from Dashboard (was embedded)
- Reusable for immediate or scheduled lighting
- Optional venue information display
- Character counter (140 chars)
- Three mood options: Conversation, Quiet Company, Activity/Game
ScheduleLightForm - Schedule future light
- Multi-step wizard (Venue โ Date/Time โ Interest/Mood)
- Step progress indicators
- Date/time validation (up to 30 days ahead)
- Preview of scheduled time
- Connects to VenuePicker and LightLanternForm
Updated Components โ
- Now triggers full flows for "Light Lantern" and "Schedule a Light"
- Added handlers for waves and chats (future navigation)
- Updated props to support new interactions
- Removed embedded
LightLanternForm(now imported) - Added state management for multi-step flows
- Integrated all new components
- Maintains existing venue detail โ light flow
- Added global flows via Lantern Hub
- Removed embedded
Storybook Stories โ
- VenuePicker.stories.jsx - 4 stories
- LightLanternForm.stories.jsx - 4 stories
- ScheduleLightForm.stories.jsx - 3 stories
User Flows โ
Flow 1: Global Light Lantern (from Lantern Hub) โ
Tap Fire Icon โ Lantern Hub Opens
โ
Tap "Light Lantern"
โ
Venue Picker โ Select Venue
โ
Light Lantern Form โ Set Interest & Mood
โ
Confirm โ Lantern Lit โจSteps:
- User taps extinguished fire icon
- Lantern Hub opens (no active lantern view)
- User taps "Light Lantern" primary CTA
- VenuePicker opens showing all nearby venues
- Can search, filter by category, switch list/map view
- User selects a venue
- LightLanternForm opens with venue info
- User selects mood
- User writes interest message (max 140 chars)
- User taps "Activate Lantern"
- Lantern is lit, fire icon glows
- User moved to ActiveLanternView
Flow 2: Schedule a Light (Future) โ
Tap Fire Icon โ Lantern Hub Opens
โ
Tap "Schedule a Light"
โ
Schedule Form Step 1 โ Select Venue
โ
Schedule Form Step 2 โ Pick Date & Time
โ
Light Lantern Form โ Set Interest & Mood
โ
Confirm โ Scheduled Light Saved ๐
Steps:
- User taps fire icon
- Lantern Hub opens
- User taps "Schedule a Light"
- ScheduleLightForm opens (Step 1: Venue)
- User taps "Select Venue"
- VenuePicker opens
- User selects venue
- Returns to Schedule Form
- Step 2: Date & Time
- User picks date (up to 30 days ahead)
- User picks time
- Preview shows formatted date/time
- User taps "Continue to Set Interest"
- LightLanternForm opens
- User sets interest and mood
- User taps "Activate Lantern"
- Scheduled light saved to
upcomingLights - Shows in Lantern Hub "Upcoming" section
- TODO: Backend saves, push notification at scheduled time
Flow 3: Existing Venue Detail โ Light (Unchanged) โ
Browse Venues โ Tap Venue
โ
Venue Detail View
โ
Tap "Light My Lantern"
โ
Light Lantern Form โ Set Interest & Mood
โ
Confirm โ Lantern Lit โจThis flow still works as before, now using the extracted LightLanternForm component.
Component Architecture โ
Component Hierarchy โ
Dashboard
โโโ LanternHub (modal)
โ โโโ Triggers flows โ
โ โโโ VenuePicker
โ โโโ LightLanternForm
โ โโโ ScheduleLightForm
โ โโโ VenuePicker (nested)
โ โโโ LightLanternForm (nested)
โโโ VenuePicker (full-screen)
โโโ LightLanternForm (full-screen)
โโโ ScheduleLightForm (full-screen)
โโโ ... existing componentsState Management in Dashboard โ
// Form flow states
const [showVenuePicker, setShowVenuePicker] = useState(false)
const [showLightForm, setShowLightForm] = useState(false)
const [showScheduleForm, setShowScheduleForm] = useState(false)
const [venueForLight, setVenueForLight] = useState(null)
const [scheduleData, setScheduleData] = useState(null)
// Upcoming scheduled lights
const [upcomingLights, setUpcomingLights] = useState([])Component Props โ
VenuePicker:
{
venues: Venue[]
onSelectVenue: (venue: Venue) => void
onCancel: () => void
title?: string
description?: string
}LightLanternForm:
{
venue?: Venue | null
onCancel: () => void
onConfirm: (data: { interest, mood, moodId }) => void
showVenueInfo?: boolean
initialInterest?: string
initialMood?: string
}ScheduleLightForm:
{
onCancel: () => void
onConfirm: (data: { date, time }) => void
onSelectVenue: () => void
selectedVenue?: Venue | null
}Key Features โ
โ VenuePicker โ
- Dual view modes: List and map (radar style)
- Search: Real-time filtering by venue name/type
- Category filters: All, Cafe, Bar, Food, Activities
- Visual indicators: Shows active lantern counts
- Map visualization: Radar-style with venue dots
- Responsive: Full-screen mobile optimized
โ LightLanternForm โ
- Reusable: Works for immediate or scheduled lighting
- Optional venue info: Can hide venue details
- Three moods: Conversation, Quiet Company, Activity/Game
- Character limit: 140 characters with counter
- Auto-focus: Interest textarea focused on open
- Validation: Disables submit until interest is entered
โ ScheduleLightForm โ
- Multi-step wizard: Clear progress indicators
- Venue selection: Integrates with VenuePicker
- Date validation: Min = today, Max = 30 days
- Time picker: HTML5 time input
- Preview: Shows formatted scheduled time
- Flexible: Can change venue during flow
โ Integration โ
- Seamless transitions: Components open/close smoothly
- Preserved state: Venue selection carries through flow
- Context-aware: Forms know if immediate or scheduled
- Backend-ready: TODOs marked for API integration
Future Enhancements โ
Near-Term โ
- [ ] Backend API integration for scheduled lights
- [ ] Push notifications at scheduled time
- [ ] Edit/delete scheduled lights
- [ ] Auto-light lantern at scheduled time (with confirmation)
- [ ] Geofence check before lighting
Mid-Term โ
- [ ] Recurring scheduled lights ("Every Tuesday at 6 PM")
- [ ] Scheduled light reminders (30 min before)
- [ ] Friend suggestions for scheduled lights
- [ ] Venue event integration (auto-fill from venue events)
Long-Term โ
- [ ] Group scheduled lights (meetup planning)
- [ ] Calendar app integration (export to Google/Apple Calendar)
- [ ] Merchant-sponsored scheduled events
- [ ] AI suggestions for schedule times based on activity
Testing โ
Manual Testing Checklist โ
VenuePicker:
- [ ] List view displays all venues
- [ ] Map view shows venue dots correctly
- [ ] Search filters venues in real-time
- [ ] Category filters work (All, Cafe, Bar, Food, Activities)
- [ ] Selecting venue triggers callback
- [ ] Cancel closes picker
- [ ] View mode toggle works
LightLanternForm:
- [ ] Venue info displays correctly
- [ ] Mood selection works (visual feedback)
- [ ] Interest textarea accepts input
- [ ] Character counter updates
- [ ] Submit disabled when interest empty
- [ ] Form submits with correct data structure
- [ ] Cancel triggers callback
ScheduleLightForm:
- [ ] Step 1: Venue selection works
- [ ] Can change venue after selection
- [ ] Step 2: Date/time inputs work
- [ ] Date validation (min/max)
- [ ] Preview shows formatted time
- [ ] Progress indicators update correctly
- [ ] Continue button enables when valid
Integration:
- [ ] Hub โ Light Lantern โ Venue Picker โ Form โ Confirm
- [ ] Hub โ Schedule โ Venue โ Date/Time โ Form โ Save
- [ ] Scheduled lights show in "Upcoming" section
- [ ] Existing venue detail flow still works
- [ ] Fire icon glows when lantern lit
- [ ] All cancel buttons properly close flows
Storybook Testing โ
npm run storybookNavigate to:
- Components โ VenuePicker (4 stories)
- Components โ LightLanternForm (4 stories)
- Components โ ScheduleLightForm (3 stories)
Code Organization & Refactoring โ
Before vs. After โ
Before:
LightLanternFormembedded in Dashboard.jsx- No global light lantern flow
- No schedule light functionality
- Lantern Hub just placeholders
After:
LightLanternFormextracted to/componentsVenuePickernew reusable componentScheduleLightFormnew multi-step wizard- Lantern Hub triggers complete flows
- Dashboard orchestrates all flows
Benefits of Refactoring โ
- Reusability: Components used in multiple contexts
- Testability: Individual components in Storybook
- Maintainability: Single source of truth for each form
- Scalability: Easy to add new flows (e.g., edit scheduled light)
- Separation of Concerns: Dashboard orchestrates, components render
API Integration (Future) โ
Endpoints Needed โ
POST /api/lanterns/schedule # Schedule a lantern
GET /api/lanterns/scheduled # Get user's scheduled lights
PUT /api/lanterns/scheduled/:id # Edit scheduled light
DELETE /api/lanterns/scheduled/:id # Cancel scheduled light
POST /api/lanterns/schedule/:id/activate # Manually activate earlyData Structure for Scheduled Light โ
{
id: string,
userId: string,
venueId: string,
venueName: string,
scheduledDateTime: ISO8601,
interest: string,
mood: string,
moodId: string,
status: 'pending' | 'active' | 'cancelled' | 'completed',
createdAt: ISO8601,
notificationSent: boolean
}Backend Tasks โ
- Scheduled task processor (check for lights due to activate)
- Push notification service (remind user 30min before)
- Geofence validation (ensure user is near venue)
- Auto-activate or prompt user at scheduled time
Related Documentation โ
Files Changed โ
New Files Created (7) โ
src/components/VenuePicker.jsxsrc/components/VenuePicker.stories.jsxsrc/components/LightLanternForm.jsxsrc/components/LightLanternForm.stories.jsxsrc/components/ScheduleLightForm.jsxsrc/components/ScheduleLightForm.stories.jsxdocs/features/GLOBAL_LANTERN_FLOWS.md(this file)
Modified Files (2) โ
src/components/LanternHub.jsx- Added navigation handlerssrc/dashboard/Dashboard.jsx- Integrated new components, refactored flows
Conclusion โ
The Lantern Hub now provides complete, production-ready flows for:
- โ Global lantern lighting (not tied to specific venue detail view)
- โ Scheduling future lights
- โ Reusable components for all lighting scenarios
Users can now access all lantern features from the fire icon, making the app more intuitive and the navigation cleaner. The multi-step flows guide users smoothly through venue selection, interest/mood setup, and confirmation.
Next steps include backend integration, push notifications, and advanced features like recurring schedules and friend suggestions.