Repository navigation
Conversation
mneuhaus
force-pushed
the
marc/desktop-flavor
branch
2 times, most recently
from
October 1, 2026 10:27
fb741f4 to
eb0600f
Compare
mneuhaus
force-pushed
the
marc/desktop-flavor
branch
from
October 1, 2026 10:41
eb0600f to
cc37439
Compare
mneuhaus
force-pushed
the
marc/desktop-flavor
branch
from
October 2, 2026 21:29
cc37439 to
300a6a5
Compare
Thread transfer impact
This comment will update automatically after the next completed run. |
A local desktop build had the release identity: same bundle id, same product name and the release update feed, so the next update replaced the build again, and nothing told the two apps apart. T3CODE_DESKTOP_FLAVOR=<id> gives a build its own bundle identity: bundle id com.t3tools.t3code.<id>, product name "T3 Code (<Id>)", the dev artwork, and no update feed, so it stays the build it is. The flavor is recorded in the packaged package.json and read synchronously at startup (an async read lets Electron emit ready before Clerk registers its schemes). It only changes the branding: window title "T3 Code (<Id>)" with the Dev stage art. Data, Electron profile and keychain entry stay the release install's, so the build sees the same threads, settings and secrets. On macOS neither the release app (no single-instance lock) nor the server guards that shared data directory. A flavored app therefore refuses to start, before ready, while another live server owns it (server-runtime.json), and says which process to quit.
mneuhaus
force-pushed
the
marc/desktop-flavor
branch
from
October 7, 2026 10:56
300a6a5 to
735f005
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A local desktop build had the release identity: the same bundle id, product name and update feed. The next release update replaced the build, and nothing told the two apps apart.
What changed
T3CODE_DESKTOP_FLAVOR=<id>(for examplemarc) builds a personal app that takes the release app's place on one machine and keeps working on the same data.Build (
scripts/build-desktop-artifact.ts):com.t3tools.t3code.<id>and the product nameT3 Code (<Id>).publishconfig, so no update feed: the build stays the build it is.package.jsonast3codeDesktopFlavor.t3code,t3code-dev), because the build replaces the release app.Runtime (
apps/desktop):DesktopFlavor.readPackagedDesktopFlavorreads the flavor synchronously at startup, packaged builds only. An async read yields and lets Electron emitreadybefore the Clerk bridge registers its privileged schemes; that crashed the first build. A malformed field throws.T3 Code (<Id>)with the Dev stage art.~/.t3), the Electron profile and the keychain entryt3code Safe Storagestay the release install's. The keychain entry is named after the package, which does not change. So the build sees the same threads, settings and encrypted secrets.@clerk/electronskips it on darwin), and the server does not lock its state directory. Two apps on the same data would run two servers on one database.server-runtime.jsonviaDesktopFlavor.findLiveServerOwner. If a live process other than itself owns the state directory, the app shows an error naming that process and quits.DesktopFlavor.layerSharedDataGuard.main.tsprovides it to the Clerk layer chain beforeDesktopClerk.layer, so it runs synchronously before Clerk setsuserDataand before anything yields. Chromium never opens the shared profile.Without the env var, nothing changes.
Known limits
Validation
DesktopFlavor.test.ts:DesktopEnvironment.test.ts: the flavored environment has the release's data dirs and Electron profile; only the branding differs.build-desktop-artifact.test.ts:vp test runon these files: all green exceptskips the primary native probe for cross-architecture Windows payloads. That test fails the same way on unmodifiedmarc/mainon this Mac.tsc --noEmitis clean inapps/desktopandscripts. Lint and format are clean.T3CODE_DESKTOP_FLAVOR=marc, together with feat(projects): find folders with fuzzy path queries #1 to feat(clients): add an "In 1 month" snooze preset #3):com.t3tools.t3code.marc, noapp-update.yml;~/.t3/userdata;T3CODE_HOME= temp dir with a live owner pid), the app logged the refusal, showed the dialog, created no database and opened no server port.Model: Claude Opus 5.5 in Claude Code (via T3 Code).
Rebased onto the new orchestrator (2026-10-02)
Rebased onto upstream
main8bc40b4, which includes pingdotgg#2829. It applied cleanly. Upstream moved the Electron profile choice intoDesktopUserData(profilet3code-v2) and removeduserDataDirName, so the shared-data test now compares data dirs and app-data directory only; the flavor never reaches the profile choice. A sandbox start of the rebuilt app (0.0.45, emptyT3CODE_HOME, mock keychain) brought up the V2 server withstatev2.sqliteand served the UI.Rebased onto main cd41c4a (2026-10-07), guard moved
Rebased onto upstream
maincd41c4a. A review of the rebase found a bug in the original commit, not caused by the rebase. The shared-data check ran insideDesktopApp.startup, after the async login-shell probe and the settings load. Electron emitsreadyas soon as startup yields, so the check ran afterreadyand afterDesktopClerkhad set the shareduserData. It still stopped the second backend, but not Chromium opening the shared profile.DesktopFlavor.layerSharedDataGuardand is provided inmain.tsright beforeDesktopClerk.layer.DesktopApp.tsis back to upstream; the PR no longer touches it.DesktopFlavor.test.tscases: live owner (error box, quit, interrupt), missing runtime file, release build never stopped.apps/desktop: 1402 tests pass, typecheck, lint and format are clean.HOME/CFFIXED_USER_HOME/T3CODE_HOMEand--use-mock-keychain:app ready, backend ready on the configured port,/.well-known/t3/environmentreports protocol 2, the window loads. NoregisterSchemesAsPrivilegederror.server-runtime.jsonnames a live foreign pid: the only log line is the refusal, the dialog "T3 Code (Marc) cannot start" names the process, no database, no Electron profile, no helper processes, no open port.🤖 Generated with Claude Code