detached 5d58f8a

refactor(picker): shorten remote session status

commit
5d58f8a2727fbeb283cb505b7321690b67b396fe
author
brice · · 2026-08-10 04:42 UTC
parent
fe8474f
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +11 -4
M internal/usecase/daemon/remote_picker.go +1 -4
@@ -210,10 +210,7 @@ func remotePickerView(key domain.RemoteSessionKey, session ports.RemoteCatalogSe
210210 if detail == "" {
211211 switch session.State {
212212 case "up":
213- detail = "running"
214- if session.Attached {
215- detail += " · attached"
216- }
213+ detail = "up"
217214 case "down", "stopped":
218215 detail = "stopped"
219216 case "broken":
@@ -210,10 +210,7 @@ func remotePickerView(key domain.RemoteSessionKey, session ports.RemoteCatalogSe
210 if detail == "" {210 if detail == "" {
211 switch session.State {211 switch session.State {
212 case "up":212 case "up":
213- detail = "running"213+ detail = "up"
214- if session.Attached {
215- detail += " · attached"
216- }
217 case "down", "stopped":214 case "down", "stopped":
218 detail = "stopped"215 detail = "stopped"
219 case "broken":216 case "broken":
M internal/usecase/daemon/remote_picker_test.go +10 -0
@@ -82,6 +82,16 @@ func TestRemotePickerStoppedRowsUseCanonicalStateAndSafeSelection(t *testing.T)
8282 }
8383 }
8484
85+func TestRemotePickerUsesCompactUpDetailRegardlessOfAttachment(t *testing.T) {
86+ for _, attached := range []bool{false, true} {
87+ view := remotePickerView(domain.RemoteSessionKey{Host: "remote", Name: "work"}, ports.RemoteCatalogSession{
88+ LifecycleID: remoteLifecycleForTest(), Name: "work", State: "up", Attached: attached,
89+ Tabs: []ports.RemoteCatalogTab{{ID: "tab-1", Index: 0}},
90+ }, remoteHostFresh, time.Now())
91+ require.Equal(t, "up", view.RemoteDetail)
92+ }
93+}
94+
8595 func TestRemotePickerDeduplicatesSameLifecycleReachedThroughHostAliases(t *testing.T) {
8696 store := &remoteRefreshHostStore{hosts: []string{"remote", "vev@remote"}}
8797 d := newRemotePickerDaemon(store)
@@ -82,6 +82,16 @@ func TestRemotePickerStoppedRowsUseCanonicalStateAndSafeSelection(t *testing.T)
82 }82 }
83 }83 }
84 84
85+func TestRemotePickerUsesCompactUpDetailRegardlessOfAttachment(t *testing.T) {
86+ for _, attached := range []bool{false, true} {
87+ view := remotePickerView(domain.RemoteSessionKey{Host: "remote", Name: "work"}, ports.RemoteCatalogSession{
88+ LifecycleID: remoteLifecycleForTest(), Name: "work", State: "up", Attached: attached,
89+ Tabs: []ports.RemoteCatalogTab{{ID: "tab-1", Index: 0}},
90+ }, remoteHostFresh, time.Now())
91+ require.Equal(t, "up", view.RemoteDetail)
92+ }
93+}
94+
85 func TestRemotePickerDeduplicatesSameLifecycleReachedThroughHostAliases(t *testing.T) {95 func TestRemotePickerDeduplicatesSameLifecycleReachedThroughHostAliases(t *testing.T) {
86 store := &remoteRefreshHostStore{hosts: []string{"remote", "vev@remote"}}96 store := &remoteRefreshHostStore{hosts: []string{"remote", "vev@remote"}}
87 d := newRemotePickerDaemon(store)97 d := newRemotePickerDaemon(store)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close