-
Notifications
You must be signed in to change notification settings - Fork 552
Add cursor-pointer class to button component #800
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
Closed
Closed
Conversation
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
…unch Add directory validation and automatic creation support for Claude Code sessions: - New /validate-directory endpoint to check directory status before session creation - Add createDirectoryIfNotExists flag to session creation API - Implement directory creation logic in session manager with proper error handling - Return 422 status when directory doesn't exist and needs creation - Add DirectoryNotFoundError type for cleaner error handling This allows Claude Code to prompt users before creating new directories, improving the user experience when launching sessions in non-existent paths.
Allows draft sessions to be configured with any working directory path without immediate validation. Directory validation and creation now happens when launching the draft via POST /sessions/{id}/launch, not during draft creation. This improves UX by keeping sessions in draft state on validation failure.
- Skip directory validation in LaunchSession when isDraft=true
- Add createDirectoryIfNotExists parameter to LaunchDraftSession API
- Validate/create directories before status transition in LaunchDraftSession
- Return 422 response when directory doesn't exist and creation not requested
- Update OpenAPI spec and regenerate server code
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implement client-side handling for directory creation when launching draft sessions: - Add CreateDirectoryDialog component with confirmation UI - Update DraftLauncherForm to catch 422 responses and show dialog - Update HTTP client to parse 422 directory_not_found errors - Regenerate SDK with createDirectoryIfNotExists parameter support - Add CREATE_DIRECTORY_DIALOG hotkey scope When launching a draft session with a non-existent working directory, the daemon returns 422 with directory details. The UI now shows a confirmation dialog and retries the launch with createDirectoryIfNotExists=true when confirmed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…tories Add real-time directory validation and automatic creation capabilities to the Additional Directories dropdown, providing a smoother UX when adding new paths. Backend changes: - Add POST /directories endpoint to create directories via daemon - Add CreateDirectory handler with tilde expansion and os.MkdirAll - Regenerate Go and TypeScript SDKs from OpenAPI spec - Add validateDirectory and createDirectory methods to SDK client Frontend changes: - Add debounced validation (300ms) as user types directory paths - Track directory existence state and show visual feedback - Dynamic button text: "Add" for existing dirs, "Create" for non-existent - Use destructive button variant (red) when creating directories - Improved toast messages distinguishing create vs add operations - Fix FuzzySearchInput bug: now correctly filters out files, showing only directories All filesystem operations go through daemon endpoints (no Tauri fs calls), ensuring consistent behavior and proper permission handling.
Apply cursor-pointer to all button variants through the base class, providing clear visual feedback that buttons are interactive elements.
Contributor
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 5a79afd in 2 minutes and 11 seconds. Click for details.
- Reviewed
2529lines of code in26files - Skipped
0files when reviewing. - Skipped posting
7draft 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/ui/button.tsx:8
- Draft comment:
Good addition of the 'cursor-pointer' class in the button variant definition; this improves interactivity indication. Ensure accessibility (e.g., focus rings) is maintained. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. humanlayer-wui/src/hooks/hotkeys/scopes.ts:16
- Draft comment:
The new hotkey scope 'CREATE_DIRECTORY_DIALOG' is added consistently with other scopes. This enhances organized keybinding management. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. humanlayer-wui/src/components/internal/SessionDetail/components/CreateDirectoryDialog.tsx:60
- Draft comment:
The CreateDirectoryDialog component is well implemented with clear instructions and effective hotkey usage for confirm/cancel actions, which improves user experience. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. humanlayer-wui/src/components/internal/SessionDetail/components/AdditionalDirectoriesDropdown.tsx:247
- Draft comment:
The debounced validation of directory existence is implemented correctly. As an enhancement, consider memoizing the validateDirectory function using useCallback to avoid unnecessary re-creations. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. humanlayer-wui/src/components/internal/SessionDetail/components/DraftLauncherForm.tsx:441
- Draft comment:
Integration of the 'createDirectoryIfNotExists' flag in launchDraftSession is handled properly and the error for a 422 'directory_not_found' response is robustly managed. Consider adding stricter type checks or narrowing for the error object in the catch block. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
6. humanlayer-wui/src/lib/daemon/http-client.ts:327
- Draft comment:
The error handling in the launchDraftSession method is robust, correctly parsing a 422 error response and re-throwing a structured error for UI handling. Adding more detailed logging when JSON parsing fails could further aid debugging. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
7. hld/sdk/typescript/src/generated/apis/FilesApi.ts:97
- Draft comment:
The JSDoc forvalidateDirectoryRawrefers to a parameter namedvalidateDirectoryRequestwith type{ValidateDirectoryRequest}, but the actual function parameter isrequestParametersof typeValidateDirectoryOperationRequest. Please update the documentation to match the code. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% This is a generated file (see header comments). The mismatch appears to be systematic across all methods. While technically incorrect, fixing it in one place would be inconsistent with the rest of the file. Generated files should generally not be manually edited as changes will be lost on next generation. The inconsistency likely comes from the OpenAPI generator template. The comment is technically correct in pointing out a real documentation mismatch. Manual fixes to generated files could help developers in the short term. The systematic nature of the issue and the fact this is a generated file means local fixes would be lost and inconsistent. The proper fix would be to update the OpenAPI generator template. Delete the comment since this is a generated file and the issue should be fixed in the generator template rather than with manual edits.
Workflow ID: wflow_ajNhDApkXCGLoyLK
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
What problem(s) was I solving?
This PR addresses two UX improvements:
Directory Validation and Creation: Users launching Claude Code sessions need to specify working directories. Previously, if a directory didn't exist, the session would fail without offering an option to create it. This created friction in the user experience, especially for new projects or non-standard paths.
Button Cursor Feedback: Buttons throughout the UI lacked a clear visual indicator that they are interactive, which can confuse users about which elements are clickable.
What user-facing changes did I ship?
Directory Management
/validate-directoryAPI endpoint to check if a directory exists before attempting session creationcreateDirectoryIfNotExistsflag on session creation endpoints allows automatic directory creation with user confirmationVisual Improvements
cursor: pointeron hover, providing clear visual feedback that elements are interactiveHow I implemented it
Backend (hld/)
ValidateDirectoryhandler: Checks directory existence, identifies if path is a directory, and returns creation feasibilityCreateDirectoryhandler: Creates directories withos.MkdirAlland proper tilde expansionCreateSessionandLaunchDraftSessionto accept and handlecreateDirectoryIfNotExistsflagDirectoryNotFoundErrortype for cleaner error handling and structured responsesFrontend (humanlayer-wui/)
cursor-pointerclass to base button styles for all variantsGenerated Code
validateDirectoryandcreateDirectorymethodsHow to verify it
Manual Testing
Directory Validation
Additional Directories Feature
Button Cursor Feedback
API Validation
/validate-directoryendpoint with:exists: false, canCreate: trueexists: true, isDirectory: trueexists: true, isDirectory: false~): Should return expanded path/directoriesendpoint creates directories correctlycreateDirectoryIfNotExistsflagDescription for the changelog
New Features
/validate-directoryand/directoriesendpointscreateDirectoryIfNotExistsflagImprovements
cursor-pointerclass to button components for better visual feedbackDirectoryNotFoundErrorresponses