Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8a17051
Add tui.no_sidebar_auto setting for always-show sidebar behavior
ariane-emory Jan 14, 2026
ecb9083
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 15, 2026
a1eec20
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 16, 2026
f485790
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 17, 2026
caaf415
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 17, 2026
0d15175
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 19, 2026
901680a
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 20, 2026
140fecd
Merge dev into feat/sidebar-no-auto-setting
ariane-emory Jan 22, 2026
fa3a2d4
Fix syntax error in config test file after merge
ariane-emory Jan 22, 2026
ef42eb7
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 23, 2026
d5b39e4
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 25, 2026
503b380
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 25, 2026
deefecd
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 26, 2026
0877a53
Remove unused config.json file from sidebar-no-auto feature
ariane-emory Jan 26, 2026
39470e3
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 27, 2026
cbd0af4
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 29, 2026
5e0f371
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 29, 2026
8938e3e
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Jan 30, 2026
099b1ce
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 1, 2026
b0f488e
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 2, 2026
cdabf9a
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 3, 2026
dfa2db2
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 4, 2026
b236c1f
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 4, 2026
786f86d
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 6, 2026
a2d3f08
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 6, 2026
ddce705
Merge dev into feat/sidebar-no-auto-setting
ariane-emory Feb 6, 2026
951bb79
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 6, 2026
876ce52
Merge branch 'dev' into feat/sidebar-no-auto-setting
ariane-emory Feb 7, 2026
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 packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function Session() {
const sidebarVisible = createMemo(() => {
if (session()?.parentID) return false
if (sidebarOpen()) return true
if (sidebar() === "auto" && wide()) return true
if (sidebar() === "auto" && ((sync.data.config.tui as any)?.no_sidebar_auto || wide())) return true
return false
})
const showTimestamps = createMemo(() => timestamps() === "show")
Expand Down
4 changes: 4 additions & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,10 @@ export namespace Config {
.enum(["auto", "stacked"])
.optional()
.describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),
no_sidebar_auto: z
.boolean()
.optional()
.describe("When true, 'auto' sidebar mode always shows the sidebar regardless of window width"),
})

export const Server = z
Expand Down
31 changes: 27 additions & 4 deletions packages/opencode/test/config/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,29 @@ describe("deduplicatePlugins", () => {
})
})

test("loads tui.no_sidebar_auto config", async () => {
await using tmp = await tmpdir({
init: async (dir) => {
await Bun.write(
path.join(dir, "opencode.jsonc"),
JSON.stringify({
$schema: "https://opencode.ai/config.json",
tui: {
no_sidebar_auto: true,
},
}),
)
},
})
await Instance.provide({
directory: tmp.path,
fn: async () => {
const config = await Config.get()
expect(config.tui?.no_sidebar_auto).toBe(true)
},
})
})

describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
test("skips project config files when flag is set", async () => {
const originalEnv = process.env["OPENCODE_DISABLE_PROJECT_CONFIG"]
Expand Down Expand Up @@ -1713,7 +1736,7 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
instructions: ["./CUSTOM.md"],
}),
)
// Create the instruction file (should be skipped)
// Create instruction file (should be skipped)
await Bun.write(path.join(dir, "CUSTOM.md"), "# Custom Instructions")
},
})
Expand All @@ -1722,12 +1745,12 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
directory: tmp.path,
fn: async () => {
// The relative instruction should be skipped without error
// We're mainly verifying this doesn't throw and the config loads
// We're mainly verifying this doesn't throw and config loads
const config = await Config.get()
expect(config).toBeDefined()
// The instruction should have been skipped (warning logged)
// We can't easily test the warning was logged, but we verify
// the relative path didn't cause an error
// relative path didn't cause an error
},
})
} finally {
Expand All @@ -1751,7 +1774,7 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
try {
await using configDirTmp = await tmpdir({
init: async (dir) => {
// Create config in the custom config dir
// Create config in custom config dir
await Bun.write(
path.join(dir, "opencode.json"),
JSON.stringify({
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk/js/src/v2/gen/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,10 @@ export type Config = {
* Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column
*/
diff_style?: "auto" | "stacked"
/**
* When true, 'auto' sidebar mode always shows the sidebar regardless of window width
*/
no_sidebar_auto?: boolean
}
server?: ServerConfig
/**
Expand Down