Skip to content

Fix method graph panel stability and column behavior#10

Merged
lchoquel merged 15 commits intomainfrom
feature/Method-graph
Feb 21, 2026
Merged

Fix method graph panel stability and column behavior#10
lchoquel merged 15 commits intomainfrom
feature/Method-graph

Conversation

@lchoquel
Copy link
Member

@lchoquel lchoquel commented Feb 18, 2026

Summary

  • Keep panel in place on reveal: use reveal(undefined) instead of reveal(ViewColumn.Beside) so the panel stays in its current column when updating
  • Retain context when hidden: add retainContextWhenHidden: true to preserve webview content when backgrounded
  • Redirect stray files: when a file opens in the graph panel's column (e.g. user clicks explorer while graph has focus), close it there and re-open it in the main editor column

Test plan

  • Open an .mthds file, trigger "Show Method Graph"
  • Click on other files while the graph panel has focus — files should open in the main column, not the graph's column
  • Switch between .mthds files — the same panel should update in place without jumping
  • Close the panel, re-trigger — a fresh panel should appear beside the editor

🤖 Generated with Claude Code


Note

Medium Risk
Adds new runtime behaviors that execute external CLIs (pipelex-agent) on save and manage a persistent webview panel, which can impact editor performance/UX and error handling across platforms despite test coverage.

Overview
Adds Pipelex Node-host-only features to the VS Code extension: on-save pipelex-agent validation with inline diagnostics, and a new method graph webview (pipelex.showMethodGraph) that stays in its current column, retains state when hidden, redirects “stray” editor opens out of the panel column, and avoids stale async updates via inflight cancellation and staleness checks.

Introduces supporting utilities (cliResolver, processUtils, sourceLocator, shared types) and a comprehensive Vitest suite covering the new behaviors and regressions; activation now awaits registerPipelexFeatures and gracefully skips Node-dependent features in browser hosts.

Updates release/process artifacts: bumps extension version to 0.4.0 and updates CHANGELOG.md, adds a /release Claude skill (workflow + version map + change detection script), tweaks make check to run tests, and refreshes docs/packaging (README example image, dedicated PyPI README wired via pyproject.toml + new Changelog URL).

Written by Cursor Bugbot for commit 26e4bb9. This will update automatically on new commits. Configure here.

lchoquel and others added 9 commits February 17, 2026 10:32
Replace the repo root README (which includes VS Code banner and full
Taplo README) with a CLI-focused standalone README for the PyPI page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code blocks render as plain TOML on GitHub and have no syntax
coloring on PyPI. Use a hosted screenshot instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backfill CHANGELOG.md with all changes since v0.2.1 (0.3.0–0.3.2 +
unreleased), annotate CLI-specific entries with plxt versions, and
broaden the title to cover both extension and CLI.

Add Changelog URL to pyproject.toml [project.urls] for PyPI sidebar.

Add .claude/skills/release/ project skill with detection script,
version map reference, and workflow instructions for automated
version bumping and changelog updates via /release.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The fix was already shipped in plxt 0.1.4 / ext v0.3.2 but was
mislabeled under [Unreleased] with an incorrect future version annotation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate pipelex-agent CLI to provide on-save validation diagnostics
for MTHDS files with source-located errors, and add a "Show Method Graph"
command that renders the ReactFlow graph in a side panel. Includes CLI
resolution (venv, PATH, uv fallback), validation types, source locator,
and unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use undefined instead of ViewColumn.Beside when revealing an existing
panel so it stays in its current column. Add retainContextWhenHidden
to preserve webview content when backgrounded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a file opens in the graph panel's editor group (e.g. user clicks
explorer while the graph has focus), close it there and re-open it in
the main editor column to keep the graph group dedicated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@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: 9942fec934

ℹ️ 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".

… path

Address 6 PR review issues: extract shared processUtils (spawnCli,
cancelInflight helpers), cancel all inflight graph jobs on file switch
with staleness check, guard against infinite loop when panel is in
column 1, add missing warning message in MethodGraphPanel, detect
Windows .venv/Scripts path, and gate validator/graph behind child_process
availability for browser hosts. Add cliResolver unit tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lchoquel and others added 4 commits February 18, 2026 17:25
registerNodeFeatures was called fire-and-forget, so the showMethodGraph
command could be missing at activation time and import failures were
unhandled. Make registerPipelexFeatures async, await the helper, and
surface errors as warnings.

Fix filename extraction using split('/') which broke on Windows
backslash paths — replace with a regex that handles both separators.

Add staleness guard after fs.promises.readFile so a file switch during
the read doesn't overwrite the current graph with stale HTML.

Add three new test files (processUtils, methodGraphPanel,
pipelexExtension) covering these bugs plus regression guards for
previous fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Expose pipelex-agent's --direction flag as a pipelex.graph.direction
setting (top_down | left_to_right, default top_down) so users can
control the method graph layout direction from VS Code settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

viewColumn: targetCol,
preserveFocus: false,
});
return;
Copy link

Choose a reason for hiding this comment

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

Infinite-loop guard also blocks MTHDS auto-update

Medium Severity

When the graph panel ends up in column 1 (e.g., user closes the original editor column or drags the panel), the targetCol === panelCol guard correctly prevents an infinite redirect loop — but the early return also prevents the MTHDS auto-update logic at lines 47–52 from ever executing. Switching between .mthds files will no longer refresh the graph, because the handler exits before reaching this.show(newUri). The guard needs to fall through to the auto-update check instead of returning outright.

Additional Locations (1)

Fix in Cursor Fix in Web

@lchoquel lchoquel merged commit 26e4bb9 into main Feb 21, 2026
23 checks passed
@lchoquel lchoquel deleted the feature/Method-graph branch February 21, 2026 20:55
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.

1 participant