feat(tabs): add close left/right/other tab commands#2026
feat(tabs): add close left/right/other tab commands#2026bajrangCoder merged 3 commits intoAcode-Foundation:mainfrom
Conversation
Greptile SummaryThis PR adds "Close Left", "Close Right", and "Close Others" tab commands wired through the existing file menu, key-bindings registry, and i18n system. The shared Confidence Score: 5/5Safe to merge; all remaining findings are P2 quality-of-life suggestions that do not affect correctness. No P0 or P1 issues found. The close-all-tabs refactor is a faithful extraction. The new commands handle edge cases (empty lists, pinned tabs, active-file focus) correctly. The two P2 comments flag a silent save-skip and a missing toast — nice-to-haves, not blockers. src/lib/commands.js — minor quality concerns in closeTabs(); all other files are straightforward. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant FileMenu
participant acode
participant commands
participant closeTabs
participant EditorFile
User->>FileMenu: click "Close Right" (value=file_id)
FileMenu->>acode: exec("close-tabs-to-right", file_id)
acode->>commands: close-tabs-to-right(file_id)
commands->>commands: resolveReferenceFile(file_id)
commands->>commands: getTabsRelativeToFile("right", file)
commands->>closeTabs: closeTabs(tabsToRight, options)
alt unsaved files exist
closeTabs->>User: confirm("warning", unsavedWarning)
User-->>closeTabs: ok
closeTabs->>User: select(save/close/cancel)
User-->>closeTabs: save or close
closeTabs->>User: confirm(saveWarning or closeWarning)
User-->>closeTabs: ok
end
loop for each closable file
alt save = true
closeTabs->>EditorFile: file.save()
end
closeTabs->>EditorFile: file.remove(force=true, silentPinned=true)
EditorFile-->>closeTabs: removed
end
closeTabs-->>commands: true
Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile |
No description provided.