refactor(agent-service): remove dead checkout/headChange path#5930
Draft
bobbai00 wants to merge 1 commit into
Draft
refactor(agent-service): remove dead checkout/headChange path#5930bobbai00 wants to merge 1 commit into
bobbai00 wants to merge 1 commit into
Conversation
The step-checkout feature was wired end-to-end but unreachable: nothing in the product ever invokes the frontend `checkoutStep()`, so the backend `/agents/:id/checkout` endpoint and its `headChange` WebSocket broadcast were never triggered. Remove the dead vertical slice: - server.ts: drop the `POST /:id/checkout` route and the `headChange` / `workflowContent` members of the outgoing-message type. - texera-agent.ts: drop `TexeraAgent.checkout()`. - agent.service.ts (frontend): drop the `case "headChange"` handler and `checkoutStep()`. HEAD tracking itself is retained — `init`/`step` messages still carry `headId`, and the chat panel still walks the ancestor path from HEAD to render the visible step chain. Only the backward HEAD move (checkout) is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qFkyrpTd5PrkNBPcBeo4Q
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5930 +/- ##
============================================
+ Coverage 54.60% 54.65% +0.05%
Complexity 2927 2927
============================================
Files 1109 1109
Lines 42828 42783 -45
Branches 4608 4603 -5
============================================
- Hits 23385 23383 -2
+ Misses 18081 18038 -43
Partials 1362 1362
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bobbai00
added a commit
to bobbai00/texera
that referenced
this pull request
Jun 24, 2026
Convert the per-message comments in types/ws to uniform JSDoc blocks (so they surface in IDE hovers) and give every client and server frame a brief purpose line. Mark WsServerHeadChangeMessage @deprecated: it is redundant and unused (the checkout flow that emits it is unreachable) and is slated for removal in apache#5930. Doc-only; no type or runtime change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qFkyrpTd5PrkNBPcBeo4Q
bobbai00
added a commit
to bobbai00/texera
that referenced
this pull request
Jun 24, 2026
…lts on demand Operator result summaries were pushed over the socket (on snapshot, step, and completion frames), but the only frontend consumer — the per-operator chat popover — reads them from a subject that was fed solely by those pushes, and the step-frame results were never applied at all (dead payload). Most summary fields are server-side agent context that is never displayed. Move results to an on-demand pull and slim the socket to conversation + lifecycle: - Drop the `completion` frame entirely (type, server broadcast, frontend handler). Run-end is already signaled by the end-of-run `status` frame. - Drop `operatorResults` from the `snapshot` and `step` frames (and stop computing/sending them there). - The chat popover now calls fetchOperatorResults() (GET /operator-results) when it opens, pushing fresh summaries to operatorResultSummaries$. - Remove the dead result-annotations machinery (toggleResultAnnotations, resultAnnotationsVisible(Subject/$), getResultAnnotationsVisible) — no callers. Server frames are now: snapshot, step, status, error (plus the deprecated headChange, removed in apache#5930). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qFkyrpTd5PrkNBPcBeo4Q
This was referenced Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Removes the step-checkout feature from agent-service, which was wired end-to-end but unreachable — nothing in the product ever invokes the frontend
checkoutStep(), so the backend/agents/:id/checkoutendpoint and itsheadChangeWebSocket broadcast were never triggered. Removing the dead vertical slice:agent-service/src/server.ts— drop thePOST /:id/checkoutroute and theheadChange/workflowContentmembers of the outgoing WebSocket-message type.agent-service/src/agent/texera-agent.ts— dropTexeraAgent.checkout().frontend/.../agent/agent.service.ts— drop thecase "headChange"WS handler and the unusedcheckoutStep()method.HEAD tracking is retained:
init/stepmessages still carryheadId, and the chat panel still walks the ancestor path from HEAD to render the visible step chain. Only the backward HEAD move (checkout) is removed.This branches from
mainand is independent of the type-refactor stack (#5751 → #5928/#5927). Note #5751 currently listsheadChangeas a server message; whichever merges second will drop it from the union — a trivial reconciliation.Any related issues, documentation, discussions?
Closes #5942
Part of #5747. Independent of the stack (branches from
main).How was this PR tested?
agent-service:
tsc --noEmitclean, 93/93bun testpass, prettier clean. Frontend: the removedcheckoutStep()had zero callers and theheadChangehandler is now unreachable; verified no remainingcheckout/headChangereferences and no orphaned imports.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8 (1M context)