Skip to content

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

Open
metal-huang wants to merge 1 commit into
anomalyco:devfrom
metal-huang:fix-plugin-path-windows
Open

fix(tui): use path.sep for plugin name extraction in /status dialog#46114
metal-huang wants to merge 1 commit into
anomalyco:devfrom
metal-huang:fix-plugin-path-windows

Conversation

@metal-huang

@metal-huang metal-huang commented Aug 29, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #46101

Type of change

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

What does this PR do?

On Windows, fileURLToPath() returns backslash-separated paths, but the status dialog was splitting on / only. The entire path became a single token, and the first . in .config made the displayed name C:\Users\Administrator\ instead of rtk.

Changed split("/") to split(path.sep) and renamed the local variable to avoid shadowing the path module import.

How did you verify your code works?

Ran a Node script comparing old vs new logic on a Windows path:

  • Old (split "/"): name = C:\Users\Administrator\
  • New (split path.sep): name = rtk

Screenshots / recordings

See screenshot in linked issue #46101.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes

History: This bug was reported in #34141 and two prior PRs attempted to fix it (#33375, #34183). Both were closed without merging. The bug still exists on dev, re-reported as #46101.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

Based on my search, I found a potentially related PR:

Related PR:

Why it's related: This PR also addresses the same issue of rendering plugin names correctly in the status dialog on Windows. It appears to be an earlier attempt at fixing the file path handling issue that the current PR (46114) is addressing. The PR description mentions that prior attempts (#33375, #34183) were closed without merging, and this (#40132) might be another attempt that wasn't merged.

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

Copy link
Copy Markdown
Contributor

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

@metal-huang

Copy link
Copy Markdown
Author

Note: #40132 attempts the same fix using split(/[\\/]/) (regex). This PR uses split(path.sep) which is more idiomatic and does not require regex. Either fix resolves the bug — happy to defer to whichever the maintainers prefer.

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.

TUI /status dialog shows full file path instead of plugin name on Windows

1 participant