• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pomerium / pomerium / 21458011535

28 Jan 2026 10:32PM UTC coverage: 44.719% (-1.3%) from 46.02%
21458011535

push

github

web-flow
ssh: reverse tunnel status tui improvements (#6004)

This PR includes significant changes to the structure and configuration
of the reverse tunnel status TUI, as well as new components and
functionality.

The TUI is much more configurable than it was before, although the
current configuration is such that it doesn't look much different.

High level changes:
- Theme and colors are now fully configurable and all styling is derived
from the theme instead of hard-coded.
- Size/layout/presence of components is now configurable within the CLI
controller.
- New persistent header bar with highly configurable segments
- UI elements have been organized into a widget library with consistent
code style
- New highly configurable context menus and dialogs
- Support for inline editing of table data
- Basic user preference management system
- Support for active route health checks
- Copy-to-clipboard support (with terminal capability detection)

186 of 3203 new or added lines in 56 files covered. (5.81%)

26 existing lines in 8 files now uncovered.

30923 of 69150 relevant lines covered (44.72%)

102.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

73.53
/pkg/ssh/cli_controller.go
1
package ssh
2

3
import (
4
        "github.com/spf13/cobra"
5

6
        extensions_ssh "github.com/pomerium/envoy-custom/api/extensions/filters/network/ssh"
7
        "github.com/pomerium/pomerium/config"
8
        "github.com/pomerium/pomerium/pkg/ssh/api"
9
        "github.com/pomerium/pomerium/pkg/ssh/cli"
10
        "github.com/pomerium/pomerium/pkg/ssh/cli/commands"
11
        "github.com/pomerium/pomerium/pkg/ssh/models"
12
        "github.com/pomerium/pomerium/pkg/ssh/tui/preferences"
13
        "github.com/pomerium/pomerium/pkg/ssh/tui/style"
14
)
15

16
type DefaultCLIController struct {
17
        config           *config.Config
18
        defaultTheme     *style.Theme
19
        preferencesStore preferences.Store
20
}
21

22
func NewDefaultCLIController(config *config.Config, defaultTheme *style.Theme) *DefaultCLIController {
144✔
23
        return &DefaultCLIController{
144✔
24
                config:           config,
144✔
25
                defaultTheme:     defaultTheme,
144✔
26
                preferencesStore: preferences.NewInMemoryStore(),
144✔
27
        }
144✔
28
}
144✔
29

30
// Configure implements InternalCLIController.
31
func (cc *DefaultCLIController) Configure(root *cobra.Command, ic cli.InternalCLI, ctrl api.ChannelControlInterface) {
29✔
32
        if cc.config.Options.IsRuntimeFlagSet(config.RuntimeFlagSSHRoutesPortal) {
49✔
33
                root.AddCommand(commands.NewPortalCommand(ic, ctrl))
20✔
34
        }
20✔
35
        root.AddCommand(commands.NewLogoutCommand(ic))
29✔
36
        root.AddCommand(commands.NewWhoamiCommand(ic, ctrl))
29✔
37
        root.AddCommand(commands.NewTunnelCommand(ic, ctrl, cc.defaultTheme, cc.preferencesStore))
29✔
38
}
39

40
// DefaultArgs implements InternalCLIController.
41
func (cc *DefaultCLIController) DefaultArgs(modeHint extensions_ssh.InternalCLIModeHint) []string {
3✔
42
        switch modeHint {
3✔
NEW
43
        default:
×
NEW
44
                fallthrough
×
45
        case extensions_ssh.InternalCLIModeHint_MODE_DEFAULT:
3✔
46
                if cc.config.Options.IsRuntimeFlagSet(config.RuntimeFlagSSHRoutesPortal) {
4✔
47
                        return []string{"portal"}
1✔
48
                }
1✔
49
                return []string{}
2✔
NEW
50
        case extensions_ssh.InternalCLIModeHint_MODE_TUNNEL_STATUS:
×
NEW
51
                return []string{"tunnel"}
×
52
        }
53
}
54

55
// EventHandlers implements InternalCLIController.
56
func (cc *DefaultCLIController) EventHandlers() models.EventHandlers {
150✔
57
        return models.EventHandlers{
150✔
58
                RouteDataModelEventHandlers: models.RouteModelEventHandlers{
150✔
59
                        OnRouteEditRequest: func(route models.Route) {
150✔
NEW
60
                                _ = route
×
NEW
61
                        },
×
62
                },
63
        }
64
}
65

66
// PreferencesStore implements InternalCLIController.
NEW
67
func (cc *DefaultCLIController) PreferencesStore() preferences.Store {
×
NEW
68
        return cc.preferencesStore
×
NEW
69
}
×
70

71
var _ cli.InternalCLIController = (*DefaultCLIController)(nil)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc