Skip to content

fix: Fix Windows credential storage via windows-native keyring feature#6

Merged
23prime merged 3 commits intomainfrom
fix/windows-keyring
Mar 7, 2026
Merged

fix: Fix Windows credential storage via windows-native keyring feature#6
23prime merged 3 commits intomainfrom
fix/windows-keyring

Conversation

@23prime
Copy link
Owner

@23prime 23prime commented Mar 7, 2026

Checklist

  • Target branch is main
  • Status checks are passing

Summary

Fix credential storage on Windows by adding the windows-native feature to the keyring crate, which enables Windows Credential Manager as the backend.

Reason for change

After the v0.1.3 release, real-device testing on Windows revealed that bl auth login completed without error but credentials were not actually stored — causing bl auth status to fail with "API key not found". The root cause was that the async-secret-service feature (Linux D-Bus) was the only backend enabled; without windows-native, the keyring crate had no working backend on Windows and silently returned Ok(()) instead of storing anything.

Changes

  • Cargo.toml: Add windows-native keyring feature as a Windows-only platform dependency ([target.'cfg(windows)'.dependencies]) to avoid expanding the dependency graph on Linux/macOS
  • .github/workflows/check-rust.yml: Add check-windows job on windows-latest to catch platform-specific compilation issues early

Notes

Cargo.lock records dependencies for all target platforms regardless of the build host, so the single lock file works correctly for both Linux CI and Windows CI with --locked.

Copilot AI review requested due to automatic review settings March 7, 2026 06:15
@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

📝 Walkthrough

Walkthrough

The keyring crate dependency in Cargo.toml now enables the "windows-native" feature alongside existing features. This is a single-line dependency configuration update affecting platform-specific functionality.

Changes

Cohort / File(s) Summary
Dependency Configuration
Cargo.toml
Added "windows-native" feature flag to the keyring crate dependency.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A whisker twitch, a feature bright,
Windows-native, what a sight!
Keyring dancing with new flair,
Platform magic in the air! 🔑✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: adding the windows-native keyring feature to fix Windows credential storage, which is the core objective of the PR.
Description check ✅ Passed The PR description clearly explains the purpose (fixing credential storage on Windows), the root cause, and the specific changes made to address the issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/windows-keyring
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/windows-keyring

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Rust dependency configuration so the CLI can use the Windows Credential Manager backend via keyring when running on Windows, avoiding cases where bl auth login does not persist the API key.

Changes:

  • Enable the keyring crate’s windows-native feature in Cargo.toml.
  • Regenerate Cargo.lock to include the newly-resolved transitive dependencies (e.g., windows-sys, byteorder).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
Cargo.toml Enables keyring’s Windows backend feature to support Credential Manager.
Cargo.lock Updates lockfile to reflect the dependency graph after enabling windows-native.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 7, 2026
23prime added 2 commits March 7, 2026 15:21
Addresses review comment: "windows-native expands the dependency graph
for all platforms unnecessarily"
Verifies that platform-specific Windows dependencies (windows-native
keyring feature) compile correctly on windows-latest.
@23prime 23prime changed the title fix: add windows-native keyring feature for Windows Credential Manager fix: Fix Windows credential storage via windows-native keyring feature Mar 7, 2026
@23prime 23prime merged commit b78b293 into main Mar 7, 2026
12 checks passed
@23prime 23prime deleted the fix/windows-keyring branch March 7, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants