Skip to content

Constellation timeline integration and optimization #67

Merged
haoruizhou merged 2 commits intodevfrom
claude/constellation-pecan-timeline-M2owd
May 1, 2026
Merged

Constellation timeline integration and optimization #67
haoruizhou merged 2 commits intodevfrom
claude/constellation-pecan-timeline-M2owd

Conversation

@haoruizhou
Copy link
Copy Markdown
Contributor

No description provided.

The Constellation page only ever read the latest live frame, so importing
a .pecan file (or pausing the live timeline) had no effect on the canvas.
Drop a TimelineBar onto the page and feed the canvas from the timeline
cursor when a replay is mounted or the timeline is paused, so historical
sessions light up the same star map and correlations.

- Constellation page mounts TimelineBar and consumes useTimeline().
- When pinned (replay or paused), value/history refs are rebuilt from
  getAllLatestAt/getHistoryAt at the cursor; live+live keeps the rolling
  subscription path.
- Canvas accepts cursorTimeMs/source/mode and uses getLatestAt for the
  per-star isLive check so dim stars match the cursor moment.
- useConstellationSignals takes a refresh key so an embedded DBC from a
  .pecan import re-enumerates the sensor catalogue.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c16b63365e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

`/api/query?season=${encodeURIComponent(selectedSeason)}`,
{
method: 'POST',
body: JSON.stringify({ signal: sig, start, end, limit: noLimit ? null : 5000, no_limit: noLimit }),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Normalize constellation IDs before querying exports

The export loop sends each signalIds entry directly as signal, but these IDs are constellation node IDs (msgID:signalName) rather than raw Timescale column names. In this form the backend will query columns like "0x0C0:Accel_X", which do not exist in the telemetry table schema, so downloads fail (or partially fail) whenever selected nodes include prefixed IDs. Split/normalize the ID to the actual signal column name before POSTing /api/query.

Useful? React with 👍 / 👎.

Comment on lines +40 to +42
const allLatest = dataStore.getAllLatest();
const vals: Record<string, number> = {};
allLatest.forEach((sample) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Append history only for the message that changed

This subscription rebuilds from getAllLatest() on every single datastore update and appends every signal into telemetryHistoryRef, even when that signal did not receive a new frame. Since subscribe is triggered per ingested message, unrelated high-rate traffic will duplicate stale values for other IDs and skew correlation/insight calculations. Use the updatedMsgID callback argument (or per-signal timestamp checks) so only truly updated signals are appended.

Useful? React with 👍 / 👎.

Comment on lines +10 to +11
const x = s1.slice(0, len);
const y = s2.slice(0, len);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align correlation windows to most recent samples

When histories differ in length, the correlation code slices from index 0, so it compares the oldest part of the longer series against the shorter series. In live telemetry this produces misleading r values because recent behavior is ignored for longer histories. Correlation should align on the latest shared window (tail slice) to reflect current relationships used by auto-linking and sidebar insights.

Useful? React with 👍 / 👎.

@haoruizhou haoruizhou changed the base branch from main to dev May 1, 2026 13:41
@haoruizhou haoruizhou changed the title Constellation init Constellation timeline integration and optimization May 1, 2026
@haoruizhou haoruizhou merged commit 91b9db2 into dev May 1, 2026
17 checks passed
@haoruizhou haoruizhou deleted the claude/constellation-pecan-timeline-M2owd branch May 1, 2026 13:42
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.

2 participants