Skip to content

fix: open the folder menu from Places - #137

Closed
AksharP5 wants to merge 2 commits into
thisisgm:mainfrom
AksharP5:fix/places-context-menu
Closed

AksharP5 wants to merge 2 commits into
thisisgm:mainfrom
AksharP5:fix/places-context-menu

Conversation

@AksharP5

@AksharP5 AksharP5 commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Right-clicking folders under Places currently does nothing. These rows now open the shared folder menu, and each action targets the clicked folder independently of the current listing. The sidebar menu key uses the same path.

The existing menu snapshot captures the folder's identity before operations run. Rename uses the existing dialog and follows the new path when the renamed folder contains the current location.

Fixes #136.

Validation:

  • Full JavaScript suite and 9 menu backend tests in debug and release passed; file budgets and shell loading passed.
  • New backend regressions cover copy/rename targeting, replaced-folder refusal and missing-target refusal. All 8 added assertions passed.
  • Isolated real-shell checks passed for the sidebar signal, full menu and submenu, copy, Properties, rename failure/retry, ancestor rename and returning to listing actions.
  • tests/run-all.sh has five failing suites here: ops, protocol and uistate also fail on unchanged main; thumbs and media require missing media fixtures. Native pointer tests were unavailable because omarchy-drive is not installed.

Summary by CodeRabbit

  • New Features

    • Added context menus for Home and Places folders.
    • Folder menus support opening, terminal access, permissions, copying, duplicating, renaming, trashing, pasting, compressing, and adding favorites.
    • Actions apply to the clicked folder, even when another directory is open.
    • Added folder-specific rename handling with confirmation and safeguards against acting on changed or missing folders.
  • Documentation

    • Documented the new Places-folder menu behavior and supported actions.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 617d22d5-35ad-491d-a0a1-95d335d0aa89

📥 Commits

Reviewing files that changed from the base of the PR and between c6a0149 and cc7089e.

📒 Files selected for processing (15)
  • README.md
  • docs/protocol.md
  • src/backend/menu_actions.rs
  • src/backend/run.rs
  • tests/js/harness.qml
  • tests/js/pathmenu.js
  • tests/ops.sh
  • ui/ContextMenu.qml
  • ui/MenuActionDialog.qml
  • ui/Pane.qml
  • ui/PaneMenuActions.qml
  • ui/Sidebar.qml
  • ui/js/Ops.js
  • ui/js/PathMenu.js
  • ui/js/RailKeys.js

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change adds context menus for Home and XDG folders under Places. Menu actions use explicit folder paths, backend snapshots return metadata, rename supports path targets, and tests cover action routing and stale or missing paths.

Changes

Places context menu support

Layer / File(s) Summary
Explicit path snapshot contract
src/backend/..., docs/protocol.md
Menu actions accept explicit paths. Snapshot responses include selection count and file-type mode metadata.
Places target menu wiring
ui/ContextMenu.qml, ui/Pane.qml, ui/PaneMenuActions.qml, ui/Sidebar.qml, ui/js/RailKeys.js
Places entries open shared menus with fixed target paths. Menu identity, validation, terminal actions, Dropbox checks, and snapshot handling use the target path.
Target action dispatch and rename
ui/js/PathMenu.js, ui/js/Ops.js, ui/MenuActionDialog.qml, ui/PaneMenuActions.qml
Path-targeted actions dispatch through PathMenu. Paste and compression use the target destination. Rename dialogs submit and process path-based rename operations.
Validation and documentation
tests/js/*, tests/ops.sh, README.md
Tests cover Places actions, cursor preservation, stale inode rejection, missing paths, and rename behavior. README and protocol documentation describe the feature.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Sidebar
  participant PaneMenuActions
  participant Backend
  User->>Sidebar: right-click Places folder
  Sidebar->>PaneMenuActions: open target-path menu
  PaneMenuActions->>Backend: snapshot explicit folder path
  Backend-->>PaneMenuActions: return folder metadata
  PaneMenuActions->>Backend: execute selected action
  Backend-->>User: complete action or report validation failure
Loading

Suggested reviewers: thisisgm

Merge Risk: ⚪ Minimal · up to cc708

Places menu actions retain the clicked folder target, including Add to Favorites. No actionable merge-blocking issue remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (8 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #136 requires a normal folder menu for Home and Places folders. Sidebar.qml opens the shared menu with the entry path. ContextMenu.qml builds the normal listing entries with one explicit tar…
Out of Scope Changes check ✅ Passed The changes stay within issue #136. The README and protocol updates document the folder-menu behavior and path snapshot contract. The added tests and targeting helpers support the implementation. No u…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: opening folder menus from Places.
Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 7 files. (8 skipped: 8 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thisisgm

Copy link
Copy Markdown
Owner

Landed in v0.3.0 reworked onto the menu board with credit; closing in favour of that commit, thank you.

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.

Places folders do not open a context menu

2 participants