{"record":{"id":"730969da7995732e","repo":"Eugeny/tabby","slug":"unavailable","errorCode":null,"errorMessage":"Unavailable","messagePattern":"Unavailable","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"tabby-web/src/services/hostWindow.service.ts","lineNumber":44,"sourceCode":"\n    reload (): void {\n        location.reload()\n    }\n\n    setTitle (title?: string): void {\n        document.title = title ?? 'Tabby'\n    }\n\n    toggleFullscreen (): void {\n        if (this.isFullscreen) {\n            document.exitFullscreen()\n        } else {\n            document.body.requestFullscreen({ navigationUI: 'hide' })\n        }\n    }\n\n    minimize (): void {\n        throw new Error('Unavailable')\n    }\n\n    isMaximized (): boolean {\n        return true\n    }\n\n    toggleMaximize (): void {\n        throw new Error('Unavailable')\n    }\n\n    close (): void {\n        window.close()\n    }\n}\n","sourceCodeStart":26,"sourceCodeEnd":59,"githubUrl":"https://github.com/Eugeny/tabby/blob/14e2d60b9b6dee84a53c37f05eefeb803787de04/tabby-web/src/services/hostWindow.service.ts#L26-L59","documentation":"Thrown by WebHostWindow.minimize(), the web implementation of the abstract HostWindowService.minimize(). A web page cannot minimize the host OS window, so the browser build throws 'Unavailable'. Other methods like setTitle, toggleFullscreen, and close ARE implemented because the browser exposes them; minimize is not.","triggerScenarios":"hostWindow.minimize() is called in the web build. The window controls (app/lib/window.ts:390) call this when the user clicks a custom 'minimize' titlebar button rendered inside the web app.","commonSituations":"Custom in-app window controls (frameless-style title bar buttons) are rendered in the web build and the user clicks minimize; shared window-control component runs in both Electron and Web; a plugin triggers minimize programmatically.","solutions":["Hide the minimize button when hostWindow is the Web implementation or platform is Web.","Catch 'Unavailable' and show a tooltip/message that the OS window cannot be minimized from the browser.","Use the desktop build where native window controls are required.","Bind minimize only in the Electron host window service path."],"exampleFix":"// before\nthis.window?.minimize()\n// after\ntry {\n    this.window?.minimize()\n} catch {\n    // web build: no native minimize available\n}","handlingStrategy":"fallback","validationCode":"import { Platform } from 'tabby-core'\nif (hostApp.platform === Platform.Web) {\n    // minimize unavailable in browser; disable the button\n} else {\n    hostWindow.minimize()\n}","typeGuard":"import { WebHostWindow } from 'tabby-web'\nfunction isWebWindow (w: unknown): w is WebHostWindow {\n    return w instanceof WebHostWindow\n}","tryCatchPattern":"try { this.window?.minimize() } catch (e) {\n    if (e.message !== 'Unavailable') throw e\n}","preventionTips":["Hide custom minimize controls in the web build.","Catch 'Unavailable' in shared window-control components.","Keep window-control affordances platform-aware."],"tags":["web","platform","window-management","unsupported"],"backgroundTag":null,"analyzedSha":"14e2d60b9b6dee84a53c37f05eefeb803787de04","analyzedAt":"2026-08-12T11:46:48.773Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}