Repository navigation
feat(locallibrary): let a plugin ask for more of an account, and say when accounts sign themselves out - #340
Merged
Merged
Conversation
…nts more of an account
…in its last 2 days
SizeCompared with main. KiB are 1,024 bytes.
|
bnb
approved these changes
Oct 30, 2026
# Conflicts: # apps/locallibrary/CHANGELOG.md # apps/locallibrary/src/output.rs # apps/locallibrary/src/tui/app.rs # apps/locallibrary/src/tui/mod.rs # crates/loclib-plugin/src/lib.rs
bnb
previously approved these changes
Nov 1, 2026
bnb
previously approved these changes
Nov 1, 2026
bnb
previously approved these changes
Nov 1, 2026
# Conflicts: # crates/locallibrary/src/plugin/accounts/shared.rs
bnb
previously approved these changes
Nov 1, 2026
botandbang
dismissed
bnb’s stale review
November 2, 2026 03:33
The merge-base changed after approval.
bnb
previously approved these changes
Nov 2, 2026
Contributor
Author
|
Closing and reopening so CI runs against current main. Branch unchanged. |
…l draws The profile bar test compared the "sign in again by" span's colour with the theme's warning as plain RGB. The bar draws it through the theme, which gives RGB only on a terminal that says it takes 24-bit colour (COLORTERM, or a known TERM_PROGRAM) and an xterm-256 index otherwise, so the test passed in a truecolor terminal and failed on CI's runners. It now compares with what theme::fg gives for the warning colour, and passes with and without COLORTERM and with NO_COLOR.
bnb
previously approved these changes
Nov 2, 2026
Rust coverageFrom run 184. Both are held to the thresholds in .cargo/config.toml.
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 2, 2026
… runs `Asked`, the ways a_plugin_wanting_more_of_an_account_asks_only_in_a_terminal runs echo's `ensure`, was compiled on every platform, but its one test is `#[cfg(unix)]`, so on Windows it was never used and clippy's `-D warnings` stopped the merge queue's other-os job. It now has the same `#[cfg(unix)]` as its test.
bnb
approved these changes
Nov 2, 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 and why
Stacked on #339. A plugin's optional scopes had no way to be asked for at the moment a command needs them, and nothing said when an account would stop working.
Added:
accounts/ensure {type, scopes, access?}in the plugin protocol (part of theaccountsfeature, so no protocol bump) andHost::ensure_accountin the SDK. It answersgrantedanddeclinedscope names, never a token.--json,--yesor watch) and the player ask, signing in again when the account lacks the service scope; with nobody to ask, it fails with the action that gives it.locallibrary accountsays when each account signs itself out (a token that doesn't refresh, or a refresh token the service says expires), and publishing, the access prompt and the player warn in an account's last 2 days, offering to sign in again.How it was tested
accounts/ensure, a hegel property that ensure answers granted or declined and never a token (with an asker that allows, declines or partly grants, and with none), a CLI property that a terminal asks and--jsonerrors with an action, a player test, and a property that tokens last as the service says. Each new test was broken once to see it fail.docs/rpccurrent, full nextest 4094/4096 (the props_edit failure test(locallibrary): leave blank names out of the edit model's playlist lookups #334 fixes, and a flaky account property whose cause is fixed in its own PR). Hegel coverage 95.56 / 94.10 / 93.63.Checklist
apps/locallibrary/CHANGELOG.mdhas a line under Unreleaseddocs/and--helpstill say what the code does (apps/locallibrary/docs/rpc/too)