Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
eea4cd5
feat(chat): collapse Claude insight asides by default
LaMarCab76 Oct 21, 2026
5ad0e23
feat(web): show thread and subagent tasks and usage
LaMarCab76 Nov 13, 2026
a2243df
fix(web): correct native tasks and bound thread usage reads
LaMarCab76 Nov 13, 2026
125463f
fix(server): preserve insights when descendant turn reads fail
LaMarCab76 Nov 13, 2026
32028cf
Merge pull request #1: thread and subagent tasks and usage
LaMarCab76 Nov 14, 2026
d12d9fb
Merge remote-tracking branch 'upstream/main'
LaMarCab76 Nov 14, 2026
1b05265
ci(fork): sync upstream and build desktop installers
LaMarCab76 Nov 14, 2026
9920fd0
feat(threads): optionally snooze a thread until its next scheduled ta…
LaMarCab76 Nov 14, 2026
0efc73d
Merge remote-tracking branch 'origin/feat/snooze-until-scheduled-task'
LaMarCab76 Nov 14, 2026
ee83442
ci(fork): build personal releases as T3 Code L with the nightly logo
LaMarCab76 Nov 14, 2026
a483280
chore(fork): merge upstream main preserving fork features
LaMarCab76 Nov 15, 2026
b24b638
fix(fork): publish increasing versions with updater-compatible tags
LaMarCab76 Nov 15, 2026
75aa7e8
fix(fork): include update feed in local installer builds
LaMarCab76 Nov 15, 2026
816feef
Merge remote-tracking branch 'upstream/main'
LaMarCab76 Nov 15, 2026
c016bd7
feat(web): command progress, thread details in the sidebar, and wallp…
LaMarCab76 Nov 16, 2026
77185bc
fix(web): address review on command progress, sidebar details, and wa…
LaMarCab76 Nov 16, 2026
474039f
Merge pull request #2: command progress, thread details in the sideba…
LaMarCab76 Nov 16, 2026
41a04c5
fix(web): overlay thread insights menu on lineage rows
LaMarCab76 Nov 16, 2026
0341184
fix(web): keep thread details on the right of the chat
LaMarCab76 Nov 16, 2026
1ea2ec2
Merge remote-tracking branch 'origin/main' into chat-menu-position
LaMarCab76 Nov 16, 2026
14533bb
fix(fork): address review findings before integration
LaMarCab76 Nov 16, 2026
7e4c0ac
fix(desktop): align mock update feed channels
LaMarCab76 Nov 16, 2026
cbe7caa
Merge pull request #3 from LaMarCab76/chat-menu-position
LaMarCab76 Nov 16, 2026
a67a251
fix(server): snooze threads after task runs schedule follow-ups
LaMarCab76 Nov 16, 2026
a34bb53
ci(fork): block merges with unresolved CodeRabbit threads
LaMarCab76 Nov 16, 2026
f4e6d79
Merge remote-tracking branch 'upstream/main'
LaMarCab76 Nov 16, 2026
222aefd
feat(web): show estimated cost in thread details
LaMarCab76 Nov 17, 2026
b8d8b0a
chore: merge main into feature/thread-details-cost
LaMarCab76 Nov 17, 2026
238af9b
chore: sync latest main before publishing thread cost
LaMarCab76 Nov 17, 2026
8023ae7
chore: merge latest main into thread cost branch
LaMarCab76 Nov 17, 2026
a07f917
chore(fork): sync upstream main
LaMarCab76 Nov 17, 2026
8c850f5
chore: merge main into task follow-up snooze
maria-rcks Nov 18, 2026
ee28843
fix: address task snooze takeover review findings
maria-rcks Nov 18, 2026
12e1499
chore: merge current main into task follow-up snooze
maria-rcks Nov 18, 2026
c78e05d
fix(server): snooze threads between scheduled runs
LaMarCab76 Nov 18, 2026
e15676d
fix(server): keep pending link cards awake before task snooze
maria-rcks Nov 18, 2026
968d0ef
chore(fork): sync upstream main
LaMarCab76 Nov 18, 2026
1997e92
chore(fork): refresh upstream main
LaMarCab76 Nov 18, 2026
9be5863
fix(server): isolate scheduled snooze dispatch waits
LaMarCab76 Nov 18, 2026
203b5ea
fix(server): isolate snooze evaluation by thread
LaMarCab76 Nov 18, 2026
f754b5e
fix(server): revalidate scheduled snooze at write time
LaMarCab76 Nov 18, 2026
456db54
chore(fork): refresh upstream main
LaMarCab76 Nov 18, 2026
5f0554d
fix(server): preserve snooze through schedule and settings races
LaMarCab76 Nov 18, 2026
4e088b9
chore(fork): refresh upstream main
LaMarCab76 Nov 18, 2026
7a7e9ca
fix(server): retry snooze when the candidate schedule disappears
LaMarCab76 Nov 18, 2026
dff91e7
fix(server): recheck snooze eligibility in the writer
LaMarCab76 Nov 18, 2026
1b01dd7
fix(server): type the exhausted snooze outcome
LaMarCab76 Nov 18, 2026
18a5c0f
fix(server): revalidate replacement snooze deadlines
LaMarCab76 Nov 18, 2026
337b651
fix(server): validate scheduled snooze deadlines at commit
LaMarCab76 Nov 18, 2026
b3cb15f
fix(server): wait for schedule updates before snoozing
LaMarCab76 Nov 18, 2026
4044639
fix(server): recheck snooze when scheduled tasks change
LaMarCab76 Nov 18, 2026
9481ec7
fix(server): resume expired snoozes and retire superseded waits
LaMarCab76 Nov 18, 2026
76ccb00
Merge pull request #4 from LaMarCab76/fix/scheduled-task-repeat-snooze
LaMarCab76 Nov 18, 2026
ddb9f19
chore(fork): sync upstream main
LaMarCab76 Nov 18, 2026
0a785d4
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 19, 2026
00c4f6d
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 20, 2026
febabaf
fix(usage): show Antigravity quotas by model when available
LaMarCab76 Nov 21, 2026
1ab1a13
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 21, 2026
5b0e566
feat(chat): make each Claude insight collapsible
LaMarCab76 Nov 22, 2026
72527a0
chore: reconcile the Claude insights branch with current main
LaMarCab76 Nov 22, 2026
7088555
fix(mobile): enlarge Claude insight touch targets
LaMarCab76 Nov 22, 2026
b7a79cd
chore(fork): sync upstream main
LaMarCab76 Nov 22, 2026
01c6cc7
merge(fork): integrate collapsible Claude insights
LaMarCab76 Nov 22, 2026
b48c80f
fix(server): preserve pending task actions and recorded command progress
LaMarCab76 Nov 22, 2026
07ec548
fix(web): localize task and usage details
LaMarCab76 Nov 22, 2026
a623925
fix(markdown): keep one insight line-break detector
LaMarCab76 Nov 22, 2026
88ff29c
fix(web): recognize completed Claude insights in Words
LaMarCab76 Nov 22, 2026
9077e74
chore(fork): sync upstream through 76b421864b
LaMarCab76 Nov 22, 2026
e4b3b5d
chore(fork): sync upstream through bcace0787e
LaMarCab76 Nov 22, 2026
c71645a
chore(fork): sync upstream through bc13afaa3c
LaMarCab76 Nov 22, 2026
362eada
chore(fork): finish upstream sync and integrate fork features
LaMarCab76 Nov 22, 2026
9c9ff33
fix(server): refresh branch lists when Git metadata changes
LaMarCab76 Nov 22, 2026
b91cdca
fix: preserve provider background work and resume state
LaMarCab76 Nov 22, 2026
49d7cd3
fix: address fork integration review for checkout and providers
LaMarCab76 Nov 22, 2026
90ca355
fix: address fork feedback and insights review
LaMarCab76 Nov 22, 2026
2f98a49
fix(vcs): preserve staged changes and refresh Git refs
LaMarCab76 Nov 22, 2026
fb230e3
fix(server): adopt worktrees created by checkout hooks
LaMarCab76 Nov 22, 2026
cca72c6
fix(web): preserve fallback browser history during migration
LaMarCab76 Nov 22, 2026
c4e4379
fix(server): keep worktree adoption compatible across the integration…
LaMarCab76 Nov 22, 2026
1edb2d2
fix(vcs): stage full-worktree commits once when the index is clean
LaMarCab76 Nov 22, 2026
5365668
fix(server): protect restored handoffs after a rejected finalization
LaMarCab76 Nov 22, 2026
5c37990
test(server): verify Claude loss retries keep the original session
LaMarCab76 Nov 22, 2026
cc7e05a
fix: finish insights translations and cover linked session reload
LaMarCab76 Nov 22, 2026
443d7d9
fix: keep Git and composer state current across async work
LaMarCab76 Nov 22, 2026
ab507c5
fix: preserve checkout and composer state through handoffs
LaMarCab76 Nov 22, 2026
2dcf25e
fix(ci): use supported triggers for the CodeRabbit gate
LaMarCab76 Nov 22, 2026
9519dc2
fix(workspace): adopt worktrees with relative Git registrations
LaMarCab76 Nov 22, 2026
c131642
test(web): refresh cached test keybindings before using the right-pan…
LaMarCab76 Nov 22, 2026
46ad09f
fix: preserve provider handoffs and recoverable operations
LaMarCab76 Nov 22, 2026
41ff5a8
fix(server): use the sent prompt to account for stopped tasks
LaMarCab76 Nov 22, 2026
686bd7a
fix: recover feedback reports and preserve live client state
LaMarCab76 Nov 22, 2026
620120d
fix(web): replay unsaved browser history changes after storage recovers
LaMarCab76 Nov 22, 2026
2122f93
fix(web): preserve browser history removals across storage recovery
LaMarCab76 Nov 22, 2026
25f9302
fix: address checkout, Markdown, and provider review findings
LaMarCab76 Nov 22, 2026
7081504
fix(workspace): reject blocked repository worktree destinations
LaMarCab76 Nov 22, 2026
5bc2290
merge: sync reviewed stage two fixes into stage three
LaMarCab76 Nov 22, 2026
947cc80
fix(git): preserve the inferred private pull request base on retry
LaMarCab76 Nov 22, 2026
39ba5f1
fix(opencode): reconcile accepted commands after status probe failures
LaMarCab76 Nov 22, 2026
3485739
merge: sync stage three and reconcile insight rendering
LaMarCab76 Nov 22, 2026
280a391
fix: address checkout, composer, and provider review findings
LaMarCab76 Nov 22, 2026
f923633
fix(web): reconcile unsaved history and guard detached sends
LaMarCab76 Nov 22, 2026
cc88654
fix(ci): run the required thread gate on integration pushes
LaMarCab76 Nov 22, 2026
d3797ff
fix: preserve checkpoint ordering and legacy thread synchronization
LaMarCab76 Nov 23, 2026
81af658
fix(git): preserve unrelated staging during selected commits
LaMarCab76 Nov 23, 2026
d5c9794
fix(cursor): avoid replaying restored handoff context twice
LaMarCab76 Nov 23, 2026
5e9bcf0
fix: address first integration review regressions
LaMarCab76 Nov 23, 2026
b50d4f5
fix(codex): refuse work after the app-server retires
LaMarCab76 Nov 24, 2026
8e36d47
Merge pull request #6 from LaMarCab76/integration/fork-main-20261122-1
LaMarCab76 Nov 24, 2026
f1f8961
fix(git): pin private PR worktree pushes to the companion
LaMarCab76 Nov 24, 2026
4cebeb9
Merge pull request #7 from LaMarCab76/integration/fork-main-20261122-2
LaMarCab76 Nov 24, 2026
12ffbc2
Merge pull request #8 from LaMarCab76/integration/fork-main-20261122-3
LaMarCab76 Nov 24, 2026
cf0aefb
merge: synchronize fork main into the final integration stage
LaMarCab76 Nov 24, 2026
b294b21
test(git): await lane startup before releasing processes
LaMarCab76 Nov 24, 2026
567166d
Merge pull request #9 from LaMarCab76/integration/fork-main-20261122-4
LaMarCab76 Nov 24, 2026
96b6b00
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 24, 2026
fbb2b1f
fix(server): preserve feedback when resuming a provider turn [skip ci]
LaMarCab76 Nov 24, 2026
96b2abe
fix(antigravity): preserve fork MCP approvals [skip ci]
LaMarCab76 Nov 24, 2026
ed2d9ea
fix(git): strip Git line endings from upstream refs [skip ci]
LaMarCab76 Nov 24, 2026
186fe92
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 25, 2026
6229cfd
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 25, 2026
44d4ba0
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 25, 2026
875ae5d
feat(fork): merge and delete the source branch [skip ci]
LaMarCab76 Nov 25, 2026
022a8b0
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 26, 2026
0278ccc
feat(threads): show command and task progress in thread lists
LaMarCab76 Nov 26, 2026
603ddb6
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 27, 2026
a03d47d
style(mobile): format the command progress label [skip ci]
LaMarCab76 Nov 27, 2026
07dca19
feat(usage): persist analytics and subscription reports
LaMarCab76 Nov 27, 2026
0cb6ba9
chore(fork): integrate scheduled snooze branch [skip ci]
LaMarCab76 Nov 27, 2026
08fbf64
fix(usage): handle failed payment saves in both clients [skip ci]
LaMarCab76 Nov 27, 2026
a7c67c7
feat(composer): edit prompts in full screen [skip ci]
LaMarCab76 Nov 28, 2026
2d7e69c
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 28, 2026
433a49c
feat(usage): reorganize reports and show weekly limits [skip ci]
LaMarCab76 Nov 28, 2026
6a935ba
chore(fork): sync upstream main [skip ci]
LaMarCab76 Nov 29, 2026
4222540
fix(mobile,web): fill weekly usage charts between readings
LaMarCab76 Nov 29, 2026
a6e447c
chore: merge upstream main into weekly usage chart branch
LaMarCab76 Nov 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .github/fork/brand-l.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Personal fork branding: "T3 Code L" with the nightly logo, sharing the official app's data
// (~/.t3 and the t3code-v2 Chromium profile). Run from the repo root on a throwaway checkout
// before `scripts/build-desktop-artifact.ts`; it rewrites tracked files and must not be committed.
import * as NodeFS from "node:fs";

