Remove the unimplemented u and b keys

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 12:19:35 +02:00
co-authored by Claude Sonnet 5.5
parent a285a35c95
commit a328d3cc3a
6 changed files with 32 additions and 45 deletions
+2 -2
View File
@@ -119,8 +119,8 @@ The mouse works too: click to select, click `▸` to toggle, wheel to move.
## Status
A prototype. Browsing is complete; the actions `u` (check out the pin) and `b` (bump the pin to the tip) are
planned.
A prototype. Browsing is complete and read-only; write actions (restore,
stage pin) are being specified in [docs/actions.md](docs/actions.md).
## Documentation
+3 -3
View File
@@ -33,10 +33,10 @@ Installs `submarine` and the alias `sub` (linux/macOS, amd64/arm64) to
through a git provider (`internal/submodule/git`): `submarine [dir]`. It
fetches only when asked (`f`) and follows changes made in other shells. `submarine --mock` shows
the built-in mock data (`internal/submodule/mock`). `!` shows only
submodules with problems. The actions `u` and `b` only show a "not
implemented" message ([drafts of the write actions](actions.md)).
submodules with problems. It is read-only so far; the first write actions
are [drafted](actions.md).
Next steps, roughly in order:
1. Actions: checkout pin (`submodule update`), bump pin to tip, init.
1. Write actions: restore and stage pin, see [actions.md](actions.md).
2. (done) "Problems only" (`!`) view, reusing the tree's filter.
+4 -8
View File
@@ -89,7 +89,7 @@ commit hashes. It doesn't answer the questions users actually have:
severe first), staged pins, how many are still loading, and the time since
the last fetch.
- **F31** The footer shows key hints; `?` toggles the full help. It
temporarily shows short messages (e.g. "not implemented").
temporarily shows short messages (e.g. "copied <path>").
### Navigation
@@ -128,14 +128,10 @@ commit hashes. It doesn't answer the questions users actually have:
list is not mistaken for a healthy repository. See
[Problems only](ux-guide.md#problems-only).
### Actions (planned, not implemented)
### Actions (planned)
| Key | Action |
|---|---|
| `u` | Check out the pinned commit (`git submodule update`) |
| `b` | Bump the pin to the tip of its ref |
See [actions.md](actions.md) for the draft of the write actions.
The tool is read-only so far. The first write actions, restore and stage
pin, are drafted in [actions.md](actions.md).
## Usage
+17 -20
View File
@@ -221,7 +221,6 @@ colors in components.
| `c` | Copy the absolute directory of the selected submodule to the clipboard (OSC 52, so it also works over SSH; needs terminal support, in tmux `set -g set-clipboard on`). The footer confirms with `copied <path>`. Without a local provider (mock) the path relative to the superproject is copied |
| `/` | Open the filter, see [Filter](#filter) |
| `!` | Toggle problems only, see [Problems only](#problems-only) |
| `u`, `b` | Planned actions (see requirements) |
"First child" always means the first child **as displayed** (children are
grouped by directory).
@@ -276,29 +275,27 @@ the term*.
### Key reference
Every key in the UI, where it is shown, and whether it works. Update this
table when a key is added, moved or implemented. "Bar" is the short footer
Every key in the UI, where it is shown. Update this
table when a key is added or moved. "Bar" is the short footer
bar, "Palette" the detail pane's palette (the footer takes its keys over
where the palette can't be shown, see [Key bar and palette](#key-bar-and-palette)),
"Help" the full help (`?`).
| Key | Action | Group | Shown in | Implemented |
|---|---|---|---|---|
| `↑` / `k`, `↓` / `j` | Move selection | Navigation | Bar, Help | yes |
| `←` / `h`, `→` / `l` | Fold / unfold, parent / first child | Navigation | Bar, Help | yes |
| `H` / `⇧←`, `L` / `⇧→` | Collapse / expand all | Navigation | Bar, Help | yes |
| `space` | Toggle expand/collapse | Navigation | Bar, Help | yes |
| `home` / `g`, `end` / `G` | Header / last submodule | Navigation | Help | yes |
| `pgup`, `pgdn` | Move by one screen | Navigation | Help | yes |
| `c` | Copy path | Submodule | Palette, Help | yes |
| `u` | Checkout pin | Submodule | Help | no (flashes "not implemented") |
| `b` | Bump pin to tip | Submodule | Help | no (flashes "not implemented") |
| `f` | Fetch all repositories | Global | Help | yes |
| `r` | Reload everything | Global | Help | yes |
| `/` | Filter | Global | Help | yes |
| `!` | Problems only (toggle) | Global | Help | yes |
| `?` | Toggle full help | Global | Bar, Help | yes |
| `q`, `ctrl+c` | Quit | Global | Bar, Help | yes |
| Key | Action | Group | Shown in |
|---|---|---|---|
| `↑` / `k`, `↓` / `j` | Move selection | Navigation | Bar, Help |
| `←` / `h`, `→` / `l` | Fold / unfold, parent / first child | Navigation | Bar, Help |
| `H` / `⇧←`, `L` / `⇧→` | Collapse / expand all | Navigation | Bar, Help |
| `space` | Toggle expand/collapse | Navigation | Bar, Help |
| `home` / `g`, `end` / `G` | Header / last submodule | Navigation | Help |
| `pgup`, `pgdn` | Move by one screen | Navigation | Help |
| `c` | Copy path | Submodule | Palette, Help |
| `f` | Fetch all repositories | Global | Help |
| `r` | Reload everything | Global | Help |
| `/` | Filter | Global | Help |
| `!` | Problems only (toggle) | Global | Help |
| `?` | Toggle full help | Global | Bar, Help |
| `q`, `ctrl+c` | Quit | Global | Bar, Help |
### Mouse
-4
View File
@@ -380,10 +380,6 @@ func (m Model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
case key.Matches(msg, k.Issues):
m.tree.SetProblemsOnly(!m.tree.ProblemsOnly())
m.layout()
case key.Matches(msg, k.Update, k.Bump):
cmd := m.footer.Flash("“" + msg.String() + "” is not implemented in the prototype")
m.layout()
return m, cmd
}
return m, nil
}
+2 -4
View File
@@ -6,7 +6,7 @@ type keyMap struct {
Up, Down, Left, Right, Toggle key.Binding
CollapseAll, ExpandAll key.Binding
Home, End, PageUp, PageDown key.Binding
Update, Bump, Fetch, Reload, Filter, Issues key.Binding
Fetch, Reload, Filter, Issues key.Binding
Copy, Help, Quit key.Binding
}
@@ -23,8 +23,6 @@ func defaultKeys() keyMap {
End: key.NewBinding(key.WithKeys("end", "G"), key.WithHelp("end/G", "last")),
PageUp: key.NewBinding(key.WithKeys("pgup"), key.WithHelp("pgup", "page up")),
PageDown: key.NewBinding(key.WithKeys("pgdown"), key.WithHelp("pgdn", "page down")),
Update: key.NewBinding(key.WithKeys("u"), key.WithHelp("u", "checkout pin")),
Bump: key.NewBinding(key.WithKeys("b"), key.WithHelp("b", "bump pin to tip")),
Fetch: key.NewBinding(key.WithKeys("f"), key.WithHelp("f", "fetch")),
Reload: key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "reload")),
Filter: key.NewBinding(key.WithKeys("/"), key.WithHelp("/", "filter")),
@@ -59,7 +57,7 @@ func (k keyMap) FullHelp() [][]key.Binding {
{k.Up, k.Down, k.Left, k.Right, k.Toggle},
{k.CollapseAll, k.ExpandAll},
{k.Home, k.End, k.PageUp, k.PageDown},
{k.Copy, k.Update, k.Bump},
{k.Copy},
{k.Fetch, k.Reload, k.Filter, k.Issues},
{k.Help, k.Quit},
}