Skip to content

fix(tui): show plugin directory names for path-registered plugins - #46580

Open
tumbledseea wants to merge 2 commits into
anomalyco:devfrom
tumbledseea:status-plugin-name
Open

tumbledseea wants to merge 2 commits into
anomalyco:devfrom
tumbledseea:status-plugin-name

Conversation

@tumbledseea

@tumbledseea tumbledseea commented Sep 1, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #46560

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Path-registered plugins configured by file path showed a truncated path instead of their directory name in the /status dialog on Windows.

On Windows, fileURLToPath returns paths with backslashes, so the previous split("/") did not extract the last path segment. The fallback split(".")[0] then cut the full path at the first dot.

This PR derives the display name by splitting on both Windows and POSIX separators, and moves the naming logic into a small pure helper covered by tests.

How did you verify your code works?

Added unit tests in packages/tui/test/component/dialog-status.test.ts for Windows paths, dotted filenames, index entrypoints, and npm specs.

Verified with:

  • bun typecheck
  • oxlint

Screenshots / recordings

N/A. This is not a UI layout change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Derive the display name for path-registered plugins from the directory
basename instead of splitting the raw path on "/". On Windows
fileURLToPath returns backslash paths, so the previous split never fired
and the /status dialog truncated the whole path at its first dot. Split on
both separators and extract the naming logic into a testable helper.

Fixes anomalyco#46560
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #46114 - fix(tui): use path.sep for plugin name extraction in /status dialog

  • This PR appears to address the same issue: extracting plugin directory names correctly in the /status dialog
  • Both PRs deal with path separator handling for plugin name display in the TUI

Related PR (different but adjacent):
PR #40132 - fix(tui): render Windows file:// plugin names correctly in /status

  • Historical fix for Windows path handling in plugin name rendering
  • Similar domain (Windows paths, plugin display in /status)

The primary duplicate concern is PR #46114, which seems to solve the same path separator extraction problem for plugin name display in the status dialog.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

/status shows mangled plugin names for path-registered plugins on Windows

1 participant