Skip to content

feat: add the File New Task dialog - #34

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/file-new-task-7fde
Oct 20, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/file-new-task-7fde

Conversation

@JamesLinYJ

Copy link
Copy Markdown
Owner

Summary

File → New Task previously opened the system Run dialog (IShellDispatch::FileRun). It now opens a Task Manager dialog with a command line and an optional “create this task with administrative privileges” checkbox.

  • The launch runs on a worker thread through ShellExecuteExW. Administrative launches use the runas verb. There is no custom token path.
  • Failure is an immediate dialog. Success only means the shell accepted the request; the dialog does not claim the task is still running.
  • Options is unchanged. New strings are in TextKey and every locale. IDM_RUN keeps its resource ID, routing, enabled state, and status-bar help.

Checks

Local Linux cross typecheck (not a Windows device test):

  • cargo fmt --all -- --check
  • cargo check --all-targets --locked for x86_64-pc-windows-msvc, i686-pc-windows-msvc, and aarch64-pc-windows-msvc
  • cargo clippy --all-targets --locked -- -D warnings for those three targets
  • git diff --check

cargo test and cargo build --release did not link here: this host has no Windows SDK import libraries (kernel32.lib and the rest). CI on Windows is the test and release build.

Open in Web Open in Cursor 

Replace the system Run dialog with a Task Manager dialog that takes a
command line and an optional administrative-privileges checkbox. The
launch uses ShellExecuteEx off the UI thread, with runas for elevation,
and reports failure immediately without claiming the task is still alive.

Co-authored-by: jameslincn <jameslincn@outlook.sg>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T03:40:32.084507Z 531c252 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 531c252a3c

ℹ️ 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 thread src/app/new_task.rs
Comment thread src/app/mod.rs Outdated
Resolve the whole New Task input as one shell resource before ShellExecuteExW, so unquoted paths such as C:\Program Files are not cut at the first space. Apply SHRestricted(REST_NORUN) to every New Task entry, including the Applications-page button and view popup.

Co-authored-by: jameslincn <jameslincn@outlook.sg>
@cursor
cursor Bot merged commit 553ba15 into main Oct 20, 2026
3 checks passed
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