Skip to content

Commit a0279da

Browse files
fix(app): retire legacy entry (#10)
* fix(app): retire legacy entry * docs: deepen harness adoption audit * test(app): migrate legacy draft expectation * test(app): remove retired layout coverage
1 parent bcdda89 commit a0279da

6 files changed

Lines changed: 296 additions & 45 deletions

File tree

‎.changeset/redcode-chat-default.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"opencode": patch
3+
---
4+
5+
Open Redcode directly in the full chat shell, including for profiles that previously selected the legacy interface.

‎.red/researches/2026-08-15-deepseek-harness.md‎

Lines changed: 283 additions & 0 deletions
Large diffs are not rendered by default.

‎packages/app/e2e/regression/legacy-new-session.spec.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { expect, test } from "@playwright/test"
2-
import { base64Encode } from "@opencode-ai/core/util/encode"
32
import { mockOpenCodeServer } from "../utils/mock-server"
43

54
const draftID = "draft_legacy_new_session"
65
const directory = "C:/OpenCode/LegacyNewSession"
76
const server = `http://${process.env.PLAYWRIGHT_SERVER_HOST ?? "127.0.0.1"}:${process.env.PLAYWRIGHT_SERVER_PORT ?? "4096"}`
87

9-
test("redirects a draft to the legacy new-session route", async ({ page }) => {
8+
test("migrates a legacy draft preference into the Redcode chat", async ({ page }) => {
109
await mockOpenCodeServer(page, {
1110
directory,
1211
project: {
@@ -35,7 +34,8 @@ test("redirects a draft to the legacy new-session route", async ({ page }) => {
3534

3635
await page.goto(`/new-session?draftId=${draftID}`)
3736

38-
await expect(page).toHaveURL(`/${base64Encode(directory)}/session`)
39-
await expect(page.locator("header[data-tauri-drag-region]")).toBeVisible()
40-
await expect(page.locator('[data-component="prompt-input"]')).toBeVisible()
37+
await expect(page).toHaveURL(`/new-session?draftId=${draftID}`)
38+
await expect(page.locator('[data-slot="redcode-wordmark"]')).toBeVisible()
39+
await expect(page.locator('[data-component="session-draft-timeline"]')).toBeVisible()
40+
await expect(page.locator('[data-component="prompt-input-v2"]')).toBeVisible()
4141
})

‎packages/app/e2e/regression/redcode-entry.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test("opens directly into an unpersisted RedCode chat draft", async ({ page }) =
2626
})
2727
await page.addInitScript(
2828
({ directory }) => {
29-
localStorage.setItem("settings.v3", JSON.stringify({ general: { newLayoutDesigns: true } }))
29+
localStorage.setItem("settings.v3", JSON.stringify({ general: { newLayoutDesigns: false } }))
3030
localStorage.setItem("opencode-theme-id", "oc-2")
3131
localStorage.setItem("opencode-color-scheme", "dark")
3232
localStorage.setItem(

‎packages/app/e2e/regression/session-timeline-projection.spec.ts‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -128,43 +128,6 @@ test.describe("session timeline projection", () => {
128128
await expect(page.locator('[data-timeline-row="TurnGap"]')).toBeVisible()
129129
})
130130

131-
test("renders comment strips and historical diff summary overflow", async ({ page }) => {
132-
const user = userMessage(
133-
[
134-
userText("The user made the following comment regarding lines 4 through 8 of src/a.ts: Keep this stable", {
135-
id: "prt_comment_only",
136-
synthetic: true,
137-
metadata: {
138-
opencodeComment: {
139-
path: "src/a.ts",
140-
selection: { startLine: 4, startChar: 0, endLine: 8, endChar: 0 },
141-
comment: "Keep this stable",
142-
},
143-
},
144-
}),
145-
userText("Continue after the comment", { id: "prt_comment_visible" }),
146-
],
147-
{ summary: { diffs: Array.from({ length: 11 }, (_, index) => summaryDiff(index)) } },
148-
)
149-
const nextUser = userMessage(undefined, { id: "msg_2000_diff_next_user", created: 1700000010000 })
150-
const nextAssistant = assistantMessage([], {
151-
id: "msg_2001_diff_next_assistant",
152-
parentID: "msg_2000_diff_next_user",
153-
created: 1700000011000,
154-
})
155-
await setupTimeline(page, {
156-
messages: [user, assistantMessage(), nextUser, nextAssistant],
157-
settings: { newLayoutDesigns: false },
158-
})
159-
const scroller = page.locator(".scroll-view__viewport", { has: page.locator("[data-timeline-row]") })
160-
await scroller.evaluate((element) => (element.scrollTop = 0))
161-
162-
await expect(page.locator('[data-timeline-row="CommentStrip"]')).toBeVisible()
163-
await expect(page.getByText("Keep this stable", { exact: true })).toBeVisible()
164-
await expect(page.locator('[data-timeline-row="DiffSummary"]')).toBeVisible()
165-
await expect(page.getByText(/show all/i)).toBeVisible()
166-
})
167-
168131
test("renders interruption independently when the turn is not compacted", async ({ page }) => {
169132
const user = userMessage()
170133
const before = assistantMessage([{ id: "prt_before", type: "text", text: "Before" }], {

‎packages/app/src/context/settings.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export const sansDefault = "System Sans"
5959
export const terminalDefault = "JetBrainsMono Nerd Font Mono"
6060
const legacyNewLayoutDesignsDefault = import.meta.env.VITE_OPENCODE_CHANNEL !== "prod"
6161
export const newLayoutDesignsDefault = true
62-
// Existing users can switch layouts until local midnight on this date. Set new Date(YYYY, M-1, D) to show.
63-
export const oldInterfaceSunset = new Date(2026, 8, 14)
62+
// Redcode launches directly into the chat shell. Keep the persisted preference only for migration.
63+
export const oldInterfaceSunset = new Date(2026, 7, 15)
6464
const newLayoutDesignsUpgradeCutoff = "1.17.19"
6565

6666
function compareVersions(a: string, b: string) {

0 commit comments

Comments
 (0)