Skip to content

fix(app): show the Working treatment for a freshly delegated child task - #4723

Merged
yomgui merged 1 commit into
devfrom
e2e/delegated-task-shimmer
Sep 11, 2026
Merged

yomgui merged 1 commit into
devfrom
e2e/delegated-task-shimmer

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member

Root cause

Triage: reports/e2e-red-2026-09-09/triage.md → Cluster 2 — Delegated-task activity rows (Brief C).

task-activity-shimmer and parent-child-permission-approval ("a parent task surfaces and resolves its child session permission request") both look for [data-subagent-activity="shimmer"] on the seeded in-flight child. Since #4635 (fc8c9852b) subagentRunActivity returns waiting-result when the parent thread is not running and the child has no observed run (resultPending = … || (!parentActive && !child?.runActive)); #4642 (1396c591f) then started feeding the in-transcript row the real parentActive from MessageList's runActive (status === "submitted" | "streaming" | "retrying").

The dev-only eval.task_activity.seed hook only marked the activity store busy; the ThreadStatus that MessageList reads comes from the status query and stayed "ready". So the seed rendered "a delegated child under a parent that has stopped", and the product — correctly, and as unit-tested in message-list-loading.test.tsx ("does not claim an unobserved child is running after its parent stops") — showed "Waiting for task result" instead of the Working shimmer.

Decision: the product state is intentional and right — a live delegating parent is mid-run, so a freshly delegated child with no progress yet does get the shimmer / "Working" treatment in real use. The seed was misrepresenting the scenario. Neither spec's claim nor prose changes.

What changed

apps/app/src/react-app/domains/session/surface/session-surface.tsx — eval.task_activity.seed now also calls setEvalThreadStatus("streaming"), exactly like the neighbouring eval.chat_loading.seed already does. 4 lines, dev-only eval seam (import.meta.env.DEV), no production path touched.

Proof (Daytona, sandbox source verified 14ad97df531626c709e85e5cf48080fe0d9f4f24)

OPENWORK_EVAL_REF=14ad97df531626c709e85e5cf48080fe0d9f4f24 pnpm evals:e2e task-activity-shimmer --daytona
selection: engine=legacy surface=legacy case=all; placement: daytona (--daytona)
 ✓ delegated-task activity stays with its original message after a follow-up  110314ms
Tests  1 passed (1)   → {"passed":1,"failed":0,"skipped":0,"verdict":"passed"}
OPENWORK_EVAL_REF=14ad97df531626c709e85e5cf48080fe0d9f4f24 pnpm evals:e2e parent-child-permission-approval --daytona
selection: engine=legacy surface=legacy case=all; placement: daytona (--daytona)
 ✓ switching and creating threads hydrate permissions without waiting for unrelated roots  121475ms
 ✓ a parent task surfaces and resolves its child session permission request  124752ms   ← this cluster's target, was red
 × retry recovery and stopping a permission leave other requests and fresh work intact   ← Cluster 1 (Brief B), pre-existing
 × a parent answers and stops real child questions, then finishes fresh work …            ← pre-existing, see below
Tests  2 failed | 2 passed (4)

The two remaining failures in that file are byte-identical to the dev baseline (e2e-dev-baseline-61b41901c.log: same messages, same spec lines 138 and 354) and are out of this cluster's scope:

  • "Timed out waiting for the unrelated approval is pending … last value []" — the swallowed fresh-session send, Cluster 1 / Brief B.
  • "Target remained visible: {role: button, label: /^Child checklist/}" at spec:354 after Stop + follow-up — not attributed to a cluster in the triage; noting it for the owner of Brief B/K to check.

Unit control: apps/app pnpm typecheck clean; bun test tests/subagent-run-line.test.tsx 5/5. tests/message-list-loading.test.tsx fails 10/16 with "Platform context is missing" both here and on a clean origin/dev @ c744e2d7b control worktree — pre-existing, untouched.

Verdict for this cluster: Passed (both target tests green at 14ad97df5, 0 skips). All Daytona sandboxes from these runs were deleted.

Noticed, not touched

  • The uncommitted subagent-run-line.tsx edits in the main worktree (row → details toggle, separate "Open sub-agent chat" arrow button) are orthogonal to this fix; they change layout, not subagentRunActivity, so they will not reintroduce this red. They were read, not modified.
  • parent-child-permission-approval test 4 failure above (not in the triage's clusters).
  • message-list-loading.test.tsx "Platform context is missing" pre-existing unit red on dev.

The eval.task_activity.seed hook rendered an in-flight child under a parent
whose thread status stayed "ready": it only marked the activity store busy.
Since #4635 MessageList reads that as a stopped parent and the unobserved
child shows "Waiting for task result" instead of the Working shimmer, so
task-activity-shimmer and parent-child-permission-approval lost their
[data-subagent-activity="shimmer"] row. A delegating parent is mid-run;
mark the eval thread streaming like the chat-loading seed already does.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 1:43am UTC
3 Skipped Deployments
Project Deployment Actions Updated
openwork-den Skipped Skipped Sep 10, 2026 1:43am UTC
openwork-diagnostics Skipped Skipped Sep 10, 2026 1:43am UTC
openwork-landing Skipped Skipped v0 Sep 10, 2026 1:43am UTC

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (21 ms), confidentiality-review (75 ms), desktop-den-sync-review (78 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (14ad97df531626c709e85e5cf48080fe0d9f4f24). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 3/3 tests · 4/4 assertions · 2 images

Commit 14ad97df531626c709e85e5cf48080fe0d9f4f24 · selected evidence

Open review report

This branch was successfully deployed

1 active and 3 inactive deployments
Preview – openwork-app — 14ad97df Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — 14ad97df Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — 14ad97df Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-landing — 14ad97df Deployed Sep 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant