Two named components are shared by the whole app. They live in ui.contract, a 31 line file that every feature file imports from, and they carry two of the app's principles: people appear as a face or a coloured initial, never as a key (Names, not identifiers), and a failure is always a sentence with a way out (Honest state).
The two components
Component | What it is | Props | Calls in code |
|---|---|---|---|
A round picture of a person, or a green disc with their initial |
| 9 | |
A failure message with a "Retry" button |
| 4 |
Source: ui.contract L1-L31. The file also holds the one function avatarHue, which picks the disc colour.
Who imports them
File | Imports | Calls |
|---|---|---|
| Avatar, StatusLine | Avatar 3, StatusLine 3 |
| Avatar, StatusLine | Avatar 1, StatusLine 1 |
| Avatar | Avatar 1 |
| Avatar | Avatar 1 |
| Avatar | Avatar 3 |
| Avatar | none (imported, never called) |
| Avatar, StatusLine | none (imported, never called) |
Why only two
DESIGN.md planned four shared components (Avatar, DocRow, CommentBubble, StatusLine). In the built app the document row and the comment bubble moved into the features that own them, as DocItemRow and DiscussBubble. What stayed shared is what several tabs draw. Inferred from the file comments: ui.contract is owned by the lead and changed only on request, so features kept their own parts close and the shared file stayed small.
The Agents tab does not use StatusLine. It has its own red variant, AgentError, and the Activity, Me, Profile and Vault screens write their failure rows inline. The catalogue of all failure treatments is in Loading, failure and empty states.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-APP-05 Always know what is happening: Section parent: the two components every feature may use
US-TEAM-08 Ask for a design change: The shared components whose change reaches every feature
Related
Parent: Component toolkit
The platform parts that play a similar shared role: Badge, EmptyState
Visual rules they follow: Color and tokens, Spacing, radii and sizes
How it is built: Shared components and visual design
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime