This repository was archived by the owner on Oct 10, 2026. It is now read-only.
Repository navigation
Integrate 8 upstream commits (security, Claude git text gen, UI fixes) #35
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d644795
docs: properly linked CLAUDE.md to AGENTS.md (#1328)
jakob1379 f0e57b3
Add copy action to error toast messages (#1416)
juliusmarminge 24b3b5c
fix(desktop): prevent git actions and terminal toggle from overlappin…
78i87 2ad3405
fix(web): clear composer border after picker dismissal (#1382)
AbdulelahHajjar ad908bc
fix(web): add pointer cursor to composer send button (#1415)
BeckWangthumboon 0cb0433
fix(security): send sensitive config over a bootstrap fd (#1398)
juliusmarminge 273bb8d
fix(web): prevent provider model submenu overlap (#1403)
aaditagrawal 8caad87
feat(git): Add Claude as a TextGenerationProvider (#1323)
keyzou 9597c26
fix: address CodeRabbit review findings
aaditagrawal 6b03780
fix: strip T3CODE_BOOTSTRAP_FD unconditionally in dev-runner
aaditagrawal 77a7335
style: format GitManager.ts with oxfmt
aaditagrawal 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| AGENTS.md | ||
| AGENTS.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| import * as NFS from "node:fs"; | ||
| import * as path from "node:path"; | ||
| import { execFileSync, spawn } from "node:child_process"; | ||
| import * as NodeServices from "@effect/platform-node/NodeServices"; | ||
| import { assert, it } from "@effect/vitest"; | ||
| import { FileSystem, Schema } from "effect"; | ||
| import * as Duration from "effect/Duration"; | ||
| import * as Effect from "effect/Effect"; | ||
| import * as Fiber from "effect/Fiber"; | ||
| import { TestClock } from "effect/testing"; | ||
|
|
||
| import { readBootstrapEnvelope, resolveFdPath } from "./bootstrap"; | ||
| import { assertNone, assertSome } from "@effect/vitest/utils"; | ||
|
|
||
| const TestEnvelopeSchema = Schema.Struct({ mode: Schema.String }); | ||
|
|
||
| it.layer(NodeServices.layer)("readBootstrapEnvelope", (it) => { | ||
| it.effect("uses platform-specific fd paths", () => | ||
| Effect.sync(() => { | ||
| assert.equal(resolveFdPath(3, "linux"), "/proc/self/fd/3"); | ||
| assert.equal(resolveFdPath(3, "darwin"), "/dev/fd/3"); | ||
| assert.equal(resolveFdPath(3, "win32"), undefined); | ||
| }), | ||
| ); | ||
|
|
||
| it.effect("reads a bootstrap envelope from a provided fd", () => | ||
| Effect.gen(function* () { | ||
| const fs = yield* FileSystem.FileSystem; | ||
| const filePath = yield* fs.makeTempFileScoped({ prefix: "t3-bootstrap-", suffix: ".ndjson" }); | ||
|
|
||
| yield* fs.writeFileString( | ||
| filePath, | ||
| `${yield* Schema.encodeEffect(Schema.fromJsonString(TestEnvelopeSchema))({ | ||
| mode: "desktop", | ||
| })}\n`, | ||
| ); | ||
|
|
||
| const fd = yield* Effect.acquireRelease( | ||
| Effect.sync(() => NFS.openSync(filePath, "r")), | ||
| (fd) => Effect.sync(() => NFS.closeSync(fd)), | ||
| ); | ||
|
|
||
| const payload = yield* readBootstrapEnvelope(TestEnvelopeSchema, fd, { timeoutMs: 100 }); | ||
| assertSome(payload, { | ||
| mode: "desktop", | ||
| }); | ||
| }), | ||
| ); | ||
|
|
||
| it.effect("returns none when the fd is unavailable", () => | ||
| Effect.gen(function* () { | ||
| const fd = NFS.openSync("/dev/null", "r"); | ||
| NFS.closeSync(fd); | ||
|
|
||
| const payload = yield* readBootstrapEnvelope(TestEnvelopeSchema, fd, { timeoutMs: 100 }); | ||
| assertNone(payload); | ||
| }), | ||
| ); | ||
|
|
||
| it.effect("returns none when the bootstrap read times out before any value arrives", () => | ||
| Effect.gen(function* () { | ||
| const fs = yield* FileSystem.FileSystem; | ||
| const tempDir = yield* fs.makeTempDirectoryScoped({ prefix: "t3-bootstrap-" }); | ||
| const fifoPath = path.join(tempDir, "bootstrap.pipe"); | ||
|
|
||
| yield* Effect.sync(() => execFileSync("mkfifo", [fifoPath])); | ||
|
|
||
| const _writer = yield* Effect.acquireRelease( | ||
| Effect.sync(() => | ||
| spawn("sh", ["-c", 'exec 3>"$1"; sleep 60', "sh", fifoPath], { | ||
| stdio: ["ignore", "ignore", "ignore"], | ||
| }), | ||
| ), | ||
| (writer) => | ||
| Effect.sync(() => { | ||
| writer.kill("SIGKILL"); | ||
| }), | ||
| ); | ||
|
|
||
| const fd = yield* Effect.acquireRelease( | ||
| Effect.sync(() => NFS.openSync(fifoPath, "r")), | ||
| (fd) => Effect.sync(() => NFS.closeSync(fd)), | ||
| ); | ||
|
|
||
| const fiber = yield* readBootstrapEnvelope(TestEnvelopeSchema, fd, { | ||
| timeoutMs: 100, | ||
| }).pipe(Effect.forkScoped); | ||
|
|
||
| yield* Effect.yieldNow; | ||
| yield* TestClock.adjust(Duration.millis(100)); | ||
|
|
||
| const payload = yield* Fiber.join(fiber); | ||
| assertNone(payload); | ||
| }).pipe(Effect.provide(TestClock.layer())), | ||
| ); | ||
|
Comment on lines
+50
to
+95
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guard these fd tests on Windows. These cases use 🤖 Prompt for AI Agents |
||
| }); | ||
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.
Uh oh!
There was an error while loading. Please reload this page.