Skip to content

Commit 4bdc69c

Browse files
committed
refactor: remove includeProjects navigation option
Projects are now always included in keyboard navigation (cmd+j/k, cmd+1-9). This simplifies the navigation model and removes a rarely-used configuration option.
1 parent bbaed62 commit 4bdc69c

File tree

8 files changed

+19
-41
lines changed

8 files changed

+19
-41
lines changed

src-tauri/src/config.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,10 @@ impl Default for MergeConfig {
188188
}
189189
}
190190

191-
#[derive(Debug, Clone, Serialize, Deserialize)]
191+
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
192192
#[serde(default)]
193193
pub struct NavigationConfig {
194-
/// Include open projects in keyboard navigation (cmd+j/k)
195-
#[serde(rename = "includeProjects")]
196-
pub include_projects: bool,
197-
}
198-
199-
impl Default for NavigationConfig {
200-
fn default() -> Self {
201-
Self {
202-
include_projects: true,
203-
}
204-
}
194+
// Reserved for future navigation settings
205195
}
206196

207197
#[derive(Debug, Clone, Serialize, Deserialize)]

src-tauri/src/config.schema.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,8 @@
179179
},
180180
"navigation": {
181181
"type": "object",
182-
"description": "Configuration for keyboard navigation",
183-
"properties": {
184-
"includeProjects": {
185-
"type": "boolean",
186-
"description": "Include open projects in keyboard navigation (cmd+j/k, cmd+1-9). When false, only cycles through open worktrees.",
187-
"default": true
188-
}
189-
},
182+
"description": "Reserved for future navigation settings",
183+
"properties": {},
190184
"additionalProperties": false
191185
},
192186
"indicators": {

src-tauri/src/default_config.jsonc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@
4444
}
4545
},
4646

47-
"navigation": {
48-
// Include open projects in keyboard navigation (cmd+j/k, cmd+1-9)
49-
"includeProjects": true
50-
},
5147

5248
"indicators": {
5349
// Time in ms after last activity before progress indicator turns off

src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,15 @@ function App() {
314314

315315
// Open entities in sidebar order - scratch terminals first, then projects/worktrees
316316
// Used for unified keyboard navigation (1-9, j/k)
317-
// When includeProjects is true, projects are interleaved with their worktrees in sidebar order
317+
// Projects are interleaved with their worktrees in sidebar order
318318
const openEntitiesInOrder = useMemo(() => {
319319
const scratchIds = scratchTerminals.map(s => ({ type: 'scratch' as const, id: s.id }));
320320

321321
// Build project/worktree list in sidebar visual order
322322
const projectAndWorktreeIds: Array<{ type: 'project' | 'worktree'; id: string }> = [];
323323
for (const project of projects) {
324-
// Include project if includeProjects is enabled and project terminal is open
325-
if (config.navigation.includeProjects && openProjectIds.has(project.id)) {
324+
// Include project if project terminal is open
325+
if (openProjectIds.has(project.id)) {
326326
projectAndWorktreeIds.push({ type: 'project' as const, id: project.id });
327327
}
328328
// Include open worktrees from this project
@@ -334,7 +334,7 @@ function App() {
334334
}
335335

336336
return [...scratchIds, ...projectAndWorktreeIds];
337-
}, [scratchTerminals, projects, openProjectIds, openWorktreeIds, config.navigation.includeProjects]);
337+
}, [scratchTerminals, projects, openProjectIds, openWorktreeIds]);
338338

339339
// Worktrees with running tasks and their counts (for sidebar indicator)
340340
const runningTaskCounts = useMemo(() => {

src/components/Drawer/DrawerTerminal.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('DrawerTerminal', () => {
1515
entityId: 'worktree-1',
1616
isActive: true,
1717
shouldAutoFocus: false,
18-
terminalConfig: defaultTestConfig.terminal,
18+
terminalConfig: defaultTestConfig.drawer,
1919
};
2020

2121
beforeEach(() => {
@@ -38,7 +38,7 @@ describe('DrawerTerminal', () => {
3838

3939
it('applies padding from config', () => {
4040
const customConfig = {
41-
...defaultTestConfig.terminal,
41+
...defaultTestConfig.drawer,
4242
padding: 12,
4343
};
4444

@@ -197,7 +197,7 @@ describe('DrawerTerminal', () => {
197197
describe('terminal config', () => {
198198
it('applies font family from config', async () => {
199199
const customConfig = {
200-
...defaultTestConfig.terminal,
200+
...defaultTestConfig.drawer,
201201
fontFamily: 'JetBrains Mono',
202202
};
203203

@@ -212,7 +212,7 @@ describe('DrawerTerminal', () => {
212212

213213
it('applies font size from config', async () => {
214214
const customConfig = {
215-
...defaultTestConfig.terminal,
215+
...defaultTestConfig.drawer,
216216
fontSize: 14,
217217
};
218218

src/components/MainPane/MainTerminal.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('MainTerminal', () => {
1414
type: 'main' as const,
1515
isActive: true,
1616
shouldAutoFocus: false,
17-
terminalConfig: defaultTestConfig.terminal,
17+
terminalConfig: defaultTestConfig.drawer,
1818
};
1919

2020
beforeEach(() => {
@@ -47,7 +47,7 @@ describe('MainTerminal', () => {
4747

4848
it('applies padding from config', () => {
4949
const customConfig = {
50-
...defaultTestConfig.terminal,
50+
...defaultTestConfig.drawer,
5151
padding: 16,
5252
};
5353

@@ -154,7 +154,7 @@ describe('MainTerminal', () => {
154154
describe('terminal config', () => {
155155
it('applies font settings from config', async () => {
156156
const customConfig = {
157-
...defaultTestConfig.terminal,
157+
...defaultTestConfig.drawer,
158158
fontSize: 16,
159159
fontFamily: 'Fira Code',
160160
};
@@ -175,7 +175,7 @@ describe('MainTerminal', () => {
175175
const { unmount } = render(
176176
<MainTerminal
177177
{...defaultProps}
178-
terminalConfig={{ ...defaultTestConfig.terminal, padding }}
178+
terminalConfig={{ ...defaultTestConfig.drawer, padding }}
179179
/>
180180
);
181181

src/hooks/useConfig.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface MergeConfig {
2727
}
2828

2929
export interface NavigationConfig {
30-
includeProjects: boolean;
30+
// Reserved for future navigation settings
3131
}
3232

3333
export type TaskKind = 'command' | 'daemon';
@@ -111,9 +111,7 @@ const defaultConfig: Config = {
111111
terminal: 'Ghostty',
112112
editor: 'Zed',
113113
},
114-
navigation: {
115-
includeProjects: true,
116-
},
114+
navigation: {},
117115
indicators: {
118116
activityTimeout: 250,
119117
showIdleCheck: true,

src/test/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function emitEvent(eventName: string, payload: unknown) {
3131
export const defaultTestConfig = {
3232
main: { command: null, fontFamily: 'Menlo', fontSize: 13, fontLigatures: false, padding: 8 },
3333
drawer: { fontFamily: 'Menlo', fontSize: 13, fontLigatures: false, padding: 8 },
34-
navigation: { includeProjects: true },
34+
navigation: {},
3535
indicators: { activityTimeout: 5000, showIdleCheck: true },
3636
apps: { terminal: 'Terminal', editor: 'VS Code' },
3737
tasks: [],

0 commit comments

Comments
 (0)