Skip to content

fix(ui): show git actions for feature-branch sub-namespaces#2364

Draft
shangyian wants to merge 1 commit into
DataJunction:mainfrom
shangyian:fix-feature-branch-git-button
Draft

fix(ui): show git actions for feature-branch sub-namespaces#2364
shangyian wants to merge 1 commit into
DataJunction:mainfrom
shangyian:fix-feature-branch-git-button

Conversation

@shangyian

Copy link
Copy Markdown
Collaborator

Summary

The git action button gated on the structural gitShape, 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 yet fell through to the not-git "Connect to Git" button instead of Sync to Git / Create PR. This is the same flat-shape trap the read-only verdict fix (#2348) addressed, in the button logic it missed.

This change gates editableBranch on !isGitManaged && (gitShape === 'branch' || isFeatureBranch) so a feature branch and its sub-namespaces get the edit->ship controls consistently.

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

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>
@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit bcff6ea
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a6334dd935a640008739c19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant