fix(ui): show git actions for feature-branch sub-namespaces#2364
Draft
shangyian wants to merge 1 commit into
Draft
fix(ui): show git actions for feature-branch sub-namespaces#2364shangyian wants to merge 1 commit into
shangyian wants to merge 1 commit into
Conversation
The git action button gated on the structural gitShape (`=== 'branch'`), but a sub-namespace inside a feature branch inherits github_repo_path + git_branch with no parent_namespace of its own, so detectShape() returns 'flat'. Such sub-namespaces were editable (isGitManaged is false) yet fell through to the not-git "Connect to Git" button instead of Sync to Git / Create PR — the same `flat`-shape trap the read-only verdict fix (DataJunction#2348) addressed, in the button logic it missed. Gate editableBranch on `!isGitManaged && (gitShape === 'branch' || isFeatureBranch)` so a feature branch and its sub-namespaces get the edit->ship controls consistently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for thriving-cassata-78ae72 canceled.
|
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.
Summary
The git action button gated on the structural
gitShape, but a sub-namespace inside a feature branch inheritsgithub_repo_path+git_branchwith noparent_namespaceof its own, sodetectShape()returns 'flat'. Such sub-namespaces were editable yet fell through to the not-git "Connect to Git" button instead of Sync to Git / Create PR. This is the sameflat-shape trap the read-only verdict fix (#2348) addressed, in the button logic it missed.This change gates
editableBranchon!isGitManaged && (gitShape === 'branch' || isFeatureBranch)so a feature branch and its sub-namespaces get the edit->ship controls consistently.Test Plan
make checkpassesmake testshows 100% unit test coverageDeployment Plan