const NAME = "T3 Code L";
const APP_ID = "com.lamarcab76.t3code.l";

function replaceOnce(path, from, to) {
const text = NodeFS.readFileSync(path, "utf8");
if (text.split(from).length !== 2) throw new Error(`${path}: expected exactly one "${from}"`);
NodeFS.writeFileSync(path, text.replace(from, to));
}

replaceOnce(
"apps/desktop/src/app/DesktopEnvironment.ts",
'const APP_BASE_NAME = "T3 Code";',
`const APP_BASE_NAME = "${NAME}";`,
);
replaceOnce(
"apps/desktop/src/app/DesktopEnvironment.ts",
"displayName: `${APP_BASE_NAME} (${stageLabel})`,",
"displayName: APP_BASE_NAME,",
);
replaceOnce(
"apps/desktop/src/app/DesktopAppIdentity.ts",
"`${environment.branding.baseName} ${environment.branding.stageLabel}`,",
"environment.displayName,",
);
replaceOnce(
"scripts/build-desktop-artifact.ts",
'const DESKTOP_APP_ID = "com.t3tools.t3code";',
`const DESKTOP_APP_ID = "${APP_ID}";`,
);
replaceOnce("apps/desktop/src/app/DesktopEnvironment.ts", '"com.t3tools.t3code"', `"${APP_ID}"`);
replaceOnce(
"apps/desktop/package.json",
'"productName": "T3 Code (Beta)"',
`"productName": "${NAME}"`,
);

