mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-12 18:06:11 +02:00
## Thinking Path > - Paperclip helps people manage AI agents and their work. > - Task notifications tell people who changed a task. > - The authenticated event stream removed the actor ID and type. > - The UI then showed “Someone” and could not hide the viewer's own actions. > - Toasts also had no field or renderer for an actor avatar. > - This pull request keeps authorized actor identity and shows the existing person or agent avatar. ## Linked Issues or Issue Description **What happened?** Authenticated task notifications showed “Someone.” A person's own actions could produce notifications. Toasts showed a colored dot instead of the actor's avatar. **Expected behavior** Show the actor's name and avatar. Hide notifications for the viewer's own task actions. **Steps to reproduce** 1. Sign in to an authenticated instance. 2. View a page other than the task being changed. 3. Create or update a task, or add a comment. 4. Observe the generic name and the notification for your own action. ## What Changed - Keep actor IDs and types after the existing task access check. - Read only the actor's name, photo, or agent appearance from company-scoped records. Do not forward task details or comments. - Supply names and avatars even when the browser has no cached directory. - Carry actor data through the toast provider. Use the existing person and agent avatar components. - Identify the local trusted viewer so that self-actions are also hidden there. - Add tests for authenticated event delivery, hidden tasks, private details, self-actions, names, agent appearance, and avatar rendering. ## Verification - Passed: 71 UI tests across LiveUpdatesProvider, ToastContext, and ToastViewport. - Passed: 11 server tests across live-events-toast and live-events-ws. The added tests assert the actual SQL filters and bound company, actor, and active-membership values. - Passed: UI typecheck (`cd ui && ../node_modules/.bin/tsc -b`). - Passed: UI production build (`cd ui && node_modules/.bin/vite build`). - Passed: `pnpm check:token-gates` and `git diff --check`. - The full `pnpm -r typecheck` and `pnpm build` could not complete because this environment has no Rust `cargo` executable. - The full `pnpm test:run` did not complete. Broad validation exceeded the 4 GB sandbox memory limit. The full test run was stopped; the focused tests were then run successfully. - Manual review: use two signed-in people, make task changes from each, and confirm only the other person's toast appears. Repeat with an agent and check its avatar. ### Avatar screenshots Production toast components with sample identities. These isolated browser renders cover the person image and the agent custom avatar in both themes.   ## Risks - Task toast events add a small profile read per authorized viewer. Other task actions retain IDs without a profile read. - Deleted or unavailable identities use an ID-based label. People without a photo use initials. - Access checks and task-detail filtering remain in place. There is no database migration. - All CI checks passed on the first commit, including full typecheck, build, test shards, and browser suites. The updated commit must pass CI again. The PR is ready for review. CI and Greptile must pass on the updated commit. ## Model Used - OpenAI GPT-6 through Codex, with code editing and tool execution. The exact deployment model ID and context window were not exposed to this run. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass (focused suites listed above) - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes (behavior and validation are recorded above; no command or configuration change) - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge