fix(ui): expand launch error modal

Let the 'Unable to launch OpenCode' dialog grow up to 80vh and keep only the error output pane scrollable so longer stderr is visible without cramped nested scrolling.
This commit is contained in:
Shantur Rathore
2026-02-08 21:46:36 +00:00
parent 56a0e8aa6e
commit 0d4a4ccad7

View File

@@ -354,32 +354,34 @@ const App: Component = () => {
<Dialog open={Boolean(launchError())} modal> <Dialog open={Boolean(launchError())} modal>
<Dialog.Portal> <Dialog.Portal>
<Dialog.Overlay class="modal-overlay" /> <Dialog.Overlay class="modal-overlay" />
<div class="fixed inset-0 z-50 flex items-center justify-center p-4"> <div class="fixed inset-0 z-50 flex items-center justify-center p-4">
<Dialog.Content class="modal-surface w-full max-w-md p-6 flex flex-col gap-6"> <Dialog.Content class="modal-surface w-full max-w-3xl p-6 flex flex-col gap-6 max-h-[80vh] min-h-0 overflow-hidden">
<div> <div>
<Dialog.Title class="text-xl font-semibold text-primary">{t("app.launchError.title")}</Dialog.Title> <Dialog.Title class="text-xl font-semibold text-primary">{t("app.launchError.title")}</Dialog.Title>
<Dialog.Description class="text-sm text-secondary mt-2 break-words"> <Dialog.Description class="text-sm text-secondary mt-2 break-words">
{t("app.launchError.description")} {t("app.launchError.description")}
</Dialog.Description> </Dialog.Description>
</div> </div>
<div class="rounded-lg border border-base bg-surface-secondary p-4"> <div class={`flex flex-col gap-4 ${launchErrorMessage() ? "flex-1 min-h-0" : ""}`}>
<p class="text-xs font-medium text-muted uppercase tracking-wide mb-1">{t("app.launchError.binaryPathLabel")}</p> <div class="rounded-lg border border-base bg-surface-secondary p-4 flex-shrink-0">
<p class="text-sm font-mono text-primary break-all">{launchErrorPath()}</p> <p class="text-xs font-medium text-muted uppercase tracking-wide mb-1">{t("app.launchError.binaryPathLabel")}</p>
</div> <p class="text-sm font-mono text-primary break-all">{launchErrorPath()}</p>
</div>
<Show when={launchErrorMessage()}>
<div class="rounded-lg border border-base bg-surface-secondary p-4 flex flex-col gap-2 flex-1 min-h-0">
<p class="text-xs font-medium text-muted uppercase tracking-wide">{t("app.launchError.errorOutputLabel")}</p>
<pre class="text-sm font-mono text-primary whitespace-pre-wrap break-words overflow-auto flex-1 min-h-0">{launchErrorMessage()}</pre>
</div>
</Show>
</div>
<Show when={launchErrorMessage()}> <div class="flex justify-end gap-2">
<div class="rounded-lg border border-base bg-surface-secondary p-4"> <Show when={launchError()?.missingBinary}>
<p class="text-xs font-medium text-muted uppercase tracking-wide mb-1">{t("app.launchError.errorOutputLabel")}</p> <button
<pre class="text-sm font-mono text-primary whitespace-pre-wrap break-words max-h-48 overflow-y-auto">{launchErrorMessage()}</pre> type="button"
</div> class="selector-button selector-button-secondary"
</Show>
<div class="flex justify-end gap-2">
<Show when={launchError()?.missingBinary}>
<button
type="button"
class="selector-button selector-button-secondary"
onClick={handleLaunchErrorAdvanced} onClick={handleLaunchErrorAdvanced}
> >
{t("app.launchError.openAdvancedSettings")} {t("app.launchError.openAdvancedSettings")}