Skip to content

feat(platform): read task discussions like a chat thread - #4559

Merged
yannickmonney merged 6 commits into
mainfrom
feat/unified-conversation
Oct 9, 2026
Merged

yannickmonney merged 6 commits into
mainfrom
feat/unified-conversation

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Why

A task's discussion read like a log. Every comment had the same flat shape, agent reports of up to 10,000 characters were never shortened, a burst of status changes or failed runs cost a row each, and German event labels were lowercased ("titel geändert"). Chats and tasks looked unrelated. This PR is the first half of making them one conversation design. A follow-up converges the board dialog's lists and the chat's own bubble onto the same pieces.

What changes

@tale/ui — the thread family:

  • ThreadMessage:
    • The viewer's own words show as a right-aligned bubble.
    • Other voices show under an identity row: avatar, name, a badge such as Agent, and the clock time.
    • Continuations, and actions that show on hover, keyboard focus, an open menu and always on touch.
    • An optional ReadMore clamp.
  • ThreadEvent / ThreadEventGroup: quiet gutter lines, with bursts folded into one line that opens in place.
  • ThreadDayDivider (pinned while its day scrolls) with groupByDay; ThreadTime; layout constants.
  • ReadMore: a height or line clamp, content kept in the DOM, slack before clamping, the toggle kept in view on collapse. Keys common.actions.readMore/showLess in EN, DE and FR.
  • Avatar: person, agent, automation, system and unassigned kinds, four sizes.
  • The chat's TimelineRow and ThinkingDots move into the family with their keyframes. The chat and composer frames read the shared layout constants.

Task conversation (task page, and the rows of the board dialog):

  • Comments:
    • Your own comments sit right as bubbles, and teammates and agents under identity rows, with the Agent badge for agents.
    • Clock times under the day pills, and continuations within 5 minutes.
    • Edit and delete become named icon actions that also show on touch, and long bodies sit behind Read more.
  • Events:
    • A glyph per kind of change. The change leads in its catalog casing ("Status geändert: …"), which fixes the lowercased German labels.
    • Three or more in a row fold into "N updates · names".
  • The inbox drops its own date header for the shared ThreadDayDivider.

Docs and contracts:

  • The design doc gives the conversation-entry anatomy. The tasks page is updated in EN, DE and FR.
  • A ui-docs "Conversation thread" page with a live demo.
  • Manual boxes TASK-F70–F72 and TASK-A18 with their automation row.

Verification

  • @tale/ui: 230 unit and 14 browser tests for the thread pieces, ReadMore and Avatar.
  • Platform: task conversation, comments, timeline and values (migrated from lowercase labels to catalog casing), conversations, thought timeline, task-conversation/task-log-window browser suites, and the skeleton parity browser suite. All green locally.
  • tsc (platform, ui, ui-docs), oxlint, i18n parity, ui-docs tests, lint:manual, check-guide and lint:links are green.
  • Checked in a real browser (1440 px, demo org):
    • An agent report clamps with a fade and opens in place.
    • Own comments show as bubbles, and the agent badge and clock times read right.
    • Five failed runs and a status change fold into one line and expand.
    • The day pill stays pinned.

Not in this PR (follow-up)

  • The board dialog still lists comments newest-first, above a separate Activity list. Its rows use the new pieces, but converging its layout means retiring the windowed log and needs a performance measurement.
  • The chat's own user bubble and assistant turn on ThreadMessage.
  • Markdown parity for comments; this waits on the mention-handles PR.
  • AssigneeAvatar/ContactInitials as Avatar wrappers.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

REQUEST CHANGES — independent API-only review of fb3f9d3495e7066db83f1dde9fd721dd164f1a84 (base ba3f848a535d928637161be4053f150bd4d15f4c). I did not implement this PR.

  1. [P2] Preserve workflow names in folded history — services/platform/app/features/tasks/components/task-conversation.tsx:210. For three consecutive workflow-sentinel activity rows (actorType: 'agent', actorId: 'workflow'), the summary calls resolveActor, which always returns the generic English Automation. The expanded TaskTimelineEntry resolves the actual name from entry context or a nearby run via inferWorkflowContextFromRuns and resolveActorPreview. Thus known workflows lose their attribution in the default folded view, and distinct workflows are deduplicated to the same generic name. Reuse the existing context-aware actor resolution for the summary, and add a TaskConversation regression asserting the same workflow names before and after expansion (including the nearby-run fallback). This is a source-bound finding; I did not execute a reproduction locally.

