Commit Graph

11 Commits

Author SHA1 Message Date
bincxz 5b0a21146c fix(snippets): clear hidden package dialog state 2026-08-28 12:25:57 +08:00
bincxz 792a1a7be9 fix(snippets): sync hidden vault package state 2026-08-28 12:14:27 +08:00
bincxz 8db29c4726 fix(snippets): restore draggable after right-click outside
Arm a one-shot window/document capture listener on non-primary
pointerdown so releasing over the portalled context menu still
restores draggable, and share the helper across both surfaces.
2026-08-27 21:35:30 +08:00
bincxz d9d9812e71 fix(snippets): add package context menu for rename and delete
Right-clicking a script package in the terminal scripts tree now shows
Rename and Delete. Vault package and snippet cards use asChild triggers
and ignore non-primary drags so Windows context menus are not swallowed.
2026-08-27 21:02:18 +08:00
bincxz 2004f26c3e ui(scripts): compact side panel toolbar like host tree
Hide search behind an icon toggle, surface create actions as inline icons,
and move bulk delete into a selection bar so the Library toolbar stays compact.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 11:02:28 +08:00
Netcatty-Bot 5dcba28621 feat(scripts): add expand/collapse all and delete-selected toolbar actions (#2828)
* fix(#2826): automated Cursor CLI fix

* fix(scripts): confirm bulk delete and clear host bindings

Scripts side-panel mass-delete skipped confirmation and, when
onSnippetsChange was wired, filtered snippets without clearing host
login/connect script bindings. Confirm first, always dispatch the shared
delete event, and apply deletes via deleteSelectedSnippetsFromVault.

Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>

* fix(scripts): harden delete handler against stale vault state

Read snippets/hosts from refs in the shared delete listener so rapid
confirms cannot resurrect already-removed items, and clear pending bulk
delete when the scripts panel hides so the confirm dialog does not
resurface after a mid-prompt hide.

Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>

* fix(scripts): keep delete refs current within the same tick

Update snippetsRef/hostsRef immediately after applying a delete so a
same-tick second event cannot rebuild vault state from the pre-delete
snapshot and resurrect removed snippets or host bindings.

Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>

* fix: address Codex review on PR #2828

* fix(scripts): hoist bulk-delete confirm outside toolbar popover

Portalled Dialog focus dismissed the compact Scripts popover and cleared
pendingDeleteIds before confirm. Own the confirm in TerminalToolbar and
defer via onBulkDeleteRequest when nested in that popover.

Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: serialize snippet saves with bulk-delete vault lock

updateSnippets wrote STORAGE_KEY_SNIPPETS without withVaultImportLock, so a
concurrent edit could land between bulk-delete's snapshot read and journal
commit and be discarded. Queue ordinary snippet writes on the shared lock and
include them in waitForPendingVaultWrites.

Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>

* fix: rebase queued snippet saves onto latest vault snapshot

Locking updateSnippets alone still wrote a pre-delete full array, so a
popup bulk-delete could be resurrected (or a storage-event version bump
could cancel the local edit). Rebase under the vault lock and supersede
only newer local writers via snippetsWriteOwnerRef.

Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

* fix: address Codex review on PR #2828

---------

Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: 陈大猫 <binaricat@users.noreply.github.com>
2026-08-10 10:20:55 +08:00
bincxz 9203ce69c0 fix(scripts): address Codex P1 sensitive skip and package focus trap
Guard standalone no-workspace run-on-all against sensitive prompts, and keep
Tab focus inside the new-package dialog overlay.
2026-07-27 14:12:31 +08:00
bincxz 7884524afa fix(scripts): address multi-agent review on side panel UX
Restore modal dialog contract for quick-add (role/data-state/escape),
harden package path validation, skip sensitive sessions on multi-tab
snippet sends, and show a single run-on-all-tabs action for plain snippets.
2026-07-27 13:44:40 +08:00
bincxz 074724eb68 feat(scripts): improve terminal scripts side panel UX
Address #2502: bind shortkeys when quick-adding snippets, add package
creation via a split + menu, convert quick-add to a right-side drawer,
and let code snippets run on all workspace tabs from the context menu.
2026-07-27 13:37:50 +08:00
bincxz 5d6b6b9769 fix theme contrast in terminal side panels 2026-07-12 23:40:28 +08:00
陈大猫 5e00e998a8 Add vault drag reorder ordering (#1407) 2026-06-11 16:05:17 +08:00