fix(framework-editor): publish detects name/description-only changes (FRAME-9)#3127
Merged
Merged
Conversation
… for publish Editing just the framework's name or description left the Publish Version button greyed out with "no changes detected" — the manifest diff only compared controls/requirements/policies/tasks and their links, never the framework's own metadata (which the manifest already stores). - framework-diff: add a `framework` meta-diff (name/description) to ManifestDiff. - VersionDiffView: hasAnyChanges() now counts a framework metadata change, and the diff renders a "Framework" section showing the name/description edit. Closes FRAME-9 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🎉 This PR is included in version 3.82.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What
The Publish Version button no longer stays greyed out ("no changes detected since the last published version") when you change only the framework's name and/or description.
Why (FRAME-9)
Reported on NIST SP800-53 v5.2 Low Impact: editing just the framework title/description via "Edit Framework" left Publish disabled, claiming no changes — the reporter had to make a throwaway edit to a requirement to force it.
Root cause: the manifest stores
framework.name/description, butdiffManifestsonly compared controls/requirements/policies/tasks and their links — never the framework's own metadata. SohasAnyChangesreturned false and the Publish button stayed disabled.Changes
API (
framework-diff.ts):frameworkmeta-diff ({ changed, name?, description? }) toManifestDiff, computed by comparingfrom.frameworkvsto.framework. Purely additive — no existing consumer constructs aManifestDiffliteral, so nothing else changes.Frontend (
VersionDiffView.tsx,useFrameworkDraftDiff.ts):hasAnyChanges()now counts a framework metadata change → Publish enables.from → to) / description-updated change. Field is optional on the client type for backward-compat with older/historical diffs.Testing
framework-diff.spec.ts: +3 tests (identical → no change; name change; description change). 29 API version tests pass, none of the existing ones regressed by the added field.VersionDiffView.test.tsx: +5 tests forhasAnyChanges(empty, name-only, description-only, changed:false, entity sanity).turbo typecheckclean for both@trycompai/framework-editorand the changed API files.Both publish-time (draft vs latest) and historical (v_n vs v_n-1) diffs go through the same function, so both now reflect metadata changes.
🤖 Generated with Claude Code
Summary by cubic
Enables Publish when only the framework name or description changes, and shows those edits in the diff. Addresses FRAME-9.
frameworkmeta-diff (name/description) toManifestDiffand compute it indiffManifests.hasAnyChanges()now includes framework metadata; the diff shows a “Framework” section with name (from → to) and “Description updated”.frameworkfield is optional in client types for older/historical diffs.Written for commit b6e8240. Summary will update on new commits.