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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</p>

> [!IMPORTANT]
> OpenCode Classic is an unofficial Linux-focused fork that tracks upstream while preserving the classic desktop layout. Its releases and updater are maintained independently at [`LogicLyra/opencode-classic`](https://github.com/LogicLyra/opencode-classic). Translated READMEs are inherited from upstream and may contain upstream installation links.
> OpenCode Classic is an unofficial Linux-focused fork that tracks upstream, defaults to the classic desktop layout, and keeps the redesigned layout available in Settings. Its releases and updater are maintained independently at [`LogicLyra/opencode-classic`](https://github.com/LogicLyra/opencode-classic). Translated READMEs are inherited from upstream and may contain upstream installation links.

<p align="center">
<a href="README.md">English</a> |
Expand Down
8 changes: 4 additions & 4 deletions packages/app/src/context/settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe("agent visibility", () => {
})

describe("layout transition", () => {
test("blank profiles default to the new layout", () => {
expect(newLayoutDesignsDefault).toBe(true)
test("blank profiles default to the classic layout (fork)", () => {
expect(newLayoutDesignsDefault).toBe(false)
})

test("hides the transition until a sunset is scheduled", () => {
Expand Down Expand Up @@ -70,8 +70,8 @@ describe("layout transition", () => {
expect(shouldEnableNewLayout("1.16.9", "2.0.0")).toBe(true)
})

test("enables the new layout when no previous version was recorded", () => {
expect(shouldEnableNewLayout(undefined, "1.17.20")).toBe(true)
test("does not auto-migrate first launches to the new layout (fork)", () => {
expect(shouldEnableNewLayout(undefined, "1.17.20")).toBe(false)
})

test("detects upgrades only when a previous version is older", () => {
Expand Down
10 changes: 7 additions & 3 deletions packages/app/src/context/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ export interface Settings {
export const monoDefault = "System Mono"
export const sansDefault = "System Sans"
export const terminalDefault = "JetBrainsMono Nerd Font Mono"
const legacyNewLayoutDesignsDefault = import.meta.env.VITE_OPENCODE_CHANNEL !== "prod"
export const newLayoutDesignsDefault = true
// fork: classic layout is the default on every channel, including before the store loads
const legacyNewLayoutDesignsDefault = false
// fork: fresh profiles start on the classic layout; the new layout stays one toggle away
export const newLayoutDesignsDefault = false
// Existing users can switch layouts until local midnight on this date. Set new Date(YYYY, M-1, D) to show.
// fork: the classic interface is preserved indefinitely; no sunset, no forced retirement
export let oldInterfaceSunset: Date | null = null
Expand Down Expand Up @@ -103,7 +105,9 @@ export function initialAgentVisibility(initialized: boolean | undefined, existin
export function shouldEnableNewLayout(previous: string | undefined, current: string | undefined) {
if (!current) return false
const currentComparison = compareVersions(current, newLayoutDesignsUpgradeCutoff)
if (!previous) return currentComparison !== undefined && currentComparison > 0
// fork: first launches never auto-migrate to the new layout; only genuine
// upgrades from before the cutoff do
if (!previous) return false
if (!isAppUpgrade(previous, current)) return false
const previousComparison = compareVersions(previous, newLayoutDesignsUpgradeCutoff)
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ export const dict = {
"settings.general.row.newInterface.title": "New layout",
"settings.general.row.newInterface.badge": "New",
"settings.general.row.newInterface.description":
"Use the new tabs and home layout. Switch between layouts for a limited time.",
"Use the new tabs and home layout. Switch between layouts anytime.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update non-English layout availability copy

When the app uses any non-English locale, its dictionary overrides this key with the old claim that switching is available only for a limited time (for example de.ts:793-794, es.ts:970-971, and zh.ts:941), so those users receive incorrect guidance despite the toggle now being permanently available. Update those translations, or temporarily remove their overrides so they fall back to the corrected English source.

AGENTS.md reference: packages/app/AGENTS.md:L35-L35

Useful? React with 👍 / 👎.

"settings.general.row.newInterfaceNotice.title": "You're now using new layout",
"settings.general.row.newInterfaceNotice.description": "The previous layout is no longer available",
"settings.general.row.newInterfaceNotice.dismiss": "Dismiss",
Expand Down
7 changes: 6 additions & 1 deletion packages/desktop/scripts/copy-metainfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const arg = process.argv[2]
const channel = arg === "dev" || arg === "beta" || arg === "prod" ? arg : resolveChannel()

const identity = DESKTOP_IDENTITIES[channel]
const summary = `Open source AI coding agent${channel !== "prod" ? ` (${channel})` : ""}`
const summary = `Open source AI coding agent with the classic desktop layout${channel !== "prod" ? ` (${channel})` : ""}`
const repository = `https://github.com/${DESKTOP_RELEASE_REPOSITORY.owner}/${DESKTOP_RELEASE_REPOSITORY.repo}`

const xml = `<?xml version="1.0" encoding="UTF-8"?>
Expand All @@ -26,6 +26,11 @@ const xml = `<?xml version="1.0" encoding="UTF-8"?>
<p>
OpenCode is an open source agent that helps you write and run code with any AI model.
</p>
<p>
OpenCode Classic is an unofficial Linux-focused build that defaults to the classic desktop
layout; the redesigned layout stays available under Settings, and releases are maintained
independently from upstream.
</p>
</description>

<launchable type="desktop-id">${identity.appId}.desktop</launchable>
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/assets/icons/provider/merge-gateway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions packages/ui/src/components/provider-icons/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/ui/src/components/provider-icons/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const iconNames = [
"minimax-coding-plan",
"minimax-cn",
"minimax-cn-coding-plan",
"merge-gateway",
"meganova",
"lucidquery",
"lmstudio",
Expand Down
Loading