Skip to content

Commit 3325f12

Browse files
authored
Merge branch 'main' into fix/forgejo-pull-request-state-filter
2 parents 687871a + b4ae3c8 commit 3325f12

597 files changed

Lines changed: 20783 additions & 4432 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/triage/PLAYBOOK.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,16 @@ of `main` for that work, never the tag-pinned diagnosis clone.
125125
- Show the user the complete final issue text and get an explicit yes before
126126
posting. Never post without it.
127127
- Note at the end of the issue which model and agent produced it.
128-
- If `gh` is not authenticated, offer `gh auth login`, or build a prefilled
129-
https://github.com/pingdotgg/t3code/issues/new URL with title and body query
130-
parameters; print the URL, and open it in their browser only after they
131-
approve.
128+
- Post with `gh issue create --repo pingdotgg/t3code --label via-triage` only
129+
if `gh api repos/pingdotgg/t3code --jq .permissions.triage` prints `true`.
130+
- Otherwise, or if `gh` is not authenticated, build a prefilled
131+
https://github.com/pingdotgg/t3code/issues/new?template=via-triage.yml URL.
132+
The form applies the label whoever submits it. Add `title` plus one
133+
URL-encoded query parameter per form field id: `what-happened`, `diagnosis`,
134+
`steps`, `version`, `environment`, `evidence`, `related`, `workaround` and
135+
`agent`. Keep the full encoded URL below 6,000 characters by shortening any
136+
fields as needed. Give the user any omitted text to paste into the form before
137+
submitting. Print the URL, and open it in their browser only after they approve.
132138
- If the user pasted screenshots, remind them to drag the images into the issue
133139
after it is created; they cannot be attached from here.
134140

‎.github/workflows/mobile-eas-production.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ jobs:
215215
git config user.name "${APP_SLUG}[bot]"
216216
git config user.email "${user_id}+${APP_SLUG}[bot]@users.noreply.github.com"
217217
git add apps/mobile/app.config.ts
218-
git commit \
218+
git commit --no-verify \
219219
-m "chore(mobile): bump app version to $RELEASE_VERSION" \
220220
-m "Co-authored-by: codex <[email protected]>"
221221
git push origin "HEAD:refs/heads/${GITHUB_REF_NAME}"

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ jobs:
13881388
git config user.email "${{ steps.app_bot.outputs.email }}"
13891389
13901390
git add apps/server/package.json apps/desktop/package.json apps/web/package.json packages/contracts/package.json pnpm-lock.yaml
1391-
git commit -m "chore(release): prepare $RELEASE_TAG"
1391+
git commit --no-verify -m "chore(release): prepare $RELEASE_TAG"
13921392
git push origin HEAD:main
13931393
13941394
announce_discord:

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@t3tools/desktop",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"private": true,
55
"type": "module",
66
"main": "dist-electron/boot.cjs",

‎apps/desktop/resources/installer.nsh‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
!include "StrFunc.nsh"
2+
!ifdef BUILD_UNINSTALLER
3+
${UnStrRep}
4+
!define T3StrRep '${UnStrRep}'
5+
!else
6+
${StrRep}
7+
!define T3StrRep '${StrRep}'
8+
!endif
9+
10+
!macro customAppRunningMessages
11+
Push $0
12+
Push $1
13+
${If} $IsPowerShellAvailable == 0
14+
System::Call 'kernel32::SetEnvironmentVariable(t "T3CODE_INSTALL_DIR", t "$INSTDIR")'
15+
nsExec::ExecToStack `"$PowerShellPath" -NoProfile -NonInteractive -C "Get-CimInstance -ClassName Win32_Process | Where-Object { $$_.ExecutablePath -and [IO.Path]::GetDirectoryName($$_.ExecutablePath) -eq $$env:T3CODE_INSTALL_DIR } | ForEach-Object { [IO.Path]::GetFileNameWithoutExtension($$_.ExecutablePath) } | Where-Object { $$_ -in 'T3 Code (Alpha)', 'T3 Code (Beta)', 'T3 Code (Nightly)' } | Select-Object -First 1 | ForEach-Object { [Console]::Write($$_) }"`
16+
Pop $0
17+
Pop $1
18+
System::Call 'kernel32::SetEnvironmentVariable(t "T3CODE_INSTALL_DIR", p 0)'
19+
${If} $0 == 0
20+
${If} $1 == "T3 Code (Alpha)"
21+
${OrIf} $1 == "T3 Code (Beta)"
22+
${OrIf} $1 == "T3 Code (Nightly)"
23+
${T3StrRep} $appRunningMessage $appRunningMessage "${PRODUCT_NAME}" $1
24+
${T3StrRep} $appClosingMessage $appClosingMessage "${PRODUCT_NAME}" $1
25+
${T3StrRep} $appCannotBeClosedMessage $appCannotBeClosedMessage "${PRODUCT_NAME}" $1
26+
${EndIf}
27+
${EndIf}
28+
${EndIf}
29+
Pop $1
30+
Pop $0
31+
!macroend
32+
133
!macro customInstall
234
!ifndef DO_NOT_CREATE_START_MENU_SHORTCUT
335
${IfNot} ${FileExists} "$newStartMenuLink"

‎apps/desktop/src/app/DesktopEarlyElectronStartup.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ type EarlyLinuxElectronOptionsInput = EarlyDesktopSettingsInput;
2626

