fmt(js): npm run fix on merge (#95114)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
903354587a
commit
1a5ca62233
@@ -24,8 +24,14 @@ test('buildBrowserWindowUrl avoids a double slash when the dev server has a trai
|
||||
})
|
||||
|
||||
test('buildBrowserWindowUrl omits a blank tab', () => {
|
||||
assert.equal(buildBrowserWindowUrl(' ', { devServer: 'http://localhost:5173' }), 'http://localhost:5173/?win=browser#/')
|
||||
assert.equal(buildBrowserWindowUrl(null, { devServer: 'http://localhost:5173' }), 'http://localhost:5173/?win=browser#/')
|
||||
assert.equal(
|
||||
buildBrowserWindowUrl(' ', { devServer: 'http://localhost:5173' }),
|
||||
'http://localhost:5173/?win=browser#/'
|
||||
)
|
||||
assert.equal(
|
||||
buildBrowserWindowUrl(null, { devServer: 'http://localhost:5173' }),
|
||||
'http://localhost:5173/?win=browser#/'
|
||||
)
|
||||
})
|
||||
|
||||
test('buildBrowserWindowUrl builds a packaged file URL with the flag before the hash', () => {
|
||||
|
||||
@@ -8484,13 +8484,15 @@ function applySecretStorageEncryption(on: boolean) {
|
||||
const needsEncrypt = (secret: any) => secret?.encoding === 'plain' && Boolean(secret.value)
|
||||
|
||||
// Probe FIRST so an unusable keychain fails before any store is touched.
|
||||
if (!(() => {
|
||||
try {
|
||||
return Boolean(safeStorage.isEncryptionAvailable())
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
})()) {
|
||||
if (
|
||||
!(() => {
|
||||
try {
|
||||
return Boolean(safeStorage.isEncryptionAvailable())
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
})()
|
||||
) {
|
||||
throw new Error(
|
||||
'OS keychain encryption is unavailable on this machine, so stored gateway secrets cannot be encrypted.'
|
||||
)
|
||||
|
||||
@@ -22,19 +22,11 @@ export function BrowserPopoutShell() {
|
||||
data-contrib-shell=""
|
||||
style={{ '--titlebar-height': `${TITLEBAR_HEIGHT}px` } as CSSProperties}
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className="relative shrink-0 bg-(--ui-bg-chrome)"
|
||||
style={{ height: TITLEBAR_HEIGHT }}
|
||||
>
|
||||
<div aria-hidden="true" className="relative shrink-0 bg-(--ui-bg-chrome)" style={{ height: TITLEBAR_HEIGHT }}>
|
||||
{/* Same traffic-light / native-overlay carve-out as the main titlebar:
|
||||
a full-bar drag region would eat the window buttons. */}
|
||||
<div
|
||||
className="pointer-events-none absolute inset-y-0 left-0 w-(--titlebar-controls-left,14px) [-webkit-app-region:drag]"
|
||||
/>
|
||||
<div
|
||||
className="pointer-events-none absolute inset-y-0 left-[calc(var(--titlebar-controls-left,14px)+(var(--titlebar-control-size,24px)*2)+0.75rem)] right-[calc(var(--titlebar-tools-right,0.75rem)+0.75rem)] [-webkit-app-region:drag]"
|
||||
/>
|
||||
<div className="pointer-events-none absolute inset-y-0 left-0 w-(--titlebar-controls-left,14px) [-webkit-app-region:drag]" />
|
||||
<div className="pointer-events-none absolute inset-y-0 left-[calc(var(--titlebar-controls-left,14px)+(var(--titlebar-control-size,24px)*2)+0.75rem)] right-[calc(var(--titlebar-tools-right,0.75rem)+0.75rem)] [-webkit-app-region:drag]" />
|
||||
</div>
|
||||
<div className="relative min-h-0 min-w-0 flex-1 overflow-hidden">
|
||||
{tabId ? (
|
||||
|
||||
@@ -320,9 +320,8 @@ describe('PreviewBrowserBar', () => {
|
||||
|
||||
it('shows Open in browser when only the external handler is provided', () => {
|
||||
const onOpenExternal = vi.fn()
|
||||
const rendered = render(
|
||||
<PreviewBrowserBar {...baseProps} onOpenExternal={onOpenExternal} onPopOut={undefined} />
|
||||
)
|
||||
|
||||
const rendered = render(<PreviewBrowserBar {...baseProps} onOpenExternal={onOpenExternal} onPopOut={undefined} />)
|
||||
|
||||
expect(rendered.getByRole('button', { name: 'Open in browser' })).toBeTruthy()
|
||||
expect(rendered.queryByRole('button', { name: 'Pop out' })).toBeNull()
|
||||
|
||||
@@ -1302,7 +1302,9 @@ export function ContribWiring({ children }: { children: ReactNode }) {
|
||||
|
||||
{/* Single persistent xterm host chasing the terminal pane's slot rect.
|
||||
The HUD has no terminal pane, so it has nothing to chase. */}
|
||||
{!isHudWindow() && !isBrowserWindow() && <PersistentTerminal onAddSelectionToChat={composer.addTerminalSelectionAttachment} />}
|
||||
{!isHudWindow() && !isBrowserWindow() && (
|
||||
<PersistentTerminal onAddSelectionToChat={composer.addTerminalSelectionAttachment} />
|
||||
)}
|
||||
</ContribWiringContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -76,9 +76,7 @@ function persist(tree: LayoutNode | null) {
|
||||
/** The live tree (null until a default is declared). A secondary window ignores
|
||||
* the persisted (primary) layout and boots to the default — nothing but its
|
||||
* own routed session. */
|
||||
export const $layoutTree = atom<LayoutNode | null>(
|
||||
isSecondaryWindow() || isBrowserWindow() ? null : loadPersisted()
|
||||
)
|
||||
export const $layoutTree = atom<LayoutNode | null>(isSecondaryWindow() || isBrowserWindow() ? null : loadPersisted())
|
||||
|
||||
/**
|
||||
* Which layout preset the current tree came from; `'custom'` after the user
|
||||
|
||||
Reference in New Issue
Block a user