-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Description
The timeline view in the control plane only displays memories that have an occurred_start date, which excludes the vast majority of opinions and conversation-type facts. I discovered this during usage by observing only 1 out of nearly 200 opinions appearing on the timeline.
Root Cause
Thanks to @nicoloboschi for the feedback in understanding this problem's root cause better.
The TimelineView component in data-view.tsx filters on occurred_start:
const withDates = filteredRows
.filter((row: any) => row.occurred_start) // <-- Effectively excludes opinionsOpinions are typically classified as fact_kind == "conversation" during fact extraction, and only fact_kind == "event" facts receive an occurred_start date. All facts do have a mentioned_at timestamp (when the fact was learned/formed), but this wasn't being used as a fallback.
Expected Behaviour
- All facts with date information should appear on the timeline
- For events: display when the event happened (
occurred_start) - For opinions/conversations: display when the fact was formed (
mentioned_at) - Timeline should be sorted in descending order (newest first), consistent with the API query ordering
Actual Behaviour
- Only facts with
occurred_startappear on the timeline - Opinions and conversation-type facts are hidden
- Timeline was sorted ascending (oldest first) - which is inconsistent with the actual api endpoint's query:
hindsight/hindsight-api/hindsight_api/engine/memory_engine.py
Lines 2082 to 2091 in 6d820ef
units = await conn.fetch( f""" SELECT id, text, event_date, context, fact_type, mentioned_at, occurred_start, occurred_end, chunk_id FROM memory_units {where_clause} ORDER BY mentioned_at DESC NULLS LAST, created_at DESC LIMIT {limit_param} OFFSET {offset_param} """, *query_params, )
Steps to Reproduce
- Create a memory bank with several opinions (e.g., "I think X is important", "I prefer Y")
- Navigate to Opinions in the control plane
- Switch to Timeline view
- Observe that most/all opinions are missing from the timeline
Testing
Manually tested with a real memory bank containing ~200 opinions. Verified that opinions which were previously hidden now appear on the timeline and are correctly ordered by their effective date (descending).
Other Observations
I'll raise another couple of issues following this based upon my observations:
Dates - Inconsistency
I noticed in the timeline that dates are inconsistently localised. Whilst they are displayed correctly on the timeline itself, within the memory details it seems to be GMT. This means (in my case) an event that occurred on 2025-12-17 at 21:59 (GMT-3) is shown/ordered correctly on the timeline but then has "When: Thursday, December 18, 2025" in the text. I'll raise this as a separate bug once I've investigated it.
Control Plane Linting
The current linting configuration does not run, next lint is deprecated. I've started updating/resolving this already and will push my branch shortly - but there are a number of errors/warnings to resolve and I'll probably need to chat with you about approaches and verify whether or not this is already in progress.