Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions flatpak/com.t3tools.t3code.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<launchable type="desktop-id">com.t3tools.t3code.desktop</launchable>
<url type="homepage">https://t3.codes</url>
<releases>
<release version="0.1.9" date="2026-11-11">
<url type="details">https://github.com/pingdotgg/t3code/releases/tag/v0.1.9</url>
<description></description>
</release>
<release version="0.1.8" date="2026-11-09">
<url type="details">https://github.com/pingdotgg/t3code/releases/tag/v0.1.8</url>
<description>
Expand Down
4 changes: 2 additions & 2 deletions flatpak/modules/t3code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ test-commands:
sources:
- type: git
url: https://github.com/pingdotgg/t3code.git
tag: v0.1.8
commit: bf469bb19669671d0df2efda74ed73867a7137c0
tag: v0.1.9
commit: 24e77473ecf41bc1f7142529c7911c1c1aae1d76
x-checker-data:
type: json
url: https://api.github.com/repos/pingdotgg/t3code/releases/latest
Expand Down
16 changes: 9 additions & 7 deletions patches/0003-flatpak-host-environment.patch
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,19 @@ index 9d9e390c95..0f4e738aba 100644
const path = yield* Path.Path;
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
diff --git a/apps/desktop/src/updates/DesktopUpdates.test.ts b/apps/desktop/src/updates/DesktopUpdates.test.ts
index 3b45d80bbc..cc2cc4c537 100644
index 604fbeda3c..1b14a0497b 100644
--- a/apps/desktop/src/updates/DesktopUpdates.test.ts
+++ b/apps/desktop/src/updates/DesktopUpdates.test.ts
@@ -1,4 +1,4 @@
@@ -1,6 +1,6 @@
import * as NodeModule from "node:module";

-import { assert, describe, it } from "@effect/vitest";
+import { assert, describe, it, vi } from "@effect/vitest";
import { DESKTOP_UPDATE_RESTART_MARKER_FILE } from "@t3tools/contracts";
import { computeReleaseNotes } from "electron-updater/out/providers/GitHubProvider.js";
import * as Cause from "effect/Cause";
import * as Deferred from "effect/Deferred";
@@ -23,6 +23,28 @@ import * as DesktopUpdates from "./DesktopUpdates.ts";
import { flushCallbacks, makeHarness } from "./updatesTestHarness.ts";
@@ -77,6 +77,28 @@ const stableUpdateInfo = (
};

