Feat v0.6.15 user display audit
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 3s
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-go-pg (pull_request) Has been cancelled
CI/CD / test-sqlite (pull_request) Has been cancelled

Add batch user resolve endpoint, sw.users SDK module, and migrate all
surfaces to show display_name instead of UUIDs. Canonical fallback chain:
display_name → username → "Unknown".

- GET /api/v1/users/resolve?ids=... (max 100, map response)
- sw.users.resolve(), resolveMany(), displayName() with 60s cache
- Chat participants resolved from users table, not snapshot
- Admin users/teams/groups/team-admin show display_name
- Chat-core participants.display_name column deprecated
- 5 new handler tests, OpenAPI spec updated

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 14:19:03 +00:00
parent c9b9e68c18
commit a8204859b5
21 changed files with 542 additions and 35 deletions

View File

@@ -91,17 +91,13 @@ Shipped. Stale fallback colors purged (~65 instances), fonts self-hosted
regressions (half-step tokens), theme settings default, surface overflow,
and user menu zoom drift. See CHANGELOG.md.
### v0.6.15 — User Display Audit
### v0.6.15 — User Display Audit
Every place a user identity appears in the UI must show a human-readable
name, never a UUID. Fallback chain: `display_name → username → "Unknown"`.
| Step | Description |
|------|-------------|
| Participant display-name resolution | `chat-core` participants endpoint resolves `display_name` from the users table at query time instead of relying on a creation-time snapshot. If the stored `display_name` is empty, look up `users.display_name` or `users.username` by `participant_id`. |
| Audit all user-facing identity surfaces | Walk every surface that shows user identity: chat participant list, chat message sender names, chat typing indicators, workflow assignees, team member lists, admin user list, notification actor names. Ensure the fallback chain is `display_name → username → "Unknown"` everywhere. |
| SDK user-resolve utility | Add `sw.users.resolve(id)` or similar to the SDK — returns `{id, username, display_name, avatar}` with local caching. Surfaces use this instead of ad-hoc lookups. |
| Stale snapshot cleanup | Remove or deprecate the static `display_name` column in the participants table. All display names come from the users table via the resolve utility. |
Shipped. `GET /api/v1/users/resolve?ids=...` batch endpoint, `sw.users`
SDK module with `resolve()`, `resolveMany()`, `displayName()` + 60s cache.
Chat participants resolved from users table instead of snapshot. All admin
surfaces show `display_name || username || 'Unknown'`. Chat-core snapshot
column deprecated. 5 new handler tests. See CHANGELOG.md.
### v0.6.16 — Usability Survey Gate
@@ -133,7 +129,7 @@ v0.6.13 Responsive & Spacing ✅ SHIPPED
v0.6.14 Visual Polish ✅ SHIPPED
v0.6.15 User Display Audit ← No UUIDs in the UI, ever
v0.6.15 User Display Audit ✅ SHIPPED
v0.6.16 Usability Survey Gate ← Machine-audit the finished product
```