Animation#78
Draft
bnlawrence wants to merge 20 commits into
Draft
Conversation
added 13 commits
June 17, 2026 08:59
…tion - animation_protocol.py: Message types (Start/Frame/End/Error) and serialization - animation_session.py: Backend state machine and session management - worker.py: Emit helpers for animation frames - worker_message_router.py: ANIM_* message handlers - 36 tests passing for protocol and session logic - docs: design docs and cf-plot guidance
Comprehensive guide covering: - Task invocation with #ANIMATION:1 header - AnimationPlaybackWidget placement in stacked layout - Message routing integration with worker_message_router - State management and playback controls (play/pause/seek/stop) - Layout transitions between static plot and animation - Error handling and edge cases - Full implementation checklist
…but server config
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an end-to-end “animation mode” for 3D selections by enabling worker-side streaming of per-frame renders (via cf-plot animation hooks) and GUI-side buffering/playback/export, alongside a set of related UI and test updates.
Changes:
- Add an
#ANIMATION:1task header plus worker-side cf-plot wrappers that emitANIM_START/FRAME/END/ERRORmessages. - Extend the GUI to support an
animationplot action for 3D selections, including buffering/playback controls and export (GIF / PNG sequence). - Add new animation session/protocol modules, docs, and expanded test coverage (plus remote configuration UX improvements).
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| xconv2/worker.py | Parses animation task header and wraps cf-plot calls to stream animation lifecycle + frames to the GUI. |
| xconv2/worker_message_router.py | Routes ANIM_* messages from worker stdout to host animation handlers. |
| xconv2/ui/selection_controller.py | Enables “animation mode” UX for 3D selections and threads dimensionality into plot/action option updates. |
| xconv2/ui/plot_view_controller.py | Adds animation controls (Play/Stop/Export) and action-mode UI switching logic. |
| xconv2/ui/dialogs.py | Adds AnimationOptionsDialog and improves remote configuration dialogs with edit/delete actions. |
| xconv2/main_window.py | Implements animation buffering/playback state machine and hooks up handlers for ANIM_* messages. |
| xconv2/main_window_components/plot_ops.py | Routes 3D+animation plot requests into worker animation tasks (emit_image disabled, animation flag enabled). |
| xconv2/core_window.py | Adds GIF/PNG-sequence export path for buffered animation frames; adds animation options dialog wiring. |
| xconv2/cf_templates.py | Adds animation as a plot_action option and squeezes plotted fields in generated selection code. |
| xconv2/animation_session.py | New in-memory animation session buffer/controller + playback state enum. |
| xconv2/animation_protocol.py | New helper types and base64(pickle) payload encode/decode utilities for animation messages. |
| tests/test_worker_remote_tasks.py | Adds coverage for parsing #ANIMATION:1 header into worker TaskHeaders. |
| tests/test_selection_controller.py | Updates selection controller tests for the new plot/action option APIs. |
| tests/test_remote_configuration_dialog.py | Adds Qt-backed tests for edit/delete behavior in remote configuration dialog. |
| tests/test_https_nginx_integration.py | Extends HTTPS integration coverage with “index.html instead of autoindex” listing behavior. |
| tests/test_coordinate_flow.py | Adds animation mode flow tests (3D selection → animation action → worker task) and playback/export tests. |
| tests/test_contour.py | Updates fake field to support squeeze() and adds contour template test for animation plot_action. |
| tests/test_animation_session.py | New unit tests for animation session/controller state transitions and buffering. |
| tests/test_animation_router.py | New unit tests for routing ANIM_* payloads through WorkerMessageRouter. |
| tests/test_animation_protocol.py | New unit tests for protocol dataclasses and encode/decode round trips. |
| tests/conftest.py | Adds an nginx HTTPS fixture variant that serves an index page at root (no autoindex). |
| pyproject.toml | Bumps version and adjusts dependencies (notably adds pystac-client). |
| docs/mac-app.md | Updates mac build instructions (removes conda run wrapper example). |
| docs/gui-animation-integration.md | Adds design/implementation strategy documentation for GUI animation integration. |
| docs/cfplot-animation-guidance.md | Adds cf-plot-specific guidance for implementing required animation callback hooks. |
| docs/animation.md | Adds overall animation design draft and protocol notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
460
to
464
| def clear_plot_canvas(self, message: str = "Plot unavailable") -> None: | ||
| """Clear any rendered plot image and show a fallback message.""" | ||
| self.host._plot_pixmap_original = None | ||
| self.host.plot_frame.setPixmap(QPixmap()) | ||
| self.host.plot_frame.setText(message) |
Comment on lines
+417
to
+421
| self.frame_axis_combo = QComboBox(self) | ||
| self.frame_axis_combo.addItem("Auto", "auto") | ||
| self.frame_axis_combo.addItem("Time", "time") | ||
| self.frame_axis_combo.addItem("Level", "level") | ||
| self.frame_axis_combo.addItem("Depth", "depth") |
added 7 commits
July 2, 2026 11:00
…there are more than one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements animation against a reconfigured cf-plot that has the appropriate hooks.
Currently this is still dependent on the bnlawrence fork of cf-plot, but a pull request against ncas-cms/cf-plot is in flight.