Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bearylabs/doomcode
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: bearylabs/doomcode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refactor-codebase
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 12 commits
  • 25 files changed
  • 3 contributors

Commits on Jun 17, 2026

  1. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    04cd30b View commit details
    Browse the repository at this point in the history
  2. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    234b9c1 View commit details
    Browse the repository at this point in the history
  3. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    205356a View commit details
    Browse the repository at this point in the history
  4. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    bacf677 View commit details
    Browse the repository at this point in the history
  5. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    2a2aaca View commit details
    Browse the repository at this point in the history
  6. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    a23f8ea View commit details
    Browse the repository at this point in the history
  7. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    7d2cc2d View commit details
    Browse the repository at this point in the history
  8. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    627a270 View commit details
    Browse the repository at this point in the history
  9. 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
    Hendrik Rudek committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    5cb8a24 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2026

  1. 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.
    bearylabs committed Jun 18, 2026
    Configuration menu
    Copy the full SHA
    55c664d View commit details
    Browse the repository at this point in the history
  2. 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.
    bearylabs committed Jun 18, 2026
    Configuration menu
    Copy the full SHA
    7a94feb View commit details
    Browse the repository at this point in the history
  3. 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.
    claude committed Jun 18, 2026
    Configuration menu
    Copy the full SHA
    bdbf010 View commit details
    Browse the repository at this point in the history
Loading