feat:[mono] add campsite_session_store to parse cookie#1117
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the in-memory session store with a CampsiteApiStore, migrates all user_id fields from i64 to String, updates OAuth cookie handling, and propagates the new campsite_user_id through MR and issue endpoints.
- Introduce
CampsiteApiStoreand wire it into the OAuth flow (cookie name,FromRequestParts) - Change all storage and model
user_idfields fromi64toStringand add a migration - Update MR/issue routers to accept
LoginUserand passcampsite_user_idto storage calls
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mono/src/api/oauth/mod.rs | Switched from MemoryStore to CampsiteApiStore, new cookie |
| mono/src/api/oauth/campsite_store.rs | Implement SessionStore::load_session, stubs for other methods |
| mono/src/api/mr/mr_router.rs | Inject LoginUser, use campsite_user_id in MR actions |
| mono/src/api/mr/mod.rs | Change MegaConversation.user_id type to String |
| mono/src/api/mod.rs | Use CampsiteApiStore in service state |
| mono/src/api/issue/issue_router.rs | Inject LoginUser, use campsite_user_id in issue actions |
| jupiter/src/storage/{user,mr,issue}_storage.rs | Update storage method signatures to String user_id |
| jupiter/migration/src/m20250613_033821_alter_user_id.rs | Migration to alter user_id columns to string |
| jupiter/callisto/src/{ssh_keys,mega_mr,mega_conversation,access_token}.rs | Update entity definitions to use String user_id; remove unique on path |
| config/config.toml | Add campsite_api_domain and allowed_cors_origins |
| common/src/config.rs | Extend OauthConfig with new fields |
| ceres/src/pack/monorepo.rs | Use empty String for system events, update add_mr_conversation |
| ceres/src/api_service/mono_api_service.rs | Change merge_mr signature to accept user_id: String |
Comments suppressed due to low confidence (2)
mono/src/api/mr/mr_router.rs:155
- Cannot borrow a mutable reference to a temporary (
model.into()); assignmodel.into()tolet mut mrand then callmerge_mr(..., &mut mr).
.merge_mr(user.campsite_user_id, &mut model.into())
common/src/config.rs:542
- Adding new config fields requires updating the deserialization logic; ensure these fields are included in the config loader or deserialization will fail.
pub campsite_api_domain: String,
genedna
approved these changes
Jun 13, 2025
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.
No description provided.