Skip to content

Conversation

jprochazk
Copy link
Member

To repro the original issue on main:

  1. call viewer.set_time_ctrl
  2. move the time cursor in the viewer somewhere else
  3. call viewer_set_time_ctrl again with the same arguments (same time/timeline)

(3) would not adjust the time cursor like in step (1). This is due to _time_ctrl being stateful, but not bidirectionally synchronized between the Viewer and SDK. Moving the time cursor doesn't update the _time_ctrl value back in Python land, and so the _time_ctrl value in (3) isn't changed from (1), resulting in no state update for the Viewer.

For these kinds of things it makes more sense to use custom messages for SDK->Viewer uni-directional things. For Viewer->SDK, we have events exposed for timeline state, which are correctly fired whenever a user input in the Viewer results in the state changing.

@jprochazk jprochazk added sdk-python Python logging API notebook Jupyter notebooks etc include in changelog labels Jul 8, 2025
@ntjohnson1 ntjohnson1 self-requested a review July 8, 2025 13:45
Copy link
Member

@ntjohnson1 ntjohnson1 left a comment

Choose a reason for hiding this comment

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

LGTM. I'm going to pull this into my branch and apply the same change for the partition_url update.

@jprochazk jprochazk merged commit 97d3150 into main Jul 8, 2025
35 checks passed
@jprochazk jprochazk deleted the jan/fix-notebook-time-ctrl branch July 8, 2025 14:27
@ntjohnson1 ntjohnson1 linked an issue Jul 8, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog notebook Jupyter notebooks etc sdk-python Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set_time_ctrl silently does nothing when using url
2 participants