Repository navigation
feat(editor): add a deterministic code explore mode - #426
Merged
Merged
Conversation
fcoury
marked this pull request as ready for review
November 1, 2026 17:27
Contributor
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4481a0d21
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
cursor
Bot
force-pushed
the
cursor/code-explore-5c4c
branch
from
November 1, 2026 23:19
a4481a0 to
581f4a6
Compare
Give Red a reading view for unfamiliar code: a cursor-following sidebar, symbol follow, skeleton dimming, a review trail, and a tree-sitter index that can refresh one file or only a pull request's changed files.
Write the interface rules the editor and plugins already follow, then bring the explore sidebar in line with them: theme colors, a footer under the content, ellipsis, keycaps, and plain labels.
Space e is the explore group, with plain labels in the which-key popup. Errors move to Space D. Section headings use the theme accent, and a single indexed file reads as "1 file".
Shell commands re-enter execute. Building the explore future in its own non-inlined function matches the other boxed editor actions.
Drop the bracketed key list. Space e ? opens Keyboard shortcuts scoped to the explore bindings. The sidebar uses the dialog frame and sideBar styles, and counts and modes follow the status line.
Replace the dialog frame with a sideBar fill, one editor-edge divider, and a plain explore title row.
Put Explore on the window-bar row, keep section names bold in the content color, and right-align only the Matches count.
Keep the bottom row on the current function, kind, and name, and add a muted trail counter only while jumps are recorded.
A detached shell command re-enters the action dispatcher. In a debug build that function's frame is large enough that the nested call overflows the 2 MiB test stack. Move the earlier match arms into their own frame. Space D is the error list that stays available from a panel.
Next match walks a stable file order, so stepping into another function does not skip occurrences. Trail jumps to an unnamed buffer activate that buffer. Review scope no longer treats a helper in an unchanged file as a project call.
Space e R walked the tree and parsed every file on the editor thread, so Red's sources blocked input for about 11 seconds. The scan now runs on a background thread, the status line counts files, and a second command does not start another index. Large open buffers reparse off the editor thread as well.
cursor
Bot
force-pushed
the
cursor/code-explore-5c4c
branch
from
November 3, 2026 15:13
ba43ef2 to
2949aa9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reading unfamiliar code needs a view that stays legible without asking a model anything. Code explore is that view: a cursor-following sidebar, dimming, and a review trail that never sends the buffer to a model.
gdstill asks the language server.The recording uses the Tokyo Night theme and JetBrainsMono Nerd Font. Captions use Red's chord notation. The bottom row is
review › variable › templatebefore the definition jump, thenstruct › LaunchSpecwith2/2. Trail back and forward change that counter.The sidebar is a docked column from the window's top row, with one
│on the editor edge (|when borders are ASCII).Exploreis a bold title with the Neo-tree root icon(>when icons are not Nerd Font). Section headers are bold insideBar.foreground. The Matches count is right-aligned on its header. The definition count stays beside the kind (review.rs:8 let 3).The row above the status line is the cursor, not the jump history. Inside a function it is
review › variable › template. Onstruct LaunchSpec;it isstruct › LaunchSpec. Empty segments and a segment that repeats the one before it are left out, and the wordexploreis not used as a placeholder. Inside still saystop of the filewhen no function encloses the cursor. When the trail has entries, that row ends with a muted counter such as2/2.Space ewas the error list. That list is nowSpace D.Space Estill toggles explore. AfterSpace,eis the explore group. Which-key shows only the next key; the full chord is the popup title (Space e · keymaps), the command line,:keys, and the command palette.Keys
Space e e,Space E,:exploreSpace e qSpace e f,Space e *Space e sSpace e dSpace e tSpace e j/Space e kSpace e b/Space e nSpace e rSpace e R,:explore indexSpace e p,:explore prSpace e ?gdNext match walks one file order, so stepping into another function does not skip an occurrence. Trail back reopens an unnamed buffer. Review scope leaves a helper in an unchanged file dim. The index is tree-sitter, capped at 400 files, and SCIP files stay unread.
Space e R,Space e p, and:explore index/prdo not run the walk on the editor thread. The status line counts files (Indexing project · 12/400), then shows the summary. Starting an index while one is already running does nothing extra. A buffer larger than 48 KiB, includingSpace e rand the reparse after an edit, is parsed in the background as well.docs/EXPLORE.mdanddocs/DESIGN.mddescribe the mode and the sidebar rules it follows.How to Test
Space e e. The sidebar should open on the top row with one divider. Put the cursor on a name inside a function and pressSpace e f. The bottom row should readfunction › kind › name, with no counter, and Inside should name that function.Space e d. The row should stay on the definition (struct › Namefor a struct) and gain a counter such as2/2.Space e bshould return to the use and show1/2.Space e nshould return to2/2. On a top-level struct, Inside should saytop of the file.Space e R, or:explore prfor the current review. Typing and scrolling should keep working while the status line counts files, then the summary should replace the count. Running the same command during the count should report that an index is already running.Space Dshould open the error list. With explore off, double-click should still select a word.cargo test --lib location_row_follows_the_cursor,cargo test --lib project_index_lets_the_editor_take_input_while_it_runs, andcargo test --lib large_buffer_reparse_does_not_block_the_next_editcover the location row, a live index, and a large buffer.