Files
PaperClipAI/maps/feature-map/README.md
T
DottaandPaperclip aded4197e5 fix: make multiplayer task toasts personal (#16153)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for work.
> - A company can have several human users and shared agents.
> - Live task events currently produce toasts for any user who can read the task.
> - This makes unrelated work interrupt other users.
> - This pull request checks each user's task participation before it permits a toast.
> - Users receive relevant task notifications while company views continue to refresh.

## Linked Issues or Issue Description

**What happened?**

Company task activity and agent failures produce noisy toasts for users who have no involvement in the task.

**Expected behavior**

A task qualifies when the viewer created it, commented on it, is its assigned user, deliberately acted on it under the Mine rules, or has an explicit user mention in its description or a non-deleted comment. Viewing, agent ownership, responsible-user attribution, and parent participation alone do not qualify.

**Steps to reproduce**

1. Sign in as two users in the same company.
2. Have the second user create and update a task that does not involve the first user.
3. Observe a task toast in the first user's company view before this fix.

The duplicate PR search found no existing change for personal task-toast eligibility.

## What Changed

- Extract the existing Mine participation predicate without changing Mine behavior.
- Compute task eligibility from stored tasks, comments, and run associations after WebSocket access checks. Use an exact indexed comment-mention lookup with `LIMIT 1`.
- Add optional `toastEligible` metadata to each viewer's event copy. Keep it off the shared event bus.
- Require eligibility for live task activity and task-linked run errors. Suppress generic agent errors.
- Continue cache updates for quiet events. Refetch visible comments when authenticated events omit hydration details. Ignore stale socket callbacks after account or company changes.
- Document toast semantics and add feature-map and agent-access-map coverage.
- Add persisted-data, socket, UI, and authenticated browser regression coverage.

## Verification

- Final commit: `1dc4f9402c5883744738cfe236ad00fa0bb5ca4c`.
- All 55 current-head checks passed. Two Storybook checks were skipped because this change does not affect that coverage.
- Greptile approved this exact commit with 5/5. The security scan passed. Both review threads are resolved.
- Local `pnpm build`, `pnpm -r typecheck`, `pnpm check:token-gates`, and `node scripts/check-maps.mjs` passed.
- The focused socket/UI suite passed 123 tests. The persisted eligibility suite passed 9 tests, including long history, exact viewer matching, and regex escaping. The existing Mine service suite previously passed 140 tests.
- The named browser case `task toasts follow personal involvement in multiplayer` passed against the final commit in an isolated authenticated instance. It used two real sessions, real WebSocket delivery, and persisted tasks, edits, comments, and mentions. It verified quiet unrelated activity, viewing alone, first and historical mentions, own-action suppression, visible-task suppression, and live cache refresh.
- A prior-head server shard passed its single rerun after a fixture-cleanup deadlock. The final-head CI run passed without a rerun.
- The broad local run remained in progress when CI completed the full test suite. Local focused checks and CI provide the completed test evidence.

## Risks

- This intentionally reduces live notifications. A new client stays quiet against an older server that omits eligibility.
- Eligibility queries add work to live event delivery. A lookup failure suppresses the toast and still delivers the authorized event.
- Deleted mentions cease to qualify unless another participation rule applies. Historical comment authorship retains the existing Mine behavior.
- No database migration or notification-settings change is required.

## Model Used

OpenAI Codex with GPT-6 assisted with implementation, tests, documentation, and PR preparation. It used repository tools, shell commands, and browser automation. The runtime did not expose an exact backend revision or context-window size.

## 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 (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before requesting merge


Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-13 08:09:19 -05:00

12 KiB

Paperclip feature map

Start here when reproducing a user-facing bug, verifying a change, or deciding which surfaces a fix must cover. Each recipe describes what a person can do, where they can do it, the expected result, and the evidence needed to verify it. Product behavior is still governed by the implementation spec.

The sibling agent access map records APIs, agent entry points and permission boundaries for the same capability IDs. Follow the shared map contract when maintaining either map.

Features

The map is organized by user capability, not by source file. It covers 35 feature families across the product, CLI, and operator workflows, checked against source on 2026-10-12. Experimental and developer-only surfaces are labeled explicitly. Each recipe includes sub-features, current entry points, automated evidence, manual verification steps, and gotchas.

Getting started and access

Feature What it covers
Onboarding and first work Instance setup, company wizard, first agent and task.
Login, invitations, and access Sessions, bootstrap, membership, roles, and CLI authorization.
Companies and portability Company switching/settings, archival, package import/export.

Tasks and conversations

Feature What it covers
Task creation and lifecycle Creation, assignment, lists, properties, comments, and completion.
Delegation, dependencies, and signoff Child work, prerequisites, reviewers, and task-tree controls.
Inbox, decisions, and search Personal triage, decision queues, unread/blocked views, search, and personal task toasts.
Agent conversations and project handoff Persistent conversations, discovery, handoff, and gated board chat.
Questions and approvals Question/plan responses, formal approvals, and app-tool review.
Steering and queued messages Follow-ups, queue edits, interruption, and pause/resume.
Documents, attachments, and work products Versioned documents, annotations, files, outputs, and artifact library.

Agents and reusable capabilities

Feature What it covers
Hiring, configuration, and organization Agent identity, instructions, reporting lines, lifecycle, and built-ins.
Runs, harnesses, and model accounts Adapter/model setup, account validation, transcripts, and run history.
Skills and Skill Studio Discovery, sources, authoring, revisions, tests, and agent policies.
Team packages and installation Catalog preview/install via CLI/API; catalog UI availability called out.

Projects and execution

Feature What it covers
Projects and repositories Project lifecycle, task context, repository configuration, and defaults.
Goals and work alignment Goal hierarchy, ownership, status, and project/task context.
Workspaces, services, and files Provisioning, task bindings, services/logs, Git/files, and closure.
Execution environments Local, SSH, sandbox providers, target probes, and custom images.
Recovery Stopped work, workspace repair, bounded continuation, and reconnect.

Apps, channels, and extensions

Feature What it covers
Connection setup Catalog, MCP links, task requests, authentication, and setup resumption.
App access and action permissions Agent grants, off/ask/allowed actions, discovery, tests, and revocation.
External chat and email Provider-specific identity, threads, files, delivery, and endpoint upkeep.
Tool gateways and access profiles Tool exposure, client configuration, tokens, profiles, and activity.
Secrets and proposals Company/user credentials, grants, proposals, and vault import.
Plugins Installation/configuration, contributed pages/tools, and lifecycle.

Automation and structured work

Feature What it covers
Routines, schedules, and triggers Definitions, variables, scheduled/webhook/manual runs, and history.
Pipelines, review queues, and learnings Experimental stages, automation, items, review, and learning records.
Cases Experimental structured fields, relationships, revisions, and task links.
Status cards Experimental summaries, watched work, refresh history, and settings.

Oversight and operation

Feature What it covers
Costs and budgets Spend reports, scoped limits, incidents, hard stops, and resumption.
Dashboards and audit trails Company health, live work, activity, runs, routines, and timeline.
Navigation, profile, and announcements Sidebar state, favorites/recents, personal identity, and dismissals.
Instance operations Installation, updates, service health, configuration, and backups.
CLI/API and local worktrees Explicit context, resource commands, outputs, runs, and isolated instances.

Contributor surfaces

Feature What it covers
Developer previews and diagnostic labs Design examples, interaction fixtures, performance checks; not production acceptance.

These are verification instructions, not a claim that every journey passed a live test. A component test proves its component; a scripted provider proves that fixture integration. Record executed results separately from the map.

Before driving a journey

  1. Use this checkout's isolated test drive for manual product checks. It creates a temporary instance and prints its URL and data directory. Do not guess that a server on port 3100 belongs to you.
  2. Record the commit, URL, company, login role, relevant experimental settings, adapter, runtime mode, and live versus simulated dependencies. Use disposable tasks and provider resources. A fresh test drive creates a company and CEO, but no task or first run.
  3. Use the current navigation and company prefix. Paths in recipes omit that prefix. Record whether the streamlined or production shell is selected; Agent Chat, chat connectors, and the combined Inbox/Tasks view have separate gates. A hidden surface is an unmet prerequisite, not a successful test.
  4. Run the smallest relevant test first. Vitest commands below run from the repository root after installing dependencies. Playwright recipes use their named configuration and its isolated environment, not an unrelated running instance. Reserve expensive runner/provider tests for the behavior at issue.
  5. Exercise the actual user action, inspect its result, reload, and verify the persisted state or continuation. Use read-only API checks to corroborate UI evidence; creating state through the API does not prove the creation UI.

For agent-driven acceptance work, start with the Paperclip verification skill for an isolated launch, ownership/readiness checks, browser driving, evidence, and cleanup. It uses this directory as its feature map. The existing dev-workspace run/verify skill and evaluation skill describe runtime ownership and evidence handling. Reuse them; this map introduces no environment launcher, credentials, scheduled job, or second test framework.

Evidence contract

Report each entry point as passed, failed, blocked (with its missing prerequisite), or not run. Include the feature filename and entry-point ID, commit/environment, user action, expected and observed result, command/exit code, and evidence links. Screenshots or traces should show both the action and the discriminating result. Include task/run/request IDs when relevant, without secrets.

A fix is verified across its affected surfaces only when each has evidence or an explicit reason it does not apply. Shared code alone does not prove parity. Keep product regressions visible; do not change the recipe to bless a failure. For Paperclip-assigned work, attach evidence through the artifact workflow.

Inventory and remaining depth

The UI coverage inventory accounts for every non-test TSX module under ui/src/pages, including supporting panels, legacy variants, and labs. Every product area now links to concrete recipes. Partial means the area still has the named variant or workflow gaps; unmapped is reserved for an area with no recipe. These statuses describe documentation, not runtime health.

The page inventory is a source snapshot dated 2026-10-05. The map also includes entry points hosted inside other modules (pipeline Review Queue and Learnings, task documents, onboarding), CLI-only operations, and operator work. The team recipe explicitly distinguishes the current CLI/API path from catalog UI components without a current top-level route. Refer to route registration and the CLI registry when changing reachability.

Remaining depth includes complete provider/auth/attachment matrices, every harness/model/environment capability combination, third-party plugin features, and every role/error/mobile/legacy-shell permutation. The recipes name relevant gaps instead of equating source presence with a working user journey. The index can include capabilities that do not add a page file.

Maintaining the reference

The map documents user journeys. It does not execute them automatically; coverage.json records documentation scope rather than live test health.

When maintaining a recipe, compare its entry points and expected results with the current source. Check that linked tests still exercise the stated behavior and that local references still exist. Refresh the inventory snapshot when it helps explain the current product. Keep the same-named agent access companion and stable sub-feature IDs aligned when behavior or access changes. Source-only access inventory remains distinct from live verification. Run node scripts/check-maps.mjs after map edits for structural/reference checks; follow the shared contract for the source and behavioral checks it cannot perform.

Each recipe starts with an H1 and a user-visible description, then exactly:

  1. Sub-features — stable backticked IDs and observable behavior/states.
  2. How to get to it (user POV) — one H3 backticked entry-point ID per surface.
  3. Driving it with — starts with Preconditions:; repeat each entry-point H3, with Automated: and Manual: paragraphs. Name test scope and gaps honestly.
  4. Gotchas — misleading look-alikes, feature gates, and invalid evidence.

New or updated entries follow Poteto's feature-map examples. Existing entries with a Driving it heading can adopt the named harness when their recipes are updated. The original format was inspired by Omnigent's feature map. Paperclip's recipes and checks follow its own task model and test infrastructure.