fix(app): surface skill reveal failures and localize the reveal label - #3092
Draft
benjaminshafii wants to merge 1 commit into
Draft
fix(app): surface skill reveal failures and localize the reveal label#3092benjaminshafii wants to merge 1 commit into
benjaminshafii wants to merge 1 commit into
Conversation
Clicking "Reveal in Finder" on a skill did nothing on Windows: the label was a hardcoded macOS string, and the call site used a bare `void` so the one failure the main process can report (a skill path the client cannot see on disk) was discarded. Localize the label per platform, surface failures via toast, and extract the main-process handler so its branching is unit-testable. Reported via OpenWork feedback (Scott Zahn, Jun 17).
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am on macOS. I could not exercise the actual Windows Explorer path. Do not merge on my evidence alone; this needs a Windows check. Everything below is what I did verify.
What
Reported via OpenWork feedback (Scott Zahn, Jun 17, v0.17.0, Windows): viewing a skill in the extensions section and clicking "Reveal in Finder" does nothing.
Two confirmed defects:
extension-detail-modal.tsx:373hardcoded the literal EnglishReveal in Finder— in a file that imports no i18n at all, and on Windows there is no Finder. Suitable keys already existed (en.ts:750,788,1748-1750).mcp-view.tsx:836calledvoid revealDesktopItemInDir(path)— no platform branch, no catch. The correct pattern already existed 300 lines up in the same file (mcp-view.tsx:506-510) for the MCP config reveal:isWindowsPlatform()branch + try/catch + visible error + swapped label.Root cause of "nothing happens"
shell.showItemInFolderreturnsvoid, so a Windows failure is structurally undetectable — the handler reported success unconditionally. But the failure that most likely bit this user is reportable:detailSkill.pathis produced by the server (apps/server/src/skills.ts:78, roots at:123-137), so it can be a path the Electron main process cannotexistsSync. In that casemain.mjs:1913returns an error string — which the barevoiddiscarded.How
revealLabelprop, so the design-system component stays presentational;mcp-viewpasses the already-localized, platform-correct label.revealSkill()gets the platform branch + try/catch. Errors surface via toast, notconfigError—configErroronly renders inside the Advanced settings panel (mcp-view.tsx:1426), which is the wrong surface when a skill modal is open over the page.reveal-item-in-dir.mjsso its branching is unit-testable (precedent:open-external.mjs). Behavior is unchanged — see below.Deliberately NOT done
An earlier pass made Windows open the parent directory via
openPath(which returns an error string) instead ofshowItemInFolder. I reverted that: it buys error detectability for a rare case by losing item selection for every Windows user in the common case. Not a good trade. The Electron limitation is documented in the helper instead.Tests run
__revealItemInDirhad zero coverage before this. Added 5 cases: existing file, missing file with existing parent, neither exists, Windows still selects the item, Windows path semantics for the parent, and parent-open failure propagation.Proven vs unproven
Proven: typecheck, 116 desktop unit tests, non-Windows branch logic via injected deps.
Unproven: real Windows Explorer behavior; no fraimz/CDP run.