mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-04 11:01:16 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The feature map describes product capabilities and user journeys. > - Small fixes and test changes have added long notes to that map. > - These notes make substantial features harder to find. > - This pull request removes those additions from the last week's changes and sets a clear rule for future additions. > - The benefit is a smaller map with stable capability IDs and accurate entry points. ## Linked Issues or Issue Description **Issue type** Unclear or confusing documentation. **Where is the issue?** `maps/feature-map/`, the map maintenance instructions, and repository rules. **What's wrong?** Between October 27 and November 3, 2026, 115 commits changed the feature map. Many additions describe bug fixes, performance details, small UI changes, or new tests. They do not introduce substantial product features. The old synchronization instructions also encouraged a map edit for every behavior change. **Suggested fix** Add a rule that requires a substantial new feature before expanding the map. Remove minor-update notes. Keep genuine feature additions and minimal corrections to existing instructions. The review covers master through `b22ef22d56`; it does not revert application code. Conflict resolution preserves later map changes from master outside that audit snapshot. Searched open GitHub PRs and issues for related feature-map work. No duplicate cleanup was found. Substantial feature additions retained here include Coordinator (#17983), the agent YAML editor (#18036), document image galleries (#18157), remote workspace storage (#18403), native Kimi (#18391), proactive chat messages (#18374), and the Sentry receiver added in #18714. ## What Changed - Add `rules/feature-map-scope.mdc` and register its `maps/**` scope with Greptile. - Align `AGENTS.md` and the shared map contract with that rule. Routine fixes and test changes no longer require incidental map edits. - Remove 755 net lines from 23 feature recipes. Preserve all 35 areas and 192 capability IDs. - Keep substantial features and the corrections needed for current navigation, provider availability, and access boundaries. Examples from the reviewed changes: | Removed or shortened addition | Why it does not need a feature-map expansion | | --- | --- | | Rounded composer image thumbnails (#18689) | Small UI change within existing task creation. | | Connection profile reads and review-count queries (#18687, #18688) | Performance details within existing app permissions. | | Warm-session, Retry, export-capacity, and tool-wait cases | Regression details for existing execution and recovery. | | New task-search, project-context, document-persistence, and routine test journeys | Test additions for existing capabilities. The tests remain in place. | | New task button placement (#18703) | Another entry to an existing task form. | | Local browser verification notes | Run evidence belongs in the PR or test report. | ## Verification - `node scripts/check-maps.mjs` passes: 35 areas, 192 capability IDs, valid references and contract fields. - `node scripts/storybook-catalog.mjs` passes: 328 files and 3,068 stories. Generated indexes remain ignored. - Compared capability keys and navigation metadata in every edited recipe with the original source. All are unchanged. - Checked rule frontmatter, Greptile registration, representative scope matches, and `git diff --check`. - `pnpm -r typecheck` and `pnpm build` pass on `9a60eef8eb8da9bc7c3a02203c79bec12e8c8b6b`. The final `a0801e8a939494ecde3739097a80258917428e94` commit only corrects two lines in the plugin-panel recipe; map and catalog checks pass again. - Greptile reviewed the final `a0801e8a939494ecde3739097a80258917428e94` head at 5/5 with no findings. The earlier review found one inaccurate phrase about unavailable plugin panels. The hook confirms that readiness gates automatic opening, while declared panels remain selectable. The final documentation commit corrects that phrase and the thread is resolved. Paperclip's refreshed review is advisory and remains queued. - The earlier CI run failed two assertions: [server 4/12](https://github.com/paperclipai/paperclip/actions/runs/41634761842/job/125914173960) counted three Anthropic identity calls instead of two in `connection-management.integration.test.ts`; [chat 1/3](https://github.com/paperclipai/paperclip/actions/runs/41634761842/job/125914174257) observed zero publications instead of one in the same-principal endpoint-settlement case. Both exact tests pass locally on the rebased head. This PR changes neither their source nor their expectations. These failed results remain historical evidence. - Final-head CI passed server 4/12 and all other suites except the first [chat 1/3 attempt](https://github.com/paperclipai/paperclip/actions/runs/41637834618/job/125925926131), which repeated the same zero-publication assertion. The browser gate passed. The single failed-job retry was accepted for this unchanged head in [workflow attempt 2](https://github.com/paperclipai/paperclip/actions/runs/41637834618/attempts/2). [Chat 1/3 passed on that retry](https://github.com/paperclipai/paperclip/actions/runs/41637834618/job/125933199635), and the aggregate verification gate passed. Both required gates, `ci / verify` and `ci / e2e`, are green on `a0801e8a939494ecde3739097a80258917428e94`. The one retry allowance is consumed. - The first full local `pnpm test:run` attempt was interrupted before completion so master could be rebased without changing source under running tests. It is not a passing test result. Full current-head CI remains required. - No application code, tests, schemas, or lockfiles changed. ## Risks - Low runtime risk. This change only edits documentation and review guidance. - Detailed regression instructions become less visible in the feature map. Their tests and technical documentation remain available. - Some additions mix a new feature with a small fix. Those blocks retain the feature and shorten the incidental detail. ## Model Used - OpenAI Codex, GPT-6 family, with reasoning, Git history inspection, repository tools, and code execution. The session does not expose a more specific model deployment ID 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 — map, catalog, capability-ID, and rule-scope checks; full Vitest limits are stated above - [x] I have added or updated tests where applicable — no new runtime tests apply to this documentation change - [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>
110 lines
6.5 KiB
Markdown
110 lines
6.5 KiB
Markdown
---
|
|
navigation: {"section":"Oversight and operation","sectionOrder":70,"order":20}
|
|
---
|
|
|
|
# Dashboards and audit trails
|
|
|
|
People inspect company health, recent activity, run history, and routine activity, then follow evidence back to the task or agent responsible.
|
|
|
|
Feature ID: `activity`.
|
|
|
|
Implementation: [dashboard](../../ui/src/pages/Dashboard.tsx), [live dashboard](../../ui/src/pages/DashboardLive.tsx), [audit hub](../../ui/src/pages/audit/AuditHub.tsx).
|
|
|
|
Agent access: [companion](../agent-access-map/activity.md).
|
|
|
|
## Sub-features
|
|
|
|
- `overview`: `activity/overview` — inspect the company dashboard and live-work summary.
|
|
- `activity`: `activity/activity` — filter and page through recorded actor/resource events.
|
|
- `runs`: `activity/runs` — find executions and follow their task/agent context.
|
|
- `routine-audit`: `activity/routine-audit` — inspect routine execution activity separately from its definition.
|
|
- `timeline`: `activity/timeline` — use the available timeline view to understand work over time.
|
|
- `agent-commentary`: `activity/agent-commentary` — browse attributed agent suggestions and complaints.
|
|
|
|
## How to get to it (user POV)
|
|
|
|
### `dashboard`
|
|
|
|
Open `/dashboard` or `/dashboard/live`.
|
|
|
|
### `activity-audit`
|
|
|
|
Open `/activity`, `/activity/runs`, or `/activity/timeline` in the streamlined shell; legacy routes may redirect.
|
|
|
|
## Driving it with Playwright and the Paperclip CLI
|
|
|
|
Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Prepare known task mutations and completed/failed runs in a disposable company, recording their IDs and actors.
|
|
|
|
### `dashboard`
|
|
|
|
Automated: [dashboard service](../../server/src/__tests__/dashboard-service.test.ts) covers server aggregation; [dashboard helpers](../../ui/src/pages/Dashboard.test.ts) is narrower UI helper coverage.
|
|
|
|
Manual: Compare the dashboard with the known fixture tasks and runs. Start and finish a small task, refresh/reload, and verify the summary changes and links reach the right records. Exercise empty data and a failed fetch.
|
|
|
|
### `activity-audit`
|
|
|
|
Automated: [activity service](../../server/src/__tests__/activity-service.test.ts), [audit runs](../../ui/src/pages/audit/AuditRuns.test.tsx), and [routine audit](../../ui/src/pages/audit/RoutineAuditActivity.test.tsx) cover these separate data/host layers.
|
|
|
|
Manual: Find a known mutation by actor/resource and a known run by status. Change filters, load more, and follow the source links. Reload the chosen view and verify no company leakage or duplicate events. Inspect a routine run from its audit entry.
|
|
|
|
Case detail's **View in Audit** opens `/activity?entityType=case&entityId=<case UUID>`.
|
|
The Activity filters include **Cases** actions and **Case** entities; the Case
|
|
search accepts a UUID or human identifier such as `CAS-C1` (Enter or blur applies
|
|
the search). Scoped history names and links the case, and agent actors use their
|
|
real avatars. Historical creation, field, status, link, attachment and label
|
|
events from `case_events` appear alongside the already recorded handoffs and
|
|
document events, without duplicating those mirrored records. Combined history
|
|
passes retained case access before cursor pagination.
|
|
|
|
Focused regressions: [Audit feed](../../ui/src/pages/audit/AuditFeed.test.tsx),
|
|
[Audit routing](../../ui/src/pages/audit/AuditHub.test.tsx), and
|
|
[Postgres audit routes](../../server/src/__tests__/agent-action-audit-routes.test.ts).
|
|
These prove the component/API boundaries separately; follow the case-to-Audit
|
|
link in the actual app to verify the assembled journey.
|
|
|
|
Issue activity is also available through `GET /api/issues/{id}/activity`.
|
|
[Agent authorization](../../server/src/__tests__/activity-routes.test.ts) and
|
|
[sandbox bridge](../../packages/adapter-utils/src/sandbox-callback-bridge.test.ts)
|
|
regressions cover this route separately from company-wide audit. Live sandbox
|
|
agent access remains unverified; use the companion recipe.
|
|
|
|
Audit-event Load more and run listings differ: Runs currently loads at most 200
|
|
entries without pagination. The tested RoutineAuditActivity component has no
|
|
registered activity-route host; inspect execution links actually offered by
|
|
the routine rather than treating that component test as a reachable journey.
|
|
|
|
### `agent-commentary`
|
|
|
|
Open Audit → Commentary (`/activity/commentary`). Search message text, filter by agent and suggestion/complaint,
|
|
page through 50-message previews, and open a row to read the full message with its task/run links.
|
|
Filters, page offsets and the selected entry are retained in the URL. Read access requires board company access and
|
|
`commentary:view`, granted by default to all human company roles and backfilled for existing active
|
|
human members. Task privacy applies to previews, counts and full messages; agent-action audit access is separate.
|
|
All Audit tab destinations resolve in both the classic and streamlined layouts.
|
|
|
|
Storybook: [production page and message journeys](../../ui/storybook/stories/activity/agent-commentary.stories.tsx)
|
|
covers populated, filtered, long-message, paginated, empty, loading, failed, denied,
|
|
linked-message, mobile and light states using synthetic API fixtures. These examples do
|
|
not prove live database filtering or authorization.
|
|
|
|
## Gotchas
|
|
|
|
- Audit/activity events, run-log rows, first-party Telemetry, and operator OpenTelemetry traces are separate data paths.
|
|
- A healthy stream or dashboard counter alone does not prove task success.
|
|
- Cost and budget reports have their own [recipe](./budgets-costs.md).
|
|
|
|
### Storybook verification
|
|
|
|
#### `runs`
|
|
|
|
Capability ID: `activity/runs`.
|
|
|
|
Scope: ui
|
|
Storybook: Mount AuditRuns selected status/agent/routine, linked task/agent, empty/loading/error/retry and 200-entry limit. Do not invent pagination.
|
|
Production: GET /companies/{id}/heartbeat-runs and /routines/{id}/runs require company/read/privacy checks; real browser follows context links and confirms the referenced execution.
|
|
Company run history defaults to 200 rows and caps explicit limits at 1,000.
|
|
Summary contexts omit stored prompts and expand JSON once per returned row.
|
|
The array response and run visibility/redaction checks remain in place.
|
|
Agent detail links resolve older runs by ID outside the recent history page.
|
|
Sources: Source: [AuditRuns.tsx](../../ui/src/pages/audit/AuditRuns.tsx), [heartbeats.ts](../../ui/src/api/heartbeats.ts), [routines.ts](../../ui/src/api/routines.ts). Tests: [AuditRuns.test.tsx](../../ui/src/pages/audit/AuditRuns.test.tsx), [heartbeat-run-privacy-routes.test.ts](../../server/src/__tests__/heartbeat-run-privacy-routes.test.ts), [routines-service.test.ts](../../server/src/__tests__/routines-service.test.ts)
|