forked from Qortal/q-blog
1.8 KiB
1.8 KiB
Q-Blog v0.2.0 — Wiki Mode Canonical Selection
Date: 2025-08-22
Highlights
- Wiki Mode canonical selection: When multiple authors publish the same
BLOG_POSTidentifier, the app now selects a single canonical revision to display based on blog settings. - Per-blog settings cache: Efficiently resolves each blog’s owner and wiki settings (
wikiEnabled,editorWhitelist,editorBlacklist). - Favorites and Subscriptions respect wiki mode: Lists deduplicate by identifier across names and pick the canonical author.
- Individual post view resolves canonical author when wiki is enabled before fetching content JSON.
- UI: Navbar search/filter and persistent Tile/List view toggle. Notifications consolidated in one place.
- Quality: Accessibility tests and stronger utility/unit coverage; minor code cleanup and worker URL fix.
Canonical selection rules
- Owner is always allowed (cannot be blocked by blacklist).
- Blacklist disallows others even if whitelisted; whitelist gates non-owners if non-empty.
- Among authorized authors: pick latest by
updatedAt/qdnUpdated; owner wins ties; otherwise lowest id as last tiebreaker.
Implementation notes
utils/wiki.tsimplementsisAuthorized,canEdit, andselectCanonical.utils/wikiSettingsCache.tscaches per-blog owner/settings, preferring metadata when available.hooks/useFetchPosts.tsxcanonicalizes search results for feed, favorites, and subscriptions.pages/BlogIndividualPost/BlogIndividualPost.tsxselects the canonical author for the requested post.
Breaking changes
- None. Existing identifiers and endpoints are unchanged.
Fixes & cleanup
- Removed an unused web worker and fixed a BLOG_POST worker URL.
- Removed redundant local helper where a shared util exists.
Upgrade notes
- No migration steps required. Deploy as usual; v0.2.0 is compatible with prior data.