Restore access to old threads that mention rules - #58560
Merged
MartinYe1234 merged 8 commits intoJun 4, 2026
Merged
Conversation
Removing the Rule variant from MentionUri broke deserialization of threads saved before rules were removed, making those threads inaccessible. Re-add a minimal, self-contained Rule variant so old threads still load; serde ignores the now-removed id field.
The previous fix dropped the rule id field, so re-saved threads could no longer be loaded by older Zed versions that still require it. Keep the id verbatim through serialization, and synthesize a valid placeholder when it is missing, so threads load on any version.
Clicking a legacy rule mention did nothing since the rules UI was removed. Instead, open the skill file the rule was migrated into (when it exists) and show a toast letting the user know rules are now skills.
Migrated skills always live in the local global skills dir, but open_abs_path resolves against the active project, which fails on remote/collab projects. Resolve the file against the local filesystem: open the editable file on local projects, and show a read-only local buffer on remote/collab. Native path joins keep this correct on Windows.
MartinYe1234
marked this pull request as ready for review
June 4, 2026 16:33
danilo-leal
approved these changes
Jun 4, 2026
MartinYe1234
deleted the
martin/ai-371-preview-data-loss-in-old-threads-mentioning-rules
branch
June 4, 2026 16:56
TomPlanche
pushed a commit
to TomPlanche/zed
that referenced
this pull request
Jun 8, 2026
Removing the `Rule` variant from `MentionUri` in zed-industries#58080 broke deserialization of any thread saved before the rules-to-skills migration. Loading one failed with `unknown variant `Rule``, making those threads inaccessible. This restores access without bringing back the rules feature: - Reintroduce a backward-compatible `Rule` mention variant so legacy threads deserialize again. - Preserve the original rule `id` through save/load so a thread re-saved by a newer build still loads on older Zed versions (and synthesize a valid placeholder when the id is missing). - Clicking a legacy rule mention now opens the skill the rule was migrated into, and shows a notification linking the Skills docs. On remote/collab projects the migrated file lives on the local machine, so it opens as a read-only buffer. If no matching skill exists, it does nothing. Closes zed-industries#58498 Closes AI-371 Release Notes: - Fixed old threads that mention Rules being inaccessible after Rules were migrated to Skills
This was referenced Jun 18, 2026
Closed
This was referenced Jul 1, 2026
This was referenced Jul 10, 2026
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
Removing the `Rule` variant from `MentionUri` in zed-industries#58080 broke deserialization of any thread saved before the rules-to-skills migration. Loading one failed with `unknown variant `Rule``, making those threads inaccessible. This restores access without bringing back the rules feature: - Reintroduce a backward-compatible `Rule` mention variant so legacy threads deserialize again. - Preserve the original rule `id` through save/load so a thread re-saved by a newer build still loads on older Zed versions (and synthesize a valid placeholder when the id is missing). - Clicking a legacy rule mention now opens the skill the rule was migrated into, and shows a notification linking the Skills docs. On remote/collab projects the migrated file lives on the local machine, so it opens as a read-only buffer. If no matching skill exists, it does nothing. Closes zed-industries#58498 Closes AI-371 Release Notes: - Fixed old threads that mention Rules being inaccessible after Rules were migrated to Skills
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
Removing the `Rule` variant from `MentionUri` in zed-industries#58080 broke deserialization of any thread saved before the rules-to-skills migration. Loading one failed with `unknown variant `Rule``, making those threads inaccessible. This restores access without bringing back the rules feature: - Reintroduce a backward-compatible `Rule` mention variant so legacy threads deserialize again. - Preserve the original rule `id` through save/load so a thread re-saved by a newer build still loads on older Zed versions (and synthesize a valid placeholder when the id is missing). - Clicking a legacy rule mention now opens the skill the rule was migrated into, and shows a notification linking the Skills docs. On remote/collab projects the migrated file lives on the local machine, so it opens as a read-only buffer. If no matching skill exists, it does nothing. Closes zed-industries#58498 Closes AI-371 Release Notes: - Fixed old threads that mention Rules being inaccessible after Rules were migrated to Skills
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removing the
Rulevariant fromMentionUriin #58080 broke deserialization of any thread saved before the rules-to-skills migration. Loading one failed withunknown variantRule``, making those threads inaccessible.This restores access without bringing back the rules feature:
Rulemention variant so legacy threads deserialize again.idthrough save/load so a thread re-saved by a newer build still loads on older Zed versions (and synthesize a valid placeholder when the id is missing).Closes #58498
Closes AI-371
Release Notes: