zed/crates/edit_prediction_ui
morgankrey 129c68ff4b
Fix edit predictions for organizations without a subscription (#65301)
## Summary

Fix Zed AI edit predictions for a selected team organization with no
active subscription. The menu previously showed the personal account's
unlimited allowance even though requests from that organization failed.

- Show a no-subscription explanation instead of the personal allowance.
- Stop prediction requests and disable **Predict Edit at Cursor** while
that organization is selected.
- Show an unavailable indicator and tooltip. Update them when the
organization changes.

Personal accounts, subscribed organizations, and other prediction
providers keep their existing behavior. Cloud access rules, billing
records, and `deny-free-edit-predictions` are unchanged.

## Tests

- `cargo test -p client -p edit_prediction -p edit_prediction_ui` — 22
client, 101 edit-prediction, and 5 UI tests passed.
- `./script/clippy -p client -p edit_prediction -p edit_prediction_ui` —
passed with warnings denied.
- `cargo fmt --all -- --check` and `git diff --check` — passed.

Tests cover subscription state, blocked requests, another prediction
provider, switching to a subscribed organization, and main's Free-plan
handling. The new UI still needs a manual check. Requests already in
progress are not cancelled when the organization changes.

Release Notes:

- Fixed edit predictions showing an unlimited allowance and available
controls for a selected team organization with no active subscription.
2026-10-09 14:06:54 +00:00
..
src Fix edit predictions for organizations without a subscription (#65301) 2026-10-09 14:06:54 +00:00
Cargo.toml copilot: Move enterprise URI to top-level setting (#65082) 2026-10-02 11:22:04 +00:00
LICENSE-GPL