forked from pingdotgg/t3code
-
Notifications
You must be signed in to change notification settings - Fork 3
sync: port upstream web UI polish, prompt stash, appearance settings (#2109–#5004) #193
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.
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
abd89bc
feat(web): prompt stash — cmd+S saves the composer to a per-provider …
t3dotgg e6d3e45
feat: allow new thread creation through project breadcrumbs (#4638)
0x4bs3nt 81d8fac
fix(web): scope PR state to the thread branch (#4460)
juliusmarminge 53cf8d8
Fix live sidebar resize limits and defer Alchemy runtime context (#4655)
juliusmarminge 0632881
fix(web): constrain branch toolbar context (#4657)
maxktz c2d3885
fix: close actions dropdown when editing (#4660)
0x4bs3nt a45c58f
Prevent draft thread detail polling before shell registration (#4670)
juliusmarminge 209fc7c
feat(diff-panel): show total line additions and deletions (#4674)
0x4bs3nt b3a7104
Clear provider update actions while updating (#4676)
juliusmarminge 3ce7344
Fix sidebar highlighting for draft threads (#4679)
juliusmarminge aff6758
Use glass surfaces for web toasts (#4681)
juliusmarminge e092685
Show origin ref in branch trigger label (#4680)
juliusmarminge 5aa2672
feat: default sidebar v2 on for nightly and dev builds (#4491)
t3dotgg 6144d09
fix(web): 33 web UI fixes (#4700)
maxktz 6c3fcd8
feat(web): add maria's sidebar header artwork toggle (#4652)
maxktz 587459f
feat(web): add appearance settings category (#4715)
maxktz a7ce492
fix(desktop): allow updater-controlled relaunch (#4721)
0x4bs3nt b84fd28
fix(web): prevent diff panel scroll jumping (#4724)
0x4bs3nt 6c03ce8
Link inline code file paths in chat markdown (#4726)
juliusmarminge 3ae87bc
Prevent sidebar row labels from truncating (#4789)
juliusmarminge f9a5fda
fix(web): stashed prompts now survive switching providers (#4787)
t3dotgg 03a0753
fix(web): defer command palette filesystem navigation (#2109)
juliusmarminge 530dc1e
Remove Connect waitlist and add GA announcement tooling (#4691)
juliusmarminge 8fd8430
fix(desktop): restore T3 Connect sign-in (#4809)
PixPMusic 43f98d5
Simplify files panel header (#4828)
juliusmarminge e72c81e
Preserve the thread shell while detail loads (#4830)
juliusmarminge f0af22c
fix(web): remember the rendered-markdown choice across threads (#4853)
Sy-D 3e18a1b
fix(web): restore sidebar v2 thread actions and terminal icon (#4712)
Noojuno 12ec52c
fix(web): settle button now works on hover, not just right-click (#4905)
t3dotgg 945d98a
fix(composer): hide default Codex service tier (#4784)
maxktz 58f4f10
fix(web): align remote server update action (#4731)
StiensWout 26f954f
fix(web): show Codex fast mode as a bolt (#4947)
t3dotgg e269ec3
fix(web): keep worktree default when switching a draft's machine (#4964)
t3dotgg 625bc2a
feat(web): pasting a huge screenshot now compresses it instead of err…
t3dotgg fe91fe1
fix(web): fill fast mode icon (#5004)
maria-rcks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| import { assert, describe, it } from "@effect/vitest"; | ||
| import * as Effect from "effect/Effect"; | ||
| import * as Layer from "effect/Layer"; | ||
| import * as Ref from "effect/Ref"; | ||
|
|
||
| import type * as Electron from "electron"; | ||
|
|
||
| import * as ElectronApp from "../electron/ElectronApp.ts"; | ||
| import * as ElectronTheme from "../electron/ElectronTheme.ts"; | ||
| import * as DesktopEnvironment from "./DesktopEnvironment.ts"; | ||
| import * as DesktopLifecycle from "./DesktopLifecycle.ts"; | ||
| import * as DesktopShutdown from "./DesktopShutdown.ts"; | ||
| import * as DesktopState from "./DesktopState.ts"; | ||
| import * as DesktopWindow from "../window/DesktopWindow.ts"; | ||
|
|
||
| describe("DesktopLifecycle", () => { | ||
| for (const platform of ["darwin", "win32", "linux"] satisfies ReadonlyArray<NodeJS.Platform>) { | ||
| it.effect(`lets the updater's quit event proceed on ${platform}`, () => { | ||
| const appListeners = new Map<string, (...args: readonly unknown[]) => void>(); | ||
|
|
||
| const electronAppLayer = Layer.succeed(ElectronApp.ElectronApp, { | ||
| metadata: Effect.die("unexpected metadata read"), | ||
| name: Effect.succeed("T3 Code"), | ||
| whenReady: Effect.void, | ||
| quit: Effect.void, | ||
| exit: () => Effect.void, | ||
| relaunch: () => Effect.void, | ||
| setPath: () => Effect.void, | ||
| setName: () => Effect.void, | ||
| setAboutPanelOptions: () => Effect.void, | ||
| setAppUserModelId: () => Effect.void, | ||
| requestSingleInstanceLock: Effect.succeed(true), | ||
| isDefaultProtocolClient: () => Effect.succeed(false), | ||
| setAsDefaultProtocolClient: () => Effect.succeed(true), | ||
| setDesktopName: () => Effect.void, | ||
| setDockIcon: () => Effect.void, | ||
| appendCommandLineSwitch: () => Effect.void, | ||
| onBeforeQuitForUpdate: (listener) => | ||
| Effect.acquireRelease( | ||
| Effect.sync(() => { | ||
| appListeners.set("before-quit-for-update", listener); | ||
| }), | ||
| () => | ||
| Effect.sync(() => { | ||
| appListeners.delete("before-quit-for-update"); | ||
| }), | ||
| ).pipe(Effect.asVoid), | ||
| on: (eventName, listener) => | ||
| Effect.acquireRelease( | ||
| Effect.sync(() => { | ||
| appListeners.set( | ||
| eventName, | ||
| listener as unknown as (...args: readonly unknown[]) => void, | ||
| ); | ||
| }), | ||
| () => | ||
| Effect.sync(() => { | ||
| appListeners.delete(eventName); | ||
| }), | ||
| ).pipe(Effect.asVoid), | ||
| } satisfies ElectronApp.ElectronApp["Service"]); | ||
|
|
||
| const electronThemeLayer = Layer.succeed(ElectronTheme.ElectronTheme, { | ||
| shouldUseDarkColors: Effect.succeed(false), | ||
| setSource: () => Effect.void, | ||
| onUpdated: () => Effect.void, | ||
| }); | ||
|
|
||
| const desktopWindowLayer = Layer.succeed(DesktopWindow.DesktopWindow, { | ||
| createMain: Effect.die("unexpected window creation"), | ||
| ensureMain: Effect.die("unexpected window creation"), | ||
| revealOrCreateMain: Effect.die("unexpected window creation"), | ||
| activate: Effect.void, | ||
| createMainIfBackendReady: Effect.void, | ||
| showConnectingSplash: Effect.void, | ||
| handleBackendReady: () => Effect.void, | ||
| handleBackendNotReady: Effect.void, | ||
| flushMainWindowBounds: Effect.void, | ||
| dispatchMenuAction: () => Effect.void, | ||
| syncAppearance: Effect.void, | ||
| }); | ||
|
|
||
| const environmentLayer = Layer.succeed(DesktopEnvironment.DesktopEnvironment, { | ||
| platform, | ||
| isDevelopment: false, | ||
| } as DesktopEnvironment.DesktopEnvironment["Service"]); | ||
|
|
||
| const layer = DesktopLifecycle.layer.pipe( | ||
| Layer.provideMerge(electronAppLayer), | ||
| Layer.provideMerge(electronThemeLayer), | ||
| Layer.provideMerge(desktopWindowLayer), | ||
| Layer.provideMerge(environmentLayer), | ||
| Layer.provideMerge(DesktopShutdown.layer), | ||
| Layer.provideMerge(DesktopState.layer), | ||
| ); | ||
|
|
||
| return Effect.scoped( | ||
| Effect.gen(function* () { | ||
| const lifecycle = yield* DesktopLifecycle.DesktopLifecycle; | ||
| yield* lifecycle.register; | ||
|
|
||
| appListeners.get("before-quit-for-update")?.(); | ||
|
|
||
| let prevented = false; | ||
| const event = { | ||
| preventDefault: () => { | ||
| prevented = true; | ||
| }, | ||
| } as Electron.Event; | ||
| appListeners.get("before-quit")?.(event); | ||
|
|
||
| assert.isFalse( | ||
| prevented, | ||
| "cancelling this event prevents the updater from completing its relaunch", | ||
| ); | ||
|
|
||
| const state = yield* DesktopState.DesktopState; | ||
| assert.isTrue(yield* Ref.get(state.quitting)); | ||
| }), | ||
| ).pipe(Effect.provide(layer)); | ||
| }); | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
before-quit-for-updatesets this flag, the followingbefore-quitevent takeshandleBeforeQuit's early-return path and never callsrequestDesktopShutdownAndWait.DesktopAppis still blocked onshutdown.awaitRequest, so its backend-pool finalizer—the path that sends each backend its graceful stop—cannot run before Electron exits; installing an update can therefore hard-kill local/WSL backends and skip their persistence cleanup. Coordinate shutdown before invokingquitAndInstallrather than bypassing it.AGENTS.md reference: AGENTS.md:L25-L25
Useful? React with 👍 / 👎.