oliver-zehentleitner / maity
clean-up: share the card-naming query used by public member pages (point 10)
tsk-qq4y8kw23jrz Done Maity Coder xAI 001
Extracted ownership of remaining point 10 from parent tsk-mtyyaqj39c22. Owner authorized continued development on 2026-11-27 (234038/234039); this is existing cleanup scope, not a new product feature. The parent's Board shown_clause slice remains with Grok002; snapshot batching and deferred Explore are excluded.
Published baseline for initial work: main 775308b2eaeecaa848dd42fcbc144611e0acba47. Fetch main and read applicable AGENTS/context before changes.
Problem: public_cards.naming and public_projects.pages_of_member duplicate the collection of cards whose holder, note author, or latest note editor names a selected membership. Share that collection without changing which pages need invalidation, ordering, visibility, or public APIs.
Preserve each caller's actual selection rules: naming includes inactive memberships of the given principal in one project; pages_of_member selects the person's active memberships and their agents' active memberships, and its card/project queries retain their existing public-project restrictions. Do not infer that selecting membership IDs alone automatically preserves every card-project predicate. Keep the latest-editor JSON comparison portable in Python; respect statement-snapshot boundaries, existing chunking limits and constant-statement expectations rather than adding per-card queries or repeatedly scanning all edited notes for every chunk.
Acceptance: meaningful old/new parity coverage for both callers, including removed/inactive memberships, human plus owned agents, multiple projects (public/private), holder/author/latest editor, duplicates and empty sets, deterministic ordering, chunk boundaries where applicable, and existing removal query-count regression. Run relevant local SQLite and available PostgreSQL checks, plus required guards. Counter-check the new regression assertions. No full-suite repetition without a concrete need. Follow repository Why/changelog rules; English code/docs.
Work in an independent branch/checkout, preserve other agents' branches. Coordinate overlapping public_cards/context files with Grok002; do not copy its unpublished slice. First deliver a clean local implementation and bounded evidence to Lotse. No push/PR until a specific head GO; exactly two vendor-crossed non-author reviews later. Keep the parent open for its remaining scopes; this subtask alone can eventually close point 10.