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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ apps/web/app/.well-known/workflow
apps/web/.swc
apps/web/public/orca

# CoDev's IDE (packages/ide) carries its own formatter (oxfmt, see its
# .oxfmtrc.json) and lints itself with oxlint. Running the root Prettier over
# its ~11k sources would rewrite the entire IDE to a different style and turn
# `format:check` red, so it formats itself and is checked by its own tooling.
packages/ide

# Vendored verbatim from stablyai/orca — kept byte-identical to upstream so
# re-vendoring is a clean copy (see third_party/orca-mobile/UPSTREAM.md).
apps/mobile/src/vendor/orca
8 changes: 4 additions & 4 deletions apps/web/components/orca-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ async function waitFor<T>(
*
* This drives the real, unmodified UI a person would click through (host
* picker -> Browse folder -> navigate to the directory -> Select folder)
* rather than reaching for Orca's internal store/RPC calls, which aren't
* reachable from outside the vendored bundle. Any missing/renamed selector
* rather than reaching for the IDE's internal store/RPC calls, which aren't
* reachable from outside the built bundle. Any missing/renamed selector
* just aborts silently and leaves the manual "Add Project" flow as the
* fallback. Re-check selectors after any Orca version bump (see
* third_party/orca/UPSTREAM.md).
* fallback. Re-check these selectors after UI changes in `packages/ide`
* (see packages/ide/CODEV-INTEGRATION.md).
*
* The dialog's path field is a *filter* over the current directory's
* listing, not an absolute-path navigator — typing the full cloned path
Expand Down
7 changes: 6 additions & 1 deletion apps/web/components/sign-in-layout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ describe("sign-in provider layout", () => {
);
expect(signInPage).toContain("CredentialsSignin");
expect(signInPage).toContain("CredentialsSignInForm");
expect(signInPage).toContain('initialMode={mode === "sign-up"');
// The ?mode=sign-up param still selects sign-up; the page routes it through
// startInSignUp so an invite grant opens that tab too.
expect(signInPage).toContain('const startInSignUp = mode === "sign-up"');
expect(signInPage).toContain(
'initialMode={startInSignUp ? "sign-up" : "sign-in"}',
);
expect(credentialsSignInForm).toContain('name="intent"');
expect(credentialsSignInForm).toContain("Create an account");
expect(credentialsSignInForm).toContain("Sign in with email");
Expand Down
13 changes: 10 additions & 3 deletions apps/web/lib/orca-pairing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { z } from "zod";
* `orca_server_ready` JSON line at startup; `codev-orchestrator` captures it
* and returns it verbatim as `IdeSession.ready` from
* `POST/GET /v1/sandboxes/{workspaceId}/ide` (see
* `services/orchestrator/src/backend/orca.rs`). See third_party/orca/UPSTREAM.md.
* `services/orchestrator/src/backend/orca.rs`). See
* packages/ide/CODEV-INTEGRATION.md.
*/

export const orcaReadySchema = z.object({
Expand Down Expand Up @@ -42,7 +43,13 @@ export interface OrcaPairing {
}

/**
* Extract the base64url pairing code from an `orca://pair?code=...` deep link.
* Accepted pairing deep-link schemes. The IDE mints `codev://`; `orca://` is
* still accepted so a runtime built before the rename keeps pairing.
*/
const PAIRING_PROTOCOLS = new Set(["codev:", "orca:"]);

/**
* Extract the base64url pairing code from a `codev://pair?code=...` deep link.
*/
export function extractPairingCode(pairingUrl: string): string | null {
let parsed: URL;
Expand All @@ -51,7 +58,7 @@ export function extractPairingCode(pairingUrl: string): string | null {
} catch {
return null;
}
if (parsed.protocol !== "orca:" || parsed.hostname !== "pair") {
if (!PAIRING_PROTOCOLS.has(parsed.protocol) || parsed.hostname !== "pair") {
return null;
}
const code = parsed.searchParams.get("code");
Expand Down
36 changes: 14 additions & 22 deletions infra/aws/orca-build/Containerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Builds `orca serve` (Orca's Electron main process / IDE backend) from its
# real MIT source at a pinned tag, instead of trusting a prebuilt
# upstream AppImage release asset. See
# infra/aws/scripts/build-orca-serve.sh, which builds this image with Apple's
# `container` tool and copies the
# resulting artifact out. Keep ORCA_REF/ORCA_COMMIT_PREFIX in sync with
# third_party/orca/UPSTREAM.md when bumping the vendored web client.
# Builds `orca serve` (the Electron main process / IDE backend) from CoDev's own
# first-party IDE source in packages/ide, which is this image's build context.
# See infra/aws/scripts/build-orca-serve.sh, which builds the image with Apple's
# `container` tool and copies the resulting artifact out.
#
# There is no upstream clone and no patch step any more: the IDE is forked into
# this monorepo (see packages/ide/README.md), so what builds here is exactly the
# source in the tree — the same source `pnpm orca:web` builds the browser client
# from, which is what keeps the two halves on one version by construction.
FROM ubuntu:24.04

ARG ORCA_REF=v1.4.176
ARG ORCA_COMMIT_PREFIX=02cea8a
ARG TARGET_ARCH=arm64
ARG ARTIFACT_ARCH=arm64
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -32,18 +32,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

WORKDIR /build

COPY codev-web.patch /tmp/codev-web.patch

# Pin to a specific commit, not just the mutable tag, so a compromised or
# force-moved upstream tag can't silently swap in different source.
RUN git clone --branch "${ORCA_REF}" --depth 1 https://github.com/stablyai/orca.git . \
&& actual_commit="$(git rev-parse --short=12 HEAD)" \
&& case "${actual_commit}" in \
${ORCA_COMMIT_PREFIX}*) ;; \
*) echo "orca commit mismatch at tag ${ORCA_REF}: expected ${ORCA_COMMIT_PREFIX}*, got ${actual_commit}" >&2; exit 1 ;; \
esac \
&& git apply --check /tmp/codev-web.patch \
&& git apply /tmp/codev-web.patch
# The build context is packages/ide (set by build-orca-serve.sh). Its
# .dockerignore keeps node_modules/, out/, and dist/ out of the transfer, so a
# developer's local IDE install never leaks into the image.
COPY . /build

RUN pnpm install --frozen-lockfile

Expand All @@ -53,7 +45,7 @@ RUN pnpm install --frozen-lockfile
RUN if [ "${TARGET_ARCH}" = arm64 ]; then export ORCA_LINUX_ARM64_RELEASE=1; fi; \
pnpm run build:linux -- --"${TARGET_ARCH}"

# `orca serve` is what CoDev's orchestrator (services/orchestrator/src/backend/orca.rs)
# `orca serve` is what the orchestrator (services/orchestrator/src/backend/orca.rs)
# spawns per workspace. `--appimage-extract` unpacks the AppImage into a plain
# squashfs-root/ directory with no FUSE mount required, which is exactly the
# layout production already runs `AppRun` out of, so the orchestrator needs no
Expand Down
Loading
Loading