# 嵌套模式禁用扳手菜单操作

**URL:** https://meta.discourse.org/t/nested-mode-disables-post-wrench-menu-actions/403155
**Category:** Bug
**Tags:** nested-replies
**Created:** [2026年五月16日 14:26 UTC](https://meta.discourse.org/t/nested-mode-disables-post-wrench-menu-actions/403155 "2026-05-16T14:26:38Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2026年五月18日 20:41 UTC](https://meta.discourse.org/t/nested-mode-disables-post-wrench-menu-actions/403155/6 "2026-05-18T20:41:23Z")

</div>

> [@Lilly](#):
>
> 点击扳手图标可以调出菜单，但选择任何选项都会失败且没有报错。必须切换到扁平模式，找到帖子并执行所需操作。

> <https://github.com/discourse/discourse/pull/40138>
>
> \## Summary
> 
> Clicking items in the post wrench (admin) menu in nested replies — C…hange Owner, Lock Post, Rebuild HTML, Change Notice, Grant Badge, Toggle Wiki, etc. — did nothing: no error, no network request, no UI change.
> 
> \`AdminPostMenu#topicAction\` invokes the chosen item via \`this.args.data\[name\]?.()\`. The optional chain silently no-ops when the action is \`undefined\`. In nested mode none of these actions were plumbed to \`\<PostMenu\>\`, so every click was a quiet no-op.
> 
> This adds delegate actions on the nested controller (mirroring the existing \`editPost\`/\`recoverPost\`/\`showHistory\` pattern that forwards to the hydrated topic controller and topic route), then plumbs them through:
> 
> \- \`templates/nested.gjs\` → \`\<Nested\>\` / \`\<NestedContextView\>\`
> \- \`\<Nested\>\` / \`\<NestedContextView\>\` → \`\<NestedOp\>\` and \`\<NestedPost\>\`
> \- \`\<NestedOp\>\` → OP's \`\<PostMenu\>\`
> \- \`\<NestedPost\>\` → reply's \`\<PostMenu\>\` and recursive \`\<NestedPostChildren\>\`
> \- \`\<NestedPostChildren\>\` → recursive \`\<NestedPost\>\` (so the menu works at any depth)
> 
> Affected actions: \`changeNotice\`, \`changePostOwner\`, \`grantBadge\`, \`lockPost\`, \`unlockPost\`, \`permanentlyDeletePost\`, \`rebakePost\`, \`showPagePublish\`, \`togglePostType\`, \`toggleWiki\`, \`unhidePost\`.
> 
> \## Test plan
> 
> \- \[x\] Added \`spec/system/nested\_post\_admin\_menu\_spec.rb\` exercising lock-post on a reply, lock-post on the OP, and change-owner modal on a reply (CI will run)
> \- \[x\] \`bin/lint --fix\` on all changed files (eslint, prettier, rubocop pass)
> \- \[\] Manually: as admin in nested mode, open wrench on OP and replies — each menu action fires (lock, rebake, change owner modal, etc.)

---

_[View the full topic](https://meta.discourse.org/t/nested-mode-disables-post-wrench-menu-actions/403155)._
