Repository navigation
feat(client): track Pilot tasks and scope views - #16
Conversation
Link task selection to RTDL trees and Executor call summaries, retain completed calls, and add a conversation-wide plan overview. Stabilize sidebar layout and scrolling, correct canceled plan labels and nested dialog dismissal, and cover the behavior with browser regressions.
Tag active-plan query failures with the hop that failed (Atlas, Executor registration, Executor connection or Executor response) and show a readable notice with the raw gRPC detail folded away. Skip a poll while the previous query is still waiting on its deadline. Group saved plans by task in the plan overview, with status pills and a group for plans saved without task information. Rebuild the overview and task list only when their content changes, so polls keep scroll position and clicks. Share one plan-ownership scope between the tree, the Executor card and the call context, so plans from Pilot builds without task ownership show in all three, and make the Executor card follow the plan the tree displays. Keep the modal close button at its size on narrow screens and drop unused translations.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
enkerewpo
left a comment
There was a problem hiding this comment.
Tested locally: 63 Python and 74 Playwright tests pass. With an unreachable Atlas, /api/executor/active-plans returns reason: atlas_unreachable with the endpoint and a clean gRPC detail. pilot_pb2 field numbers match TaskStateEvent/TaskSummary on robonix dev, and Pilot sends a plan's owning task_state before the plan event, so the planIds scoping holds. Main ask: split out or explain the robonix.history removal. The other comment is small.
| // One-time migration: preserve conversations without taskState (legacy sessions) | ||
| // and conversations still awaiting their first task_state event. | ||
| if (localStorage.getItem("robonix.taskOwnershipCleanup") !== "1") { | ||
| localStorage.removeItem("robonix.history"); | ||
| localStorage.setItem("robonix.taskOwnershipCleanup", "1"); |
There was a problem hiding this comment.
This drops the robonix.history migration and deletes the key on first load, but the comment says legacy conversations are preserved. It is unrelated to task scoping and silently discards old prompt history. Could you move it to a separate PR, or keep the migration?
There was a problem hiding this comment.
Agreed, that change was unrelated. Reverted in 615133d: loadConversations is back to the upstream version, so the robonix.history migration is kept and nothing deletes the key. The test now checks that history is preserved and still migrates when robonix.conversations is unreadable.
| const controls = maybe("taskScopeControls"); | ||
| if (controls) { | ||
| const buttons = []; | ||
| [["", "Follow latest task"]].forEach(([id, label]) => { |
There was a problem hiding this comment.
This loops over a single entry, and the id ? … : … branch can never be taken. A single button would be clearer.
There was a problem hiding this comment.
Done in 615133d. It is now a single button with aria-pressed taken from state.followLatestTask. I also removed some UI leftovers that became dead in this PR (unused i18n entries and CSS rules).
Restore the upstream robonix.history migration in loadConversations. The task ownership work no longer deletes old prompt history. Render the scope control as a single "Follow latest task" button. Remove leftovers from the replaced goal and RTDL panels: 25 i18n entries with no remaining users (20 of them upstream entries whose last caller this branch removed), the .goal-line, .goal-details and hidden panel-header rules, and the duplicate .task-list-row block. Translate the task panel aria-label. Compute plan records and task plan ids once per render instead of per item.
Problem
Pilot can run several tasks in one conversation, but the client treated every
RTDL plan as part of one global stream. The execution tree, the Executor card
and the plan overview could show plans from different tasks, and a finished
call disappeared from the card on the next poll.
When the Executor query failed, the plan overview printed the raw
<AioRpcError ...>repr. It did not say which hop failed. A dead Atlas alsostacked requests, because each failed query waits on its 4 s deadline while
the overview polls every 2 s.
Changes
Task tracking
task_stateevents and keep a task list in the sidebar. You canfollow the latest task or pin one.
conversation switching, and a new event replaces them.
Task-scoped execution views
Without task ownership information (sessions saved before this change,
Pilot builds that send only goal/status, or before the first
task_stateevent), every plan this conversation holds a tree for counts as owned.
Executor plans from other clients stay out.
one if any. It keeps one complete call group per plan, so completed calls
stay visible and a newer owned plan is what replaces the group.
details before the plan overview underneath.
Executor query errors
/api/executor/active-plansreturnsreason(atlas_unreachable,executor_not_registered,executor_unreachable,executor_error) and theendpoint involved. The frontend shows a translated headline and hint, with
the raw gRPC detail folded into "Technical details".
Plan overview
task, with status pills and a "View call details" button per call. Plans
saved without task information get their own group.
so polls keep scroll position, open sections and clicks.
stretched every
.icon-buttonto full width.Protocol
pilot_pb2.pyis regenerated from thepilot.protothat robonixaf458212(feat(rbnx): declare capability transports in manifests (#296))emits at build time, with protobuf 6.31.1. The proto is generated from
capability IDL in that repo and is not checked in here.
Known limitations
c2cd2b4and426e23ahave no commit body. They are pushed history, sorewording them would need a force-push. I left them as they are.
runningfromthe Executor. This guards against stale polls. If the Executor ever retries
an op under the same
op_id, the card would keep the old outcome.Validation
vitals.bundle.jsrebuild is byte-identicalscripts/check_commit_authorship.py --base upstream/main --head HEADpasses