Skip to content

Refine init inventory menu section labels and spacing #318

@rianjs

Description

@rianjs

Problem

The interactive cr init inventory menus currently use the first command row's description as a pseudo section label. In the LLM runtime config menu, this causes Actions to render directly underneath Template: Claude CLI subscription, which reads like metadata for that template rather than a section heading.

The same inventory list also uses taller row spacing than the surrounding huh menus, making this stage feel visually inconsistent with the rest of init.

The footer help also advertises d delete and r restore while the cursor is on template/action rows. Those operations are ignored for templates, but showing them implies templates can be deleted or restored.

Desired behavior

  • Remove the Actions pseudo-label from command rows.
  • Avoid attaching section labels to selectable items where the label can be mistaken for item-specific help text.
  • Collapse the inventory row spacing/height so these menus feel closer to standard huh menu density.
  • Preserve clear separation for pending deletion rows if still needed, but do not make the first selectable command look special by accident.
  • Make the help footer context-aware so d delete appears only for deletable configured rows and r restore appears only for restorable pending-deletion rows.

Context

Current source of the Actions line:

  • internal/cmd/credentialcmd/init_inventory.go adds Actions via withSectionDescription(grouped[initInventoryRowKindCommand], "Actions").
  • internal/cmd/credentialcmd/credentialcmd.go makes Template: Claude CLI subscription the first LLM runtime command row, so it inherits that description.
  • internal/cmd/credentialcmd/init_inventory_test.go currently asserts this behavior, so tests need updating with the UI change.

Current source of the misleading delete/restore hints:

  • internal/cmd/credentialcmd/init_inventory.go always includes delete and restore bindings in AdditionalShortHelpKeys / AdditionalFullHelpKeys.
  • The key handlers already guard those actions with row-level Deletable / Restorable flags, so this is a presentation mismatch rather than a data mutation bug.

Acceptance criteria

  • The LLM runtime menu no longer shows Actions under Template: Claude CLI subscription.
  • Inventory menus have tighter vertical spacing comparable to adjacent huh menus.
  • Template/action rows do not show unavailable d delete or r restore footer hints.
  • Deletable configured rows still expose and support d delete.
  • Restorable pending-deletion rows still expose and support r restore.
  • Enter selects and escape backs out as before.
  • Tests cover the updated rendering, help, and order expectations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:surfaceUser-visible command surface and lifecycle commandsenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions