Repository navigation
fix(ui): host-owned token links, an Unverified notice, and a labels capability - #707
Merged
Merged
Conversation
…ens recorded per host The worked set holds the last saved token each host answered, cleared when the credential is forgotten, and is reported only for an enabled host. The Labels row shows a host's reported labels read-only where it has no labels capability.
Tryanks
marked this pull request as ready for review
October 11, 2026 07:54
Tryanks
enabled auto-merge (squash)
October 11, 2026 07:54
…lish # Conflicts: # crates/protocol/src/lib.rs # crates/ui/src/pull_requests/detail.rs
This was referenced Oct 11, 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.
Summary
Why
HostStatus, notHostTerms: the token page depends on the host's authority (GitHub Enterprise, self-managed GitLab, a Forgejo mount path, the Azure organization), which only the adapter that resolves the host's credential knows;HostTermsis static per kind. The scopes travel with the URL so the row reads one owner.Evidence
After:
Fresh
TCODE_DATA_DIR, throwaway HOME,env -iwithPATH=/usr/bin:/binandHOSTNAME="Demo Mac", English, light. Synthetic projectsample-app(remotegit@bitbucket.org:atlassian/atlassian-connect-express.git); its one thread failed to start (no provider on PATH) and links public PRatlassian/atlassian-connect-express#547, read anonymously, so the PR shots show that public PR's content, not the maintainer's. The Source Control shots have bitbucket.org added with a fake access token (demo-access-token-not-real, never sent: the PR shots were taken before it was saved, and it was cleared again before the phone PR shot). The track is switched to "API token" so the "Create an API token" link and the Unverified notice show together. The Source Control shots were retaken after the rewording, on a fresh profile with bitbucket.org configured and the same fake token, and no PR. Dark theme was looked at on the phone, not attached.Tests (new or changed):
services::forge::tests::a_bitbucket_reopen_or_label_edit_is_refused(wasa_declined_bitbucket_pull_request_is_not_reopened, extended): Bitbucket's capabilities lacklabels, andSetLabelsthrough the dispatcher answersUnsupported. Bitbucket's ownactalso refusesSetLabels, so this pins the user contract rather than isolating the gate; no other host lacks labels.source_control_settings::tests::an_unverified_token_gets_its_notice(new): throughSourceControlPanelwith a settings snapshot, a Bitbucket row withUnverifiedgets its notice and a connected GitLab row gets none. Fails when the panel skips the Unverified notice (checked by a local edit).pull_requests::detail::tests::the_labels_row_is_absent_where_the_host_has_no_labels(new): throughPullRequestViewand a conversation read, with the Reviewers row present in every case:Each of the last two fails without its rule (checked by local edits). The test view has no session status, so it is read-only and never shows Edit; the "Edit only with the capability" half is not separately asserted.
services::gitlab::tests::a_saved_token_is_unverified_until_it_is_used(new, no HTTP): a token saved in a temp store givescredential_status()["gitlab.com"].problem == Some(Unverified); with onlyGITLAB_TOKENit isNone. The existinganswer_otherconversation moved into aconversation()helper the new test reuses.Checks on the final commit:
cargo fmt --all --check: cleancargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo nextest run --workspace --locked: 1158 tests run: 1158 passed, 13 skippedcargo machete: no unused dependenciesLimitations:
/-/user_settings/personal_access_tokens. Older self-managed GitLab servers (before 16.x) keep the page at/-/profile/personal_access_tokens, so the link may not land on that page for them.Merge Danger
Door: two-way
Blast Radius: settings
Wire shape changes (
HostStatusgains three fields,HostProblemgainsunverified, capabilities gainlabels) under the samePROTOCOL_VERSION, noted above it; client and host come from one tree.changed_files(#698) lines are untouched.Closes #699