-
Notifications
You must be signed in to change notification settings - Fork 1
Comparing changes
Open a pull request
base repository: bearylabs/doomcode
base: main
head repository: bearylabs/doomcode
compare: refactor-codebase
- 12 commits
- 25 files changed
- 3 contributors
Commits on Jun 17, 2026
-
fix: address low-severity code quality findings
- Remove unused formatFileSize/formatPermissions imports (findFile.ts) - Replace magic number literals with named constants across extension.ts, menu.ts, openEditors.ts, projectFile.ts, fuzzy.ts, mru.ts - Fix broken column-0 indentation in menu.ts and showBindings.ts - Add console.warn to silent catch blocks in findFile, recentProjects, fuzzy, and extension.ts - Drop unnecessary async/Promise<void> from moveSelection (3 panels) and revealEditorLine (fuzzy.ts) - Change recentProjects.prepareShow return type to void with interface note - Replace Math.random() nonces with crypto.randomUUID() in helpers.ts and menu.ts
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 04cd30b - Browse repository at this point
Copy the full SHA 04cd30bView commit details -
fix: rename fuzzyMatch to substringMatch, remove hardcoded extension …
…id, memoize trigger bindings - Rename `fuzzyMatch` to `substringMatch` in panel/helpers.ts and all consumers (search/search.ts, buffers/openEditors.ts, whichkey/bindingsPanel.ts); update UI strings from "fuzzy search" to "search" to match the actual substring implementation - Replace hardcoded 'bearylabs.doom' extension id in menu.ts with packageJSON passed via DoomWhichKeyMenu constructor, matching the pattern used elsewhere in the codebase - Memoize getWhichKeyTriggerBindings() at module scope so package.json is parsed once per session rather than on every binding resolution - Rename src/search/fuzzy.ts to src/search/search.ts and DoomFuzzySearchPanel to DoomSearchPanel; update all imports and references in extension.ts and panel/shared.ts
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 234b9c1 - Browse repository at this point
Copy the full SHA 234b9c1View commit details -
refactor: deduplicate isRecord, createNonce, and managed vim setting …
…keys Export isRecord and createNonce from panel/helpers as single sources of truth. Remove the duplicate isRecord from whichkey/bindings and menu, and replace getNonce in menu with createNonce. Expand DOOM_MANAGED_VIM_BINDING_SETTINGS in vimBindings to cover all four managed vim arrays (NonRecursive + plain, both modes), and replace the two hardcoded keysToCheck arrays in extension.ts with that constant.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 205356a - Browse repository at this point
Copy the full SHA 205356aView commit details -
fix(whichkey): interpolate webview timing constants into menu client …
…script BLUR_ENABLE_DELAY_MS and SUPPRESS_WINDOW_MS are Node-side module constants, but the webview client script referenced them as bare identifiers instead of interpolating their values. Since they don't exist in the webview's JS sandbox, every render message threw a ReferenceError before render() ran, leaving the which-key menu blank while keybindings and the bindings QuickPick still worked. Wrap both usages in ${...} so the numeric values are baked into the generated client JS, restoring menu rendering.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for bacf677 - Browse repository at this point
Copy the full SHA bacf677View commit details -
fix: separate install-managed and stale-scanned vim binding sets
DOOM_MANAGED_VIM_BINDING_SETTINGS was widened to four keys, conflating two distinct concerns: the arrays Doom installs/merges into (the two NonRecursive arrays, backing isDoomManagedVimBindingSetting used by install and dashboard detection) and the broader set scanned for stale Doom commands during cleanup. Restore DOOM_MANAGED_VIM_BINDING_SETTINGS to the two NonRecursive keys and add DOOM_STALE_VIM_BINDING_SETTINGS covering all four arrays for the stale-scan and detection paths in extension.ts. Extend the centralization test to assert both sets.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 2a2aaca - Browse repository at this point
Copy the full SHA 2a2aacaView commit details -
refactor: extract shared webview controller and HTML builder
Collapse the six bottom-panel pickers (find-file, project files, recent projects, open editors, search, which-key bindings) onto a common base and a single HTML template, removing the duplicated controller lifecycle and embedded CSS/JS scaffolding. - Add DoomWebviewController (src/panel/controller.ts) owning the view/ready/ viewDisposables/activeIndex/query state, attach/detach, the resolveWebviewView bootstrap, the render guard, the ready|query|move|activate|close dispatch skeleton, updateVisibilityContext, and close(). Panels override only getHtml, filterItems, activateSelection, buildRenderState, itemCount, plus small hooks (onReady, afterRender, onVisibilityChanged, extraViewDisposables, onMessage, updateViewMetadata, onDetach/onDispose). - Add createPanelHtml (src/panel/helpers.ts) producing the shared CSP, chrome CSS, appendHighlightedText, the focus/setSelectionRange + forceQuery reconcile, and the keydown handler (Escape/Arrow/Enter/Ctrl+J/Ctrl+K). createFilePickerHtml delegates to it; each panel passes only its row layout + render-item builder. Normalize the small CSS drifts (promptbar gap, status alignment, paddings) to one canonical chrome. - Standardize selection movement on the in-webview handler: drop the redundant ctrl+j/k keybindings, the *Move{Down,Up} commands/registrations, and the now unused moveSelection(). Fixes the double-move on the file pickers and makes Ctrl+J/K an alias of the arrows on every panel. No user-visible behavior change beyond unifying Ctrl+J/K navigation. The two workspace FileSystemWatchers are intentionally left in place.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for a23f8ea - Browse repository at this point
Copy the full SHA a23f8eaView commit details -
fix: dispose workspace file watchers via shared WorkspaceFileIndex
DoomProjectFilePanel and DoomSearchPanel each lazily created a createFileSystemWatcher('**/*') stored in a field that was never pushed to context.subscriptions or disposed, leaking two full-tree watchers for the session. Extract a single WorkspaceFileIndex service that owns the one watcher, exposes getFiles() and an onCacheInvalidated event, and is registered in context.subscriptions so it is disposed with the extension. Both panels now subscribe to onCacheInvalidated to clear their own derived caches and no longer own a watcher.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 7d2cc2d - Browse repository at this point
Copy the full SHA 7d2cc2dView commit details -
refactor: split extension entry point into focused command modules
Decompose src/extension.ts (~1.5k lines mixing onboarding I/O, terminal management, window commands, and ~20 inline command bodies) into cohesive modules, each exposing a register()/named API: - onboarding/keybindingsFile.ts — keybindings.json read/parse/rewrite - onboarding/staleCleanup.ts — stale-settings cleanup + legacy binding migration - onboarding/onboardingCommands.ts — doom.install, doom.cleanup, doom.dashboard - terminal/terminalCommands.ts — editor/AI-CLI and panel terminal commands - window/windowCommands.ts — doom.windowDelete and window focus/split commands activate() is now a short wiring list that calls each module's register(). Also: - Collapse the three copy-paste AI-CLI commands into a single table-driven openCliTerminal() helper that derives EDITOR_TERMINAL_NAMES. - Move the pure resolveWindowDeleteAction into window/windowCommands.ts, removing the command modules' import dependency on extension.ts; update the test import to match.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 627a270 - Browse repository at this point
Copy the full SHA 627a270View commit details -
fix: align package.json command contributions with registered commands
Declare all user-invokable commands in contributes.commands; keep internal routing and mid-keystroke mode-state commands (whichKeyHide, sidebarHide, panelHide, terminalEscape*) out of the palette. Replace the hand-picked command lists in extension.test.ts with a dynamic cross-check that reads contributes.commands and contributes.keybindings from package.json and asserts every referenced command is registered — drift now fails CI automatically. Document the declaration rule in CONTRIBUTING.md.
Hendrik Rudek committedJun 17, 2026 Configuration menu - View commit details
-
Copy full SHA for 5cb8a24 - Browse repository at this point
Copy the full SHA 5cb8a24View commit details
Commits on Jun 18, 2026
-
refactor: back workspace search with doom-workspace ripgrep command
Replace the in-process WorkspaceFileIndex line cache with debounced, cancellable calls to doom-workspace.searchText. Drops workspaceCache, loadSequence, the file-size limit, and background preloading; results now stream from ripgrep/git grep on the workspace host.
Configuration menu - View commit details
-
Copy full SHA for 55c664d - Browse repository at this point
Copy the full SHA 55c664dView commit details -
fix: resolve which-key focus race on fast-path chord resolution
close(): skip closePanel and focus-restore when the panel was never revealed (view not visible), so deferred editor focus no longer races the panel.focus of the command that runs next. setActiveController(): always detach the previous controller, even when the same one is reused, so its ready flag resets before showMode's re-attach replaces the webview HTML — blocking render() until the new webview signals ready.
Configuration menu - View commit details
-
Copy full SHA for 7a94feb - Browse repository at this point
Copy the full SHA 7a94febView commit details -
Format readDirectory size/permissions in findFile via shared helpers
The doom-workspace.readDirectory command now returns raw size/mode numbers instead of pre-formatted strings. Format them here through formatFileSize and formatPermissions from panel/helpers.ts, matching how the project file picker already handles listProjectFiles. Display output is unchanged.
Configuration menu - View commit details
-
Copy full SHA for bdbf010 - Browse repository at this point
Copy the full SHA bdbf010View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...refactor-codebase