Repository navigation
feat(ui): a failed connect's error page with the connect's stages (D-114) - #77
Merged
Merged
Conversation
…outlined The owner's alpha walk of 2026-10-22 on v0.38.0 (G16): - AW3, AW19: the window's Escape knew the palette, the notifications, a settings page and the drawer only, so over a dialog it closed the drawer behind it or did nothing. Every overlay now registers what Escape does over it as it shows (escape.go: onEscape, onShown); the window's escape runs the top one's, an overlay without one takes the key. Every Fyne dialog is shown through sh.showDialog (Escape is its Dismiss), a framed dialog hides (its SetOnClosed answers no), the pop-ups, the palette, the notifications, the MCP details and the top bar's menus close. - Fyne hands a key to the focused widget only: the fields of Cogpit's dialogs are types that pass an Escape on (fieldEntry, fieldSelectEntry, fieldCheck, fieldSlider, secretEntry), so Escape cancels a dialog whatever field has the keyboard. - AW4: a list's search is cleared and the table gets the keys; the find bar closes from its fields and from the editor (yamlview's OnEscape). D-57's "any other search" had been the navigator's only. - AW2: Escape on an open dropdown's list takes the keyboard off the field, and a dropdown with the keyboard passes Escape on. - AW1: a closed dropdown draws an entry's outline; the field outline token is raised to 2:1 on every surface in both themes, the wells' and cards' edges keep the old value as colorHairline. TestEveryDialogTakesEscape reads the sources for a dialog or pop-up shown past the mechanism. D-116 and D-104 record the lead's decisions; G16, ui-parity, usage, architecture, conventions and the design language say so.
The owner's alpha walk (AW12): a click below a list's rows closed the drawer about a second later, × and Escape at once. Fyne's driver holds every tap on a fyne.DoubleTappable for the double-click interval before it calls Tapped (internal/driver/glfw/window.go, mouseClickedHandleTapDoubleTap; NSEvent.doubleClickInterval on macOS, 0.5 s by default), and the list's table was one for its header separators' double click, which fits a column. The table now counts that double click itself, as the tab bar and the navigator do (doubleClickTime and the tab bar's clock), and is no DoubleTappable: every click on it acts at its release. Rows and headers were not held: their cells take their own taps. TestListClicksAreNotHeld clicks a row, a header, a header separator and the area below the rows as the driver finds the object under the pointer and fails on a DoubleTappable target; it and the reworked TestDoubleClickSeparatorFitsColumn fail before the change. D-106's GW1 table records the cause and the lead's choice; G16, ui-parity and architecture follow.
The welcome page's cluster rows were a fyne.DoubleTappable, their double click doing what a click does, so Fyne's driver held every click on them for the double-click interval (AW12's cause, found on the table first). The row takes clicks only now. Without the hold, a double click's second click reaches the row again, which the page has rebuilt by then for the cluster connecting: a second cluster.connect would join the run under way but end the first one's wait with errConnectInBackground, an error toast naming another cluster, and a login program not allowed yet would be reviewed twice. The page therefore does nothing for a cluster whose connect it began and that has not returned (pending, from before the review or the dispatch to the engine's answer) or that the window shows connecting. TestWelcomeRowConnectsOnce fails on the old row (held) and on a row without the page's guard (connected twice). D-106 records the choice and the clicks left held (the sync picker's rows, the log tab's head row) with why; G16's AW12 entry follows.
…114) The owner's AW17, AW13 and AW18 of the alpha walk (2026-10-22, D-114). A chosen cluster's failed connect, the restore's or a click's, now shows that cluster's error page over the workspace whether or not a tab is open; the welcome page shows only without a chosen cluster. The page is the welcome page's look: the logo, that it is an error page, the cause in a sentence under the stage it failed in, the connect stage by stage, Connect Again and Show Connection Updates. The cluster layer measures every connect in stages: the kubeconfig, a credential plugin's login, DNS with its addresses, TCP to the address and port (or the proxy's), TLS and the API server's answer. DNS, TCP and TLS come from client-go's own first request through net/http/httptrace, so Cogpit opens no connection of its own. The stages reach the connection log (an attempt's stages, a record each in its file), UIState.ConnectFailure and the ConnectError; the connection's error is the failed stage's sentence, the chain stays in the log. Connection Updates shows each connect's stages. The welcome page lists the hotbar and Recent only, the kubeconfigs' clusters as "Your clusters" on a first start alone (AW13). The view's placeholder no longer says the failure and fits the view with an ellipsis: its long line drew a clipped "Could not" over the navigator (AW18). The window tests' fake engine derives the welcome page where the connection changes, as the engine does.
TestWelcomeRowConnectsOnce failed on the stacked tree for two reasons of D-114's commit, not of the guard. The window tests' fake engine now derives the welcome page as the engine does, which hides it while the shown cluster connects, so the row it waited to see rebuilt never was. And the page has no "Other clusters" any more (AW13): once a cluster is recent, the others' rows went, and the later steps found none. The scene puts every cluster on the hotbar, so each keeps its row, and keeps the page up after each connect the test shows, so that a click on the connecting cluster's row is still checked; a last step checks that the page hides while the shown cluster connects. The error page's test checks that Connect Again, which goes through the welcome page's connect, connects once for a double press.
hans-fischer
force-pushed
the
feat/failed-connect-page
branch
from
October 22, 2026 16:04
9312d02 to
db73e2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cogpit now shows a failed connect's own error page instead of the welcome page, and every connect, failed or not, carries its stages in Connection Updates. This builds the owner's AW17 (his decision of 2026-10-22, D-114) and AW13 from the alpha walk, and fixes AW18.
Cause
Welcomefor any failed connect, so the welcome page covered the workspace.Welcome, soTestAFailedConnectStaysOnItsClusterpassed over the bug.Fix
cluster/connectstages.gomeasures each connect in stages: kubeconfig valid and complete, a credential plugin's login, DNS, TCP, TLS, and the API server's login and first request.GET /version), traced withnet/http/httptrace.UIState.ConnectFailurefor a failed connect.Connection.Erroris the failed stage's sentence; the whole chain stays in the log.Decisions (the lead's, open to revision; details in D-114)
Tests
TestBeforeAFailedConnectShowsNotTheWelcomePageandTestBeforeThePlaceholderStaysInsideTheView(AW18: the line spanned x 128 to 1601, the view 289 to 1440), and the engine'sTestBeforeARestoreThatFailsShowsTheErrorPage.net.Pipe.go build ./...,go vet(plain, kind, envtest, standby), golangci-lint (0 issues), gosec (0),make cyclo,make test-ui(1181 tests), the cluster, engine, commands, mcp and app packages,-raceon the stage and connect-log tests,go run ./hack/parity.Before and after (offscreen render, dark)
Connection Updates with the stages: