GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(upstream): sync marcode through 78f462c4e18c by maarco · Pull Request #21 · maarco/marcode

chore(upstream): sync marcode through 78f462c4e18c #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maarco wants to merge 29 commits into main from claude/gracious-bohr-ipvnfy

Uh oh!

There was an error while loading. Please reload this page.

Closed

chore(upstream): sync marcode through 78f462c4e18c #21

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
285cf59
fix(web): preserve desktop route during Clerk auth (#5770)
wobsoriano Aug 9, 2026
02f4ce5
fix(web): match create theme and import theme buttons to the standard…
UtkarshUsername Aug 9, 2026
deb901d
fix(server): favicon resolution no longer pins the event loop (#5538)
murenovich Aug 9, 2026
062b461
fix(shared): bound the file-link label so bracket runs stop rescannin…
btsouth Aug 9, 2026
659986c
fix(web): thread title button no longer eats the drag area (#5857)
nathangerday Aug 9, 2026
bd18d8d
fix(web): unify usage page chrome (#5823)
t3-code-bot[bot] Aug 9, 2026
c8ad4b8
fix(shell): add ~/.local/bin to the Windows CLI resolver so native-in…
arhxam Aug 9, 2026
83d769f
fix(web): match settings search shortcut styling to command palette's…
UtkarshUsername Aug 9, 2026
f993fa1
fix(mobile): long-pressing a thread row no longer navigates into the …
juliusmarminge Aug 9, 2026
0d38866
fix(server): usage no longer double-counts forked Codex sessions (#5887)
t3dotgg Aug 9, 2026
2abe668
fix(server): sandbox user-provided SVGs (#5916)
t3dotgg Aug 9, 2026
9a1472d
fix(web): match usage titlebar text styling (#5897)
t3-code-bot[bot] Aug 10, 2026
f21d5e4
Move project settings to contextual project routes (#5923)
juliusmarminge Aug 10, 2026
5da4533
Preserve back navigation when opening settings (#5930)
juliusmarminge Aug 10, 2026
73b2e8f
Automate production mobile EAS releases (#5609)
juliusmarminge Aug 10, 2026
9690680
Add settings and usage breadcrumbs (#5929)
juliusmarminge Aug 10, 2026
cbd55d6
fix(web): correct model picker trigger padding (#5935)
Chrono-byte Aug 10, 2026
0ca9fb3
fix(web): show worktree icon in sidebar v2 (#5909)
tris203 Aug 10, 2026
ef051bd
fix(web): enable restore defaults after theme mix changes (#5928)
Lucenx9 Aug 10, 2026
d432100
fix(web): trait menu closes after you pick a level (#5879)
t3dotgg Aug 10, 2026
f0e2975
fix(web): align project name with headline (#5864)
carterwsmith Aug 10, 2026
3d74474
fix(web): update pills use readable theme foregrounds (#5938)
chrisdeeming Aug 10, 2026
9821bca
fix(web): use themed confirmation dialogs (#5624)
StiensWout Aug 10, 2026
fbcae59
fix(web): use import/export-appropriate icons for theme buttons (#5964)
UtkarshUsername Aug 10, 2026
67ef189
fix(mobile): detect PowerShell cmdlet errors in work log rows (#5726)
myacoub91 Aug 10, 2026
d440442
fix(mobile): stop Android user bubbles with code blocks from overlapp…
Brechard Aug 10, 2026
3b72d17
fix(mobile): parse EAS fingerprint JSON (#5991)
juliusmarminge Aug 10, 2026
78f462c
chore(release): prepare v0.0.33
t3-code-bot[bot] Aug 10, 2026
e7c3fdd
chore(upstream): merge pingdotgg/t3code@78f462c4e18c
claude Aug 10, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(web): use themed confirmation dialogs (pingdotgg#5624)
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@StiensWout
StiensWout authored Aug 10, 2026
commit 9821bca1ceb97f137a9d93f1080fe1954b6641d3

There are no files selected for viewing

89 changes: 0 additions & 89 deletions 89 apps/desktop/src/electron/ElectronDialog.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -28,70 +28,6 @@ describe("ElectronDialog", () => {
showErrorBoxMock.mockReset();
});

it.effect("returns false without opening a confirm dialog for empty messages", () =>
Effect.gen(function* () {
const dialog = yield* ElectronDialog.ElectronDialog;

const result = yield* dialog.confirm({
message: " ",
owner: Option.none(),
});

assert.isFalse(result);
assert.equal(showMessageBoxMock.mock.calls.length, 0);
}).pipe(Effect.provide(ElectronDialog.layer)),
);

it.effect("opens a confirm dialog for the owner window", () =>
Effect.gen(function* () {
const owner = { id: 1 } as BrowserWindow;
showMessageBoxMock.mockResolvedValue({ response: 1 });
const dialog = yield* ElectronDialog.ElectronDialog;

const result = yield* dialog.confirm({
message: "Delete worktree?",
owner: Option.some(owner),
});

assert.isTrue(result);
assert.deepEqual(showMessageBoxMock.mock.calls[0], [
owner,
{
type: "question",
buttons: ["No", "Yes"],
defaultId: 0,
cancelId: 0,
noLink: true,
message: "Delete worktree?",
},
]);
}).pipe(Effect.provide(ElectronDialog.layer)),
);

it.effect("opens an app-level confirm dialog when there is no owner window", () =>
Effect.gen(function* () {
showMessageBoxMock.mockResolvedValue({ response: 0 });
const dialog = yield* ElectronDialog.ElectronDialog;

const result = yield* dialog.confirm({
message: "Delete worktree?",
owner: Option.none(),
});

assert.isFalse(result);
assert.deepEqual(showMessageBoxMock.mock.calls[0], [
{
type: "question",
buttons: ["No", "Yes"],
defaultId: 0,
cancelId: 0,
noLink: true,
message: "Delete worktree?",
},
]);
}).pipe(Effect.provide(ElectronDialog.layer)),
);

it.effect("preserves folder picker request context and cause", () =>
Effect.gen(function* () {
const cause = new Error("folder picker failed");
Expand All @@ -117,31 +53,6 @@ describe("ElectronDialog", () => {
}).pipe(Effect.provide(ElectronDialog.layer)),
);

it.effect("preserves confirmation request context and cause", () =>
Effect.gen(function* () {
const cause = new Error("confirmation failed");
const owner = { id: 9 } as BrowserWindow;
showMessageBoxMock.mockRejectedValue(cause);
const dialog = yield* ElectronDialog.ElectronDialog;

const error = yield* Effect.flip(
dialog.confirm({
owner: Option.some(owner),
message: " Confirm removal? ",
}),
);

assert.instanceOf(error, ElectronDialog.ElectronDialogConfirmError);
assert.strictEqual(error.ownerWindowId, 9);
assert.strictEqual(error.promptLength, "Confirm removal?".length);
assert.notProperty(error, "promptMessage");
assert.strictEqual(error.cause, cause);
assert.include(error.message, "window 9");
assert.notInclude(error.message, "Confirm removal?");
assert.notInclude(error.message, cause.message);
}).pipe(Effect.provide(ElectronDialog.layer)),
);

it.effect("preserves message box request context and cause", () =>
Effect.gen(function* () {
const cause = new Error("message box failed");
Expand Down
58 changes: 0 additions & 58 deletions 58 apps/desktop/src/electron/ElectronDialog.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import * as Schema from "effect/Schema";

import * as Electron from "electron";

const CONFIRM_BUTTON_INDEX = 1;

export class ElectronDialogPickFolderError extends Schema.TaggedErrorClass<ElectronDialogPickFolderError>()(
"ElectronDialogPickFolderError",
{
Expand Down Expand Up @@ -38,20 +36,6 @@ export class ElectronDialogPickFilesError extends Schema.TaggedErrorClass<Electr
}
}

export class ElectronDialogConfirmError extends Schema.TaggedErrorClass<ElectronDialogConfirmError>()(
"ElectronDialogConfirmError",
{
ownerWindowId: Schema.NullOr(Schema.Number),
promptLength: Schema.Number,
cause: Schema.Defect(),
},
) {
override get message(): string {
const owner = this.ownerWindowId === null ? "the application" : `window ${this.ownerWindowId}`;
return `Failed to open an Electron confirmation dialog for ${owner} with a ${this.promptLength}-character prompt.`;
}
}

export class ElectronDialogShowMessageBoxError extends Schema.TaggedErrorClass<ElectronDialogShowMessageBoxError>()(
"ElectronDialogShowMessageBoxError",
{
Expand Down Expand Up @@ -85,7 +69,6 @@ export class ElectronDialogShowErrorBoxError extends Schema.TaggedErrorClass<Ele
export const ElectronDialogError = Schema.Union([
ElectronDialogPickFolderError,
ElectronDialogPickFilesError,
ElectronDialogConfirmError,
ElectronDialogShowMessageBoxError,
ElectronDialogShowErrorBoxError,
]);
Expand All @@ -103,11 +86,6 @@ export interface ElectronDialogPickFilesInput {
readonly filters: readonly Electron.FileFilter[];
}

export interface ElectronDialogConfirmInput {
readonly owner: Option.Option<Electron.BrowserWindow>;
readonly message: string;
}

export class ElectronDialog extends Context.Service<
ElectronDialog,
{
Expand All @@ -117,9 +95,6 @@ export class ElectronDialog extends Context.Service<
readonly pickFiles: (
input: ElectronDialogPickFilesInput,
) => Effect.Effect<readonly string[], ElectronDialogPickFilesError>;
readonly confirm: (
input: ElectronDialogConfirmInput,
) => Effect.Effect<boolean, ElectronDialogConfirmError>;
readonly showMessageBox: (
options: Electron.MessageBoxOptions,
) => Effect.Effect<Electron.MessageBoxReturnValue, ElectronDialogShowMessageBoxError>;
Expand Down Expand Up @@ -188,39 +163,6 @@ export const make = ElectronDialog.of({
});
return result.canceled ? [] : result.filePaths;
}),
confirm: Effect.fn("desktop.electron.dialog.confirm")(function* (input) {
const normalizedMessage = input.message.trim();
if (normalizedMessage.length === 0) {
return false;
}

const options = {
type: "question" as const,
buttons: ["No", "Yes"],
defaultId: 0,
cancelId: 0,
noLink: true,
message: normalizedMessage,
};
const ownerWindowId = Option.match(input.owner, {
onNone: () => null,
onSome: (owner) => owner.id,
});
const result = yield* Effect.tryPromise({
try: () =>
Option.match(input.owner, {
onNone: () => Electron.dialog.showMessageBox(options),
onSome: (owner) => Electron.dialog.showMessageBox(owner, options),
}),
catch: (cause) =>
new ElectronDialogConfirmError({
ownerWindowId,
promptLength: normalizedMessage.length,
cause,
}),
});
return result.response === CONFIRM_BUTTON_INDEX;
}),
showMessageBox: (options) =>
Effect.tryPromise({
try: () => Electron.dialog.showMessageBox(options),
Expand Down
2 changes: 0 additions & 2 deletions 2 apps/desktop/src/ipc/DesktopIpcHandlers.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
setUpdateChannel,
} from "./methods/updates.ts";
import {
confirm,
getAppBranding,
getLocalEnvironmentBootstraps,
getLocalEnvironmentBearerToken,
Expand Down Expand Up @@ -81,7 +80,6 @@ export const installDesktopIpcHandlers = Effect.fn("desktop.ipc.installHandlers"

yield* ipc.handle(pickFolder);
yield* ipc.handle(pickThemeFiles);
yield* ipc.handle(confirm);
yield* ipc.handle(setTheme);
yield* ipc.handle(showContextMenu);
yield* ipc.handle(openExternal);
Expand Down
1 change: 0 additions & 1 deletion 1 apps/desktop/src/ipc/channels.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const PICK_FOLDER_CHANNEL = "desktop:pick-folder";
export const PICK_THEME_FILES_CHANNEL = "desktop:pick-theme-files";
export const CONFIRM_CHANNEL = "desktop:confirm";
export const SET_THEME_CHANNEL = "desktop:set-theme";
export const CONTEXT_MENU_CHANNEL = "desktop:context-menu";
export const OPEN_EXTERNAL_CHANNEL = "desktop:open-external";
Expand Down
13 changes: 0 additions & 13 deletions 13 apps/desktop/src/ipc/methods/window.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -220,19 +220,6 @@ export const pickFolder = DesktopIpc.makeIpcMethod({
}),
});

export const confirm = DesktopIpc.makeIpcMethod({
channel: IpcChannels.CONFIRM_CHANNEL,
payload: Schema.String,
result: Schema.Boolean,
handler: Effect.fn("desktop.ipc.window.confirm")(function* (message) {
const dialog = yield* ElectronDialog.ElectronDialog;
const electronWindow = yield* ElectronWindow.ElectronWindow;
return yield* electronWindow.focusedMainOrFirst.pipe(
Effect.flatMap((owner) => dialog.confirm({ owner, message })),
);
}),
});

export const setTheme = DesktopIpc.makeIpcMethod({
channel: IpcChannels.SET_THEME_CHANNEL,
payload: DesktopThemeSchema,
Expand Down
1 change: 0 additions & 1 deletion 1 apps/desktop/src/preload.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ contextBridge.exposeInMainWorld("desktopBridge", {
setWslOnly: (enabled) => ipcRenderer.invoke(IpcChannels.SET_WSL_ONLY_CHANNEL, enabled),
pickFolder: (options) => ipcRenderer.invoke(IpcChannels.PICK_FOLDER_CHANNEL, options),
pickThemeFiles: () => ipcRenderer.invoke(IpcChannels.PICK_THEME_FILES_CHANNEL, undefined),
confirm: (message) => ipcRenderer.invoke(IpcChannels.CONFIRM_CHANNEL, message),
setTheme: (theme) => ipcRenderer.invoke(IpcChannels.SET_THEME_CHANNEL, theme),
showContextMenu: (items, position) =>
ipcRenderer.invoke(IpcChannels.CONTEXT_MENU_CHANNEL, {
Expand Down
1 change: 0 additions & 1 deletion 1 apps/desktop/src/window/DesktopApplicationMenu.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const electronAppLayer = Layer.succeed(ElectronApp.ElectronApp, {
const electronDialogLayer = Layer.succeed(ElectronDialog.ElectronDialog, {
pickFolder: () => Effect.succeed(Option.none()),
pickFiles: () => Effect.succeed([]),
confirm: () => Effect.succeed(false),
showMessageBox: () => Effect.succeed({ response: 0, checkboxChecked: false }),
showErrorBox: () => Effect.void,
} satisfies ElectronDialog.ElectronDialog["Service"]);
Expand Down
1 change: 1 addition & 0 deletions 1 apps/web/src/components/ChatView.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4745,6 +4745,7 @@ function ChatViewContent(props: ChatViewProps) {
"This will discard newer messages and turn diffs in this thread.",
"This action cannot be undone.",
].join("\n"),
{ variant: "destructive" },
);
if (!confirmed) {
return;
Expand Down
96 changes: 96 additions & 0 deletions 96 apps/web/src/components/ConfirmDialogHost.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import { useEffect, useSyncExternalStore } from "react";

import {
completeConfirmDialogClose,
readConfirmDialogState,
registerConfirmDialogHost,
respondToConfirmDialog,
subscribeConfirmDialog,
} from "../confirmDialog";
import {
AlertDialog,
AlertDialogClose,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogPopup,
AlertDialogTitle,
} from "./ui/alert-dialog";
import { Button } from "./ui/button";

type ConfirmationCopy = {
readonly title: string;
readonly description: string | null;
};

export function resolveConfirmDialogCopy(message: string): ConfirmationCopy {
const normalizedMessage = message.trim();
const lines = normalizedMessage.split("\n");
const questionLineIndex = lines.findIndex((line) => line.trim().endsWith("?"));

if (questionLineIndex >= 0) {
const title = lines[questionLineIndex]!.trim();
const description = lines
.filter((_, index) => index !== questionLineIndex)
.join("\n")
.trim();
return { title, description: description || null };
}

const questionMarkIndex = normalizedMessage.indexOf("?");
if (questionMarkIndex >= 0) {
return {
title: normalizedMessage.slice(0, questionMarkIndex + 1).trim(),
description: normalizedMessage.slice(questionMarkIndex + 1).trim() || null,
};
}

return {
title: "Confirm action",
description: normalizedMessage || "This action requires your confirmation.",
};
}

export function ConfirmDialogHost() {
const state = useSyncExternalStore(
subscribeConfirmDialog,
readConfirmDialogState,
readConfirmDialogState,
);

useEffect(() => registerConfirmDialogHost(), []);

const copy = resolveConfirmDialogCopy(state.status === "idle" ? "" : state.message);
const confirmVariant = state.status === "idle" ? "default" : state.variant;
const onCancel = () => respondToConfirmDialog(false);
const onConfirm = () => respondToConfirmDialog(true);

return (
<AlertDialog
open={state.status === "confirming"}
onOpenChange={(open) => {
if (!open) onCancel();
}}
onOpenChangeComplete={(open) => {
if (!open) completeConfirmDialogClose();
}}
>
<AlertDialogPopup className="max-w-lg">
<AlertDialogHeader>
<AlertDialogTitle>{copy.title}</AlertDialogTitle>
{copy.description ? (
<AlertDialogDescription className="whitespace-pre-line">
{copy.description}
</AlertDialogDescription>
) : null}
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogClose render={<Button variant="outline" />}>Cancel</AlertDialogClose>
<Button variant={confirmVariant} onClick={onConfirm}>
Confirm
</Button>
</AlertDialogFooter>
</AlertDialogPopup>
</AlertDialog>
);
}
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.