Repository navigation
Conversation
The unified (inline) diff opened in a new tab left an empty [No Name]
pane and could leak its tab. Two issues in setup_inline_diff, both hit by
layout = "unified" + open_in_new_tab = true:
1. The diff was opened with `rightbelow vsplit` off the ephemeral window
created by `:tabnew`, so that empty [No Name] window lingered beside
the diff and `wincmd =` split the width evenly. Reuse the ephemeral
window as the diff window instead. The in-current-tab path keeps the
split so it does not replace the user's buffer.
2. guard_inline_setup captured display_terminal_in_new_tab()'s return
values with `{ pcall(action) }` + `unpack(results, 2)`. Under
hide_terminal_in_new_tab that helper returns a nil terminal window in
the middle of its results; the nil is a table hole, so `#results`
reports a border before it and the trailing new-tab handle is dropped.
That left new_tab_number nil, so the tab was not closed on cleanup and
ClaudeCodeDiffOpened fired with tab_number = nil. Preserve the exact
return count via pack_results / `unpack(results, 2, results.n)`.
Add tests/unit/diff_inline_new_tab_spec.lua covering the window layout
(no empty pane, terminal hidden or shown) and the preserved tab handle.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Take main's varargs guard_inline_setup from #399 and drop this PR's pack_results helper. Keep only the empty-pane fix in setup_inline_diff. _Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh_
…iff opens A unified diff in a new tab now takes the empty window that tabnew creates, unless that window is the Claude terminal's. Then it splits beside the terminal, as before. Update the spec to main's code (the new-tab handle fix is in #399), add the terminal-only case, and add real-Neovim checks of the new tab's windows. Record covered.lock: the change only picks the diff's window in setup_inline_diff, and the lifecycle model does not model window layout. _Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh_
…d diff A unified diff in a new tab takes the window that tabnew made only when it still shows the untouched empty buffer. If a TabNew hook filled it (a dashboard), the diff splits beside it, as on main. Add a unit spec and a real-Neovim spec with a TabNewEntered hook, and record covered.lock again: the change only picks the diff's window in setup_inline_diff. _Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh_
|
@codex security review |
Codex Review Summary: ✅ CompletedThis 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. |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Mirror for the Codex security lane only. The original PR has merged, so I am closing this mirror and deleting its branch. Generated with |
Do not merge. This draft PR mirrors the exact head of fork PR #303 (
e754ef1fce624c72525d8e50d47a86d1241f673a) on a branch in this repository, because the Codex security review never answered on the fork PR. It exists only to get that review on the same commit. It will be closed, and the branch deleted, once the review is in.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high