Repository navigation
Port Nous Portal subscription credits - #569
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThis change adds the Nous Portal provider. It registers provider identity and icons, resolves Hermes credentials, fetches and parses monthly credit usage, maps errors, and enables desktop dashboard and source-policy support. ChangesNous Portal provider
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant HermesAuth as Hermes auth files
participant NousProvider
participant NousPortal as Nous Portal API
participant Desktop as Desktop usage view
HermesAuth->>NousProvider: Resolve access token and portal URL
NousProvider->>NousPortal: Request api/oauth/account
NousPortal-->>NousProvider: Return account data or HTTP error
NousProvider-->>Desktop: Return UsageSnapshot and display details
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Thermo-Nuclear Review: PR #569 — Port Nous Portal subscription creditsVerdict: REQUEST CHANGESStructural regressions
Missed simplification opportunities (code-judo)
Spaghetti / branching complexity
Boundary / abstraction / type problems
File-size / decomposition concerns
Lower-priority notes
Series note (applies to #565–#569 collectively): this batch is five independent ports sharing: (a) private bounded-body readers ×2 identical, (b) private credential resolvers ×3 same skeleton, (c) private number formatters ×3 different rounding, (d) private URL validators ×2 with the local one weaker than the canonical, (e) per-provider |
# Conflicts: # apps/desktop-tauri/src/surfaces/TrayPanel.tsx # apps/desktop-tauri/src/surfaces/settings/providers/sections/usageSourcePolicy.ts # apps/desktop-tauri/src/test/providerCatalog.ts # rust/src/core/provider.rs # rust/src/core/provider_factory.rs # rust/src/core/token_accounts.rs
Summary
NOUS_PORTAL_ACCESS_TOKENas an explicit environment override.nousresearch.comrouting for stored portal origins.Validation
cargo test --manifest-path rust/Cargo.toml nous -- --nocapture— 11 passedcargo test --manifest-path rust/Cargo.toml --lib --quiet— 1,937 passed, 1 ignoredcargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml commands::tests --quiet— 94 passedcargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings— passedcargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings— passedcargo fmt --allandgit diff --check— passedFrontend Vitest and fresh Tauri UI/CUA proof were not run because this checkout has no
apps/desktop-tauri/node_modules; installing dependencies would consume the storage budget during the port batch. Hosted CI should provide the frontend validation.Summary by CodeRabbit