Both review parts:

Topic Disposition
CODE FAIL: finding 1; shared primitive/consumer boundaries otherwise reviewed.
DATA PASS (source): no schema, migration, persistence or API changes; old/new readers use the same message/meta model. Main equals the pinned base, with the same migration inventory; no new number to collide with open PRs.
SECURITY PASS (source): discussion/activity/run reads retain org-scoped task loads and project-read checks; comment edit/delete gates retained. No new cross-project/org read path found.
PERFORMANCE NOT_RUN for comparable thread latency/memory. CI browser regression covers offscreen visibility, parse counts, anchoring and draft retention; generic Performance artifact excludes actual UI performance.
UX-CLARITY FAIL: finding 1. Own/other comments, edited state, touch actions, clamp, folded events and board/page distinctions reviewed.
A11Y BLOCKED for full proof: named native controls, disclosure state, timestamps, avatars, reduced motion, axe and keyboard browser evidence inspected; actual assistive reading/announcements, find-in-page and measured contrast not inspected.
UI-RESPONSIVE BLOCKED for integrated proof: CI primitive width, sticky-day, clamp-resize, collapse-scroll and skeleton geometry inspected; full task phone/short viewport/theme rendering and visual-analyzer proof unavailable in this API-only review.
LOCALE PASS (changed-key source parity): en/de/fr contain both shared actions and both task keys with matching plural parameters; sparse de-CH overrides inherit suitable German. Casing assertions cover de-CH too. Rendered localized states not independently exercised.
CICD BLOCKED: required execution still pending; details below.

CI at 2026-10-08T18:14:53Z: no failed check. Backend integration is running; platform Playwright shards 1–4, UI aggregate and sandbox/db/egress/gateway/runtime image jobs are queued. Trivy is neutral, with no check annotations; it is not reported as a pass. Pending jobs have no failure to attribute to this PR or to a flake.

I inspected Turbo artifacts from Checks run 37816362077: affected UI/platform unit and browser tasks are uncached MISS/exit 0. Browser logs show the 7 ReadMore, 4 ThreadMessage, 3 sticky-divider and 7 task-history cases passing. Their merge source b0cf0ef302a88a4c9439813ef8103a1ffd088206 has exactly the pinned base and head as parents. Existing casing assertions would fail against the prior lowercase behavior; new primitive tests exercise the added behavior, but generic ThreadEventGroup tests do not cover workflow attribution in TaskConversation.

Scope: all 68 changed paths/diffs and relevant task readers, access rules, query adapters, actor resolvers and UI consumers. No clone, install, local tests, push, merge, rerun, cancel or Ops access. No runtime or merge-readiness claim.

@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch 5 times, most recently from 275bbed to 245c81c Compare October 9, 2026 01:51
ReadMore clamps a long block by height, or by lines, behind Read more and Show less, keeping the full text in the DOM, clamping only when the content is clearly longer than the limit and bringing the toggle back into view on collapse. Avatar draws a person's initials on a tint chosen from the name, an agent, an automation, the system or an unassigned slot in four sizes, labelled or decorative.
ThreadMessage (the viewer's bubble or another voice's prose under an identity row, with continuations and actions that show on hover, focus, an open menu and always on touch), ThreadEvent and ThreadEventGroup (one quiet line per event in the avatar gutter, bursts folded into a summary), ThreadDayDivider with groupByDay, ThreadTime and the thread layout constants. The chat's TimelineRow and ThinkingDots move into the family with their keyframes, and the chat and composer frames read the shared constants.
Comments are thread messages: the viewer's own as a bubble on the right, everyone else's under an identity row with an Agent badge for agents, a continuation joined to the one before it, clock times under the day dividers, edit and delete as icon actions that a touch screen shows too, and a long body such as an agent's report clamped behind Read more. Events are quiet lines in the avatar gutter with a glyph per kind of change; the change leads in its own words and casing, so a German label keeps its noun, and three or more in a row fold into one line that opens in place. The day pills stay pinned while their day scrolls by.
The tasks page in EN, DE and FR explains the bubbles, the identity rows with the Agent label, Read more and the folded history lines; the design doc gives the conversation entries' anatomy and the shared day divider, which the inbox now uses too in place of its own date header. A ui-docs page with a live demo documents the thread family, and manual boxes TASK-F70 to F72 and TASK-A18 with their automation row.
Rows other open pull requests add sit at the same spot of the automation
register, so merged side by side they would conflict. The row moves a few
rows down, where no sibling adds one.
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