# Hide Rules UI when Skills feature flag is enabled \(\#56782\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/33c5ce69ef8424ae481664084638bf06924ac38a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 33c5ce69ef8424ae481664084638bf06924ac38a

Requested commit: 33c5ce69ef8424ae481664084638bf06924ac38a

Commit: 33c5ce69ef8424ae481664084638bf06924ac38a

Tree: a15d07d16186c90153669b9432219adbcf96d340

Author: MartinYe1234

Committer: GitHub

## Message

```
Hide Rules UI when Skills feature flag is enabled (#56782)

Hides the legacy Rules surfaces when the `skills` feature flag is
enabled, since Rules are surfaced through the Skills UI in that case:

- The **Rules** entry in the agent panel's ellipsis (triple-dot)
dropdown menu is hidden.
- The `assistant: open rules library` command palette action is hidden.

The `@rules` autocomplete in the chat input is intentionally left alone
for now.

### Implementation notes

`cx.has_flag::<SkillsFeatureFlag>()` reads from a global feature-flag
store that is populated asynchronously from the server:

- **Command palette**: `update_command_palette_filter` is already re-run
via `cx.on_flags_ready` once flags arrive, so the filter is reapplied
with the correct value. No new wiring needed.
- **Dropdown menu**: the popover's menu closure runs on every open, so
the latest flag value is reflected at click time.

Release Notes:

- N/A
```

## Parents

- [fa838566c61802f89ef59ed33a70d19cf4446453](https://git.cafe/gitcafe/zed/commit/fa838566c61802f89ef59ed33a70d19cf4446453?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/33c5ce69ef8424ae481664084638bf06924ac38a?format=markdown)
