chore: merging develop into version-3#584
Merged
NagariaHussain merged 126 commits intoversion-3from Mar 25, 2026
Merged
Conversation
fix: correct wiki edit links redirection
…-issue fix: prevent DiffViewer Shadow DOM from overlaying dialogs
This reverts commit 9f8105b.
…s-change-requests Revert "fix: prevent duplicate leaf slugs in change requests"
fix: archive btn not visible in contribution banner
WikiPagePatch references the obsolete "Wiki Page" doctype (replaced by Wiki Document in v3). Replace with a stub class for backward compat. Remove apply_markdown_diff, apply_changes, highlight_changes from wiki/utils.py — no other code calls them. Clean up wiki_page_patch.js. Phase 3 of the wiki contribution & merge flow refactor plan. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wiki Documents edited from Frappe Desk now automatically update the space's main_revision via on_update/on_trash doc_events hooks. Guard flags in apply_merge_revision() and reorder_wiki_documents() prevent infinite loops. Three new tests verify desk-to-revision sync, CR visibility, and no double-sync during merge. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… (Phase 2) Replace line_merge_fallback, merge_content_linewise, merge_content_disjoint, and merge_content with a single merge_content_three_way() function. Delete the duplicated retry block in merge_change_request() and unused helpers edits_conflict/ranges_overlap. Net ~50 lines removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lpers (Phase 6) Extract the 60-line monolithic function into _find_existing_draft(), _is_stale_empty_draft(), and _archive_stale_draft(). Replace duplicated inline hash comparison with a call to has_revision_changes(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CR working revisions now start empty and only accumulate items as they are edited (copy-on-write). This eliminates the O(N) clone on CR creation — a 500-page wiki no longer inserts 500 revision items just to open the editor. Key changes: - create_overlay_revision() replaces clone_revision() for CRs - get_effective_revision_item_map() merges base + overlay transparently - ensure_overlay_item() handles copy-on-write for mutations - Lazy hash computation defers recompute until merge/diff time - All read/write CR functions updated for overlay awareness - Data migration patch converts existing open CRs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… (Phase 5) Merge now only processes changed doc_keys instead of the entire tree. Fast-forward merges skip 3-way logic entirely. Content-only changes use frappe.db.set_value() to bypass validation. For a 500-page wiki with 1 changed page, this reduces merge from O(N) to O(changed). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…utions # Conflicts: # wiki/frappe_wiki/doctype/wiki_change_request/wiki_change_request.py
…sError When merging a CR, deletions must happen after structural saves so that children are reparented away before their parent group is deleted. Extracted shared deletion logic into _delete_wiki_documents helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 800-page/80-group perf test was timing out CI with too many writes. Moved to wiki/benchmarks/ so it only runs on-demand. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
refactor: overhaul contribution & merge flow for O(1) CR creation and delta-based merges
fix: wiki user unable to view editor sidebar
The editor only had light theme syntax colors, so in dark mode code blocks had near-invisible text (e.g. dark navy strings on dark background). Added dark mode overrides matching the public page theme from hljs-github-light.css. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ax-highlighting fix: add dark mode syntax highlighting to wiki editor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: Image Viewer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows AI agents and other markdown-aware clients to fetch raw wiki content by setting `Accept: text/markdown` in the request header, skipping HTML template rendering entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ismatchError The migrate_to_v3 method calls save() twice — once after creating the root group and again after creating child groups. The first save updates the modified timestamp in the database but the in-memory document retains the old timestamp, causing a TimestampMismatchError on the second save. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…p-mismatch fix: reload document after save in v3 migration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…otiation feat: return plain markdown for Accept: text/markdown
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The manual commits before frappe.throw() are intentional — they persist conflict records before the exception triggers a rollback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
get_page_data is intentionally guest-accessible as wiki pages are public. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.