Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.

Commit abc409c

Browse files
jakeleventhalclaudejuliusmarminge
authored
Add project file picker (⌘P) and project content search (⇧⌘F) (pingdotgg#4855)
Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: Julius Marminge <[email protected]>
1 parent 1877237 commit abc409c

39 files changed

Lines changed: 2928 additions & 476 deletions

‎apps/server/src/auth/RpcAuthorization.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const RPC_REQUIRED_SCOPES = {
5555
[WS_METHODS.sourceControlPublishRepository]: AuthOrchestrationOperateScope,
5656
[WS_METHODS.projectsListEntries]: AuthOrchestrationReadScope,
5757
[WS_METHODS.projectsReadFile]: AuthOrchestrationReadScope,
58+
[WS_METHODS.projectsSearchContents]: AuthOrchestrationReadScope,
5859
[WS_METHODS.projectsSearchEntries]: AuthOrchestrationReadScope,
5960
[WS_METHODS.projectsWriteFile]: AuthOrchestrationOperateScope,
6061
[WS_METHODS.shellOpenInEditor]: AuthOrchestrationOperateScope,

‎apps/server/src/keybindings.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ it.layer(NodeServices.layer)("keybindings", (it) => {
198198
assert.equal(defaultsByCommand.get("thread.jump.1"), "mod+1");
199199
assert.equal(defaultsByCommand.get("thread.jump.9"), "mod+9");
200200
assert.equal(defaultsByCommand.get("modelPicker.toggle"), "mod+shift+m");
201+
assert.equal(defaultsByCommand.get("filePicker.toggle"), "mod+p");
202+
assert.equal(defaultsByCommand.get("projectSearch.toggle"), "mod+shift+f");
201203
assert.equal(defaultsByCommand.get("sidebar.toggle"), "mod+b");
202204
assert.equal(defaultsByCommand.get("rightPanel.toggle"), "mod+alt+b");
203205
assert.equal(defaultsByCommand.get("terminal.splitVertical"), "mod+shift+d");

‎apps/server/src/keybindings.ts‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,19 +547,24 @@ const make = Effect.gen(function* () {
547547
});
548548
}
549549

550-
const nextConfig = [...customConfig, ...missingDefaults];
551-
const cappedConfig =
552-
nextConfig.length > MAX_KEYBINDINGS_COUNT
553-
? nextConfig.slice(-MAX_KEYBINDINGS_COUNT)
554-
: nextConfig;
555-
if (nextConfig.length > MAX_KEYBINDINGS_COUNT) {
556-
yield* Effect.logWarning("truncating keybindings config to max entries", {
550+
// Startup backfill must never evict persisted user rules: append only
551+
// the defaults that fit and skip the rest.
552+
const availableSlots = Math.max(0, MAX_KEYBINDINGS_COUNT - customConfig.length);
553+
const defaultsToAppend = missingDefaults.slice(0, availableSlots);
554+
const skippedDefaults = missingDefaults.slice(availableSlots);
555+
if (skippedDefaults.length > 0) {
556+
yield* Effect.logWarning("skipping default keybinding backfill at max entries", {
557557
path: keybindingsConfigPath,
558558
maxEntries: MAX_KEYBINDINGS_COUNT,
559+
commands: skippedDefaults.map((rule) => rule.command),
559560
});
560561
}
562+
if (defaultsToAppend.length === 0) {
563+
yield* Cache.invalidate(resolvedConfigCache, resolvedConfigCacheKey);
564+
return;
565+
}
561566

562-
yield* writeConfigAtomically(cappedConfig);
567+
yield* writeConfigAtomically([...customConfig, ...defaultsToAppend]);
563568
yield* Cache.invalidate(resolvedConfigCache, resolvedConfigCacheKey);
564569
}),
565570
);

0 commit comments

Comments
 (0)