Skip to content

Commit 4410d8b

Browse files
committed
Merge branch 'dev' into feat/fork-session-take-2
2 parents f535193 + 8fbba8d commit 4410d8b

88 files changed

Lines changed: 2205 additions & 598 deletions

Some content is hidden

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

.github/workflows/beta.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
runs-on: blacksmith-4vcpu-ubuntu-2404
1111
permissions:
1212
contents: write
13+
pull-requests: write
1314
steps:
1415
- name: Checkout repository
1516
uses: actions/checkout@v4

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ jobs:
2121
with:
2222
node-version: "24"
2323

24+
# Workaround for Pulumi version conflict:
25+
# GitHub runners have Pulumi 3.212.0+ pre-installed, which removed the -root flag
26+
# from pulumi-language-nodejs (see https://github.com/pulumi/pulumi/pull/21065).
27+
# SST 3.17.x uses Pulumi SDK 3.210.0 which still passes -root, causing a conflict.
28+
# Removing the system language plugin forces SST to use its bundled compatible version.
29+
# TODO: Remove when sst supports Pulumi >3.210.0
30+
- name: Fix Pulumi version conflict
31+
run: sudo rm -f /usr/local/bin/pulumi-language-nodejs
32+
2433
- run: bun sst deploy --stage=${{ github.ref_name }}
2534
env:
2635
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/nix-hashes.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ permissions:
66
on:
77
workflow_dispatch:
88
push:
9-
paths:
10-
- "bun.lock"
11-
- "package.json"
12-
- "packages/*/package.json"
13-
- "flake.lock"
14-
- ".github/workflows/nix-hashes.yml"
15-
pull_request:
9+
branches: [dev]
1610
paths:
1711
- "bun.lock"
1812
- "package.json"

.opencode/command/commit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: git commit and push
3-
model: opencode/glm-4.7
3+
model: opencode/kimi-k2.5
44
subtask: true
55
---
66

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Prefer single word variable names where possible
1313
- Use Bun APIs when possible, like `Bun.file()`
1414
- Rely on type inference when possible; avoid explicit type annotations or interfaces unless necessary for exports or clarity
15+
- Prefer functional array methods (flatMap, filter, map) over for loops; use type guards on filter to maintain type inference downstream
1516

1617
### Avoid let statements
1718

nix/desktop.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
4545
rustc
4646
jq
4747
makeWrapper
48-
]
49-
++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook4 ];
48+
] ++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook4 ];
5049

5150
buildInputs = lib.optionals stdenv.isLinux [
5251
dbus
@@ -61,6 +60,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
6160
gst_all_1.gstreamer
6261
gst_all_1.gst-plugins-base
6362
gst_all_1.gst-plugins-good
63+
gst_all_1.gst-plugins-bad
6464
];
6565

6666
strictDeps = true;
@@ -97,4 +97,4 @@ rustPlatform.buildRustPackage (finalAttrs: {
9797
mainProgram = "opencode-desktop";
9898
inherit (opencode.meta) platforms;
9999
};
100-
})
100+
})

nix/hashes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"nodeModules": {
3-
"x86_64-linux": "sha256-3wRTDLo5FZoUc2Bwm1aAJZ4dNsekX8XoY6TwTmohgYo=",
4-
"aarch64-linux": "sha256-CKiuc6c52UV9cLEtccYEYS4QN0jYzNJv1fHSayqbHKo=",
5-
"aarch64-darwin": "sha256-jGr2udrVeseioMWpIzpjYFfS1CN8GvNFwo6o92Aa5Oc=",
6-
"x86_64-darwin": "sha256-k5384Uun7tLjKkfJXXPcaZSXQ5jf/tMv21xi5cJU1rM="
3+
"x86_64-linux": "sha256-06Otz3loT4vn0578VDxUqVudtzQvV7oM3EIzjZnsejo=",
4+
"aarch64-linux": "sha256-88Qai5RkSenCZkakOg52b6xU2ok+h/Ns4/5L3+55sFY=",
5+
"aarch64-darwin": "sha256-x8dgCF0CJBWi2dZLDHMGdlTqys1X755ok0PM6x0HAGo=",
6+
"x86_64-darwin": "sha256-FkLDqorfIfOw+tB7SW5vgyhOIoI0IV9lqPW1iEmvUiI="
77
}
88
}

