Log in to Datum Cloud without leaving the console#194
Merged
Conversation
When the console detects ErrNoActiveUser, it now shows a full-screen welcome page (ASCII art, four service tiers, Datum wordmark) instead of a generic error card. Pressing [l] starts an in-TUI device authorization flow via a new overlay — the user can visit the verification URL or open it with [b]; on success the context picker opens automatically. The sidebar is hidden and status bar hints are replaced with login-specific shortcuts throughout the unauthenticated state. Adds StartDeviceAuth/FinishDeviceAuth to authutil for callers that need to drive the device flow step-by-step, and a quiet flag to completeLogin so TUI-initiated logins don't print to stdout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Plumb auth hostname from config through console.go → NewAppModel → LoginOverlayModel so staging and other non-production endpoints are respected - Fix device auth goroutines to accept and use program context instead of context.Background() - Remove dead loginCompletedMsg type and its handler - Dispatch LoadResourceTypesCmd after successful login so the console is ready if the user dismisses the context picker - Delete notLoggedIn field, SetNotLoggedIn, renderNotLoggedInPanel, and renderServicesArt from ResourceTableModel — the welcome screen in AppModel.View() supersedes them - Collapse redundant welcome/base variable in unauthenticated View() path - Use SanitizeErrMsg for overlay error display to prevent layout breaks from long network errors - Fix import group ordering so github.com/pkg/browser sorts after charm.land imports - Replace inline ✓/✗ literals with loginSuccessGlyph/loginFailGlyph named constants - Remove double blank lines in resourcetable.go Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…viceAuth Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mattdjenkinson
approved these changes
May 18, 2026
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.
What's new
Before this change, opening the console without an active session showed a generic error with no clear path forward. Now:
[l]to start a device authorization flow right inside the TUI[b]to open the verification URL in your browser automaticallyThe sidebar and status bar adapt throughout the login flow so hints are always relevant to what you're doing.
Demo
welcome-to-datumctl.mov
Test plan
datumctl consolewithout logging in — verify the welcome screen appears[l]— verify the device auth overlay appears with a verification URL[b]— verify the URL opens in a browserdatumctl consolewith an active session — verify normal console experience is unchanged🤖 Generated with Claude Code