User request
Implement the Threads-side backend changes to support the Console Activity Threads view moving to server-side filter/sort/pagination with updated authorization.
Source spec: https://github.com/agynio/architecture/blob/main/changes/2026-04-24-activity-server-side-lists.md
Specification (architecture/product)
From:
changes/2026-04-24-activity-server-side-lists.md
architecture/threads.md#listorganizationthreads-request-shape
product/console/console.md (Threads section)
Key requirements:
- New org-scoped list endpoint:
ListOrganizationThreads with server-side filter/sort/pagination.
- Deterministic cursor pagination: stable secondary sort by
id (ascending); cursor includes tie-breaker.
- List response includes:
message_count
- participants rendered as @NickNames (resolved server-side; client must not do reverse lookup)
- Auth: Threads Activity view is available to org owners + cluster admins (
can_view_threads).
Work items
1) Adopt new agynio/api RPC/proto changes
- Update
buf.lock and regenerate after agynio/api adds ListOrganizationThreads + Participant.nickname.
2) Implement ListOrganizationThreads
- Add server implementation for the new RPC.
- Filters (combine with AND; *_in values combine with OR):
- status_in
- participant_identity_id_in
- created_after / created_before
- Sort fields: created, updated, message_count, status (+ direction)
- Deterministic cursor pagination:
- stable tie-breaker by
id
- cursor includes primary sort key + id
3) Participant nickname enrichment
- For each participant identity_id in the list response, populate
Participant.nickname.
- Use the new Identity batch/reverse nickname lookup (see
agynio/identity + agynio/api issue).
4) Auth enforcement
- Ensure
can_view_threads is enforced for org-scoped list.
- Keep existing behavior for other endpoints unless updated by spec.
5) Tests
Add/extend tests to cover:
- filter semantics and pagination reset behavior
- deterministic pagination for each sort
- nickname enrichment behavior (including missing nicknames)
- auth denied cases
Acceptance
ListOrganizationThreads meets the list-envelope behavior from the spec and is deterministic under pagination.
- Participants include
@nickname from server-side enrichment.
- Auth uses
can_view_threads.
User request
Implement the Threads-side backend changes to support the Console Activity Threads view moving to server-side filter/sort/pagination with updated authorization.
Source spec: https://github.com/agynio/architecture/blob/main/changes/2026-04-24-activity-server-side-lists.md
Specification (architecture/product)
From:
changes/2026-04-24-activity-server-side-lists.mdarchitecture/threads.md#listorganizationthreads-request-shapeproduct/console/console.md(Threads section)Key requirements:
ListOrganizationThreadswith server-side filter/sort/pagination.id(ascending); cursor includes tie-breaker.message_countcan_view_threads).Work items
1) Adopt new
agynio/apiRPC/proto changesbuf.lockand regenerate afteragynio/apiaddsListOrganizationThreads+ Participant.nickname.2) Implement
ListOrganizationThreadsid3) Participant nickname enrichment
Participant.nickname.agynio/identity+agynio/apiissue).4) Auth enforcement
can_view_threadsis enforced for org-scoped list.5) Tests
Add/extend tests to cover:
Acceptance
ListOrganizationThreadsmeets the list-envelope behavior from the spec and is deterministic under pagination.@nicknamefrom server-side enrichment.can_view_threads.