feat: search relevance, CGS repo-targeting + import/destroy, ePDS auth polish, UI fixes - #192
Conversation
The activity search depends entirely on the magic-indexer, which returns matches in keyset (recency) order with no relevance score. Re-rank the fetched candidate set client-side and add a direct-jump affordance for pasted identifiers. - src/lib/search/rank.ts: pure, unit-tested lexical ranking (NFD diacritic fold, field-weighted primary/secondary scoring via max(), total additive boost capped at 0.15, query-length gate, stable tie-ordering, de-dupe + people field-merge). Prefers a server _score when one is available. - src/lib/search/parse-search-intent.ts: recognises a pasted at-URI / DID / handle / app URL and yields a direct "Jump to" target that bypasses the indexer (resolve-* enrichment gated to complete ids). - src/lib/search/constants.ts: shared SEARCH_DEBOUNCE_MS (de-duplicated from the two search components) + fetch-wide sizing. - global-search: fetch wide, re-rank certs, slice; pinned paste-to-jump row; intent-aware Enter. cert-search reuses the shared debounce const. Does not change which records are searchable (that is indexer-side, tracked in magic-indexer#224); it improves ordering of already-indexed results and adds an identifier-jump path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adopt the certified-group-service #27 migration and the two new lifecycle operations. - Targeting migration (aud-overload is deprecated upstream): createGroupAgent now proxies to the service DID via `certified_group_service`, so the JWT `aud` is the service DID, and each call names the group with an explicit `repo` (querystring for queries/body-less, body for procedures). `updateHandle` stays on the legacy proxy — a stock method with no `repo` field CGS targets via aud. - group.import: POST /api/groups/import + importGroup() promote the signed-in account into a group (CGS requires the token iss to be that account), with a focused /groups/import page (clearly names the account being converted) and a cross-link from /groups/create. - group.destroy: POST /api/groups/[groupDid]/destroy + destroyGroup(), surfaced as an owner-only "Danger zone -> Remove group" in org settings. The aud->repo change is mechanical per CGS docs/aud-migration.md but should be verified against a live group session before merge (blast radius is all group writes; the legacy form still works upstream). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add `favicon_url` to the OAuth client metadata so ePDS auth/consent pages show the Certified brandmark in the browser tab. - Handle ePDS's clean-exit redirect (#154): when the provider returns a standard OAuth `error` param instead of a code (denied consent, expired PAR, walked away), the callback handler now returns a retryable failure and the callback page offers "Try signing in again" instead of a dead-end error. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- AppDialogHeader gains an opt-in `center` prop (symmetric padding so the title is centered while leaving room for the close X); enabled on the funding-receipt and rights detail modals. - Lift in-app navigation-depth tracking into ViewTransitionProvider so the default transitionBack() pushes "/" instead of router.back() when the user entered on the current page (direct link / external referrer / refresh). This fixes the desktop top-bar Back button walking out to an external page; the mobile navbar's now-redundant local counter is removed (avoids double-patching history.pushState). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
mergePeopleByDid infers a single T from its first argument, so the two source arrays must share a type. Annotate both with a common Person shape (handle/description optional) — mirrors real usage where both people sources are normalized to one Actor shape before merge. Fixes the CI `typecheck:test` failure (tsc -p tsconfig.test.json), which checks test files that the default typecheck excludes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Draft. Bundles four independent areas from one working session; each is in its own commit and could be split into separate PRs if preferred.
1. Search — relevance ranking + paste-to-jump resilience
Activity search depends entirely on the magic-indexer, which returns matches in keyset (recency) order with no relevance score.
src/lib/search/rank.ts— pure, unit-tested client ranking (NFD diacritic fold, field-weighted primary/secondary viamax(), total boost capped 0.15, query-length gate, stable ties, de-dupe + people field-merge). Prefers a server_scoreif one ever ships.src/lib/search/parse-search-intent.ts— pasted at-URI / DID / handle / app-URL → a direct "Jump to" that bypasses the indexer.global-searchfetches wide, re-ranks, slices; adds the pinned jump row + intent-aware Enter.Does not change which records are searchable (indexer-side, see
magic-indexer#224) — only ordering + an identifier-jump path.2. Groups (CGS) — repo-targeting migration + import/destroy
aud-overload is deprecated, CGS fix: don't force OAuth consent screen on every email login #27): proxy to the service DID viacertified_group_service; name the group with an explicitrepo(querystring for queries/body-less, body for procedures).updateHandlestays on the legacy proxy (stock method, norepofield).group.import—POST /api/groups/import+ a focused/groups/importpage that converts the signed-in account into a group (CGS requires the tokenissto be that account) and a cross-link from/groups/create.group.destroy—POST /api/groups/[groupDid]/destroy+ an owner-only Danger zone → Remove group in org settings.putAnyRecord→admin (CGS Update legal pages: account deletion contact + date #13): verified no UI change needed — all group-record edit affordances already require owner/admin.3. Auth (ePDS)
favicon_urlto the OAuth client metadata (Certified mark in the auth/consent browser tab).errorredirect now yields a retryable failure with a "Try signing in again" action instead of a dead-end.4. UI fixes
AppDialogHeaderopt-incenterprop; enabled on the funding-receipt and rights modals.ViewTransitionProviderso the defaulttransitionBack()falls back to/(fixes the desktop top-bar Back; removes the navbar's redundant local copy).Verification
npx tsc --noEmitclean;npm run lintunchanged at 65 warnings / 0 errors;vitest718/718 pass (incl. 34 new search tests).Needs live verification before merge
aud→repomigration is mechanical perdocs/aud-migration.mdbut can't be runtime-tested here — verify a real group write/read against staging CGS (blast radius is all group operations; the legacy form still works upstream, so it can be staged safely).group.importdoes not yet enforceMAX_SELF_CREATED_ORGS(noted in-code; small abuse surface).🤖 Generated with Claude Code