feat: site adapter pluginization - #809
Open
urzeye wants to merge 123 commits into
Open
Conversation
The platform catalog was a prime-once module cache, so the About page kept showing stale platforms after uninstalling or toggling packs. Add a force reload path and watch the pack/binding storage keys in useSupportedAiPlatforms so all consuming UIs stay in sync.
- Add beta badge to the Site Packs nav item, placed next to the label - Introduce PuzzleIcon for the Site Packs identity and pack entries - Color pack icons from the manifest brand theme with theme-safe mixing - Use compact icon buttons for pack/binding row actions and make the registry install button state-aware (install / installed / update) - Reorder the updates tab so fixed-height cards stay reachable above the unbounded registry list - Rework the custom site form: stable two-row grid, clear input after adding, explicit edit mode from the list with domain move support, conflict guard, and scoped scrolling that no longer pushes the whole settings modal
Custom origin bindings are now explicit-only: every binding names a specific installed pack. Removes the detect rule engine, bounded page scanning, multi-match switch notice, the manifest detect field, and the binding-mode picker. Packs with empty matches now activate solely through explicit origin bindings. BREAKING CHANGE: SitePack manifests no longer accept the detect field, and detect-mode origin bindings are rejected when parsing stored state.
Unparseable binding entries are now skipped when loading the stored bindings map, so leftover data from removed binding shapes cannot take down the whole bindings state or block the custom-site list.
Packs can declare themeSync to drive the host page light/dark mode: write a configured localStorage value (flat raw/JSON string or nested object path), optionally toggle html classes, and dispatch a storage event so sites that listen for it apply the change live. Enable it for the LobeChat pack (v3) with event-only sync. duck.ai is intentionally unsupported: its runtime theme engine ignores storage writes and repaints by injecting inline CSS variables.
jsDelivr caches branch-ref URLs for hours, so clients kept installing stale pack versions (the raw fallback only triggers on fetch/signature failure, not on stale-but-valid data). Purge the mutable index files (index.json, index.sig.json) right after each publish.
A bare purge is not enough: purge.jsdelivr.net returns HTTP 200 with "throttled": true (throttlingReset up to ~700s) without purging, and a purge can race GitHub origin propagation and re-cache stale content. Log purge responses, then poll the CDN until it serves the revision just published, re-purging with escalating backoff; fail explicitly if the cache never converges.
Selector assertions now run only on user conversation pages; new-chat, share, and other site utility pages (e.g. /library, settings) are exempt instead of producing false-positive warnings.
The health check no longer runs unless explicitly enabled in Settings > Features > Reminder. When disabled, no HealthCheckManager is created, so there are no timers, storage watchers, or panel notices.
The feature was never released. Its page-type detection could not be made both accurate and useful: broad checks false-positived on non-chat pages, while restricting checks to conversation pages made it invisible in practice. Manual configuration update checks in the SitePacks page are unaffected.
Move branch-added developer docs into docs/developer/site-adapter. Add the local pluginization review report and update related links.
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.
Refs: #799