Skip to content

feat: unified Activity lane in Timeline with full-width layout#288

Merged
fiddur merged 1 commit intodevelopfrom
feat/unified-activity-timeline
Mar 2, 2026
Merged

feat: unified Activity lane in Timeline with full-width layout#288
fiddur merged 1 commit intodevelopfrom
feat/unified-activity-timeline

Conversation

@fiddur
Copy link
Owner

@fiddur fiddur commented Mar 2, 2026

Summary

Refactors the Timeline page to unify all activity types into a single lane with full-width responsive layout.

  • Full-width layout: Uses ResizeObserver instead of fixed 1000px, fills the browser width
  • Unified Activity lane: Sleep, exercise, meditation, nap, and duration tags (Sex, Sauna, YinYoga, Hot Bath, Breathwork, Holosync, Vocal Training, etc.) rendered in a single "Activity" lane — reduces from 4 tracks to 3 (Activity, Places, Tags)
  • Source merging: When a duration tag (e.g., Holosync audio) overlaps >50% with a matching activity (e.g., Oura meditation), they merge into a single item with annotation — eliminates visual duplication
  • Overlap detection: Real overlaps (e.g., Sex during sleep) use lane packing for sub-lanes, with visual indicators (reduced opacity, dashed yellow border) and a collapsible warning banner
  • Point tag icons: Point tags render as stacked emoji/image icons from tag mappings (like DayView) instead of dashed vertical lines
  • Tag icon support: Timeline now fetches fetchTagMappings to resolve emoji/image icons for tags

Data analysis (Feb 2026)

Found 37 duration tag instances; 6 overlapped with activities:

  • 2x Sex during sleep (legitimate — user was awake within sleep session)
  • 2x Holosync = meditation/nap (same activity, dual source → merged)
  • 1x YinYoga = meditation (same activity, dual source → merged)
  • 1x Hot Bath overlapping exercise by ~5min (timing imprecision)

Key implementation details

  • TAG_ACTIVITY_MERGE_MAP defines tag→activity-type merge rules
  • buildActivityLaneItems() orchestrates merging and overlap detection
  • isDurationTagActivityLike() filters duration tags for the activity lane (excludes computer:*, lastfm sources)
  • packLanes() utility handles non-overlapping lane assignment for both activities and point tags
  • resolveTagIcon() shared helper for tag icon lookup

Not included

  • DayView was not modified (could benefit from similar unification in the future)
  • Pre-existing TypeScript errors in TagMappingsSettings.tsx (is_programmatic property) are unrelated

Refactor the Timeline page to:
- Fill full browser width using ResizeObserver instead of fixed 1000px
- Unify sleep, exercise, meditation, nap, and duration tags into a
  single Activity lane (3 tracks: Activity, Places, Tags)
- Merge same-activity items from different sources (e.g., Holosync
  audio tag + Oura meditation = single merged item)
- Detect real overlaps with visual indicators (reduced opacity, dashed
  yellow border) and lane packing for sub-lanes
- Show point tags as stacked emoji/image icons from tag mappings
- Display overlap warnings in a collapsible banner

Key implementation details:
- TAG_ACTIVITY_MERGE_MAP defines which tags merge with which activity
  types when >50% temporal overlap is detected
- Duration tags with both start_time and end_time are placed in the
  Activity lane (excluding computer:* and lastfm sources)
- packLanes utility used for both activity items and point tags
- Tag icons fetched via fetchTagMappings API (was not used before)
@fiddur fiddur marked this pull request as ready for review March 2, 2026 17:48
@fiddur fiddur enabled auto-merge March 2, 2026 17:49
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.81%. Comparing base (2c420cd) to head (575399d).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #288      +/-   ##
===========================================
+ Coverage    32.43%   32.81%   +0.38%     
===========================================
  Files          185      185              
  Lines        22651    22386     -265     
  Branches      1889     1889              
===========================================
  Hits          7346     7346              
+ Misses       15271    15006     -265     
  Partials        34       34              
Flag Coverage Δ
backend 58.97% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fiddur fiddur merged commit dfbd8dc into develop Mar 2, 2026
6 checks passed
@fiddur fiddur deleted the feat/unified-activity-timeline branch March 2, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant