Skip to content

TUI: recursive submodule navigation #931

Description

@gfargo

Spun out of #884 (closed). The metadata-level submodule support landed in #925 / #930; the recursive-navigation piece is large enough to track separately.

What

`Enter` on a submodule row should drill into the submodule's history, the same way `Enter` on a commit drills into its diff. Once inside, the user can navigate the submodule's commits / files / branches as if they'd run `coco ui` from inside the submodule directory. `Esc` / `<` pops back to the parent repo.

Why

Today, a user inspecting a submodule update has to:

  1. See the inspector block from feat(log-tui): submodule status loader + inspector side-panel (#884) #930 (name / pinned / tracking / remote)
  2. Drop to shell
  3. `cd vendor/lib && coco ui`
  4. Navigate to find what changed between the old and new pinned commits

The Enter-to-drill workflow collapses all four steps into one keystroke.

Implementation sketch

  • New `SubmoduleStack` state on the root view model — a list of nested repo contexts. Pushing a submodule rebinds the SimpleGit instance (and every loader that consumes it) against the submodule's working dir, and pushes the prior context onto the stack. Popping restores.
  • Title-bar breadcrumb so the user always knows which repo they're in (`coco-ui · vendor/lib`).
  • All context-load paths must be careful about the rebind — anything cached against the parent SimpleGit instance has to be invalidated or scoped.

Effort

Large. Touches the runtime's git-instance lifecycle, every context loader, the view-stack semantics, and probably the persistence layer (tab-by-repo settings).

Related

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