draft: Android taxonomy sync + hide built-in default chips - #6
Conversation
This reverts commit cc6e7b8.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Sideload APKBuilt from this branch and uploaded as a prerelease (does not overwrite https://github.com/djbclark/superbrain/releases/tag/apk-android-category-sync-78fb1df Direct asset: superbrain-android-category-sync.apk |
Updated APK (taxonomy resync)Server categories are fine (Politics/Technology/…); the phone was showing stale local SQLite. New build: https://github.com/djbclark/superbrain/releases/tag/apk-android-category-resync-20260731-1315 Without reinstall: open the current APK and pull-to-refresh — server |
Delta sync can miss category migrations if last_synced_at already advanced; persist taxonomy_version and force a full post pull when it differs. Co-authored-by: Cursor <cursoragent@cursor.com>
Stop seeding or merging legacy product/places/food chips when the server taxonomy disables built-in defaults; clarify the config example. Co-authored-by: Cursor <cursoragent@cursor.com>
|
APK without legacy default chips: https://github.com/djbclark/superbrain/releases/tag/apk-android-no-legacy-cats-cbfa5a0 |
Keep upstream mainline chip/sync behavior when the taxonomy API is absent; activate strict chips, always-sync, and version full-resync only for taxonomy-aware servers. Co-authored-by: Cursor <cursoragent@cursor.com>
- Cache taxonomy result within each loadPosts cycle via taxonomyRef; pass pre-fetched payload to syncIfNeeded so it skips redundant fetch. Eliminates 2-3 extra GET /taxonomy round-trips per load on taxonomy servers and removes the 404 that upstream cold-start paths hit before early-return. - Defer taxonomy gate behind testConnection so offline upstream users return immediately with zero network calls (matching original behavior). - Save taxonomy_version after full sync regardless of post count (the version changed even if the server has 0 posts, avoiding repeated full-sync attempts).
|
Findings addressed:
TypeScript compiles cleanly ( |
|
Moved to upstream PR #7 (sidinsearch#7) |
Summary
Android client support for config-driven category taxonomy, gated so upstream mainline behavior is unchanged until
GET /taxonomyexists.Without
/taxonomy(current upstream): same built-in chips, early-return after local SQLite, delta-only sync (including pull-to-refresh).With
/taxonomy(this fork / future upstream):taxonomy_versionand full-resync when it changesuse_default_categories = false→ configured chips/edit options onlyUpstream safety
Safe to land in one Android round: new paths are inert until the taxonomy API (and optionally custom
categories.toml) ships. No separate fork APK required for mainline users.Verified (fork)
Sideload builds on
draft/android-category-syncagainst a taxonomy-enabled server; custom chips only; badges match after sync.Test plan
/taxonomy: chips = product/places/food/…; cold start matches current upstreamuse_default_categories=false: custom chips only; sync picks up migrationsScope
superbrain-app/src/screens/HomeScreen.tsxsuperbrain-app/src/screens/PostDetailScreen.tsxsuperbrain-app/src/services/syncService.tssuperbrain-app/src/services/api.tssuperbrain-app/src/services/localDb.tssuperbrain-app/src/services/taxonomySupport.tssuperbrain-app/src/constants/categories.tsbackend/config/categories.toml.example(comment only)Follow-ups