detached ad96dc0

refactor(client): rename the picker pending key field

commit
ad96dc057e84883a81b583cb18ad7d51a8568ec4
author
brice · · 2026-10-08 09:03 UTC
committer
brice · · 2026-10-08 09:31 UTC
parent
a536398
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +7 -7
M internal/usecase/client/supervisor.go +3 -3
@@ -895,8 +895,8 @@ type readyOutcome struct {
895895 // the supervisor can admit exactly the row the user committed. It opens no
896896 // stream and starts no terminal work itself.
897897 func (s *Supervisor) awaitReady(ctx context.Context, input *terminalInputLifetime, service ports.BrokerNavigator, sub ports.BrokerSubscription) readyOutcome {
898- if key := s.picker.pendingPickerKey; key != "" {
899- s.picker.pendingPickerKey = ""
898+ if key := s.picker.pendingKey; key != "" {
899+ s.picker.pendingKey = ""
900900 return readyOutcome{commitKey: key}
901901 }
902902 var changed <-chan struct{}
@@ -991,7 +991,7 @@ func (s *Supervisor) pickerOps() <-chan struct{} {
991991 func (s *Supervisor) takePickerClose() bool {
992992 op, key := s.cfg.Picker.TakeOp()
993993 if op.commit && key != "" {
994- s.picker.pendingPickerKey = key
994+ s.picker.pendingKey = key
995995 }
996996 if op.close && !op.exit {
997997 s.notifyPicker(pickerExitHint)
@@ -895,8 +895,8 @@ type readyOutcome struct {
895 // the supervisor can admit exactly the row the user committed. It opens no895 // the supervisor can admit exactly the row the user committed. It opens no
896 // stream and starts no terminal work itself.896 // stream and starts no terminal work itself.
897 func (s *Supervisor) awaitReady(ctx context.Context, input *terminalInputLifetime, service ports.BrokerNavigator, sub ports.BrokerSubscription) readyOutcome {897 func (s *Supervisor) awaitReady(ctx context.Context, input *terminalInputLifetime, service ports.BrokerNavigator, sub ports.BrokerSubscription) readyOutcome {
898- if key := s.picker.pendingPickerKey; key != "" {898+ if key := s.picker.pendingKey; key != "" {
899- s.picker.pendingPickerKey = ""899+ s.picker.pendingKey = ""
900 return readyOutcome{commitKey: key}900 return readyOutcome{commitKey: key}
901 }901 }
902 var changed <-chan struct{}902 var changed <-chan struct{}
@@ -991,7 +991,7 @@ func (s *Supervisor) pickerOps() <-chan struct{} {
991 func (s *Supervisor) takePickerClose() bool {991 func (s *Supervisor) takePickerClose() bool {
992 op, key := s.cfg.Picker.TakeOp()992 op, key := s.cfg.Picker.TakeOp()
993 if op.commit && key != "" {993 if op.commit && key != "" {
994- s.picker.pendingPickerKey = key994+ s.picker.pendingKey = key
995 }995 }
996 if op.close && !op.exit {996 if op.close && !op.exit {
997 s.notifyPicker(pickerExitHint)997 s.notifyPicker(pickerExitHint)
M internal/usecase/client/supervisor_attach.go +1 -1
@@ -551,7 +551,7 @@ func (s *Supervisor) runInitialNavigation(ctx context.Context, input *terminalIn
551551 if s.cfg.Picker != nil {
552552 s.cfg.Picker.TakeOp()
553553 }
554- s.picker.pendingPickerKey = ""
554+ s.picker.pendingKey = ""
555555 return s.runResolvedAttachment(ctx, input, service, pickerAttachmentTarget{request: request}, SessionEnvironmentLocalCLI)
556556 }
557557
@@ -551,7 +551,7 @@ func (s *Supervisor) runInitialNavigation(ctx context.Context, input *terminalIn
551 if s.cfg.Picker != nil {551 if s.cfg.Picker != nil {
552 s.cfg.Picker.TakeOp()552 s.cfg.Picker.TakeOp()
553 }553 }
554- s.picker.pendingPickerKey = ""554+ s.picker.pendingKey = ""
555 return s.runResolvedAttachment(ctx, input, service, pickerAttachmentTarget{request: request}, SessionEnvironmentLocalCLI)555 return s.runResolvedAttachment(ctx, input, service, pickerAttachmentTarget{request: request}, SessionEnvironmentLocalCLI)
556 }556 }
557 557
M internal/usecase/client/supervisor_picker_session.go +3 -3
@@ -7,10 +7,10 @@ package client
77 // goroutine's kills.wg/kills.done handoff. Construct with preview.clock set;
88 // other fields are ready at zero.
99 type pickerSession struct {
10- // pendingPickerKey retains a commit observed while connecting. It is
10+ // pendingKey retains a commit observed while connecting. It is
1111 // revalidated against the adopted service just like a ready-phase commit.
12- pendingPickerKey string
13- preview previewManager
12+ pendingKey string
13+ preview previewManager
1414 // kills runs the picker's `x` operations off the run goroutine.
1515 kills pickerKills
1616 }
@@ -7,10 +7,10 @@ package client
7 // goroutine's kills.wg/kills.done handoff. Construct with preview.clock set;7 // goroutine's kills.wg/kills.done handoff. Construct with preview.clock set;
8 // other fields are ready at zero.8 // other fields are ready at zero.
9 type pickerSession struct {9 type pickerSession struct {
10- // pendingPickerKey retains a commit observed while connecting. It is10+ // pendingKey retains a commit observed while connecting. It is
11 // revalidated against the adopted service just like a ready-phase commit.11 // revalidated against the adopted service just like a ready-phase commit.
12- pendingPickerKey string12+ pendingKey string
13- preview previewManager13+ preview previewManager
14 // kills runs the picker's `x` operations off the run goroutine.14 // kills runs the picker's `x` operations off the run goroutine.
15 kills pickerKills15 kills pickerKills
16 }16 }

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