Reveal-in-file-manager was always offered whenever the server exposed revealPath, including in a plain browser tab where there is no local file manager to reveal into. Gate it behind a new isBrowserClientRuntime check (web platform, no Electron shell) and relabel the save action to "Download" for that case, since it triggers a browser-style file download rather than an in-place save. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
16 lines
582 B
TypeScript
16 lines
582 B
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
|
|
import { isBrowserClientRuntime } from './desktop';
|
|
|
|
describe('browser client runtime', () => {
|
|
test('uses browser file behavior only outside the Electron shell', () => {
|
|
expect(isBrowserClientRuntime('web', false)).toBe(true);
|
|
expect(isBrowserClientRuntime('web', true)).toBe(false);
|
|
});
|
|
|
|
test('keeps desktop and VS Code runtime behavior out of browser-only flows', () => {
|
|
expect(isBrowserClientRuntime('desktop', false)).toBe(false);
|
|
expect(isBrowserClientRuntime('vscode', false)).toBe(false);
|
|
});
|
|
});
|