-
Notifications
You must be signed in to change notification settings - Fork 550
feat: Add open in editor button with configurable editor preference #730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 2d60767 in 1 minute and 10 seconds. Click for details.
- Reviewed
277lines of code in4files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. humanlayer-wui/src/components/SettingsDialog.tsx:47
- Draft comment:
Ensure 'fetchClaudeConfig' is stable in the useEffect dependencies to avoid unnecessary re-fetches. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. humanlayer-wui/src/components/SettingsDialog.tsx:172
- Draft comment:
Consider validating the selected editor value against EDITOR_OPTIONS in handleEditorChange to guard against unexpected values. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. humanlayer-wui/src/components/internal/SessionDetail/components/ActionButtons.tsx:127
- Draft comment:
Consider using a more distinct icon than Pencil for the 'Open in Editor' action to avoid confusion with text editing. - Reason this comment was not posted:
Confidence changes required:20%<= threshold50%None
4. humanlayer-wui/src/components/internal/SessionDetail/components/ResponseInput.tsx:396
- Draft comment:
Specify a dependency array for the 'mod+shift+e' hotkey callback to ensure updated session values (e.g. workingDir, isDraft) are correctly captured. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. humanlayer-wui/src/lib/preferences.ts:31
- Draft comment:
Consider validating the stored editor preference to ensure it matches one of the allowed values ('cursor', 'code', 'zed'). - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_8ADAP84yyfZAVwwD
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
34d161d to
7c7b00a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to e908159 in 42 seconds. Click for details.
- Reviewed
593lines of code in11files - Skipped
1files when reviewing. - Skipped posting
3draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. humanlayer-wui/src/lib/preferences.ts:40
- Draft comment:
Casting the stored value to EditorType without validation may lead to unexpected behavior if the stored value is invalid. Consider parsing or validating the value before defaulting to 'cursor'. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. humanlayer-wui/src/components/internal/SessionDetail/components/ActiveSessionInput.tsx:272
- Draft comment:
The useImperativeHandle hook is used with an empty dependency array. Although refs are stable, ensure that it's safe to assume that tiptapRef.current remains unchanged. If not, consider adding tiptapRef as a dependency. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. humanlayer-wui/src/components/internal/SessionDetail/components/ActiveSessionInput.tsx:293
- Draft comment:
The async setup for drag-and-drop event handling may be subject to race conditions if the component unmounts during setup. Ensure that the cleanup is robust (e.g. by verifying component mounted state) to avoid potential memory leaks. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
Workflow ID: wflow_dk4LdC3RnrsmxRNk
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
|
@dexhorthy PTAL |
|
related to #479 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sub-text is hard to read here when a given option is focused - it should probably change to be more visible like how most of our buttons do
Also, the "Cursor" text in the select component's selection appears to have a weird left indent, and that box could use a bit more padding as well
left a few other comments too
| </TooltipTrigger> | ||
| <TooltipContent> | ||
| <p className="flex items-center gap-1"> | ||
| Open in editor <KeyboardShortcut keyString="⌘+Shift+E" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in other places we are using the shift unicode character, it's spelled out here - this should probably be changed
| sessionStatus, | ||
| isArchived, | ||
| workingDir, | ||
| preferredEditor = 'cursor', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho the default should be VS Code not cursor since VS Code is far more likely to be installed
| // Cmd+Shift+E to open in editor | ||
| useHotkeys( | ||
| 'mod+shift+e', | ||
| e => { | ||
| e.preventDefault() | ||
| if (session.workingDir) { | ||
| handleOpenInEditor() | ||
| } | ||
| }, | ||
| { enableOnFormTags: true }, | ||
| ) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hotkey does not appear to have a scope configured properly, please review other usages of this hook in the codebase to understand how scopes work. probably this should be in sessions.details scope but tbh I'd just tell claude to dig into how hotkey scopes and hotkey boundaries work (pattern locator agent should be good for this) and make a recommendation
Also enableOnContentEditable is probably appropriate as well
Implementation Update for PR #730I've addressed the feedback from the PR review with the following key improvements: ✅ Changes Implemented
🔄 Remaining WorkThe Settings UI improvements are not yet implemented. This requires:
I plan to address the UI improvements in a follow-up commit after getting feedback on the core functionality changes. 🧪 Testing NeededPlease test on macOS to verify that editors open correctly without CLI tools installed. The new implementation should work with just the applications installed in cc @dexhorthy @K-Mistele - ready for review! |
- Add 'Open in Editor' button next to Archive button in session detail - Support Cursor, VS Code, and Zed editors - Add editor preference selector in Settings dialog - Implement Cmd+Shift+E hotkey to open working directory in preferred editor - Use tauri-plugin-opener for cross-platform editor launching Resolves humanlayer#479
857218f to
df905c8
Compare
|
Thanks I'll check this out
…On Mon, Nov 3, 2025 at 4:38 AM, Vaibhav Patil < ***@***.*** > wrote:
*VAIBHAVSING* left a comment (humanlayer/humanlayer#730) (
#730 (comment)
)
---------------------------------------------------------------------------------------
Implementation Update for PR #730 (
#730 )
---------------------------------------------------------------------------------------
I've addressed the feedback from the PR review with the following key
improvements:
✅ Changes Implemented
---------------------
*
*Switched to tauri-plugin-opener for cross-platform compatibility*
* Removed custom shell command logic (400+ lines)
* Now uses native Tauri opener API for reliable editor launching
* Works on macOS without requiring CLI tools to be installed
* Platform-specific app name mapping (e.g., "Visual Studio Code" on macOS,
"Code" on Windows)
*
*Changed default editor from Cursor to VS Code*
* Updated default in preferences
* VS Code is more commonly installed across platforms
*
*Fixed keyboard shortcut display*
* Changed from ⌘+Shift+E to ⌘⇧E to match codebase style
* Now consistent with other keyboard shortcuts in the app
*
*Added proper hotkey scope configuration*
* Added HOTKEY_SCOPES.SESSION_DETAIL and SESSION_DETAIL_ARCHIVED scopes
* Added enableOnContentEditable: true for proper editor integration
* Hotkey now properly scoped to session detail views
📝 Commits
---------
* 7f04001 - refactor: use tauri-plugin-opener for editor launch
* d91d221 - feat: change default editor to VS Code
* b7bf598 - fix: use unicode shift character in keyboard shortcut
* 857218f - fix: add proper hotkey scope and contentEditable support
🔄 Remaining Work
----------------
The *Settings UI improvements* are not yet implemented. This requires:
* Making the editor selector match the model selector button style
* Improving focus states for better readability
* Fixing padding and indentation issues
I plan to address the UI improvements in a follow-up commit after getting
feedback on the core functionality changes.
🧪 Testing Needed
----------------
Please test on macOS to verify that editors open correctly without CLI
tools installed. The new implementation should work with just the
applications installed in /Applications.
cc @dexhorthy ( https://github.com/dexhorthy ) @K-Mistele (
https://github.com/K-Mistele ) - ready for review!
—
Reply to this email directly, view it on GitHub (
#730 (comment)
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AA4OZLPELJ7MDVFP3UNP4CL325EF5AVCNFSM6AAAAACI2LCPVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOBQGMZDGOBQGI
).
You are receiving this because you were mentioned. Message ID: <humanlayer/humanlayer/pull/730/c3480323802
@ github. com>
|
- Resolved conflicts in lib.rs by keeping both read_last_log_lines and save_window_state functions - Resolved conflicts in SettingsDialog.tsx by merging editor preferences with log handling - Combined imports and state management from both branches - Applied UI improvements: better padding, improved focus states for select items
- Add px-2.5 padding to SelectTrigger to fix weird left indent - Change description text from text-muted-foreground to opacity-70 with group-data state - Make sub-text more readable when focused by increasing opacity on focus - Update keyboard shortcut display from ⌘+Shift+E to ⌘⇧E - Add group class to SelectItem for better state management Addresses feedback from @K-Mistele in PR humanlayer#730
Summary
This PR implements the ability to open a session's working directory in an external editor directly from CodeLayer.
Changes
Implementation Details
src/lib/preferences.tsfor storing editor choiceActionButtonscomponent to include the new buttonResponseInputcomponent to handle the editor opening logic and hotkeySettingsDialogTesting
Closes #479
Important
Adds 'Open in Editor' feature with configurable editor preference and hotkey support in CodeLayer.
ActionButtonsandActiveSessionActionButtonscomponents.PREFERRED_EDITOR_KEYinpreferences.tsfor storing preferred editor.EDITOR_OPTIONS.SettingsDialogto include editor selection dropdown.open_in_editorcommand inlib.rsto handle directory opening logic.tauri-plugin-openerfor cross-platform support.This description was created by
for e908159. You can customize this summary. It will automatically update as commits are pushed.