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 Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· 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 { | |||
| 895 | 895 | // the supervisor can admit exactly the row the user committed. It opens no | |
| 896 | 896 | // stream and starts no terminal work itself. | |
| 897 | 897 | 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 = "" | |
| 900 | 900 | return readyOutcome{commitKey: key} | |
| 901 | 901 | } | |
| 902 | 902 | var changed <-chan struct{} | |
| @@ -991,7 +991,7 @@ func (s *Supervisor) pickerOps() <-chan struct{} { | |||
| 991 | 991 | func (s *Supervisor) takePickerClose() bool { | |
| 992 | 992 | op, key := s.cfg.Picker.TakeOp() | |
| 993 | 993 | if op.commit && key != "" { | |
| 994 | - | s.picker.pendingPickerKey = key | |
| 994 | + | s.picker.pendingKey = key | |
| 995 | 995 | } | |
| 996 | 996 | if op.close && !op.exit { | |
| 997 | 997 | s.notifyPicker(pickerExitHint) | |
| @@ -895,8 +895,8 @@ type readyOutcome struct { | |||||
| 895 | // the supervisor can admit exactly the row the user committed. It opens no | 895 | // 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 = key | 994 | + | 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 | |||
| 551 | 551 | if s.cfg.Picker != nil { | |
| 552 | 552 | s.cfg.Picker.TakeOp() | |
| 553 | 553 | } | |
| 554 | - | s.picker.pendingPickerKey = "" | |
| 554 | + | s.picker.pendingKey = "" | |
| 555 | 555 | return s.runResolvedAttachment(ctx, input, service, pickerAttachmentTarget{request: request}, SessionEnvironmentLocalCLI) | |
| 556 | 556 | } | |
| 557 | 557 | ||
| @@ -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 | |||
| 7 | 7 | // goroutine's kills.wg/kills.done handoff. Construct with preview.clock set; | |
| 8 | 8 | // other fields are ready at zero. | |
| 9 | 9 | type pickerSession struct { | |
| 10 | - | // pendingPickerKey retains a commit observed while connecting. It is | |
| 10 | + | // pendingKey retains a commit observed while connecting. It is | |
| 11 | 11 | // revalidated against the adopted service just like a ready-phase commit. | |
| 12 | - | pendingPickerKey string | |
| 13 | - | preview previewManager | |
| 12 | + | pendingKey string | |
| 13 | + | preview previewManager | |
| 14 | 14 | // kills runs the picker's `x` operations off the run goroutine. | |
| 15 | 15 | kills pickerKills | |
| 16 | 16 | } | |
| @@ -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 is | 10 | + | // 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 string | 12 | + | pendingKey string |
| 13 | - | preview previewManager | 13 | + | 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 pickerKills | 15 | kills pickerKills | ||
| 16 | } | 16 | } | ||