Skip to content

M kovalsky/daxperfoptimizer delta - #1320

Merged
Michael Kovalsky (m-kovalsky) merged 16 commits into
microsoft:mainfrom
m-kovalsky:m-kovalsky/daxperfoptimizer_delta
Aug 12, 2026
Merged

M kovalsky/daxperfoptimizer delta#1320
Michael Kovalsky (m-kovalsky) merged 16 commits into
microsoft:mainfrom
m-kovalsky:m-kovalsky/daxperfoptimizer_delta

Conversation

@m-kovalsky

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings August 12, 2026 06:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the reliability and UX of Semantic Link Labs’ interactive anywidget-based tools in Microsoft Fabric (notably PySpark notebooks) by centralizing picker list population, preventing background-thread widget work that can break trait syncing, and expanding the DAX Perf Optimizer’s Vertipaq experience with Delta Analyzer integration.

Changes:

  • Introduces shared picker-list helpers (list_picker_workspaces/datasets/lakehouses) and updates multiple tools to use them instead of per-tool fabric.list_* calls.
  • Adds run_widget_task() and migrates widget-side work dispatch away from raw threading.Thread(...) usage.
  • Enhances interactive tool UIs (icons, progress indicators, improved Vertipaq Analyzer toolbar/search/sorting) and adds/updates tests to guard these behaviors.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_widget_background_work.py Guards against raw background thread dispatch for widget actions.
tests/test_ui_picker_lists.py Validates shared picker helpers and tool adoption; tests REST-first + fallback behavior.
tests/test_refresh_manager.py Updates expectations around picker seeding and removal of background discovery threads.
tests/test_perspective_editor.py Adds assertions for new header icon, icon buttons, and progress UI behavior.
tests/test_mini_model_manager_objects.py Adds assertions for icon labeling, ordering, and connecting progress behavior.
tests/test_delta_analyzer_picker.py Updates delta picker helper signature expectation.
tests/test_dax_model_picker.py Extends assertions for new Vertipaq/Delta Analyzer UX and sorting logic.
tests/test_bpa_rule_editor.py Ensures BPA rule warming uses shared widget task runner.
src/sempy_labs/semantic_model/_vertipaq_analyzer.py Refactors Delta Analyzer stat collection + picker sourcing via shared helpers.
src/sempy_labs/semantic_model/_refresh_manager.py Seeds picker lists before display and replaces raw threads with run_widget_task.
src/sempy_labs/semantic_model/_perspective_editor.py UI updates: header icon, icon-only controls, connect progress bar, ordering tweaks.
src/sempy_labs/semantic_model/_mini_model_manager.py UI updates: connecting progress, icon-labeled broken objects, ordering tweaks, shared pickers.
src/sempy_labs/semantic_model/_lineage_view.py Switches workspace/dataset picker list building to shared helpers.
src/sempy_labs/semantic_model/_find_unused_objects.py Switches picker list building to shared helpers and adjusts header layout.
src/sempy_labs/semantic_model/_direct_lake_migration.py Switches workspace/dataset picker list building to shared helpers.
src/sempy_labs/semantic_model/_direct_lake_manager.py Switches workspace/dataset picker list building to shared helpers.
src/sempy_labs/semantic_model/_dax_perf.py Major UX + behavior updates: seeded pickers, watchdogs, Vertipaq toolbar/search/sort, Delta Analyzer integration, synchronous widget task dispatch.
src/sempy_labs/semantic_model/_bpa.py Switches pickers to shared helpers and uses run_widget_task for warming.
src/sempy_labs/_ui_components.py Adds run_widget_task and shared picker-list helper implementations + new icon.
src/sempy_labs/_delta_analyzer.py Switches delta picker workspaces/lakehouses to shared helper lists and improves empty label behavior.
Suppressed comments (1)

src/sempy_labs/semantic_model/_dax_perf.py:12227

  • run_widget_task returns None (runs inline), so assigning its return value to thread and storing it in run_state["thread"] is dead code and makes the control-flow harder to follow. Call _run_widget_task(...) directly and drop the run_state["thread"] assignment.
            thread = _run_widget_task(
                _worker,
                (query, bool(widget.clear_cache), run_id, effective_user, role_name),
            )
            with state_lock:

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 1583 to 1586
pass

workspaces = _list_delta_picker_workspaces()
workspaces = _list_delta_picker_workspaces(initial_workspace_id)
lakehouses = (
Comment on lines 11614 to +11619
# must be (re)captured for the query currently in the query pane.
"traced_query": None,
"deps_query": None,
# True only while a query is executing, so a cancel that is delivered
# after the run finished is not mistaken for a real cancellation.
"active": False,
@m-kovalsky
Michael Kovalsky (m-kovalsky) merged commit 2bcd2d3 into microsoft:main Aug 12, 2026
3 of 4 checks passed
@m-kovalsky
Michael Kovalsky (m-kovalsky) deleted the m-kovalsky/daxperfoptimizer_delta branch August 12, 2026 09:44
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