Skip to content

refactor(vscode): improve statusbar item display#17511

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-30-refactor_vscode_improve_statusbar_item_display
Dec 31, 2025
Merged

refactor(vscode): improve statusbar item display#17511
graphite-app[bot] merged 1 commit intomainfrom
12-30-refactor_vscode_improve_statusbar_item_display

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Dec 30, 2025

This PR refactors the VSCode extension's status bar item display logic .

  • Double Checkmark: Both tools (oxlint / oxfmt) are found and can be used
  • Single Checkmark: One of the tools binary could not be found and is deactivated
  • Circle: None of tools binary could be found

The background color changed a bit too. The error background is not shown anymore, only the warning background when no binaries could be found.

closes #17483

grafik grafik grafik grafik

PS: the v(version) in the screenshots are outdated 😅

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 30, 2025
Copy link
Member Author

Sysix commented Dec 30, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix force-pushed the 12-30-refactor_vscode_improve_statusbar_item_display branch from 8a45f42 to 3b9ba0b Compare December 30, 2025 20:49
@Sysix Sysix requested a review from Copilot December 30, 2025 20:50
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 PR refactors the VSCode extension's status bar item display logic to improve how tool states are communicated to users. The changes centralize tooltip generation and simplify the handling of missing binary paths.

  • Introduced a new ToolState type to track tool enabled state, content, and version in a structured way
  • Moved binary path validation logic from extension.ts into individual tool activate methods
  • Simplified status bar icon and background color logic based on binary availability

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
editors/vscode/client/StatusBarItemHandler.ts Refactored tooltip handling to use ToolState type and unified tooltip generation with version display
editors/vscode/client/extension.ts Simplified binary path handling by moving validation into tools and added icon logic based on binary availability
editors/vscode/client/tools/ToolInterface.ts Changed binaryPath parameter from required to optional in the activate method signature
editors/vscode/client/tools/linter.ts Added early return for missing binary paths and refactored status bar state logic to use new isEnabled pattern
editors/vscode/client/tools/formatter.ts Added early return for missing binary paths and updated status bar method call to use new unified API

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

@Sysix Sysix force-pushed the 12-30-refactor_vscode_improve_statusbar_item_display branch from 3b9ba0b to 31d28b8 Compare December 30, 2025 21:21
@Sysix Sysix marked this pull request as ready for review December 30, 2025 21:23
@Sysix Sysix requested a review from camc314 as a code owner December 30, 2025 21:23
@Sysix Sysix force-pushed the 12-30-refactor_vscode_improve_statusbar_item_display branch from 31d28b8 to 44d7681 Compare December 30, 2025 21:27
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 31, 2025
@camc314 camc314 self-assigned this Dec 31, 2025
Copy link
Contributor

camc314 commented Dec 31, 2025

Merge activity

This PR refactors the VSCode extension's status bar item display logic .
- Double Checkmark: Both tools (oxlint / oxfmt) are found and can be used
- Single Checkmark: One of the tools binary could not be found and is deactivated
- Circle: None of tools binary could be found

The background color changed a bit too. The error background is not shown anymore, only the warning background when no binaries could be found.

closes #17483

<img width="204" height="271" alt="grafik" src="https://github.com/user-attachments/assets/95f180a0-34ec-4d59-bd89-477d4d5fe754" />

<img width="198" height="247" alt="grafik" src="https://github.com/user-attachments/assets/2155bff6-e7e6-46b5-8ebb-8ab5036fafbc" />

<img width="179" height="177" alt="grafik" src="https://github.com/user-attachments/assets/32ed59db-4caa-4a0a-89c9-65ca7caef171" />

<img width="184" height="287" alt="grafik" src="https://github.com/user-attachments/assets/759bd775-fa43-4371-a3db-ef668951aa6d" />

PS: the `v(version)` in the screenshots are outdated 😅
@graphite-app graphite-app bot force-pushed the 12-30-refactor_vscode_improve_statusbar_item_display branch from 44d7681 to dc37666 Compare December 31, 2025 23:02
@graphite-app graphite-app bot merged commit dc37666 into main Dec 31, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-30-refactor_vscode_improve_statusbar_item_display branch December 31, 2025 23:07
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 31, 2025
@ahmedelgabri
Copy link

ahmedelgabri commented Jan 5, 2026

@Sysix thanks for the fix, any idea when it's going to be released?

@camc314
Copy link
Contributor

camc314 commented Jan 5, 2026

@Sysix thanks for the fix, any idea when it's going to be released?

Should be released today #17662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VSCode extension shows an error state if oxlint is not installed (using oxfmt only)

4 participants