Sample Activity Timeline
This page shows a sample activity with its events and the implementation logic Memryo uses for the timeline view.
Sample Activity: Car Wash
We use Car Wash from the Car Maintenance category as the example. It has a monthly recurrence (every month). The timeline shows exactly 6 events, rendered as the real app would.
1. Timeline visualization (as in the app)
The timeline shows the last 6 events for the selected activity. For monthly recurrence, event labels use month/day (e.g. "Sep 4"), and the gap between events is shown in days (e.g. "31d"). Period boundary markers are hidden for monthly to avoid clutter.
Timeline behavior
- Filter: Events are filtered by
activityId === selectedActivity(oractivityname for backward compatibility). - Sort: For the timeline bar, events are sorted oldest → newest. For the event list below, newest → oldest.
- Range: Uses the first and last event in the (up to) 6 events to determine the start and end of the line.
- Position: Each event’s position is 0–100% along the line based on its timestamp within that range.
Period: Sep 2025 – Feb 2026 • Monthly recurrence • 6 events
2. Event list (as shown in app)
Each event row shows date/time (formatted by recurrence), a dot, and optional notes. Actions: add/edit notes, edit date/time, delete.
3. “Time since last activity” display
Below the timeline, Memryo shows how long it has been since the last recorded event. The format depends on the activity’s recurrence:
- hourly: e.g. “2 days, 5 hours”
- daily: e.g. “3 days”
- weekly: e.g. “2 weeks, 4 days”
- monthly / quarterly / half-yearly: e.g. “2 months, 5 days”
- yearly: e.g. “1 year, 3 months, 12 days”
For our sample (Car Wash): It’s been 0 days since the last activity (just recorded today).
4. Implementation logic summary
Recording (“Remember it”)
- Creates a new event with
id(timestamp string),activityId,activity(name),timestamp(ISO),date,time,notes(initially empty). - Duplicate check: Same activity + same local calendar day (or same hour for hourly recurrence) → “Duplicate event?” alert with “Add anyway” option.
- Early reminder: If last event was < 50% of the recurrence period ago → “Early reminder?” alert with “Add anyway” option.
- Events are stored in AsyncStorage under key
events, prepended to the list (newest first).
Recurrence periods (used for warnings and timeline scaling)
- hourly: 1 hour
- daily: 1 day
- weekly: 7 days
- monthly: ~30 days
- quarterly: ~90 days (3 months)
- half-yearly: ~180 days (6 months)
- yearly: ~365 days
Timeline axis by recurrence
- hourly: Hours (start/end labels show clock time)
- daily: Days (e.g. Nov 15, Nov 22)
- weekly: Weeks with day labels
- monthly: Months (e.g. Nov 2025, Dec 2025)
- quarterly: Quarters (e.g. Q4/25, Q1/26)
- half-yearly: Half-years (e.g. H2/25, H1/26)
- yearly: Years (e.g. 2024, 2025)
Event actions
- Edit: Change date, time, and notes. Future dates are not allowed.
- Notes: Add or edit notes via the note icon. Notes can store mileage, filter specs, receipts, etc.
- Delete: Remove event permanently (with confirmation).
5. Storage
All data is stored locally using AsyncStorage:
categories– JSON array of category objectsactivities– JSON array of activity objectsevents– JSON array of event objects
No data is sent to external servers. Everything stays on the device.