describe("DesktopUpdates", () => {
+ it.effect("leaves updates to Flatpak even when an update feed is configured", () => {
Expand Down Expand Up @@ -108,15 +110,15 @@ index 3b45d80bbc..cc2cc4c537 100644
Effect.gen(function* () {
const linuxState = (packageType: string | undefined) =>
diff --git a/apps/desktop/src/updates/DesktopUpdates.ts b/apps/desktop/src/updates/DesktopUpdates.ts
index 14688e5258..81ee76338d 100644
index 36492ca7b9..75ef423a27 100644
--- a/apps/desktop/src/updates/DesktopUpdates.ts
+++ b/apps/desktop/src/updates/DesktopUpdates.ts
@@ -1,3 +1,4 @@
+import { flatpakAppId } from "../app/Flatpak.ts";
import {
DESKTOP_UPDATE_RESTART_MARKER_FILE,
DesktopUpdateChannelSchema,
@@ -339,6 +340,9 @@ function getAutoUpdateDisabledReason(args: {
@@ -343,6 +344,9 @@ function getAutoUpdateDisabledReason(args: {
disabledByEnv: boolean;
hasUpdateFeedConfig: boolean;
}): string | null {
Expand Down
12 changes: 8 additions & 4 deletions patches/0006-flatpak-document-portal-paths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ index 4f9ab12edd..8390ff5c88 100644
pickFiles: Effect.fn("desktop.electron.dialog.pickFiles")(function* (input) {
const ownerWindowId = Option.match(input.owner, {
diff --git a/apps/desktop/src/ipc/DesktopIpc.ts b/apps/desktop/src/ipc/DesktopIpc.ts
index 354acc5a81..e8e89d9502 100644
index 69d4f70c15..34ba9342ed 100644
--- a/apps/desktop/src/ipc/DesktopIpc.ts
+++ b/apps/desktop/src/ipc/DesktopIpc.ts
@@ -17,7 +17,7 @@ export type DesktopIpcHandleListener = (
@@ -23,7 +23,7 @@ export type DesktopIpcHandleListener = (
raw: unknown,
) => unknown | Promise<unknown>;

Expand All @@ -225,7 +225,7 @@ index 354acc5a81..e8e89d9502 100644

export interface DesktopIpcMain {
removeHandler(channel: string): void;
@@ -65,7 +65,7 @@ export interface DesktopIpcMethod<E, R> {
@@ -80,7 +80,7 @@ export interface DesktopIpcMethod<E, R> {

export interface DesktopSyncIpcMethod<E, R> {
readonly channel: string;
Expand All @@ -234,7 +234,7 @@ index 354acc5a81..e8e89d9502 100644
}

export class DesktopIpc extends Context.Service<
@@ -127,11 +127,11 @@ export const make = (ipcMain: DesktopIpcMain): DesktopIpc["Service"] =>
@@ -149,7 +149,7 @@ export const make = (
Effect.try({
try: () => {
ipcMain.removeAllListeners(channel);
Expand All @@ -243,6 +243,10 @@ index 354acc5a81..e8e89d9502 100644
event.returnValue = runSync(
Effect.gen(function* () {
yield* Effect.annotateCurrentSpan({ channel });
@@ -158,7 +158,7 @@ export const make = (
yield* Effect.logWarning("Rejected sync IPC from an untrusted sender.");
return undefined;
}
- return yield* handler();
+ return yield* handler(payload);
}).pipe(
Expand Down
38 changes: 12 additions & 26 deletions patches/0007-flatpak-editor-discovery.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/apps/server/src/process/externalLauncher.test.ts b/apps/server/src/process/externalLauncher.test.ts
index 9f975ee209..0ae8ece943 100644
index f59b6a6187..c537ecf929 100644
--- a/apps/server/src/process/externalLauncher.test.ts
+++ b/apps/server/src/process/externalLauncher.test.ts
@@ -257,6 +257,55 @@ it.effect("launches an installed editor with platform-safe arguments", () =>
@@ -290,6 +290,55 @@ it.effect("launches an installed editor with platform-safe arguments", () =>
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
);

Expand Down Expand Up @@ -59,10 +59,10 @@ index 9f975ee209..0ae8ece943 100644
"reveals a WSL file in Windows File Explorer through its UNC path",
() =>
diff --git a/apps/server/src/process/externalLauncher.ts b/apps/server/src/process/externalLauncher.ts
index 7f4417d1fb..8ec3c6a3e5 100644
index b900823f16..2dc12717ce 100644
--- a/apps/server/src/process/externalLauncher.ts
+++ b/apps/server/src/process/externalLauncher.ts
@@ -122,6 +122,67 @@ const CommandLookupEnvConfig = Config.all({
@@ -123,6 +123,67 @@ const CommandLookupEnvConfig = Config.all({
const readBrowserLaunchEnv = BrowserLaunchEnvConfig.pipe(Effect.orElseSucceed(() => ({})));
const readCommandLookupEnv = CommandLookupEnvConfig.pipe(Effect.orElseSucceed(() => ({})));

Expand Down Expand Up @@ -130,15 +130,15 @@ index 7f4417d1fb..8ec3c6a3e5 100644
function parseTargetPathAndPosition(target: string): Option.Option<TargetPathAndPosition> {
const match = TARGET_WITH_POSITION_PATTERN.exec(target);
if (!match?.[1] || !match[2]) {
@@ -403,6 +464,7 @@ const buildAvailableEditors = Effect.fn("externalLauncher.buildAvailableEditors"
@@ -404,6 +465,7 @@ const buildAvailableEditors = Effect.fn("externalLauncher.buildAvailableEditors"
FileSystem.FileSystem | Path.Path | ChildProcessSpawner.ChildProcessSpawner
> {
const available: EditorId[] = [];
+ const flatpakApps = yield* installedFlatpakAppIds(platform, env);

for (const editor of EDITORS) {
if (editor.commands === null) {
@@ -413,7 +475,7 @@ const buildAvailableEditors = Effect.fn("externalLauncher.buildAvailableEditors"
@@ -414,7 +476,7 @@ const buildAvailableEditors = Effect.fn("externalLauncher.buildAvailableEditors"
}

const command = yield* resolveEditorCommand(editor, env);
Expand All @@ -147,19 +147,10 @@ index 7f4417d1fb..8ec3c6a3e5 100644
available.push(editor.id);
}
}
@@ -476,13 +538,26 @@ const resolveEditorLaunch = Effect.fn("resolveEditorLaunch")(function* (
}

@@ -479,6 +541,19 @@ const resolveEditorLaunch = Effect.fn("resolveEditorLaunch")(function* (
if (editorDef.commands) {
- const { command, baseArgs } = Option.getOrElse(
- yield* resolveEditorCommand(editorDef, env),
- () => ({
- command: editorDef.commands[0],
- baseArgs: "baseArgs" in editorDef ? editorDef.baseArgs : [],
- }),
- );
+ const installedCommand = yield* resolveEditorCommand(editorDef, env);
+ if (Option.isNone(installedCommand)) {
const resolved = yield* resolveEditorCommand(editorDef, env);
if (Option.isNone(resolved)) {
+ const appId = installedFlatpakEditorAppId(
+ editorDef.id,
+ yield* installedFlatpakAppIds(platform, env),
Expand All @@ -173,11 +164,6 @@ index 7f4417d1fb..8ec3c6a3e5 100644
+ args: ["run", appId, ...baseArgs, ...resolveCommandEditorArgs(editorDef, input.cwd)],
+ };
+ }
+ }
+ const { command, baseArgs } = Option.getOrElse(installedCommand, () => ({
+ command: editorDef.commands[0],
+ baseArgs: "baseArgs" in editorDef ? editorDef.baseArgs : [],
+ }));
return {
editor: editorDef.id,
target: input.cwd,
return yield* new ExternalLauncherCommandNotFoundError({
editor: editorDef.id,
command: editorDef.commands[0],
14 changes: 7 additions & 7 deletions patches/0009-flatpak-server-updates.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/apps/server/src/cloud/selfUpdate.test.ts b/apps/server/src/cloud/selfUpdate.test.ts
index a938d67788..8e3f30eea5 100644
index 6be4288ce3..e22848f9ae 100644
--- a/apps/server/src/cloud/selfUpdate.test.ts
+++ b/apps/server/src/cloud/selfUpdate.test.ts
@@ -160,6 +160,28 @@ const makeHarness = Effect.fn("test.make_self_update_harness")(function* (
});
@@ -196,6 +196,28 @@ it.layer(NodeServices.layer)("server self update", (it) => {
}),
);

it.layer(NodeServices.layer)("server self update", (it) => {
+ it.effect("rejects Flatpak updates and commits before invoking any updater", () =>
+ Effect.gen(function* () {
+ const { selfUpdate, order } = yield* makeHarness({
Expand All @@ -32,7 +32,7 @@ index a938d67788..8e3f30eea5 100644
it.effect("rejects invalid versions and desktop-managed servers before staging", () =>
Effect.gen(function* () {
diff --git a/apps/server/src/cloud/selfUpdate.ts b/apps/server/src/cloud/selfUpdate.ts
index 58baa160ad..85835f020a 100644
index 5e29996413..505b5e4a11 100644
--- a/apps/server/src/cloud/selfUpdate.ts
+++ b/apps/server/src/cloud/selfUpdate.ts
@@ -138,6 +138,7 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
Expand All @@ -55,7 +55,7 @@ index 58baa160ad..85835f020a 100644
const policyRefusal = managedUpdateRefusal(
policy.document,
capability === "boot-service" ? cliReleaseChannelOf(input.targetVersion.trim()) : undefined,
@@ -322,6 +328,11 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
@@ -333,6 +339,11 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
update,
commitDesktopUpdate: Effect.fn("ServerSelfUpdate.commitDesktopUpdate")(
function (requestId, onHandoffAccepted) {
Expand Down Expand Up @@ -114,7 +114,7 @@ index dc719ed93c..9567631217 100644
settledWorktreeCleanup: true,
storageCleanupRun: true,
diff --git a/apps/server/src/environment/ServerEnvironment.ts b/apps/server/src/environment/ServerEnvironment.ts
index 74c6865807..f1df53d13a 100644
index 9e29b0fded..ab77356eae 100644
--- a/apps/server/src/environment/ServerEnvironment.ts
+++ b/apps/server/src/environment/ServerEnvironment.ts
@@ -203,8 +203,11 @@ export const make = Effect.gen(function* () {
Expand Down
4 changes: 2 additions & 2 deletions patches/0010-flatpak-browser-requirements.patch
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ index 1847e5f232..eea911ee35 100644
// Playwright reports Chrome's refusal to sandbox as root as a sandbox failure too.
return (yield* HostProcess.UserId) === 0
diff --git a/apps/server/src/preview/ServerBrowser.ts b/apps/server/src/preview/ServerBrowser.ts
index 7f128dc5d4..51364a0b16 100644
index ee31b17cc5..8a0ae2935c 100644
--- a/apps/server/src/preview/ServerBrowser.ts
+++ b/apps/server/src/preview/ServerBrowser.ts
@@ -2759,7 +2759,9 @@ const make = Effect.gen(function* () {
@@ -2765,7 +2765,9 @@ const make = Effect.gen(function* () {
(yield* PreviewBrowserHost.sandboxBlocked)
) {
yield* Effect.logWarning(
Expand Down
6 changes: 3 additions & 3 deletions patches/0011-flatpak-legacy-database.patch
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ index 045d6dba29..e19a6c373d 100644
getState: () => ipcRenderer.invoke(IpcChannels.CLI_COMMAND_GET_STATE_CHANNEL),
install: () => ipcRenderer.invoke(IpcChannels.CLI_COMMAND_INSTALL_CHANNEL),
diff --git a/apps/web/src/components/settings/DatabaseStorageNotice.tsx b/apps/web/src/components/settings/DatabaseStorageNotice.tsx
index b9a0de493a..fee108569f 100644
index b4668a07f2..ef2f2a38c0 100644
--- a/apps/web/src/components/settings/DatabaseStorageNotice.tsx
+++ b/apps/web/src/components/settings/DatabaseStorageNotice.tsx
@@ -9,7 +9,7 @@ import {
Expand Down Expand Up @@ -251,10 +251,10 @@ index b9a0de493a..fee108569f 100644
+ );
+}
diff --git a/packages/contracts/src/ipc.ts b/packages/contracts/src/ipc.ts
index 29be3d6d02..03b4f4d363 100644
index 39f96754a6..3632f9fd6b 100644
--- a/packages/contracts/src/ipc.ts
+++ b/packages/contracts/src/ipc.ts
@@ -1140,6 +1140,12 @@ export interface DesktopBridge {
@@ -1143,6 +1143,12 @@ export interface DesktopBridge {
/** With a version, installs only that downloaded build. */
installUpdate: (expectedVersion?: string) => Promise<DesktopUpdateActionResult>;
onUpdateState: (listener: (state: DesktopUpdateState) => void) => () => void;
Expand Down
16 changes: 8 additions & 8 deletions patches/0012-flatpak-update-channel.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/apps/desktop/src/updates/DesktopUpdates.test.ts b/apps/desktop/src/updates/DesktopUpdates.test.ts
index cc2cc4c537..7e5bdf2ac7 100644
index 1b14a0497b..d5191e550c 100644
--- a/apps/desktop/src/updates/DesktopUpdates.test.ts
+++ b/apps/desktop/src/updates/DesktopUpdates.test.ts
@@ -38,6 +38,11 @@ describe("DesktopUpdates", () => {
@@ -92,6 +92,11 @@ describe("DesktopUpdates", () => {
const result = yield* updates.check("manual");
assert.isFalse(result.checked);
assert.equal(harness.checkCount(), 0);
Expand All @@ -15,10 +15,10 @@ index cc2cc4c537..7e5bdf2ac7 100644
Effect.scoped,
Effect.provide(harness.layer),
diff --git a/apps/desktop/src/updates/DesktopUpdates.ts b/apps/desktop/src/updates/DesktopUpdates.ts
index 81ee76338d..cc607dfada 100644
index 75ef423a27..a70eb7d771 100644
--- a/apps/desktop/src/updates/DesktopUpdates.ts
+++ b/apps/desktop/src/updates/DesktopUpdates.ts
@@ -1204,6 +1204,9 @@ export const make = Effect.gen(function* () {
@@ -1208,6 +1208,9 @@ export const make = Effect.gen(function* () {
options?: { readonly minimumVersion?: string | undefined },
) {
yield* Effect.annotateCurrentSpan({ channel: nextChannel });
Expand All @@ -29,10 +29,10 @@ index 81ee76338d..cc607dfada 100644
return yield* new DesktopUpdateChannelManagedError({
channel: nextChannel,
diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx
index 00bdcf6cf5..770756cc14 100644
index 3dc9566e89..fcace2f695 100644
--- a/apps/web/src/components/settings/SettingsPanels.tsx
+++ b/apps/web/src/components/settings/SettingsPanels.tsx
@@ -352,6 +352,8 @@ function AboutVersionSection() {
@@ -356,6 +356,8 @@ function AboutVersionSection() {
Review
</Button>
</>
Expand All @@ -41,7 +41,7 @@ index 00bdcf6cf5..770756cc14 100644
) : (
"Switches this app and every connected machine whose database the target release supports."
)
@@ -360,6 +362,9 @@ function AboutVersionSection() {
@@ -364,6 +366,9 @@ function AboutVersionSection() {
control={
<Select
value={selectedUpdateChannel}
Expand All @@ -51,7 +51,7 @@ index 00bdcf6cf5..770756cc14 100644
onValueChange={(value) => {
if (value !== selectedUpdateChannel) {
setSwitchChannel(value as DesktopUpdateChannel);
@@ -370,7 +375,9 @@ function AboutVersionSection() {
@@ -374,7 +379,9 @@ function AboutVersionSection() {
size="sm"
className="w-full sm:w-40"
aria-label="Update track"
Expand Down
9 changes: 7 additions & 2 deletions tests/packaged/packaged.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ async function attach(urlPrefix?: string) {
function appTest(name: string, run: () => Promise<void>) {
test(name, async () => {
try {
// Close anything an earlier failure left open, such as a popover.
if (!page.isClosed()) await page.keyboard.press("Escape");
// Close anything an earlier test left open, such as a popover or Settings.
// Settings navigates back to the page that opened it once it finishes closing,
// so wait for that before this test navigates anywhere itself.
if (!page.isClosed()) {
await page.keyboard.press("Escape");
await page.waitForFunction(() => !document.querySelector('[role="dialog"]'));
}
await run();
} catch (error) {
const file = `${name.replace(/[^a-z0-9]+/gi, "-").toLowerCase()}.png`;
Expand Down