2727
export interface EarlyLinuxElectronOptions {
2828
readonly isDevelopment: boolean;
29-
readonly linuxWmClass: string;
3029
readonly linuxDesktopEntryName: string;
3130
readonly passwordStore: LinuxPasswordStoreSwitch | null;
3231
}
@@ -146,7 +145,6 @@ export function resolveEarlyLinuxElectronOptions(
146145
const isDevelopment = isDevelopmentEnvironment(input.env);
147146
return {
148147
isDevelopment,
149-
linuxWmClass: isDevelopment ? "t3code-dev" : "t3code",
150148
linuxDesktopEntryName: resolveLinuxDesktopEntryName(isDevelopment),
151149
passwordStore: resolveLinuxPasswordStoreSwitch({
152150
preference,

‎apps/desktop/src/app/DesktopEnvironment.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export class DesktopEnvironment extends Context.Service<
7575
readonly displayName: string;
7676
readonly appUserModelId: string;
7777
readonly linuxDesktopEntryName: string;
78-
readonly linuxWmClass: string;
7978
readonly linuxApplicationsDir: string;
8079
readonly desktopLauncherPath: Option.Option<string>;
8180
readonly appImagePath: Option.Option<string>;
@@ -232,7 +231,6 @@ const make = Effect.fn("desktop.environment.make")(function* (
232231
isDevelopment ? "com.t3tools.t3code.dev" : "com.t3tools.t3code",
233232
),
234233
linuxDesktopEntryName: resolveLinuxDesktopEntryName(isDevelopment),
235-
linuxWmClass: isDevelopment ? "t3code-dev" : "t3code",
236234
linuxApplicationsDir,
237235
desktopLauncherPath: config.desktopLauncherPath,
238236
appImagePath: config.appImagePath,

‎apps/desktop/src/app/DesktopLinuxUrlHandler.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const makeEnvironment = (path: Path.Path, overrides: Record<string, unknown> = {
3535
isDevelopment: false,
3636
displayName: "T3 Code (Alpha)",
3737
linuxDesktopEntryName: "com.t3tools.T3Code.desktop",
38-
linuxWmClass: "t3code",
3938
linuxApplicationsDir: "/home/alice/.local/share/applications",
4039
desktopLauncherPath: Option.none(),
4140
appImagePath: Option.some("/home/alice/Applications/T3-Code.AppImage"),

‎apps/desktop/src/app/DesktopPreReadyPlatform.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ export const make = Effect.gen(function* () {
121121
} catch {}
122122
// Chromium caches portal identity; set it before any asynchronous initialization.
123123
Electron.app.setDesktopName(linux.linuxDesktopEntryName);
124-
Electron.app.commandLine.appendSwitch("class", linux.linuxWmClass);
125124
if (linux.passwordStore !== null && linuxPasswordStoreCommandLine === null) {
126125
Electron.app.commandLine.appendSwitch("password-store", linux.passwordStore);
127126
}

‎apps/desktop/src/backend/DesktopBackendManager.test.ts‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,4 +631,42 @@ describe("DesktopBackendManager", () => {
631631
}).pipe(Effect.provide(TestClock.layer())),
632632
),
633633
);
634+
635+
it.effect("waits out a slow startup and reports one that never becomes ready", () =>
636+
Effect.scoped(
637+
Effect.gen(function* () {
638+
const reports = yield* Queue.unbounded<DesktopBackendManager.BackendStartupFailure>();
639+
const startInstance = (status: Ref.Ref<number>, onReady?: Effect.Effect<void>) =>
640+
makeTestInstance({
641+
spawnerLayer: Layer.succeed(
642+
ChildProcessSpawner.ChildProcessSpawner,
643+
ChildProcessSpawner.make(() =>
644+
Effect.succeed(makeProcess({ exitCode: Effect.never })),
645+
),
646+
),
647+
httpClientLayer: layerHttpClient((request) =>
648+
Ref.get(status).pipe(Effect.map((code) => responseForRequest(request, code))),
649+
),
650+
onStartupFailure: (failure) => Queue.offer(reports, failure).pipe(Effect.asVoid),
651+
...(onReady ? { onReady } : {}),
652+
}).pipe(Effect.tap((instance) => instance.start));
653+
654+
const slowStatus = yield* Ref.make(503);
655+
const ready = yield* Deferred.make<void>();
656+
yield* startInstance(slowStatus, Deferred.succeed(ready, undefined).pipe(Effect.asVoid));
657+
yield* TestClock.adjust(Duration.seconds(66));
658+
yield* Ref.set(slowStatus, 200);
659+
yield* TestClock.adjust(Duration.millis(100));
660+
yield* Deferred.await(ready);
661+
assert.isTrue(Option.isNone(yield* Queue.poll(reports)));
662+
663+
yield* startInstance(yield* Ref.make(503));
664+
yield* TestClock.adjust(Duration.seconds(179));
665+
assert.isTrue(Option.isNone(yield* Queue.poll(reports)));
666+
yield* TestClock.adjust(Duration.seconds(1));
667+
const failure = yield* Queue.take(reports);
668+
assert.equal(failure.reason, "The server started but did not become ready in time.");
669+
}).pipe(Effect.provide(TestClock.layer())),
670+
),
671+
);
634672
});

0 commit comments

Comments
 (0)