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
6 changes: 4 additions & 2 deletions packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,15 @@ export function Sidebar(props: { sessionID: string; overlay?: boolean }) {
<span style={{ fg: theme.textMuted }}>{directory().split("/").slice(0, -1).join("/")}/</span>
<span style={{ fg: theme.text }}>{directory().split("/").at(-1)}</span>
</text>
{/* altimate_change start — sidebar branding */}
<text fg={theme.textMuted}>
<span style={{ fg: theme.success }}>•</span> <b>Open</b>
<span style={{ fg: theme.success }}>•</span> <b>Altimate</b>
<span style={{ fg: theme.text }}>
<b>Code</b>
<b> Code</b>
</span>{" "}
<span>{Installation.VERSION}</span>
</text>
{/* altimate_change end */}
</box>
</box>
</Show>
Expand Down
33 changes: 26 additions & 7 deletions packages/opencode/test/branding/upstream-merge-guard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ describe("Installation script branding", () => {
// Should not contain the upstream npm package name in install commands
// (note: @opencode-ai/ as internal scope is allowed, but `opencode-ai@` as
// an npm install target is not)
const installLines = installSrc.split("\n").filter(
(line) =>
(line.includes("npm") || line.includes("pnpm") || line.includes("bun")) &&
line.includes("install"),
)
const installLines = installSrc
.split("\n")
.filter(
(line) => (line.includes("npm") || line.includes("pnpm") || line.includes("bun")) && line.includes("install"),
)
for (const line of installLines) {
expect(line).not.toMatch(/["'`]opencode-ai["'`@]/)
}
Expand Down Expand Up @@ -206,13 +206,13 @@ describe("OAuth/MCP branding", () => {
const oauthProviderPath = join(srcDir, "mcp", "oauth-provider.ts")
const oauthCallbackPath = join(srcDir, "mcp", "oauth-callback.ts")

test("oauth-provider.ts has client_name: \"Altimate Code\" not \"OpenCode\"", () => {
test('oauth-provider.ts has client_name: "Altimate Code" not "OpenCode"', () => {
const content = readText(oauthProviderPath)
expect(content).toContain('client_name: "Altimate Code"')
expect(content).not.toMatch(/client_name:\s*"OpenCode"/)
})

test("oauth-callback.ts HTML titles contain \"Altimate Code\" not \"OpenCode\"", () => {
test('oauth-callback.ts HTML titles contain "Altimate Code" not "OpenCode"', () => {
const content = readText(oauthCallbackPath)
// All <title> tags should reference Altimate Code
const titleMatches = content.match(/<title>[^<]+<\/title>/g) ?? []
Expand Down Expand Up @@ -300,6 +300,25 @@ describe("No opencode.ai domain leaks in src/", () => {
})
})

// ---------------------------------------------------------------------------
// 5b. TUI Branding (sidebar, headers, etc.)
// ---------------------------------------------------------------------------
describe("TUI branding", () => {
const sidebarPath = join(srcDir, "cli", "cmd", "tui", "routes", "session", "sidebar.tsx")
const sidebarContent = readText(sidebarPath)

test("sidebar shows 'Altimate' not 'Open' as branded name", () => {
// The sidebar footer must say "Altimate Code", not "OpenCode"
expect(sidebarContent).toContain("<b>Altimate</b>")
expect(sidebarContent).not.toMatch(/<b>Open<\/b>\s*\n\s*<span[^>]*>\s*<b>Code<\/b>/)
})

test("sidebar has altimate_change marker to protect branding", () => {
expect(sidebarContent).toContain("altimate_change start")
expect(sidebarContent).toContain("altimate_change end")
})
})

// ---------------------------------------------------------------------------
// 6. Build & Package Branding
// ---------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions packages/opencode/test/training/tools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ describe("training meta roundtrip through content", () => {
kind: "pattern",
source: "stg_orders.sql",
applied: 5,
accepted: 3,
rejected: 1,
}
const content = "- Use CTEs\n- Cast types"
const embedded = embedTrainingMeta(content, meta)
Expand Down
Loading