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)
- [x]
Geofence check before lighting✅ Implemented 2026-01-18 (Issue #28)
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.