nix/node_modules.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,16 @@ stdenvNoCC.mkDerivation {
4646

4747
buildPhase = ''
4848
runHook preBuild
49-
export HOME=$(mktemp -d)
5049
export BUN_INSTALL_CACHE_DIR=$(mktemp -d)
5150
bun install \
5251
--cpu="${bunCpu}" \
5352
--os="${bunOs}" \
53+
--filter '!./' \
54+
--filter './packages/opencode' \
55+
--filter './packages/desktop' \
5456
--frozen-lockfile \
5557
--ignore-scripts \
56-
--no-progress \
57-
--linker=isolated
58+
--no-progress
5859
bun --bun ${./scripts/canonicalize-node-modules.ts}
5960
bun --bun ${./scripts/normalize-bun-binaries.ts}
6061
runHook postBuild

packages/app/e2e/actions.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ import {
88
sessionItemSelector,
99
dropdownMenuTriggerSelector,
1010
dropdownMenuContentSelector,
11+
projectMenuTriggerSelector,
12+
projectWorkspacesToggleSelector,
1113
titlebarRightSelector,
1214
popoverBodySelector,
1315
listItemSelector,
1416
listItemKeySelector,
1517
listItemKeyStartsWithSelector,
18+
workspaceItemSelector,
19+
workspaceMenuTriggerSelector,
1620
} from "./selectors"
1721
import type { createSdk } from "./utils"
1822

@@ -291,3 +295,69 @@ export async function openStatusPopover(page: Page) {
291295

292296
return { rightSection, popoverBody }
293297
}
298+
299+
export async function openProjectMenu(page: Page, projectSlug: string) {
300+
const trigger = page.locator(projectMenuTriggerSelector(projectSlug)).first()
301+
await expect(trigger).toHaveCount(1)
302+
303+
await trigger.focus()
304+
await page.keyboard.press("Enter")
305+
306+
const menu = page.locator(dropdownMenuContentSelector).first()
307+
const opened = await menu
308+
.waitFor({ state: "visible", timeout: 1500 })
309+
.then(() => true)
310+
.catch(() => false)
311+
312+
if (opened) {
313+
const viewport = page.viewportSize()
314+
const x = viewport ? Math.max(viewport.width - 5, 0) : 1200
315+
const y = viewport ? Math.max(viewport.height - 5, 0) : 800
316+
await page.mouse.move(x, y)
317+
return menu
318+
}
319+
320+
await trigger.click({ force: true })
321+
322+
await expect(menu).toBeVisible()
323+
324+
const viewport = page.viewportSize()
325+
const x = viewport ? Math.max(viewport.width - 5, 0) : 1200
326+
const y = viewport ? Math.max(viewport.height - 5, 0) : 800
327+
await page.mouse.move(x, y)
328+
return menu
329+
}
330+
331+
export async function setWorkspacesEnabled(page: Page, projectSlug: string, enabled: boolean) {
332+
const current = await page
333+
.getByRole("button", { name: "New workspace" })
334+
.first()
335+
.isVisible()
336+
.then((x) => x)
337+
.catch(() => false)
338+
339+
if (current === enabled) return
340+
341+
await openProjectMenu(page, projectSlug)
342+
343+
const toggle = page.locator(projectWorkspacesToggleSelector(projectSlug)).first()
344+
await expect(toggle).toBeVisible()
345+
await toggle.click({ force: true })
346+
347+
const expected = enabled ? "New workspace" : "New session"
348+
await expect(page.getByRole("button", { name: expected }).first()).toBeVisible()
349+
}
350+
351+
export async function openWorkspaceMenu(page: Page, workspaceSlug: string) {
352+
const item = page.locator(workspaceItemSelector(workspaceSlug)).first()
353+
await expect(item).toBeVisible()
354+
await item.hover()
355+
356+
const trigger = page.locator(workspaceMenuTriggerSelector(workspaceSlug)).first()
357+
await expect(trigger).toBeVisible()
358+
await trigger.click({ force: true })
359+
360+
const menu = page.locator(dropdownMenuContentSelector).first()
361+
await expect(menu).toBeVisible()
362+
return menu
363+
}

0 commit comments

Comments
 (0)