const icons = [
["nightly-macos-1024.png", "black-macos-1024.png"],
["nightly-universal-1024.png", "black-universal-1024.png"],
["nightly-windows.ico", "t3-black-windows.ico"],
["nightly-web-favicon.ico", "t3-black-web-favicon.ico"],
["nightly-web-favicon-16x16.png", "t3-black-web-favicon-16x16.png"],
["nightly-web-favicon-32x32.png", "t3-black-web-favicon-32x32.png"],
["nightly-web-apple-touch-180.png", "t3-black-web-apple-touch-180.png"],
["nightly-web-icon-192x192.png", "t3-black-web-icon-192x192.png"],
["nightly-web-icon-512x512.png", "t3-black-web-icon-512x512.png"],
];
for (const [from, to] of icons) NodeFS.copyFileSync(`assets/nightly/${from}`, `assets/prod/${to}`);

console.log(`Branded as ${NAME} (${APP_ID}) with the nightly logo.`);
131 changes: 131 additions & 0 deletions .github/workflows/fork-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Fork desktop builds
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: fork-desktop-builds
cancel-in-progress: false
jobs:
linux:
if: github.repository == 'LaMarCab76/t3code'
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.meta.outputs.version }}
env:
T3CODE_DESKTOP_UPDATE_REPOSITORY: LaMarCab76/t3code
T3CODE_TELEMETRY_CHANNEL: dev
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb
with:
node-version-file: package.json
run-install: false
- run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config libfuse2 imagemagick
- run: vp install --frozen-lockfile --filter=t3... --filter=@t3tools/web... --filter=@t3tools/desktop... --filter=@t3tools/scripts...
- run: node .github/fork/brand-l.mjs
- id: meta
run: echo "version=$(node -p 'require("./apps/desktop/package.json").version')-fork.$(date -u +%Y%m%d).${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT"
- run: node scripts/update-release-package-versions.ts "${{ steps.meta.outputs.version }}"
- run: node scripts/build-desktop-artifact.ts --platform linux --target AppImage --arch x64 --build-version "${{ steps.meta.outputs.version }}" --output-dir release
- run: |
node apps/server/scripts/cli.ts build-exe
mkdir -p cli-monitor/linux-x64
cp native/resource-monitor/target/x86_64-unknown-linux-gnu/release/t3-resource-monitor cli-monitor/linux-x64/
node scripts/build-cli-archive.ts --platform linux --arch x64 --version "${{ steps.meta.outputs.version }}" --resource-monitor-dir "$PWD/cli-monitor" --output-dir release-cli
node scripts/smoke-cli-archive.ts --archive release-cli/*.tar.gz --expect-version "${{ steps.meta.outputs.version }}"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: wsl-runtime
path: release-cli/*.tar.gz
if-no-files-found: error
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: desktop-linux
path: |
release/*.AppImage
release/*.deb
release/*.yml
if-no-files-found: error
desktop:
needs: linux
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15
platform: mac
target: dmg
arch: arm64
- runner: windows-2025
platform: win
target: nsis
arch: x64
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
env:
T3CODE_DESKTOP_UPDATE_REPOSITORY: LaMarCab76/t3code
T3CODE_TELEMETRY_CHANNEL: dev
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803
with:
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb
with:
node-version-file: package.json
run-install: false
- run: vp install --frozen-lockfile --filter=t3... --filter=@t3tools/web... --filter=@t3tools/desktop... --filter=@t3tools/scripts...
- run: node .github/fork/brand-l.mjs
- run: node scripts/update-release-package-versions.ts "${{ needs.linux.outputs.version }}"
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
if: matrix.platform == 'win'
with:
name: wsl-runtime
path: wsl-runtime
- run: |
args=()
if [[ "${{ matrix.platform }}" == win ]]; then args+=(--wsl-runtime "$PWD"/wsl-runtime/*.tar.gz); fi
node scripts/build-desktop-artifact.ts --platform "${{ matrix.platform }}" --target "${{ matrix.target }}" --arch "${{ matrix.arch }}" --build-version "${{ needs.linux.outputs.version }}" --output-dir release "${args[@]}"
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: desktop-${{ matrix.platform }}
path: |
release/*.dmg
release/*.zip
release/*.exe
release/*.yml
release/*.blockmap
if-no-files-found: error
publish:
needs: [linux, desktop]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
path: artifacts
merge-multiple: true
- env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.linux.outputs.version }}
run: |
cd artifacts
sha256sum * > SHA256SUMS
gh release create "v$VERSION" * --repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" --title "T3 Code L $VERSION" --notes "macOS arm64, Windows x64 and Linux x64. Personal unsigned builds; source $GITHUB_SHA."
61 changes: 61 additions & 0 deletions .github/workflows/fork-coderabbit-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Fork CodeRabbit gate
on:
push:
branches: ["integration/fork-main-*"]
pull_request:
types: [opened, synchronize, reopened, ready_for_review, edited]
pull_request_review:
types: [submitted, dismissed]
permissions:
contents: read
pull-requests: read
concurrency:
group: fork-coderabbit-gate-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
threads:
name: CodeRabbit threads
if: github.repository == 'LaMarCab76/t3code'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
with:
script: |
const { owner, repo } = context.repo;
let number = context.payload.pull_request?.number;
if (number === undefined) {
const branch = context.ref.slice('refs/heads/'.length);
const pulls = await github.paginate(github.rest.pulls.list, {
owner, repo, head: owner + ':' + branch, base: 'main', state: 'open',
});
number = pulls.find((pull) => pull.head.sha === context.sha)?.number;
if (number === undefined) {
core.setFailed('No open pull request to main matches this integration commit.');
return;
}
}
const open = [];
let cursor = null;
do {
const { repository } = await github.graphql(
`query($owner: String!, $repo: String!, $number: Int!, $cursor: String) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
reviewThreads(first: 100, after: $cursor) {
pageInfo { hasNextPage endCursor }
nodes { isResolved path line comments(first: 1) { nodes { author { login } url } } }
}
}
}
}`,
{ owner, repo, number, cursor },
);
const threads = repository.pullRequest.reviewThreads;
for (const thread of threads.nodes) {
const first = thread.comments.nodes[0];
if (!thread.isResolved && first?.author?.login.startsWith('coderabbitai')) open.push({ ...thread, url: first.url });
}
cursor = threads.pageInfo.hasNextPage ? threads.pageInfo.endCursor : null;
} while (cursor);
for (const thread of open) core.error(`${thread.path}:${thread.line ?? '?'} ${thread.url}`);
if (open.length > 0) core.setFailed(`${open.length} unresolved CodeRabbit thread(s)`);
24 changes: 24 additions & 0 deletions .github/workflows/fork-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Fork upstream sync
on:
schedule:
- cron: "23 */6 * * *"
workflow_dispatch:
permissions:
contents: write
actions: write
concurrency:
group: fork-upstream-sync
cancel-in-progress: false
jobs:
sync:
if: github.repository == 'LaMarCab76/t3code'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
with:
script: |
const { owner, repo } = context.repo;
const upstream = await github.rest.repos.getBranch({ owner: 'pingdotgg', repo: 't3code', branch: 'main' });
const result = await github.rest.repos.merge({ owner, repo, base: 'main', head: upstream.data.commit.sha, commit_message: 'chore(fork): sync upstream main' });
if (result.status === 204) return;
await github.rest.actions.createWorkflowDispatch({ owner, repo, workflow_id: 'fork-build.yml', ref: 'main' });
12 changes: 6 additions & 6 deletions apps/desktop/src/app/DesktopCliShim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,19 @@ export const renderCliShim = (input: {
// Forwarding starts before the CLI does: a signal in between must not unmount under it.
"{ command exec 9<&0; } 2>/dev/null || exec 9</dev/null",
"cli= pending=",
`trap 'if [ -n "$cli" ]; then kill -TERM "$cli" 2>/dev/null; else pending=TERM; fi' TERM`,
`trap 'if [ -n "$cli" ]; then kill -HUP "$cli" 2>/dev/null; else pending=HUP; fi' HUP`,
`trap 'if [ -n "$cli" ]; then interrupted=1; kill -TERM "$cli" 2>/dev/null; else pending=TERM; fi' TERM`,
`trap 'if [ -n "$cli" ]; then interrupted=1; kill -HUP "$cli" 2>/dev/null; else pending=HUP; fi' HUP`,
"trap '' INT",
`${run("$mount")} <&9 9<&- &`,
"cli=$!",
'[ -z "$pending" ] || kill -"$pending" "$cli" 2>/dev/null',
"exec 9<&-",
"status=0",
'wait "$cli" || status=$?',
// A trapped signal interrupts wait; wait again for the CLI's own exit status.
'while kill -0 "$cli" 2>/dev/null; do',
// An interrupted wait returns a signal status even if the child has already exited.
"while :; do",
" interrupted=0",
" status=0",
' wait "$cli" || status=$?',
' if [ "$interrupted" -eq 0 ] || [ "$status" -le 128 ]; then break; fi',
"done",
'exit "$status"',
"",
Expand Down
42 changes: 31 additions & 11 deletions apps/desktop/src/wsl/DesktopWslEnvironment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as NodeServices from "@effect/platform-node/NodeServices";
import { assert, describe, it } from "@effect/vitest";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
import * as Fiber from "effect/Fiber";
import * as TestClock from "effect/testing/TestClock";
import * as Layer from "effect/Layer";
import * as Option from "effect/Option";
import * as Path from "effect/Path";
Expand Down Expand Up @@ -559,23 +561,28 @@ const STORE_SERVICE = "HKLM\\SYSTEM\\CurrentControlSet\\Services\\WSLService";
const INBOX_SERVICE = "HKLM\\SYSTEM\\CurrentControlSet\\Services\\LxssManager";
const SERVICES_ROOT = "HKLM\\SYSTEM\\CurrentControlSet\\Services";

const registrySpawner = (keys: ReadonlyArray<string>) =>
const registrySpawner = (keys: ReadonlyArray<string>, pendingKey?: string) =>
ChildProcessSpawner.make((command) =>
Effect.succeed(
ChildProcessSpawner.makeHandle({
pid: ChildProcessSpawner.ProcessId(1),
stdout: Stream.empty,
stderr: Stream.empty,
all: Stream.empty,
exitCode: Effect.succeed(
ChildProcessSpawner.ExitCode(
command._tag === "StandardCommand" &&
command.command === "reg.exe" &&
[SERVICES_ROOT, ...keys].some((key) => command.args.includes(key))
? 0
: 1,
),
),
exitCode:
pendingKey !== undefined &&
command._tag === "StandardCommand" &&
command.args.includes(pendingKey)
? Effect.never
: Effect.succeed(
ChildProcessSpawner.ExitCode(
command._tag === "StandardCommand" &&
command.command === "reg.exe" &&
[SERVICES_ROOT, ...keys].some((key) => command.args.includes(key))
? 0
: 1,
),
),
isRunning: Effect.succeed(false),
kill: () => Effect.void,
stdin: Sink.drain,
Expand All @@ -589,6 +596,7 @@ const registrySpawner = (keys: ReadonlyArray<string>) =>
const isAvailable = (
policy?: Parameters<typeof DesktopManagedPolicy.layerTest>[0],
serviceKeys: ReadonlyArray<string> = [STORE_SERVICE],
pendingKey?: string,
) =>
makeIsAvailable("win32", "/windows").pipe(
Effect.provide(
Expand All @@ -598,14 +606,26 @@ const isAvailable = (
DesktopManagedPolicy.layerTest(policy),
),
),
Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, registrySpawner(serviceKeys)),
Effect.provideService(
ChildProcessSpawner.ChildProcessSpawner,
registrySpawner(serviceKeys, pendingKey),
),
);

describe("makeIsAvailable", () => {
it.effect("needs a registered WSL service, not just the System32 install stub", () =>
Effect.gen(function* () {
assert.isFalse(yield* isAvailable(undefined, []));
assert.isTrue(yield* isAvailable(undefined, [INBOX_SERVICE]));
const withSlowProbe = yield* isAvailable(undefined, [STORE_SERVICE], INBOX_SERVICE).pipe(
Effect.forkScoped,
);
yield* TestClock.adjust("5 seconds");
assert.isTrue(yield* Fiber.join(withSlowProbe));

const withSlowRoot = yield* isAvailable(undefined, [], SERVICES_ROOT).pipe(Effect.forkScoped);
yield* TestClock.adjust("5 seconds");
assert.isFalse(yield* Fiber.join(withSlowRoot));
}),
);

Expand Down
Loading
Loading