brand functionality enhancements#125
Merged
Merged
Conversation
…tion resolveBrandConfig now normalizes the ingested config (both the injected window.__BRAND_CONFIG__ path and the dev fallback) so feeds.defaultPinned always contains exactly one Following timeline entry, appended if missing, with any following-mis-typed-as-feed entry stripped. Backstop for a served config that omits Following (stale cache / service-down / upstream bug) and covers both new-account write paths (onboarding StepFinished and agent.ts).
…services Add a `services.moderation` field (DIDs of moderation services) to the community brand config and, on onboarding completion, subscribe the new account to each configured labeler via agent.addLabeler, caching the result with saveLabelers. Best-effort: a failed subscription is logged and does not block onboarding. Blacksky's default config subscribes to the Blacksky labeler.
On native there is no hostname signal (unlike web, where bskyweb injects the brand by Host), so the app now resolves a community brand from the active account and re-themes live on account switch: - resolveBrand: resolve by stamped communitySlug → Latinsky handle carveout → PDS host (GET /brands/resolve). The Blacksky PDS is the default/shared PDS and is never resolved by PDS (its config is bundled); the host is derived from the default brand config. - BrandProvider holds config in state + exposes a setter; ALF re-themes via its existing brand props, no remount. - useCommunityBrandSync (native) seeds from a per-account MMKV cache (no flash), reconciles against the brand service, and resets to the bundled Blacksky brand on logged-out surfaces (incl. "add another account" mid-session). - Signup: a "Community" step with Blacksky as the default option and other published communities in a dropdown; the choice sets the PDS and stamps the community slug on the created account. Web behavior is unchanged.
…h icons Replace the plain Select dropdown with an AccountList-style list: a rounded, bordered container with one row per community (logo + display name + PDS host) and a check on the selected one. Blacksky leads (bundled Logo); other communities show their brand logo, falling back to a theme-colored initial tile.
5b9b5ed to
2de7e3a
Compare
|
The subscribeToBrandModerationServices test tripped CI lint (require-await on non-awaiting async mocks, no-explicit-any on the agent cast). Drop `async` from the addLabeler mocks (Promise.allSettled captures their sync return/throw) and replace `as any` with a typed `Parameters<>` cast. Behavior unchanged (16 tests pass); also reformatted for prettier. Co-Authored-By: Claude Opus 4.8 (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.
Uh oh!
There was an error while loading. Please reload this page.