fix: use lib notebook for default notebook for aqora.load#201
fix: use lib notebook for default notebook for aqora.load#201jpopesculian wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds audience-group GraphQL schema support, updates workspace notebook/version metadata fields, and makes notebook download and Python loading version-aware. It also switches notebook selection to ChangesAudience Group Targeting
Workspace Notebook Versioning
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant PythonLoader as python/aqora/notebook.py
participant PyClient as PyClient._download_workspace_notebook
participant RustWorkspace as download_workspace_notebook
participant GraphQLQuery as GetWorkspaceVersionNotebookDownloadUrl
PythonLoader->>PyClient: load(..., version)
PyClient->>RustWorkspace: _download_workspace_notebook(..., version)
RustWorkspace->>GraphQLQuery: fetch libNotebook and entries
GraphQLQuery-->>RustWorkspace: notebook metadata and file URLs
RustWorkspace-->>PyClient: downloaded notebook path
PyClient-->>PythonLoader: loaded module
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/workspace.rs (1)
37-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUpdate stale "default notebook" wording after switch to
lib_notebook.The fallback now uses
workspace.lib_notebook, but the error message and hint still reference "default notebook", which will confuse users.💬 Proposed fix
let notebook_name = notebook.or(workspace.lib_notebook).ok_or_else(|| { error::user( &format!( - "No notebook specified and workspace '{owner}/{slug}' has no default notebook" + "No notebook specified and workspace '{owner}/{slug}' has no lib notebook" ), - "Please provide a filename or set a default notebook on the workspace", + "Please provide a filename or set a lib notebook on the workspace", ) })?;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/workspace.rs` around lines 37 - 44, Update the fallback error text in workspace notebook selection to match the new lib_notebook terminology. In the `notebook.or(workspace.lib_notebook).ok_or_else(...)` path, change the `error::user` message and hint so they no longer mention “default notebook” and instead refer to the workspace’s `lib_notebook` or equivalent current terminology. Keep the fix localized to the notebook resolution logic in `workspace.rs`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/workspace.rs`:
- Around line 37-44: Update the fallback error text in workspace notebook
selection to match the new lib_notebook terminology. In the
`notebook.or(workspace.lib_notebook).ok_or_else(...)` path, change the
`error::user` message and hint so they no longer mention “default notebook” and
instead refer to the workspace’s `lib_notebook` or equivalent current
terminology. Keep the fix localized to the notebook resolution logic in
`workspace.rs`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bb1ce213-9b0d-4eaf-a6df-1da98b21f9eb
📒 Files selected for processing (3)
schema.graphqlsrc/graphql/get_workspace_notebook_download_url.graphqlsrc/workspace.rs
2bfe803 to
c501757
Compare
Summary by CodeRabbit
fromVersionIdinstead offromWorkspaceId).