Repository navigation
Closed
Labels
Description
Split from #5202 (TALE-287), which was split from #5193 (#5156, item 4 of 7 of #4708).
What the reads do now
The chat tools' work legs read every project the turn user may read. They then hand that id list back to the app database:
workAccess()inservices/platform/backend/core/chat/assistant_tools.tsreads the list throughprojects/internal_queries:resolveWorkProjectsForChat. That isresolveWorkProjectsinservices/platform/backend/domains/chat/shim.ts, which callslistProjects(…, { includeArchived: true }).- In a personal thread, the tasks and projects legs pass the whole list as
projectIdstotasks/search_for_chat:searchTasksForChatandsearchProjectsForChat. Those filter witht.project_id = ANY(${readable})andid = ANY(${args.projectIds}). - The task listing checks a named
projectIdagainst the list. - The archive labels of the results come from the same list (
archivedProjectIds).
Until #5202, this list came from the knowledge scope (resolveAccessScope). The change for #5202 bounds the knowledge scope to the readable projects that hold a document. It also moves this read, unchanged, to its own query, which reaches release/0.6 with it.
What to do
- In a personal thread, join
readableProjectsSql(backend/domains/projects/service.ts) in the two search handlers, from the turn user's auth, instead of taking the id list. TALE-283 did this for the document search. - A project thread keeps its one checked project.
- A named
projectIdis checked on its own (readableProjectsAmong, orassertProjectAccessForChat). - Label archived projects from the result rows: a project row carries
archivedAt, and a task's project can go throughgetProjectLabelsForOrg. Do not take the labels from a list. - Remove
resolveWorkProjectsForChatandresolveWorkProjects.
Done means:
- no chat work leg reads an unbounded project list or sends it as
ANY(<ids>); - the tasks and projects legs return the rows they returned before, with the same archive labels;
- tests cover the visibility rules for the tasks and projects legs: PROJ-R1, and PROJ-R2 with a disabled seat included.
Activity
perf(platform): bound the knowledge scopes' readable projects
perf(platform): bound the knowledge scopes' readable projects
perf(platform): bound the knowledge scopes' readable projects
perf(platform): bound the knowledge scopes' readable projects
perf(platform): bound the knowledge scopes' readable projects
perf(platform): bound the knowledge scopes' readable projects
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): join readable projects in the chat tools' work legs
tale-code-bot commentedon Nov 2, 2026
Done on the feature line: feature train #5297 landed on
release/0.6by rebase at 2026-11-02 09:37:43 UTC. This issue's change is commit0b97a0a5a447e63e85b28e0de97a31c0edd7d6b4(perf(platform): join readable projects in the chat tools' work legs) onrelease/0.6, and it ships with Tale 0.6.0. GitHub closes issues itself only for commits that reachmain, so the feature-train role closes this one now. Board task: TALE-293.15 remaining items
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs
perf(platform): bound the knowledge scopes' readable projects
perf(platform): join readable projects in the chat tools' work legs