Skip to content

Adapt new context api in monobean Related: #1164#1173

Merged
genedna merged 8 commits into
gitmono-dev:mainfrom
pleasedontbreak123:feature/fit-contextapi
Jul 1, 2025
Merged

Adapt new context api in monobean Related: #1164#1173
genedna merged 8 commits into
gitmono-dev:mainfrom
pleasedontbreak123:feature/fit-contextapi

Conversation

@pleasedontbreak123

@pleasedontbreak123 pleasedontbreak123 commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

Related: #1164

  1. adapt new context api
  2. revise the new method in appcontext to adapt Tokio multithreaded runtime

@vercel

vercel Bot commented Jul 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 9:22am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adapts the code to the new context API and revises methods to support the Tokio multithreaded runtime for monobean. Key changes include:

  • Switching from the old jupiter context to the new context::AppContext in multiple modules.
  • Revising VaultCore initialization and key handling to support the new API.
  • Updating Cargo.toml files to include new dependencies and align versioning with the new context.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vault/src/integration/vault_core.rs Consolidated imports and added debug prints for key paths.
monobean/src/core/servers.rs Updated context usage, now passing storage where needed.
monobean/src/core/mega_core.rs Refactored vault API calls and updated context propagation.
monobean/Cargo.toml Added dependency for the new context module.
context/src/lib.rs Adapted AppContext initialization with spawn_blocking.
context/Cargo.toml Added Tokio dependency.

let dir = common::config::mega_base().join("vault");
let key_path = dir.join(CORE_KEY_FILE);

println!("{:?}", key_path);

Copilot AI Jul 1, 2025

Copy link

Choose a reason for hiding this comment

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

Consider using a logging framework (e.g., tracing::debug) instead of println to ensure consistent logging across the application.

Suggested change
println!("{:?}", key_path);
tracing::debug!("Vault key path: {:?}", key_path);

Copilot uses AI. Check for mistakes.
@genedna
genedna added this pull request to the merge queue Jul 1, 2025
Merged via the queue into gitmono-dev:main with commit 1ccbf0c Jul 1, 2025
13 checks passed
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.

3 participants