Repository navigation
feat(accounts): 支持指定固定 Bucket,避免依赖 ListBuckets - #4
Merged
Merged
Conversation
Add an optional account-level pinned bucket backed by SQLite. A generic provider wrapper exposes the known bucket without bucket-list discovery, and the app opens directly at the pinned bucket root on startup, account switch, save, or account removal. The pinned root is treated as the account's effective root for upward navigation. Other calls remain unchanged and continue to surface vendor permission errors directly. The bucket is editable without re-entering credentials and an empty value preserves normal account discovery.
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.
变更说明
本 PR 为账号新增可选的固定 Bucket 配置,用于支持仅有单个 Bucket 权限、无法调用 ListBuckets 的访问凭证。
实现方式
pinned_bucket字段,并兼容已有 SQLite 数据。PinnedBucketProvider包装现有 Provider:根目录直接返回已知的 Bucket,不触发 ListBuckets;其他对象、前缀与 Bucket 级操作保持原有行为。兼容性
验证
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-featurespnpm install --frozen-lockfile(app 目录)pnpm build(app 目录,含 TypeScript 检查和 Vite 构建)Rust 全部检查和测试通过;前端构建成功。Vite 输出的超过 500 kB chunk 警告是现有构建体积提示,不是本次改动引入的错误。