Skip to content

Commit f59ad08

Browse files
Zexiclaude
authored andcommitted
fix: add missing Flag import in shared/ui.ts and align test with Bearer scheme
The embedded-UI loader referenced Flag.* without importing it, which would throw ReferenceError at module evaluation and prevent the sidecar from starting. Also updates the www-authenticate assertion in httpapi-ui.test.ts to match the new Bearer scheme set in the authorization middleware. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent d441785 commit f59ad08

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/opencode/src/server/shared/ui.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { AppFileSystem } from "@opencode-ai/core/filesystem"
2+
import { Flag } from "@opencode-ai/core/flag/flag"
23
import { Effect, Stream } from "effect"
34
import { HttpBody, HttpClient, HttpClientRequest, HttpServerRequest, HttpServerResponse } from "effect/unstable/http"
45
import { createHash } from "node:crypto"

packages/opencode/test/server/httpapi-ui.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ describe("HttpApi UI fallback", () => {
387387
const response = yield* uiApp({ password: "secret", username: "opencode" }).request("/session")
388388

389389
expect(response.status).toBe(401)
390-
expect(response.headers.get("www-authenticate")).toBe('Basic realm="Secure Area"')
390+
expect(response.headers.get("www-authenticate")).toBe('Bearer realm="Secure Area"')
391391
}),
392392
)
393393

0 commit comments

Comments
 (0)