Skip to content

refactor(platform): draw assignees and contacts with the shared Avatar - #4576

Merged
yannickmonney merged 3 commits into
mainfrom
refactor/avatar-wrappers
Oct 9, 2026
Merged

yannickmonney merged 3 commits into
mainfrom
refactor/avatar-wrappers

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

One avatar for everyone who appears in the app. AssigneeAvatar (tasks) and ContactInitials (conversations, Home) become thin wrappers over @tale/ui's Avatar, added in #4559:

  • A person gets initials in the tint their name hashes to, the same colour on a board card, in a task's details and conversation, and in a contact list. Other people's chips used to be a flat grey.
  • You keep the filled primary circle.
  • An agent keeps the bot on the soft primary tint.
  • An automation takes the neutral workflow glyph the design specifies (it was primary-tinted).
  • Nobody gets the dashed outline.

Initials are never smaller than 10px; the old 20px chip used 8px. Accessible names are unchanged: assignees are named images, and contact initials stay decorative next to the written name.

Stacked on #4559 (independent of #4570 and #4575).

Verification

  • The assignee-avatar test is updated for the tint.
  • Tasks, conversations, Home and governance component suites pass (1,731).
  • Task and Home browser suites and the page skeletons pass (150).
  • The typecheck is clean.
  • On a dev stack (1440), the board and the task dialog show unassigned and agent avatars as before. The person tint is covered by the unit test, because no human-assigned task was in view.
  • lint:manual and check-guide are clean.

Docs

  • design/docs/app.md gains an Avatars bullet.
  • New manual box TASK-F85 (one face per person, across surfaces and themes), plus an automation row.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT — independent API-only review of #4576 at f1874c34f5b0fc84b4ebc07ea294b35dcbc3ac59, against stacked base fb3f9d3495e7066db83f1dde9fd721dd164f1a84 (#4559). I did not author this change. No blocking defect found in this PR's own six-file diff. This is source acceptance; merge readiness remains blocked by pending/missing validation and the independent review of #4559.

  1. Nonblocking test improvement — services/platform/app/features/tasks/components/assignee-avatar.test.tsx:45: the new tint assertion rejects bg-primary, but a regression to bg-muted would still pass (including the same-background check after resizing). Assert a hashed bg-*-500/15 tone and equality with the contact/shared avatar for the same name. The implementation does use the shared hashed tint correctly.
  2. Intentional initials normalization — services/platform/app/features/tasks/components/assignee-avatar.tsx:67: sharing Avatar also changes a one-word assignee from two letters to one (Jordan: JO → J), and a three-word name from first/second to first/last initials. This aligns with the existing shared Avatar contract; empty/whitespace names now fall back to the User glyph. Sizes stay 20/28px for assignees and 20/32px for contacts; the small font improves to 10px. Contact hashing/tints are preserved; agents remain soft-primary, self-assignees remain strong-primary, automation becomes the specified neutral workflow glyph, and unassigned remains dashed.
Topic Disposition
UX-CLARITY PASS (source): consistent initials/tints and kind glyphs; intentional normalization above.
A11Y PASS (source semantics): assignees retain role=img, localized/name-or-id aria-label and title; contacts remain aria-hidden beside visible text, and the contact-info button retains its own accessible name. No new image src; the shared primitive uses empty image alt under the labelled outer span. Actual browser/assistive and contrast verification NOT_RUN.
UI-RESPONSIVE PASS (source sizing/composition): dimensions and glyph sizes preserved, shared shrink-0 and dark-mode tone pairs; caller layout/controls unchanged. Rendered narrow/short/long-name and both-theme proof NOT_RUN in this API-only review.
CODE PASS: both wrappers remain with compatible public props; only their private duplicate helpers/rendering were removed, so there is no removed-wrapper import to repair. Shared Avatar/export exists unchanged from the stacked base. Assignee tests cover named images, self/agent tones and initials; shared tests cover glyph fallback, sizes, decorative/named semantics, image failure and axe. No dedicated ContactInitials regression or cross-wrapper parity test was added. TASK-F85 and the automation row retain manual theme/cross-surface coverage.
CICD BLOCKED for merge readiness: snapshot below; no failing check to attribute to #4576, #4559 or a flake.

