gcp-cherry-pick-bot[bot] 3d5035d8a6 title_bar: Ensure git onboarding banner dismissal is properly respected (cherry-pick #28147) (#28148)
Cherry-picked title_bar: Ensure git onboarding banner dismissal is
properly respected (#28147)

A user reported this issue [on

Discord](https://discord.com/channels/869392257814519848/873292398204170290/1357879959422636185).

The issue here only arises for users which recently installed Zed or had
previously not dismissed the Git Onboarding component. It was introduced
by https://github.com/zed-industries/zed/pull/27412, which made the
banner component reusable.

For every banner, there is a value stored in the KVP store when it was
first dismissed. For the git onboarding banner, this was
`zed_git_banner_dismissed_at` initially, but this key would have been
changed by the linked PR. A change would have resulted in the banner
being shown again for users who already dismissed the panel, so for the
special case of `Git Onboarding`, a check was added which ensured this
would not happen.

However, this check was only added for reading from the key from the DB
but not on writing the git onboarding dismissal it to the DB. Thus, if a
user who had not previously dismissed the panel opened Zed, we would
check for the old key to be present in the DB. Since that would not be
the case, the banner would be shown. If the user dismissed the panel, it
would be stored in the database with the new key. Thus, on a reopen of
Zed, the banner would again be shown since for the old key there would
still be no value present and users are unable to dismiss the panel.


This PR fixes this behavior by moving the check into the method that
generates the key. With this, users which were unaffected by the bug
will still not see the panel again. Users who would install Zed with
this change present will be able to properly dismiss the panel aswell.
Users which were affected by the bug need to dismiss the banner one more
time. That happens because I did not want to modify the dismissal check
to check for two keys (the original one and the new one), as it would
clutter the logic even more for this special case. If this would be
preferred, feel free to let me know.

Release Notes:

- Fixed an issue where dismissing the git onboarding banner would not be
persisted across sessions.

Co-authored-by: Finn Evers <dev@bahn.sh>
2025-04-05 11:08:31 -04:00
2025-04-01 22:35:15 +00:00
2025-04-03 08:54:26 -04:00
2025-03-18 12:55:25 -04:00
2025-04-03 08:54:26 -04:00
2025-04-03 08:54:26 -04:00
WIP
2023-12-14 09:25:14 -07:00
2025-03-10 01:06:11 -07:00
2024-09-30 17:46:21 -04:00
2025-04-01 14:19:10 -07:00
2025-02-04 09:02:59 -05:00
2025-02-04 09:02:59 -05:00
2024-08-08 17:21:38 -07:00
2024-09-05 15:39:16 -04:00
2024-11-15 14:37:39 -05:00
2025-03-10 01:06:11 -07:00
2025-03-10 01:06:11 -07:00

Zed

CI

Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.


Installation

Packaging status

On macOS and Linux you can download Zed directly or install Zed via your local package manager.

Other platforms are not yet available:

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Also... we're hiring! Check out our jobs page for open roles.

Licensing

License information for third party dependencies must be correctly provided for CI to pass.

We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:

  • Is it showing a no license specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Readme 586 MiB
Languages
Rust 94.7%
JSON-with-Comments 3.1%
Inno Setup 0.6%
Scheme 0.5%
Shell 0.3%
Other 0.4%