Skip to content

Conversation

@Anders2303
Copy link
Collaborator

@Anders2303 Anders2303 commented Mar 11, 2025

image

Replaces the old synced hover with a dedicated hover manager service, as well as some state-like hooks for using it. The general idea is that all hover effects should go through this service in the future.

For this initial release, the hover-service has been implemented for the following modules:

  • 2D viewer
    • World position (x and y)
    • Wellbore and MD value
  • 3D viewer
    • Wellbore and MD value
  • Intersection
    • Wellbore and MD value
  • Well log viewer
    • Wellbore and MD value

Anders2303 and others added 30 commits January 28, 2025 13:27
…ed to layer wrapper. Readout moved to Subsurface-wrapper be defined in layers-wrapper
@Anders2303 Anders2303 marked this pull request as ready for review November 3, 2025 11:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces a comprehensive hover synchronization system across the application through a new HoverService, refactoring hover interactions from the previous WorkbenchServices approach. The changes enable different modules (3D Viewer, 2D Viewer, Intersection, WellLogViewer) to publish and subscribe to hover events in a unified manner.

Key changes:

  • Introduced HoverService with throttled hover data updates and topic-based publish/subscribe pattern
  • Migrated from global WorkbenchServices hover topics to dedicated HoverTopic enum
  • Refactored "SettingsGroup" to "ContextBoundary" terminology throughout the codebase
  • Added wellbore trajectory interpolation utilities to support precise hover visualization at MD (Measured Depth) locations

Reviewed Changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
frontend/src/framework/HoverService.ts New service implementing hover data management with throttling and topic-based subscriptions
frontend/src/framework/Workbench.ts Integrated HoverService into the Workbench
frontend/src/modules/_shared/utils/wellbore.ts Added trajectory interpolation functions and z-axis inversion support
frontend/src/modules/_shared/utils/subsurfaceViewerLayers.ts New utility for extracting hover data from DeckGL picking information
frontend/src/modules/_shared/DataProviderFramework/visualization/VisualizationAssembler.ts Updated to use new HoverTopic type and improved hover visualization function merging
frontend/src/modules/_shared/DataProviderFramework/framework/ContextBoundary/* Renamed from SettingsGroup to ContextBoundary
frontend/src/modules/3DViewer/view/components/HoverVisualizationWrapper.tsx Implements hover visualization handling for 3D viewer
frontend/src/modules/2DViewer/view/components/HoverVisualizationWrapper.tsx Implements hover visualization handling and crosshair layer for 2D viewer
frontend/src/modules/Intersection/view/components/ReadoutWrapper.tsx Migrated to use HoverService instead of WorkbenchServices
frontend/src/modules/WellLogViewer/view/components/SubsurfaceLogViewerWrapper.tsx Migrated to use HoverService for MD synchronization
Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@jorgenherje jorgenherje left a comment

Choose a reason for hiding this comment

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

Really nice work! Well structured and easy to read code! Descriptive and easy to understand.

Some minor comments from my side.

ZONE = "hover.zone",
REGION = "hover.region",
FACIES = "hover.facies",
WORLD_POS = "hover.world_pos",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be good to clarify which type off coordinates we expect - e.g. utm-coordinates (i assume). Either do it in the naming of hover topic, or in the data below, i.e. x renamed to xUtm, and same for y. z is usually without suffix utm i believe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Went with WORLD_POS_UTM, I want to keep the {x, y, z} structure so it's easier to use in Vec2/Vec3 utils

@jorgenherje jorgenherje self-requested a review December 9, 2025 13:22
Copy link
Collaborator

@jorgenherje jorgenherje left a comment

Choose a reason for hiding this comment

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

Just two small comments, then all good :)

@Anders2303 Anders2303 enabled auto-merge (squash) December 12, 2025 09:32
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.

3 participants