fix: cleanup wiki settings#613
Conversation
Drops legacy theme/logo, navbar, app switcher, search, and guest-access fields from Wiki Settings, along with the associated cache-clearing on_update hook and clear_wiki_page_cache endpoint. Adds auto-generated type hints for the remaining fields. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
WalkthroughThe Wiki Settings DocType is simplified by removing UI configuration fields from the schema, including logo settings, theme options, search configuration, navbar settings, sidebar collapsing, app switcher list, and guest access controls. The corresponding field definitions and ordering entries are deleted from the schema file. The Python implementation removes the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@wiki/wiki/doctype/wiki_settings/wiki_settings.py`:
- Around line 27-28: The frontend still calls the removed whitelisted method
clear_wiki_page_cache which breaks the "Clear Wiki Page Cache" button; either
restore a compatibility endpoint by re-adding a whitelisted function
clear_wiki_page_cache in the wiki_settings module that performs the cache clear
(and logs/returns success) or update the frontend code that invokes
clear_wiki_page_cache to call the new API/utility (or remove the button). Locate
the caller in the frontend (wiki_settings.js) and either remove/update that
button handler or implement a server-side function named clear_wiki_page_cache
(whitelisted) that delegates to the existing cache-clear logic (e.g., reuse
get_all_spaces or the underlying cache utilities) so the UI no longer errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c85fffb7-4a78-4f48-b0aa-075eb922ff09
📒 Files selected for processing (2)
wiki/wiki/doctype/wiki_settings/wiki_settings.jsonwiki/wiki/doctype/wiki_settings/wiki_settings.py
Gates the TOC headings list in get_web_context on the Wiki Settings.enable_table_of_contents flag. The existing template and SPA navigation already collapse the TOC aside on an empty list, so no template or JS changes are needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reads head_html from the Wiki Settings single via frappe.get_cached_value and renders it inside <head> on every wiki page, allowing admins to add analytics, meta tags, or custom <head> markup site-wide. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cleanup + Closes #612