Skip to content

feat: allow folder drag-drop to speed workspace setup#173

Merged
Dimillian merged 3 commits intoDimillian:mainfrom
ignaciocervino:feat/drag-and-drop-project-import
Jan 21, 2026
Merged

feat: allow folder drag-drop to speed workspace setup#173
Dimillian merged 3 commits intoDimillian:mainfrom
ignaciocervino:feat/drag-and-drop-project-import

Conversation

@ignaciocervino
Copy link
Contributor

@ignaciocervino ignaciocervino commented Jan 21, 2026

Summary

Addresses #156

  • Enabled Tauri window drag/drop and added a full-window drop zone with “Drop Project Here” overlay to accept folder drops.
  • Introduced useWorkspaceDropZone to handle drag state, dedupe drops, and extract paths from both web and Tauri drag events.
  • Added addWorkspaceFromPath and server-side path validation (is_workspace_path_dir) to accept only directories and reuse the existing add flow.
  • Added tests for the new hook and workspace path add flow, plus minor wiring updates.

Evidence

Screen.Recording.2026-01-20.at.23.58.26.mov

Testing

  • Manual

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78137981b4

ℹ️ 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".

Comment on lines +211 to +213
const selection = path.trim();
if (!selection) {
return null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Preserve leading/trailing whitespace in workspace paths

In addWorkspaceFromPath, the incoming path is normalized with trim(). On macOS/Linux, directory names can legally start or end with whitespace, so trimming changes the actual filesystem path and can make a valid folder (e.g., a workspace named with leading/trailing spaces) fail to add. This is a regression because addWorkspace now delegates to this helper, so even file‑picker selections get trimmed. Consider removing the trim or limiting it to known drag/drop artifacts instead of always mutating the path.

Useful? React with 👍 / 👎.

@Dimillian Dimillian merged commit c2f12de into Dimillian:main Jan 21, 2026
5 checks passed
Dimillian added a commit that referenced this pull request Jan 21, 2026
@Dimillian
Copy link
Owner

FYI I had to revert it, please rework it and test it properly. It broke the drag image in the composer to attach.
Ideally it should not be a whole window drop but just show an overlay when dragging a folder (and no anything) in the sidebar, and the sidebar only

@ignaciocervino
Copy link
Contributor Author

@Dimillian Sorry for that regression. Fixed in #184

gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants