Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/app",
"version": "0.2.14",
"version": "2026.4.28",
Comment thread
Astro-Han marked this conversation as resolved.
"description": "",
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/session/session-layout.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test"
import { createRoot } from "solid-js"
import { createStableLayoutMemo } from "./session-layout"
import { createStableLayoutMemo } from "./stable-layout-memo"

describe("createStableLayoutMemo", () => {
test("reuses the last value when a disposed memo turns empty", () => {
Expand Down
18 changes: 1 addition & 17 deletions packages/app/src/pages/session/session-layout.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useParams } from "@solidjs/router"
import { createMemo } from "solid-js"
import { useLayout } from "@/context/layout"
import { createStableLayoutMemo } from "./stable-layout-memo"

export const useSessionKey = () => {
const params = useParams()
Expand All @@ -18,20 +19,3 @@ export const useSessionLayout = () => {
view: createStableLayoutMemo(() => layout.view(sessionKey)),
}
}

export function createStableLayoutMemo<T>(read: () => T) {
let last: { value: T } | undefined
const memo = createMemo(read)

return () => {
const value = memo()
if (value !== undefined) {
last = { value }
return value
}

if (last) return last.value

throw new Error("Stable layout memo read before initialization")
}
}
18 changes: 18 additions & 0 deletions packages/app/src/pages/session/stable-layout-memo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { createMemo } from "solid-js"

export function createStableLayoutMemo<T>(read: () => T) {
let last: { value: T } | undefined
const memo = createMemo(read)

return () => {
const value = memo()
if (value !== undefined) {
last = { value }
return value
}

if (last) return last.value

throw new Error("Stable layout memo read before initialization")
}
}
14 changes: 12 additions & 2 deletions packages/desktop-electron/electron-builder-app-update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import { serializeAppUpdateConfig } from "./scripts/write-app-update-config"
const roots: string[] = []
type AfterPackContext = Parameters<Extract<NonNullable<Configuration["afterPack"]>, (...args: any[]) => unknown>>[0]

function macAfterPackContext(appOutDir: string, appBundleName: string, electronPlatformName = "darwin"): AfterPackContext {
function macAfterPackContext(
appOutDir: string,
appBundleName: string,
electronPlatformName = "darwin",
): AfterPackContext {
return {
appOutDir,
electronPlatformName,
Expand Down Expand Up @@ -45,13 +49,19 @@ describe("electron builder app-update config", () => {
const config = createConfig("prod")
expect(config.productName).toBe("PawWork")
expect(config.appId).toBe("ai.pawwork.desktop")
expect(config.artifactName).toBe("pawwork-${os}-${arch}.${ext}")
expect(config.artifactName).toBe("pawwork-${os}-${arch}-${version}.${ext}")
Comment thread
Astro-Han marked this conversation as resolved.
expect(config.publish).toMatchObject({ owner: "Astro-Han", repo: "pawwork" })
expect(createConfig("prod").mac?.extendInfo).toMatchObject({
LSHasLocalizedDisplayName: true,
})
})

test("all channels share the versioned artifact name", () => {
expect(createConfig("dev").artifactName).toBe("pawwork-${os}-${arch}-${version}.${ext}")
expect(createConfig("beta").artifactName).toBe("pawwork-${os}-${arch}-${version}.${ext}")
expect(createConfig("prod").artifactName).toBe("pawwork-${os}-${arch}-${version}.${ext}")
})

test("afterPack writes app-update.yml to the packager-reported macOS resources path", async () => {
const root = mkdtempSync(join(tmpdir(), "pawwork-builder-config-"))
roots.push(root)
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-electron/electron-builder.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function writeLocalizedMacDisplayName(resourcesDir: string, channel: Chann
}

const getBase = (): Configuration => ({
artifactName: "pawwork-${os}-${arch}.${ext}",
artifactName: "pawwork-${os}-${arch}-${version}.${ext}",
Comment thread
Astro-Han marked this conversation as resolved.
directories: {
output: "dist",
buildResources: "resources",
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opencode-ai/desktop-electron",
"private": true,
"version": "0.2.14",
"version": "2026.4.28",
"type": "module",
"license": "Apache-2.0",
"homepage": "https://pawwork.ai",
Expand Down
Loading
Loading