CI snapshot at this head: 12 check runs total — 3 success, 7 skipped, 2 queued. Success: Opengrep, Opengrep OSS, PR scope. Pending: CI ready (SAST), job 113472124489, run 37821996682; CI ready (CLI), job 113473916507, run 37821996690. Queued jobs have no settled failure diagnosis. Candidate/release jobs and CLI Prepare/Build are skipped; the CLI scope log explicitly reports {"run":false,"full":false}. There are no commit statuses and no checks on synthetic merge 4c41e13c793e14b505e1c7e6dc1792ba27996af1.

The completed Opengrep and scope job checkout logs bind the execution to that synthetic merge of the exact reviewed head/base. Opengrep reports 14 scanner findings but concludes success; its gate-test lines containing ERROR/WARNING are passing tests, not ##[error]/FAIL failures. I found no such failure lines in these inspected jobs. Checks, E2E and Build workflows restrict pull_request targets to main, explaining the absence of format/lint/typecheck/unit/UI/browser/E2E/build results on this stack. This is inherited workflow coverage, not a failure introduced by the six-file diff, and it is not a proven flake. The PR body's claimed local suite/typecheck/browser passes are author claims; corresponding execution artifacts were not supplied and are not independently attested here.

No clone, install, local tests, push, merge, rerun or cancel performed. No runtime, deployment or full-platform acceptance is implied. Next owner: implementer may strengthen the nonblocking test; Fleet coordination must resolve #4559 and route normal source-bound checks when the stack targets main. Retained evidence/report: TALE-1309 outputs for task f938120a-3adc-4d30-b987-bae712c5fa05.

@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from fb3f9d3 to 59d52bc Compare October 8, 2026 18:57
@yannickmonney
yannickmonney force-pushed the refactor/avatar-wrappers branch from f1874c3 to e0cfe25 Compare October 8, 2026 18:58
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from 59d52bc to d8d0483 Compare October 8, 2026 21:11
@yannickmonney
yannickmonney force-pushed the refactor/avatar-wrappers branch from e722196 to 0fc4440 Compare October 8, 2026 21:12
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from d8d0483 to c266110 Compare October 8, 2026 22:17
@yannickmonney
yannickmonney force-pushed the refactor/avatar-wrappers branch from 0fc4440 to 4262d71 Compare October 8, 2026 22:17
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from c266110 to 275bbed Compare October 8, 2026 23:28
@yannickmonney
yannickmonney force-pushed the refactor/avatar-wrappers branch from 4262d71 to 257ea90 Compare October 8, 2026 23:28
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from 275bbed to 245c81c Compare October 9, 2026 01:51
@yannickmonney
yannickmonney force-pushed the refactor/avatar-wrappers branch 2 times, most recently from 137c6ec to 628e49e Compare October 9, 2026 02:37
@yannickmonney
yannickmonney force-pushed the feat/unified-conversation branch from a30b67a to 9e78259 Compare October 9, 2026 02:56
Base automatically changed from feat/unified-conversation to main October 9, 2026 02:56
AssigneeAvatar and ContactInitials become thin wrappers over @tale/ui's Avatar, so a person reads in the same name-hashed tint on a board card, in a task's details and conversation, and in a contact list; the viewer keeps the filled primary circle, agents the soft primary bot, automations the neutral workflow glyph.
The design doc states the shared Avatar and its wrappers; TASK-F85 checks that a person looks the same on every surface.
A person's initials take the 800 step of their tint in light mode, so 10px initials clear 4.5:1 over the tint; the widest pairs (WW, MW, WM) show their first letter in the 20px circle. The conversation header's stacked chip draws its halo as a ring, which leaves the 20px face whole, and the Home row's contact avatar is a block again, level with the checkbox that takes its place.
@yannickmonney
yannickmonney force-pushed the refactor/avatar-wrappers branch from 628e49e to 321d48e Compare October 9, 2026 03:00
@yannickmonney
yannickmonney merged commit 26d6765 into main Oct 9, 2026
@yannickmonney
yannickmonney deleted the refactor/avatar-wrappers branch October 9, 2026 03:00
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