Fix web app error with proposed solution - #895
Merged
amirbiron merged 2 commits intoOct 20, 2025
Merged
Conversation
Feat: Add API endpoint to update user editor preference Co-authored-by: amirbiron <amirbiron@gmail.com>
Contributor
|
Cursor Agent can help with this pull request. Just |
Contributor
🧯 Dangerous deletes guard reportPolicy: see .cursorrules — dangerous deletions are blocked unless wrapped safely. Summary:
Flagged findings (file:line:snippet): Excluded matches (by path pattern) |
Contributor
⏱️ Performance report(No performance test durations collected. Mark tests with |
amirbiron
marked this pull request as ready for review
October 20, 2025 23:17
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
11 of 17 tasks
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.
✨ תיאור קצר
CannotCreateIndexעקב שימוש ב-$ne ב-partial index, והוספת endpoint חסר (POST /api/user/preferences) למניעת 404 בעת שמירת העדפות עורך.📦 שינויים עיקריים
פירוט נקודות (רשימת תבליטים):
unique_user_file_anchorב-BookmarksManagerלשימוש ב-$exists: Trueבמקום$ne: ""ב-partialFilterExpression, כדי לתמוך בגרסאות MongoDB שאינן תומכות ב-$ne ב-partial index.POST /api/user/preferencesב-webapp/app.pyלשמירת העדפת סוג עורך (editor_type) עבור המשתמש, ובכך למנוע שגיאות 404 מה-frontend.🧪 בדיקות
CannotCreateIndexעלunique_user_file_anchor(דורש הפעלת שרת מחדש)./api/user/preferencesומחזיר{ ok: true, editor_type: ... }ללא שגיאת 404.🧪 בדיקות נדרשות ב‑PR
📝 סוג שינוי
✅ צ'קליסט
🧩 השפעות/סיכונים
🔗 קישורים
🧯 סיכון / החזרה לאחור (Rollback)
Note
Updates the bookmarks anchor partial index to use exists+type (avoiding $ne) and adds POST /api/user/preferences to persist editor_type in session and DB.
partialFilterExpressionforunique_user_file_anchorindatabase/bookmarks_manager.pyto{ "anchor_id": { "$exists": true, "$type": "string" } }(replace$ne: "") for broader MongoDB compatibility.POST /api/user/preferencesinwebapp/app.pyto seteditor_type(simple|codemirror), applying immediately via session and persisting tousers.ui_prefs.editor.Written by Cursor Bugbot for commit 1488ba1. This will update automatically on new commits. Configure here.