Skip to content

perf(platform): start a task's activity and run reads with the task #5231

Closed

Description

@tale-code-bot

Part of #3974: what remains of its cost (4), "the dialog's second wave of reads waits for the first". #3974 measured at 350 tasks that these reads started at ~0.63 s after the click, while the task itself was read from ~0.23 s. That was before the commit below; nothing has been measured since.

What already starts with the task

113ef5c (perf(platform): start a task's own reads together with the task, on main, release/0.6, train and feature-train) added usePrefetchTaskReads in services/platform/app/features/tasks/hooks/queries.ts. The task's body calls it as it mounts, and it prefetches:

  • the discussion (tasks/queries:listTaskDiscussion);
  • the dependencies (tasks/queries:listTaskDependencies);
  • the reviewer (tasks/queries:getTaskReviewer);
  • the watch state (collab/subscriptions:isSubscribedToTask).

What still waits for the task

Paths are under services/platform/app/features/tasks/.

  • The activity (tasks/queries:listTaskActivity, useTaskActivity) and the agent runs (tasks/queries:listTaskAgentRuns, useTaskAgentRuns).
    • Their readers mount only once the task has arrived and rendered:
      • the conversation (components/task-conversation.tsx, through useTaskTimeline);
      • Agent cost in the details (TaskAgentCostField in components/task-modal.tsx, through useTaskTimeline);
      • the run failure banner (components/task-run-failure-banner.tsx).
    • Both reads need only the task's id and the organization.
  • The project's labels (tasks/queries:listTaskLabels, useTaskLabels, read by components/label-editor.tsx).
    • The read needs the task's project, so the dialog alone cannot start it before the task arrives.
    • The board knows its project and could start it.

What to do

Done means:

  • opening a task starts its activity and agent-run reads together with the task;
  • a test shows that the prefetch fills the keys those hooks read;
  • the receipt gives the before and after figures.

Activity

  1. added
    perf
    agent-ready
    on Oct 31, 2026
  2. added a commit that references this issue on Nov 2, 2026
    4d3be4e
  3. added a commit that references this issue on Nov 2, 2026
    faf58a7
  4. added 2 commits that reference this issue on Nov 2, 2026
    d4e2fef
    5317335
  5. tale-code-bot commented on Nov 2, 2026

    @tale-code-bot
    CollaboratorAuthor

    Done on the feature line: feature train #5297 landed on release/0.6 by rebase at 2026-11-02 09:37:43 UTC. This issue's change is commit 5317335d53798e5d127192152dd5636d13a369ba (refactor(platform): list a task's activity and runs in its prefetch) on release/0.6, and it ships with Tale 0.6.0. GitHub closes issues itself only for commits that reach main, so the feature-train role closes this one now. Board task: TALE-315.

  6. added 5 commits that reference this issue on Nov 2, 2026
    333cfc3
    b7e78ee
    7d84085
    3248947
    fdf5ab0
  7. 10 remaining items

  8. added 2 commits that reference this issue on Nov 15, 2026
    e2ea151
    7e7cd7c
  9. added 2 commits that reference this issue on Nov 23, 2026
    0a4dfbb
    b93d582
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