Skip to content

perf(platform): join readable projects in the server-side readers #5193

Closed

Description

@tale-code-bot

Split from #5156 (itself item 4 of 7 of #4708).

What the reads do now

The change for #5156 (branch perf/page-projects-visibility-join, on its way to feature-train) adds readableProjectsSql (services/platform/backend/domains/projects/service.ts): the projects a caller may read, as one relation that a statement joins. The board, task search and the ops indicators join it instead of reading the caller's project list and sending it back as ANY(<ids>).

These server-side readers (paths under services/platform/) still read every readable project with listProjects, then filter or show that list:

  • backend/domains/documents/service.ts (listProjects(…, { includeArchived: true }));
  • backend/domains/automations/project-visibility.ts (readableProjectIds);
  • backend/domains/knowledge/routes.ts;
  • backend/domains/projects/settings-resource.ts;
  • backend/domains/mcp/platform-tools.ts;
  • backend/domains/chat/shim.ts and backend/domains/chat/handover.ts;
  • backend/domains/tasks/routes.ts: the create-task fallback to the org-wide project, which reads every project to pick one.

What to do

For each reader:

  • if it only filters another table by the projects the caller may read, join readableProjectsSql in that statement;
  • if it shows projects, read a bounded page, or search on the server;
  • keep the reader's own rule for archived projects.

Done means:

  • none of these readers sends the caller's whole project-id list back as ANY(<ids>), and none reads an unbounded project list;
  • their tests cover the visibility rules (PROJ-R1, PROJ-R2) through the join.

Activity

  1. added
    agent-ready
    on Oct 31, 2026
  2. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    CollaboratorAuthor

    TALE-283 splits this issue into four parts (Development's "Who decides": too large for one change).

  3. added a commit that references this issue on Oct 31, 2026
    aff5fcc
  4. added
    perf
    on Oct 31, 2026
  5. added 2 commits that reference this issue on Oct 31, 2026
    94e4ff6
    5f85220
  6. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    CollaboratorAuthor

    Landed on release/0.6 with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit 5f85220 (perf(platform): join readable projects in three server readers). It ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Task: TALE-283.

  7. added 4 commits that reference this issue on Nov 1, 2026
    4e97e84
    6205af8
    9069c18
    a311ba5
  8. 1 remaining item

  9. added 13 commits that reference this issue on Nov 2, 2026
    7fb452f
    93c11fb
    da69b01
    fbc0354
    88f4d75
    9d313cf
    08308d6
    a87888c
    67553ee
    2e11741
    b07500d
    03d0e61
    e70071c
  10. added a commit that references this issue on Nov 15, 2026
    0ca00ad
  11. added a commit that references this issue on Nov 23, 2026
    1f7c8d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyperf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions