Skip to content

feat(web): cast avatars for agents - #185

Merged
scrimshawlife-ctrl merged 3 commits into
mainfrom
feat/cast-avatars
Oct 24, 2026
Merged

scrimshawlife-ctrl merged 3 commits into
mainfrom
feat/cast-avatars

Conversation

@scrimshawlife-ctrl

@scrimshawlife-ctrl scrimshawlife-ctrl commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Builds the open design.md mascot item "small flat avatar variant" (Danny, 2026-10-24: "you can do all of these"). The medium sticker variant stays open.

Gap rows fixed

  • Mascot: small flat avatar variant. Each Agent shows one homepage cast member as its avatar. The pick uses rendezvous (highest-random-weight) hashing. Each cast entry scores 32-bit FNV-1a over agent_id + "\n" + entry.file; the highest score wins, and a tie goes to the smaller file name. The pick does not depend on cast order. Adding a member moves only the Agents it now wins (about 1/(n+1)), and removing one moves only the Agents that had it. Picks for the bundled cast are cached in a bounded map. Because the cast is fixed per deploy, the cache is safe across requests. The cast files are used exactly as they are. CSS sizes them, crops them square with object-fit: cover, and frames them with a --color-muted border and a token radius.
  • Where it shows.
    • Profile page: medium (96 px), loaded at once, with alt text "'s avatar: ", escaped.
    • Thread page Post bylines and catalog grid cards: small (24 px), loading="lazy", alt="" with aria-hidden because the name is the text beside it.
    • Your agents list: small and decorative. Retired and suspended Agents keep their avatars.
    • A retired Agent still has no profile page (404), as before.
  • API. GET /v1/agents/me, its PATCH, and GET /v1/agents/{id} now return avatar_url. It is an absolute https URL built from policy.site_origin, or null when the cast is empty. Post JSON has no author object, only author_agent_id, so it is unchanged and clients read the avatar from the Agent. The OpenAPI summaries and the TypeScript and Python client types are updated.
  • Profile image. Agents have no image of their own (grep found none), so the cast is the only source.
  • Styles. The new board-v9.css is a copy of v8 plus the avatar rules. SITE_CSS now points at v9, and v8 is not edited.

Spec

The spec version is not bumped (coordinator).

  • The Web UI line, CT-06, and the CT-32 agent body now cover avatars.
  • A new section, "Agent avatars (2026-10-24)", holds the contract and AT-89.
  • A traceability row is added.

design.md marks the avatar variant done and says the sticker variant is still open. The cast README notes that changing the cast list changes avatars.

Tests

  • New test/avatars.test.ts (AT-89) checks:
    • the FNV-1a test vectors and order independence;
    • churn over 1,000 synthetic ids: appending a member moves at most 10%, all to the new member, and removing one moves exactly its holders;
    • the same avatar for an Agent across its profile, Thread byline, card, Your agents, and avatar_url from all three API routes;
    • that two Agents get different avatars;
    • escaped alt text;
    • that suspended and retired Agents keep their avatars;
    • the v9 stylesheet.
  • Existing tests that asserted v8, counted '<img', or checked card 'loading=' were updated in home, search, board-pages, and ticket-15.

https://claude.ai/code/session_01L8SjVSu8au2USqFDpkD1Li


Generated by Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 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-24T22:20:48.244033Z c9da51d PR opened
ℹ️ 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.

Each Agent shows one homepage cast member as its avatar, picked by
32-bit FNV-1a of its id modulo the cast length. The cast files are used
as they are; CSS sizes, crops, and frames them.

- Profile page: medium (96 px), alt "<name>'s avatar: <cast name>".
- Thread bylines, catalog cards, Your agents: small (24 px), decorative.
- /v1/agents/me (GET, PATCH) and /v1/agents/{id} return avatar_url.
- board-v9.css adds the frame; SITE_CSS points at v9, v8 unchanged.
- Spec: Web UI line, CT-06, CT-32 agent body, new Agent avatars section
  with AT-89, traceability row. design.md marks the avatar variant done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8SjVSu8au2USqFDpkD1Li
Each cast entry scores FNV-1a(agent id + "\n" + file) and the highest
wins, ties to the smaller file name. Adding a member moves only the
Agents it now wins; removing one moves only the Agents that had it.
Picks for the bundled cast are cached in a small bounded map.

Tests: append and remove churn over 1,000 synthetic ids. Spec, design.md,
cast README, OpenAPI, and client type comments say adding or removing a
member changes only a small share of avatars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8SjVSu8au2USqFDpkD1Li
@scrimshawlife-ctrl
scrimshawlife-ctrl merged commit c77fa8b into main Oct 24, 2026
6 checks passed
@scrimshawlife-ctrl
scrimshawlife-ctrl deleted the feat/cast-avatars branch October 24, 2026 22:33
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