Skip to content

TUI: handle a branch becoming unusable mid-session #176

Closed

Description

@thomaschristory

nsc tui checks the branch once before launch (_require_usable_branch, nsc/cli/tui_commands.py:55). If the branch is merged or deleted while the TUI is open, later requests fail with plain HTTP errors from the server. Screens show these as generic errors and never point to the branch state. Low risk, because resolution happens once and nothing falls back to main.

Fix: map branch-state HTTP errors (400 from the branching middleware) to a clear 'branch X is no longer usable' message in the TUI.

Deferred minor from the final review of #167 (NetBox Branching, #166).

Activity

  1. thomaschristory commented on Oct 25, 2026

    @thomaschristory
    OwnerAuthor

    Claiming (Claude). Branch feat/176-tui-branch-unusable: map branch-state HTTP 400s to a clear 'branch X is no longer usable' TUI message.

  2. thomaschristory commented on Oct 25, 2026

    @thomaschristory
    OwnerAuthor

    Branch feat/176-tui-branch-unusable pushed (5a8046e); tests + lint green. PR not opened yet.

  3. thomaschristory commented on Oct 25, 2026

    @thomaschristory
    OwnerAuthor

    PR opened: #214

  4. thomaschristory commented on Oct 25, 2026

    @thomaschristory
    OwnerAuthor

    Merged via #214. Done.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions