Repository navigation
fix(list): leave CI blank when the forge CLI isn't logged in - #4449
Merged
Merged
Conversation
A failed forge call shows ⚠ only when the CLI holds a login for the forge's host; without one the cell stays blank, so an installed but logged-out CLI no longer puts a permanent ⚠ in the prompt and statusline. gh reports a missing login with exit code 4 for the host it resolved. For glab, tea and az, remote_ref::is_authed_for asks the CLI's local state for the forge.hostname or remote host, cached per process. wt config show uses the same check, names the host in its warning, and drops CiToolsStatus with its network auth-status probes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
worktrunk-bot
approved these changes
Oct 12, 2026
1 task
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.
Since #4436, any failed forge call shows ⚠. That includes a CLI that is installed but not logged in, which then puts a permanent ⚠ in
wt list --full, the shell prompt, and the Claude Code statusline. This change leaves the cell blank when the CLI holds no login for the forge's host, and keeps ⚠ for a failure from a CLI that does (offline, rate limit, expired token).Each CLI answers from its own local state, so a lost connection never reads as logged out:
ghexits with its documented code 4 when it has no login for the host it resolved for the request. The backend reads that exit code, so SSH host aliases resolve the wayghresolves them.remote_ref::is_authed_for(forge, host)asksglab config get token --host,tea logins list --output json, oraz account show, for theforge.hostnameif configured, else the remote's host. The answer is cached per forge and host for the process.wt config show --fulluses the same check for the repo's host and names that host in its warning. It replacesCiToolsStatus, which probed all four CLIs to report one, and askedgh auth status/glab auth status, which contact the server and accept a login for any host.tea's host-agnostichas_any_loginis gone with it.Behavior changes:
wt list --full/ statusline: a CLI with no login for the host leaves the CI cell blank instead of ⚠. The legend now lists that under blank, and ⚠'s examples say "expired login".wt config show --full: a login for another host no longer counts, and the warning says which host it checked (gh installed but not authenticated for github.com).Known limits: a GitLab or Gitea remote through an SSH host alias is checked under the alias, so a failure there shows blank unless
forge.hostnamenames the real host; Azure DevOps counts only anaz login, not a PAT fromaz devops login.Tests: the failed-list test now covers logged-in and logged-out cases for
gh(exit 1 vs 4) andglab(token vs none); theteaCI mocks hold a login for the test host; thetealogin-discovery test adds a login for another host.Follows #4436.