Skip to content

FIX-2345: a finished task comes back as one line that opens it (Teammates lab) - #4230

Merged
jhoffner merged 4 commits into
mainfrom
claude/project-thread-02rc08
Oct 30, 2026
Merged

jhoffner merged 4 commits into
mainfrom
claude/project-thread-02rc08

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

Part of FIX-2345 (under FIX-2152): the lab's display half. The delivery half, where the filer reads the ending as a task read instead of a user turn, is the workforce fix in #4231. Based on main (dd353e2).

What changes

  • A finished task comes back as one line. In the Teammates lab, a task the conversation filed used to come back as a block that showed its whole result in the thread. It now comes back as one collapsed line:
    • The line reads researcher finished: Look up the launch date, Coding task finished: Fix the typo…, or … couldn't finish: … when the task failed.
    • It carries the teammate's icon, and a one-line preview of what the task came back with.
    • It opens the task's popup (FIX-2339), where the whole result is.
  • The filer's own reply stays expanded under the line, as its answer.
  • A routed answer still shows as said. A task filed with resultTo: "conversation" names no task, so it has nothing to open.
  • The title comes from the board's row. The adapter reads it onto the result entry.
  • The README and the goal check now say how the result lands. The goal's step 5 reads the new line's label (Coding task finished, or couldn't finish for a failure).

Verification

  • labs/teammates vitest: 64/64 pass (re-run on this branch).
    • New screen test: a finished coding task is one line, Coding task finished: Fix the typo in the README's first line. It is not a block in the thread, and Chief of Staff's reply on it shows in full. The line opens the task's popup, whose Result holds the whole text.
    • New entries test: the line takes the task's title from its row.
    • Updated: the not-set-up test now finds Coding task couldn't finish: …, and its preview names Cursor.
  • Red state: with the old result block, 3 screen tests fail.
  • Other checks: lab typecheck, eslint and inventory pass, as do check-retired-terms and goals tsc.
  • Not checked:
    • A real-model goal run.
    • A teammate's (not a coding task's) line on a real host, since the fixture lab files only coding tasks.
    • How it looks in a real browser.

No changeset: the lab is private.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NczDiGmKnjZ6ePhvHf7KQh

In the Teammates lab, a task the conversation filed comes back as one
collapsed line, "researcher finished: <title>" (or "couldn't finish"),
that opens the task's popup with its whole result. The filer's own
reply stays expanded under it. A routed answer, which names no task,
still shows as said. The lab half of FIX-2345; the delivery half is
the workforce fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiCsRqCenZsFQRpJBHi
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 30, 2026 11:31am UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 30, 2026 11:31am UTC
flow-state-dev-ui Ignored Ignored Preview Oct 30, 2026 11:31am UTC

Request Review

@jhoffner jhoffner self-assigned this Oct 30, 2026
@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown

FIX-2345

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T11:33:51.406772Z 34dfc4a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Collaborator Author

second-look + architecture review

Verdict: the approach is right-sized. Making a finished task one collapsed line that opens the popup reuses the existing onOpenTask path and adds one optional title field. I don't see a leaner shape, and nothing here calls for a wider refactor. Two small items for the implementer.

1. Dead code this PR created (labs/teammates/src/components/Entry.tsx, case "result")

The new early return handles entry.taskId !== "" && onOpenTask. The fallback <section> below it is therefore only reached when that condition is false. That makes the {entry.taskId !== "" && onOpenTask ? <button>Open</button> : null} block in the fallback unreachable (about 6 lines). Remove it, since this change orphaned it (CLAUDE.md §3). Keep the <section> itself: a routed answer has taskId === "" and is documented as "shown as said".

2. failed derivation differs between the real adapter and the fake (optional)

  • adapter.ts: failed = taskId !== "" && task?.status !== "done".
  • test/fake-lab.ts: task.status === "failed".

A task that ends errored or cancelled (or is still unread) is drawn failed by the real adapter, but done by the fixture. The screen tests only cover "failed", so they would not catch this drift. Prefer the same predicate in both, or a shared helper if one already exists.

Nits

  • entries.test.ts new test: the row fixture sets title: id (task_y), so title: "task_y" can't tell "read from the row" from "falls back to the id". Give the row a distinct title.
  • labs/teammates/README.md: the added sentence in the coding-task paragraph is one long line next to the hard-wrapped prose. Re-wrap it to match.

Considered and fine as is: ResultLine beside SentLine (aria-label, status styling, ⚙ fallback and trailing slot differ, so merging would add parameters for little gain); isCodingEnd in run.mts (used twice); the goal step-5 wording change (it had to follow the UI).


Generated by Claude Code

#4198's merge dropped the README's inventory block, so the lab's
inventory test is red on main and on every PR. Restored the markers and
regenerated with node scripts/inventory.mjs --write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGmKnjZ6ePhvHf7KQh

jhoffner commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Test (3/3) fails on @flow-state-dev/claude-code-style's inventory test ("README.md's inventory is out of date"). It isn't this PR's change: the lab's README no longer has its stats table, so the check is red on main too. Those tables are being removed on purpose, so this PR doesn't restore it. The fix for main is #4127, which drops the lab's table check. I had pushed a commit restoring the table (8e545cd) and have reverted it (d06b5a1), so this PR's diff is the Teammates lab only. Test (3/3) stays red until #4127 merges, then this PR needs main merged in.


Generated by Claude Code

README stats tables are being removed on purpose; main's fix is #4127,
which drops the lab's table check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiGmKnjZ6ePhvHf7KQh
@jhoffner

Copy link
Copy Markdown
Collaborator Author

@claude resolve conflicts

…-02rc08

# Conflicts:
#	goals/teammates-lab/a-worker-talks-to-another-while-you-talk/goal.md
#	labs/teammates/test/screen.test.tsx

Copy link
Copy Markdown
Collaborator Author

Resolved in 34dfc4a, a merge of main. There were two conflicts, both with FIX-2342, which made Cursor the default coding agent:

  • Goal step 5: kept main's "on Claude Code by name". The result still lands as one line, Coding task finished: ….
  • Screen test: kept this PR's one-line check, and the negative check now rules out a "Cursor finished" line instead of "Claude Code finished".

Locally: the Teammates lab's 66 tests pass, as do its typecheck and inventory, goals tsc and check-retired-terms. The Claude Code-style lab's inventory check passes on the merged main too.


Generated by Claude Code

@jhoffner
jhoffner merged commit 9411a10 into main Oct 30, 2026
19 checks passed
@jhoffner
jhoffner deleted the claude/project-thread-02rc08 branch October 30, 2026 12:03
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.

2 participants