Skip to content

web: rollback on a Git project can render an empty composer context strip #435

Description

@rynfar

What happens

On a Git project, a thread whose rollback is in progress can render a visible but completely empty composer context strip — a 2.25rem bar with nothing in it, plus the shell's clip-path extension applied around it.

Why

The strip's visibility and its contents disagree about what "has Git context" means:

  • ChatView.tsx:5479 passes isGitRepo into shouldShowComposerContextStrip
  • ChatView.tsx:9257 passes showGitControls={isGitRepo && !rollbackActive} into BranchToolbar

So during a rollback the predicate still says "there is Git context, keep the strip open", while BranchToolbar skips every Git control it would have drawn.

Reproduction conditions

All of these at once, on a Git project:

  • isRollbackActive(activeThread.rollbackStatus) is true
  • single primary environment, so showEnvironmentIndicator is false
  • composer at full size, so restingComposerControlsVisible is false
  • capacity readout off, or no reading yet, so hasCapacityReading is false

MobileRunContextSelector, BranchToolbarEnvModeSelector, and BranchToolbarBranchSelector are all skipped, the environment indicator is skipped, the controls host is empty, and ComposerUsageIndicator returns null.

Suggested fix

Pass showGitControls rather than isGitRepo into the predicate, so visibility is decided by what will actually render.

Notes

Pre-existing; not introduced by #432. Found during review of that PR, which fixed the mirror-image case (strip hidden while it still had a capacity reading in it).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions