2026-04-06 21:56:13 -05:00
|
|
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
2026-03-23 07:48:50 -05:00
|
|
|
import { pickTextColorForPillBg } from "@/lib/color-contrast";
|
2026-03-02 16:44:03 -06:00
|
|
|
import { Link } from "@/lib/router";
|
[codex] Improve workspace navigation and runtime UI (#4089)
## Thinking Path
> - Paperclip agents do real work in project and execution workspaces.
> - Operators need workspace state to be visible, navigable, and
copyable without digging through raw run logs.
> - The branch included related workspace cards, navigation, runtime
controls, stale-service handling, and issue-property visibility.
> - These changes share the workspace UI and runtime-control surfaces
and can stand alone from unrelated access/profile work.
> - This pull request groups the workspace experience changes into one
standalone branch.
> - The benefit is a clearer workspace overview, better metadata copy
flows, and more accurate runtime service controls.
## What Changed
- Polished project workspace summary cards and made workspace metadata
copyable.
- Added a workspace navigation overview and extracted reusable project
workspace content.
- Squared and polished the execution workspace configuration page.
- Fixed stale workspace command matching and hid stopped stale services
in runtime controls.
- Showed live workspace service context in issue properties.
## Verification
- `pnpm install --frozen-lockfile`
- `pnpm exec vitest run
ui/src/components/ProjectWorkspaceSummaryCard.test.tsx
ui/src/lib/project-workspaces-tab.test.ts
ui/src/components/Sidebar.test.tsx
ui/src/components/WorkspaceRuntimeControls.test.tsx
ui/src/components/IssueProperties.test.tsx`
- `pnpm exec vitest run packages/shared/src/workspace-commands.test.ts
--config /dev/null` because the root Vitest project config does not
currently include `packages/shared` tests.
- Split integration check: merged after runtime/governance,
dev-infra/backups, and access/profiles with no merge conflicts.
- Confirmed this branch does not include `pnpm-lock.yaml`.
## Risks
- Medium risk: touches workspace navigation, runtime controls, and issue
property rendering.
- Visual layout changes may need browser QA, especially around smaller
screens and dense workspace metadata.
- No database migrations are included.
> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.
## Model Used
- OpenAI Codex, GPT-5.4 tool-enabled coding model, agentic
code-editing/runtime with local shell and GitHub CLI access; exact
context window and reasoning mode are not exposed by the Paperclip
harness.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-20 06:14:32 -05:00
|
|
|
import type { Issue, Project, WorkspaceRuntimeService } from "@paperclipai/shared";
|
2026-02-23 20:04:47 -06:00
|
|
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
import { accessApi } from "../api/access";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { agentsApi } from "../api/agents";
|
2026-02-26 16:08:39 -06:00
|
|
|
import { authApi } from "../api/auth";
|
2026-02-23 20:04:47 -06:00
|
|
|
import { issuesApi } from "../api/issues";
|
2026-02-17 20:16:57 -06:00
|
|
|
import { projectsApi } from "../api/projects";
|
2026-02-17 10:53:20 -06:00
|
|
|
import { useCompany } from "../context/CompanyContext";
|
2026-02-17 12:24:48 -06:00
|
|
|
import { queryKeys } from "../lib/queryKeys";
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
import { buildCompanyUserInlineOptions, buildCompanyUserLabelMap } from "../lib/company-members";
|
2026-03-02 14:20:49 -06:00
|
|
|
import { useProjectOrder } from "../hooks/useProjectOrder";
|
2026-03-05 11:19:56 -06:00
|
|
|
import { getRecentAssigneeIds, sortAgentsByRecency, trackRecentAssignee } from "../lib/recent-assignees";
|
2026-03-12 16:12:38 -05:00
|
|
|
import { formatAssigneeUserLabel } from "../lib/assignees";
|
2026-04-06 19:14:40 -05:00
|
|
|
import { buildExecutionPolicy, stageParticipantValues } from "../lib/issue-execution-policy";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { StatusIcon } from "./StatusIcon";
|
|
|
|
|
import { PriorityIcon } from "./PriorityIcon";
|
UI: Identity component, LiveRunWidget, issue identifiers, and UX improvements
Add Identity component (avatar + name) used across agent/issue displays. Add
LiveRunWidget for real-time streaming of active heartbeat runs on issue detail
pages via WebSocket. Display issue identifiers (PAP-42) instead of UUID
fragments throughout Issues, Inbox, CommandPalette, and detail pages.
Enhance CommentThread with re-open checkbox, Cmd+Enter submit, sorted display,
and run linking. Improve Activity page with richer formatting and filtering.
Update Dashboard with live metrics. Add reports-to agent link in AgentProperties.
Various small fixes: StatusIcon centering, CopyText ref init, agent detail
run-issue cross-links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:10:07 -06:00
|
|
|
import { Identity } from "./Identity";
|
2026-03-02 16:44:03 -06:00
|
|
|
import { formatDate, cn, projectUrl } from "../lib/utils";
|
2026-02-17 10:53:20 -06:00
|
|
|
import { timeAgo } from "../lib/timeAgo";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
import { Separator } from "@/components/ui/separator";
|
2026-02-20 10:32:32 -06:00
|
|
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
import { User, Hexagon, ArrowUpRight, Tag, Plus, GitBranch, FolderOpen, Check, ExternalLink } from "lucide-react";
|
2026-02-23 14:41:21 -06:00
|
|
|
import { AgentIcon } from "./AgentIconPicker";
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
|
2026-04-06 08:10:38 -05:00
|
|
|
function TruncatedCopyable({ value, icon: Icon }: { value: string; icon: React.ComponentType<{ className?: string }> }) {
|
|
|
|
|
const [copied, setCopied] = useState(false);
|
|
|
|
|
const timerRef = useRef<ReturnType<typeof setTimeout>>(undefined);
|
2026-04-06 21:56:13 -05:00
|
|
|
useEffect(() => () => clearTimeout(timerRef.current), []);
|
2026-04-06 08:10:38 -05:00
|
|
|
const handleCopy = useCallback(async () => {
|
|
|
|
|
try {
|
|
|
|
|
await navigator.clipboard.writeText(value);
|
|
|
|
|
setCopied(true);
|
|
|
|
|
clearTimeout(timerRef.current);
|
|
|
|
|
timerRef.current = setTimeout(() => setCopied(false), 1500);
|
|
|
|
|
} catch { /* noop */ }
|
|
|
|
|
}, [value]);
|
|
|
|
|
|
|
|
|
|
return (
|
2026-04-06 08:18:18 -05:00
|
|
|
<div className="flex items-start gap-1.5 min-w-0 flex-1">
|
|
|
|
|
<Icon className="h-3.5 w-3.5 text-muted-foreground shrink-0 mt-0.5" />
|
2026-04-06 08:10:38 -05:00
|
|
|
<button
|
|
|
|
|
type="button"
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
className="text-sm font-mono min-w-0 break-all text-left cursor-pointer hover:text-foreground transition-colors"
|
2026-04-06 08:10:38 -05:00
|
|
|
onClick={handleCopy}
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
title={copied ? "Copied!" : "Click to copy"}
|
2026-04-06 08:10:38 -05:00
|
|
|
>
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
{value}
|
2026-04-06 08:10:38 -05:00
|
|
|
</button>
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
{copied && <Check className="h-3 w-3 text-green-500 shrink-0 mt-0.5" />}
|
2026-04-06 08:10:38 -05:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-13 17:12:25 -05:00
|
|
|
function defaultProjectWorkspaceIdForProject(project: {
|
|
|
|
|
workspaces?: Array<{ id: string; isPrimary: boolean }>;
|
|
|
|
|
executionWorkspacePolicy?: { defaultProjectWorkspaceId?: string | null } | null;
|
|
|
|
|
} | null | undefined) {
|
|
|
|
|
if (!project) return null;
|
|
|
|
|
return project.executionWorkspacePolicy?.defaultProjectWorkspaceId
|
|
|
|
|
?? project.workspaces?.find((workspace) => workspace.isPrimary)?.id
|
|
|
|
|
?? project.workspaces?.[0]?.id
|
|
|
|
|
?? null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function defaultExecutionWorkspaceModeForProject(project: { executionWorkspacePolicy?: { enabled?: boolean; defaultMode?: string | null } | null } | null | undefined) {
|
|
|
|
|
const defaultMode = project?.executionWorkspacePolicy?.enabled ? project.executionWorkspacePolicy.defaultMode : null;
|
|
|
|
|
if (defaultMode === "isolated_workspace" || defaultMode === "operator_branch") return defaultMode;
|
|
|
|
|
if (defaultMode === "adapter_default") return "agent_default";
|
|
|
|
|
return "shared_workspace";
|
|
|
|
|
}
|
|
|
|
|
|
[codex] Improve workspace navigation and runtime UI (#4089)
## Thinking Path
> - Paperclip agents do real work in project and execution workspaces.
> - Operators need workspace state to be visible, navigable, and
copyable without digging through raw run logs.
> - The branch included related workspace cards, navigation, runtime
controls, stale-service handling, and issue-property visibility.
> - These changes share the workspace UI and runtime-control surfaces
and can stand alone from unrelated access/profile work.
> - This pull request groups the workspace experience changes into one
standalone branch.
> - The benefit is a clearer workspace overview, better metadata copy
flows, and more accurate runtime service controls.
## What Changed
- Polished project workspace summary cards and made workspace metadata
copyable.
- Added a workspace navigation overview and extracted reusable project
workspace content.
- Squared and polished the execution workspace configuration page.
- Fixed stale workspace command matching and hid stopped stale services
in runtime controls.
- Showed live workspace service context in issue properties.
## Verification
- `pnpm install --frozen-lockfile`
- `pnpm exec vitest run
ui/src/components/ProjectWorkspaceSummaryCard.test.tsx
ui/src/lib/project-workspaces-tab.test.ts
ui/src/components/Sidebar.test.tsx
ui/src/components/WorkspaceRuntimeControls.test.tsx
ui/src/components/IssueProperties.test.tsx`
- `pnpm exec vitest run packages/shared/src/workspace-commands.test.ts
--config /dev/null` because the root Vitest project config does not
currently include `packages/shared` tests.
- Split integration check: merged after runtime/governance,
dev-infra/backups, and access/profiles with no merge conflicts.
- Confirmed this branch does not include `pnpm-lock.yaml`.
## Risks
- Medium risk: touches workspace navigation, runtime controls, and issue
property rendering.
- Visual layout changes may need browser QA, especially around smaller
screens and dense workspace metadata.
- No database migrations are included.
> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.
## Model Used
- OpenAI Codex, GPT-5.4 tool-enabled coding model, agentic
code-editing/runtime with local shell and GitHub CLI access; exact
context window and reasoning mode are not exposed by the Paperclip
harness.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-20 06:14:32 -05:00
|
|
|
function primaryWorkspaceIdForProject(project: Pick<Project, "primaryWorkspace" | "workspaces"> | null | undefined) {
|
|
|
|
|
return project?.primaryWorkspace?.id
|
|
|
|
|
?? project?.workspaces.find((workspace) => workspace.isPrimary)?.id
|
|
|
|
|
?? project?.workspaces[0]?.id
|
|
|
|
|
?? null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isMainIssueWorkspace(input: {
|
|
|
|
|
issue: Pick<Issue, "projectWorkspaceId" | "currentExecutionWorkspace">;
|
|
|
|
|
project: Pick<Project, "primaryWorkspace" | "workspaces"> | null | undefined;
|
|
|
|
|
}) {
|
|
|
|
|
const workspace = input.issue.currentExecutionWorkspace ?? null;
|
|
|
|
|
const primaryWorkspaceId = primaryWorkspaceIdForProject(input.project);
|
|
|
|
|
const linkedProjectWorkspaceId = workspace?.projectWorkspaceId ?? input.issue.projectWorkspaceId ?? null;
|
|
|
|
|
if (workspace) {
|
|
|
|
|
if (workspace.mode !== "shared_workspace") return false;
|
|
|
|
|
if (!linkedProjectWorkspaceId || !primaryWorkspaceId) return true;
|
|
|
|
|
return workspace.mode === "shared_workspace" && linkedProjectWorkspaceId === primaryWorkspaceId;
|
|
|
|
|
}
|
|
|
|
|
if (!linkedProjectWorkspaceId || !primaryWorkspaceId) return true;
|
|
|
|
|
return linkedProjectWorkspaceId === primaryWorkspaceId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function runningRuntimeServiceWithUrl(
|
|
|
|
|
runtimeServices: WorkspaceRuntimeService[] | null | undefined,
|
|
|
|
|
) {
|
|
|
|
|
return runtimeServices?.find((service) => service.status === "running" && service.url?.trim()) ?? null;
|
|
|
|
|
}
|
|
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
interface IssuePropertiesProps {
|
|
|
|
|
issue: Issue;
|
2026-04-06 10:58:59 -05:00
|
|
|
childIssues?: Issue[];
|
|
|
|
|
onAddSubIssue?: () => void;
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
onUpdate: (data: Record<string, unknown>) => void;
|
2026-02-26 08:53:03 -06:00
|
|
|
inline?: boolean;
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function PropertyRow({ label, children }: { label: string; children: React.ReactNode }) {
|
|
|
|
|
return (
|
2026-04-10 22:26:21 -05:00
|
|
|
<div className="flex items-start gap-3 py-1.5">
|
|
|
|
|
<span className="text-xs text-muted-foreground shrink-0 w-20 mt-0.5">{label}</span>
|
|
|
|
|
<div className="flex items-center gap-1.5 min-w-0 flex-1 flex-wrap">{children}</div>
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
/** Renders a Popover on desktop, or an inline collapsible section on mobile (inline mode). */
|
|
|
|
|
function PropertyPicker({
|
|
|
|
|
inline,
|
|
|
|
|
label,
|
|
|
|
|
open,
|
|
|
|
|
onOpenChange,
|
|
|
|
|
triggerContent,
|
|
|
|
|
triggerClassName,
|
|
|
|
|
popoverClassName,
|
|
|
|
|
popoverAlign = "end",
|
|
|
|
|
extra,
|
|
|
|
|
children,
|
|
|
|
|
}: {
|
|
|
|
|
inline?: boolean;
|
|
|
|
|
label: string;
|
|
|
|
|
open: boolean;
|
|
|
|
|
onOpenChange: (open: boolean) => void;
|
|
|
|
|
triggerContent: React.ReactNode;
|
|
|
|
|
triggerClassName?: string;
|
|
|
|
|
popoverClassName?: string;
|
|
|
|
|
popoverAlign?: "start" | "center" | "end";
|
|
|
|
|
extra?: React.ReactNode;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}) {
|
|
|
|
|
const btnCn = cn(
|
2026-04-10 22:26:21 -05:00
|
|
|
"inline-flex items-start gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors min-w-0 max-w-full text-left",
|
2026-02-26 08:53:03 -06:00
|
|
|
triggerClassName,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (inline) {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<PropertyRow label={label}>
|
|
|
|
|
<button className={btnCn} onClick={() => onOpenChange(!open)}>
|
|
|
|
|
{triggerContent}
|
|
|
|
|
</button>
|
|
|
|
|
{extra}
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
{open && (
|
|
|
|
|
<div className={cn("rounded-md border border-border bg-popover p-1 mb-2", popoverClassName)}>
|
|
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<PropertyRow label={label}>
|
|
|
|
|
<Popover open={open} onOpenChange={onOpenChange}>
|
|
|
|
|
<PopoverTrigger asChild>
|
|
|
|
|
<button className={btnCn}>{triggerContent}</button>
|
|
|
|
|
</PopoverTrigger>
|
|
|
|
|
<PopoverContent className={cn("p-1", popoverClassName)} align={popoverAlign} collisionPadding={16}>
|
|
|
|
|
{children}
|
|
|
|
|
</PopoverContent>
|
|
|
|
|
</Popover>
|
|
|
|
|
{extra}
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-06 10:58:59 -05:00
|
|
|
export function IssueProperties({
|
|
|
|
|
issue,
|
|
|
|
|
childIssues = [],
|
|
|
|
|
onAddSubIssue,
|
|
|
|
|
onUpdate,
|
|
|
|
|
inline,
|
|
|
|
|
}: IssuePropertiesProps) {
|
2026-02-17 10:53:20 -06:00
|
|
|
const { selectedCompanyId } = useCompany();
|
2026-02-23 20:04:47 -06:00
|
|
|
const queryClient = useQueryClient();
|
|
|
|
|
const companyId = issue.companyId ?? selectedCompanyId;
|
2026-02-20 10:32:32 -06:00
|
|
|
const [assigneeOpen, setAssigneeOpen] = useState(false);
|
|
|
|
|
const [assigneeSearch, setAssigneeSearch] = useState("");
|
|
|
|
|
const [projectOpen, setProjectOpen] = useState(false);
|
|
|
|
|
const [projectSearch, setProjectSearch] = useState("");
|
2026-04-04 13:56:04 -05:00
|
|
|
const [blockedByOpen, setBlockedByOpen] = useState(false);
|
|
|
|
|
const [blockedBySearch, setBlockedBySearch] = useState("");
|
2026-04-10 22:26:21 -05:00
|
|
|
const [parentOpen, setParentOpen] = useState(false);
|
|
|
|
|
const [parentSearch, setParentSearch] = useState("");
|
2026-04-06 08:40:38 -05:00
|
|
|
const [reviewersOpen, setReviewersOpen] = useState(false);
|
|
|
|
|
const [reviewerSearch, setReviewerSearch] = useState("");
|
|
|
|
|
const [approversOpen, setApproversOpen] = useState(false);
|
|
|
|
|
const [approverSearch, setApproverSearch] = useState("");
|
2026-02-23 20:04:47 -06:00
|
|
|
const [labelsOpen, setLabelsOpen] = useState(false);
|
|
|
|
|
const [labelSearch, setLabelSearch] = useState("");
|
|
|
|
|
const [newLabelName, setNewLabelName] = useState("");
|
|
|
|
|
const [newLabelColor, setNewLabelColor] = useState("#6366f1");
|
2026-02-17 20:16:57 -06:00
|
|
|
|
2026-02-26 16:08:39 -06:00
|
|
|
const { data: session } = useQuery({
|
|
|
|
|
queryKey: queryKeys.auth.session,
|
|
|
|
|
queryFn: () => authApi.getSession(),
|
|
|
|
|
});
|
|
|
|
|
const currentUserId = session?.user?.id ?? session?.session?.userId;
|
|
|
|
|
|
2026-02-17 12:24:48 -06:00
|
|
|
const { data: agents } = useQuery({
|
2026-02-23 20:04:47 -06:00
|
|
|
queryKey: queryKeys.agents.list(companyId!),
|
|
|
|
|
queryFn: () => agentsApi.list(companyId!),
|
|
|
|
|
enabled: !!companyId,
|
2026-02-17 12:24:48 -06:00
|
|
|
});
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
const { data: companyMembers } = useQuery({
|
|
|
|
|
queryKey: queryKeys.access.companyUserDirectory(companyId!),
|
|
|
|
|
queryFn: () => accessApi.listUserDirectory(companyId!),
|
|
|
|
|
enabled: !!companyId,
|
|
|
|
|
});
|
2026-02-17 10:53:20 -06:00
|
|
|
|
2026-02-17 20:16:57 -06:00
|
|
|
const { data: projects } = useQuery({
|
2026-02-23 20:04:47 -06:00
|
|
|
queryKey: queryKeys.projects.list(companyId!),
|
|
|
|
|
queryFn: () => projectsApi.list(companyId!),
|
|
|
|
|
enabled: !!companyId,
|
2026-02-17 20:16:57 -06:00
|
|
|
});
|
2026-03-14 17:47:53 -05:00
|
|
|
const activeProjects = useMemo(
|
|
|
|
|
() => (projects ?? []).filter((p) => !p.archivedAt || p.id === issue.projectId),
|
|
|
|
|
[projects, issue.projectId],
|
|
|
|
|
);
|
2026-03-02 14:20:49 -06:00
|
|
|
const { orderedProjects } = useProjectOrder({
|
2026-03-14 17:47:53 -05:00
|
|
|
projects: activeProjects,
|
2026-03-02 14:20:49 -06:00
|
|
|
companyId,
|
|
|
|
|
userId: currentUserId,
|
|
|
|
|
});
|
2026-02-17 20:16:57 -06:00
|
|
|
|
2026-02-23 20:04:47 -06:00
|
|
|
const { data: labels } = useQuery({
|
|
|
|
|
queryKey: queryKeys.issues.labels(companyId!),
|
|
|
|
|
queryFn: () => issuesApi.listLabels(companyId!),
|
|
|
|
|
enabled: !!companyId,
|
|
|
|
|
});
|
|
|
|
|
|
2026-04-04 13:56:04 -05:00
|
|
|
const { data: allIssues } = useQuery({
|
|
|
|
|
queryKey: queryKeys.issues.list(companyId!),
|
|
|
|
|
queryFn: () => issuesApi.list(companyId!),
|
2026-04-10 22:26:21 -05:00
|
|
|
enabled: !!companyId && (blockedByOpen || parentOpen),
|
2026-04-04 13:56:04 -05:00
|
|
|
});
|
|
|
|
|
|
2026-02-23 20:04:47 -06:00
|
|
|
const createLabel = useMutation({
|
|
|
|
|
mutationFn: (data: { name: string; color: string }) => issuesApi.createLabel(companyId!, data),
|
|
|
|
|
onSuccess: async (created) => {
|
|
|
|
|
await queryClient.invalidateQueries({ queryKey: queryKeys.issues.labels(companyId!) });
|
|
|
|
|
onUpdate({ labelIds: [...(issue.labelIds ?? []), created.id] });
|
|
|
|
|
setNewLabelName("");
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const toggleLabel = (labelId: string) => {
|
|
|
|
|
const ids = issue.labelIds ?? [];
|
|
|
|
|
const next = ids.includes(labelId)
|
|
|
|
|
? ids.filter((id) => id !== labelId)
|
|
|
|
|
: [...ids, labelId];
|
|
|
|
|
onUpdate({ labelIds: next });
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-17 10:53:20 -06:00
|
|
|
const agentName = (id: string | null) => {
|
|
|
|
|
if (!id || !agents) return null;
|
|
|
|
|
const agent = agents.find((a) => a.id === id);
|
|
|
|
|
return agent?.name ?? id.slice(0, 8);
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-17 20:16:57 -06:00
|
|
|
const projectName = (id: string | null) => {
|
2026-03-02 14:20:49 -06:00
|
|
|
if (!id) return id?.slice(0, 8) ?? "None";
|
|
|
|
|
const project = orderedProjects.find((p) => p.id === id);
|
2026-02-17 20:16:57 -06:00
|
|
|
return project?.name ?? id.slice(0, 8);
|
|
|
|
|
};
|
2026-03-10 09:03:31 -05:00
|
|
|
const currentProject = issue.projectId
|
|
|
|
|
? orderedProjects.find((project) => project.id === issue.projectId) ?? null
|
|
|
|
|
: null;
|
[codex] Improve workspace navigation and runtime UI (#4089)
## Thinking Path
> - Paperclip agents do real work in project and execution workspaces.
> - Operators need workspace state to be visible, navigable, and
copyable without digging through raw run logs.
> - The branch included related workspace cards, navigation, runtime
controls, stale-service handling, and issue-property visibility.
> - These changes share the workspace UI and runtime-control surfaces
and can stand alone from unrelated access/profile work.
> - This pull request groups the workspace experience changes into one
standalone branch.
> - The benefit is a clearer workspace overview, better metadata copy
flows, and more accurate runtime service controls.
## What Changed
- Polished project workspace summary cards and made workspace metadata
copyable.
- Added a workspace navigation overview and extracted reusable project
workspace content.
- Squared and polished the execution workspace configuration page.
- Fixed stale workspace command matching and hid stopped stale services
in runtime controls.
- Showed live workspace service context in issue properties.
## Verification
- `pnpm install --frozen-lockfile`
- `pnpm exec vitest run
ui/src/components/ProjectWorkspaceSummaryCard.test.tsx
ui/src/lib/project-workspaces-tab.test.ts
ui/src/components/Sidebar.test.tsx
ui/src/components/WorkspaceRuntimeControls.test.tsx
ui/src/components/IssueProperties.test.tsx`
- `pnpm exec vitest run packages/shared/src/workspace-commands.test.ts
--config /dev/null` because the root Vitest project config does not
currently include `packages/shared` tests.
- Split integration check: merged after runtime/governance,
dev-infra/backups, and access/profiles with no merge conflicts.
- Confirmed this branch does not include `pnpm-lock.yaml`.
## Risks
- Medium risk: touches workspace navigation, runtime controls, and issue
property rendering.
- Visual layout changes may need browser QA, especially around smaller
screens and dense workspace metadata.
- No database migrations are included.
> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.
## Model Used
- OpenAI Codex, GPT-5.4 tool-enabled coding model, agentic
code-editing/runtime with local shell and GitHub CLI access; exact
context window and reasoning mode are not exposed by the Paperclip
harness.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-20 06:14:32 -05:00
|
|
|
const issueProject = issue.project ?? currentProject;
|
|
|
|
|
const liveWorkspaceService = useMemo(() => {
|
|
|
|
|
if (isMainIssueWorkspace({ issue, project: issueProject })) return null;
|
|
|
|
|
return runningRuntimeServiceWithUrl(issue.currentExecutionWorkspace?.runtimeServices);
|
|
|
|
|
}, [issue, issueProject]);
|
2026-03-02 16:44:03 -06:00
|
|
|
const projectLink = (id: string | null) => {
|
|
|
|
|
if (!id) return null;
|
|
|
|
|
const project = projects?.find((p) => p.id === id) ?? null;
|
|
|
|
|
return project ? projectUrl(project) : `/projects/${id}`;
|
|
|
|
|
};
|
2026-02-17 20:16:57 -06:00
|
|
|
|
2026-03-05 11:19:56 -06:00
|
|
|
const recentAssigneeIds = useMemo(() => getRecentAssigneeIds(), [assigneeOpen]);
|
|
|
|
|
const sortedAgents = useMemo(
|
|
|
|
|
() => sortAgentsByRecency((agents ?? []).filter((a) => a.status !== "terminated"), recentAssigneeIds),
|
|
|
|
|
[agents, recentAssigneeIds],
|
|
|
|
|
);
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
const userLabelMap = useMemo(
|
|
|
|
|
() => buildCompanyUserLabelMap(companyMembers?.users),
|
|
|
|
|
[companyMembers?.users],
|
|
|
|
|
);
|
|
|
|
|
const otherUserOptions = useMemo(
|
|
|
|
|
() => buildCompanyUserInlineOptions(companyMembers?.users, { excludeUserIds: [currentUserId, issue.createdByUserId] }),
|
|
|
|
|
[companyMembers?.users, currentUserId, issue.createdByUserId],
|
|
|
|
|
);
|
2026-03-05 11:19:56 -06:00
|
|
|
|
2026-02-17 20:16:57 -06:00
|
|
|
const assignee = issue.assigneeAgentId
|
|
|
|
|
? agents?.find((a) => a.id === issue.assigneeAgentId)
|
|
|
|
|
: null;
|
2026-04-06 19:14:40 -05:00
|
|
|
const reviewerValues = stageParticipantValues(issue.executionPolicy, "review");
|
|
|
|
|
const approverValues = stageParticipantValues(issue.executionPolicy, "approval");
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
const userLabel = (userId: string | null | undefined) => formatAssigneeUserLabel(userId, currentUserId, userLabelMap);
|
2026-02-26 16:08:39 -06:00
|
|
|
const assigneeUserLabel = userLabel(issue.assigneeUserId);
|
|
|
|
|
const creatorUserLabel = userLabel(issue.createdByUserId);
|
2026-04-06 19:14:40 -05:00
|
|
|
const updateExecutionPolicy = (nextReviewers: string[], nextApprovers: string[]) => {
|
|
|
|
|
onUpdate({
|
|
|
|
|
executionPolicy: buildExecutionPolicy({
|
|
|
|
|
existingPolicy: issue.executionPolicy ?? null,
|
|
|
|
|
reviewerValues: nextReviewers,
|
|
|
|
|
approverValues: nextApprovers,
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const toggleExecutionParticipant = (stageType: "review" | "approval", value: string) => {
|
|
|
|
|
const currentValues = stageType === "review" ? reviewerValues : approverValues;
|
|
|
|
|
const nextValues = currentValues.includes(value)
|
|
|
|
|
? currentValues.filter((candidate) => candidate !== value)
|
|
|
|
|
: [...currentValues, value];
|
|
|
|
|
updateExecutionPolicy(
|
|
|
|
|
stageType === "review" ? nextValues : reviewerValues,
|
|
|
|
|
stageType === "approval" ? nextValues : approverValues,
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
const executionParticipantLabel = (value: string) => {
|
|
|
|
|
if (value.startsWith("agent:")) {
|
|
|
|
|
return agentName(value.slice("agent:".length)) ?? value.slice("agent:".length, "agent:".length + 8);
|
|
|
|
|
}
|
|
|
|
|
if (value.startsWith("user:")) {
|
|
|
|
|
return userLabel(value.slice("user:".length)) ?? "User";
|
|
|
|
|
}
|
|
|
|
|
return value;
|
|
|
|
|
};
|
|
|
|
|
const reviewerTrigger = reviewerValues.length > 0
|
2026-04-10 22:26:21 -05:00
|
|
|
? <span className="text-sm break-words min-w-0">{reviewerValues.map((value) => executionParticipantLabel(value)).join(", ")}</span>
|
2026-04-06 19:14:40 -05:00
|
|
|
: <span className="text-sm text-muted-foreground">None</span>;
|
|
|
|
|
const approverTrigger = approverValues.length > 0
|
2026-04-10 22:26:21 -05:00
|
|
|
? <span className="text-sm break-words min-w-0">{approverValues.map((value) => executionParticipantLabel(value)).join(", ")}</span>
|
2026-04-06 19:14:40 -05:00
|
|
|
: <span className="text-sm text-muted-foreground">None</span>;
|
2026-04-08 17:00:57 -05:00
|
|
|
const nextRunnableExecutionStage = (() => {
|
|
|
|
|
if (issue.executionState?.status === "changes_requested" && issue.executionState.currentStageType) {
|
|
|
|
|
return issue.executionState.currentStageType;
|
|
|
|
|
}
|
|
|
|
|
if (issue.executionState) return null;
|
|
|
|
|
if (reviewerValues.length > 0) return "review";
|
|
|
|
|
if (approverValues.length > 0) return "approval";
|
|
|
|
|
return null;
|
|
|
|
|
})();
|
|
|
|
|
const runExecutionButton = (stageType: "review" | "approval") => (
|
|
|
|
|
<PropertyRow label="">
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
className="inline-flex items-center rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"
|
|
|
|
|
onClick={() => onUpdate({ status: "in_review" })}
|
|
|
|
|
>
|
|
|
|
|
{stageType === "review" ? "Run review now" : "Run approval now"}
|
|
|
|
|
</button>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
);
|
2026-04-06 08:40:38 -05:00
|
|
|
const currentExecutionLabel = (() => {
|
|
|
|
|
if (!issue.executionState?.currentStageType) return null;
|
|
|
|
|
const stageLabel = issue.executionState.currentStageType === "review" ? "Review" : "Approval";
|
|
|
|
|
const participant = issue.executionState.currentParticipant;
|
|
|
|
|
const participantLabel = participant
|
|
|
|
|
? (participant.type === "agent"
|
|
|
|
|
? agentName(participant.agentId ?? null)
|
|
|
|
|
: userLabel(participant.userId ?? null))
|
|
|
|
|
: null;
|
|
|
|
|
if (issue.executionState.status === "changes_requested") {
|
|
|
|
|
return `${stageLabel} requested changes${participantLabel ? ` by ${participantLabel}` : ""}`;
|
|
|
|
|
}
|
|
|
|
|
return `${stageLabel} pending${participantLabel ? ` with ${participantLabel}` : ""}`;
|
|
|
|
|
})();
|
2026-02-17 20:16:57 -06:00
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
const labelsTrigger = (issue.labels ?? []).length > 0 ? (
|
|
|
|
|
<div className="flex items-center gap-1 flex-wrap">
|
|
|
|
|
{(issue.labels ?? []).slice(0, 3).map((label) => (
|
|
|
|
|
<span
|
|
|
|
|
key={label.id}
|
|
|
|
|
className="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium border"
|
|
|
|
|
style={{
|
|
|
|
|
borderColor: label.color,
|
|
|
|
|
backgroundColor: `${label.color}22`,
|
2026-03-23 07:48:50 -05:00
|
|
|
color: pickTextColorForPillBg(label.color, 0.13),
|
2026-02-26 08:53:03 -06:00
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{label.name}
|
|
|
|
|
</span>
|
|
|
|
|
))}
|
|
|
|
|
{(issue.labels ?? []).length > 3 && (
|
|
|
|
|
<span className="text-xs text-muted-foreground">+{(issue.labels ?? []).length - 3}</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<Tag className="h-3.5 w-3.5 text-muted-foreground" />
|
|
|
|
|
<span className="text-sm text-muted-foreground">No labels</span>
|
|
|
|
|
</>
|
|
|
|
|
);
|
2026-04-10 22:26:21 -05:00
|
|
|
const labelsExtra = (issue.labelIds ?? []).length > 0 ? (
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
className="inline-flex items-center justify-center h-5 w-5 rounded hover:bg-accent/50 transition-colors text-muted-foreground hover:text-foreground"
|
|
|
|
|
onClick={() => setLabelsOpen(true)}
|
|
|
|
|
aria-label="Add label"
|
|
|
|
|
title="Add label"
|
|
|
|
|
>
|
|
|
|
|
<Plus className="h-3 w-3" />
|
|
|
|
|
</button>
|
|
|
|
|
) : undefined;
|
2026-02-26 08:53:03 -06:00
|
|
|
|
|
|
|
|
const labelsContent = (
|
|
|
|
|
<>
|
|
|
|
|
<input
|
|
|
|
|
className="w-full px-2 py-1.5 text-xs bg-transparent outline-none border-b border-border mb-1 placeholder:text-muted-foreground/50"
|
|
|
|
|
placeholder="Search labels..."
|
|
|
|
|
value={labelSearch}
|
|
|
|
|
onChange={(e) => setLabelSearch(e.target.value)}
|
|
|
|
|
autoFocus={!inline}
|
|
|
|
|
/>
|
|
|
|
|
<div className="max-h-44 overflow-y-auto overscroll-contain space-y-0.5">
|
|
|
|
|
{(labels ?? [])
|
|
|
|
|
.filter((label) => {
|
|
|
|
|
if (!labelSearch.trim()) return true;
|
|
|
|
|
return label.name.toLowerCase().includes(labelSearch.toLowerCase());
|
|
|
|
|
})
|
|
|
|
|
.map((label) => {
|
|
|
|
|
const selected = (issue.labelIds ?? []).includes(label.id);
|
|
|
|
|
return (
|
2026-04-10 22:26:21 -05:00
|
|
|
<button
|
|
|
|
|
key={label.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 text-left",
|
|
|
|
|
selected && "bg-accent"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => toggleLabel(label.id)}
|
|
|
|
|
>
|
|
|
|
|
<span className="h-2.5 w-2.5 rounded-full shrink-0" style={{ backgroundColor: label.color }} />
|
|
|
|
|
<span className="truncate">{label.name}</span>
|
|
|
|
|
</button>
|
2026-02-26 08:53:03 -06:00
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
<div className="mt-2 border-t border-border pt-2 space-y-1">
|
|
|
|
|
<div className="flex items-center gap-1">
|
|
|
|
|
<input
|
|
|
|
|
className="h-7 w-7 p-0 rounded bg-transparent"
|
|
|
|
|
type="color"
|
|
|
|
|
value={newLabelColor}
|
|
|
|
|
onChange={(e) => setNewLabelColor(e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
<input
|
|
|
|
|
className="flex-1 px-2 py-1.5 text-xs bg-transparent outline-none rounded placeholder:text-muted-foreground/50"
|
|
|
|
|
placeholder="New label"
|
|
|
|
|
value={newLabelName}
|
|
|
|
|
onChange={(e) => setNewLabelName(e.target.value)}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<button
|
|
|
|
|
className="flex items-center justify-center gap-1.5 w-full px-2 py-1.5 text-xs rounded border border-border hover:bg-accent/50 disabled:opacity-50"
|
|
|
|
|
disabled={!newLabelName.trim() || createLabel.isPending}
|
|
|
|
|
onClick={() =>
|
|
|
|
|
createLabel.mutate({
|
|
|
|
|
name: newLabelName.trim(),
|
|
|
|
|
color: newLabelColor,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<Plus className="h-3 w-3" />
|
2026-03-02 16:44:03 -06:00
|
|
|
{createLabel.isPending ? "Creating…" : "Create label"}
|
2026-02-26 08:53:03 -06:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const assigneeTrigger = assignee ? (
|
|
|
|
|
<Identity name={assignee.name} size="sm" />
|
2026-02-26 16:08:39 -06:00
|
|
|
) : assigneeUserLabel ? (
|
|
|
|
|
<>
|
|
|
|
|
<User className="h-3.5 w-3.5 text-muted-foreground" />
|
|
|
|
|
<span className="text-sm">{assigneeUserLabel}</span>
|
|
|
|
|
</>
|
2026-02-26 08:53:03 -06:00
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<User className="h-3.5 w-3.5 text-muted-foreground" />
|
|
|
|
|
<span className="text-sm text-muted-foreground">Unassigned</span>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const assigneeContent = (
|
|
|
|
|
<>
|
|
|
|
|
<input
|
|
|
|
|
className="w-full px-2 py-1.5 text-xs bg-transparent outline-none border-b border-border mb-1 placeholder:text-muted-foreground/50"
|
2026-02-26 16:08:39 -06:00
|
|
|
placeholder="Search assignees..."
|
2026-02-26 08:53:03 -06:00
|
|
|
value={assigneeSearch}
|
|
|
|
|
onChange={(e) => setAssigneeSearch(e.target.value)}
|
|
|
|
|
autoFocus={!inline}
|
|
|
|
|
/>
|
|
|
|
|
<div className="max-h-48 overflow-y-auto overscroll-contain">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
!issue.assigneeAgentId && !issue.assigneeUserId && "bg-accent"
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => { onUpdate({ assigneeAgentId: null, assigneeUserId: null }); setAssigneeOpen(false); }}
|
|
|
|
|
>
|
|
|
|
|
No assignee
|
|
|
|
|
</button>
|
2026-03-12 16:12:38 -05:00
|
|
|
{currentUserId && (
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
issue.assigneeUserId === currentUserId && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onUpdate({ assigneeAgentId: null, assigneeUserId: currentUserId });
|
|
|
|
|
setAssigneeOpen(false);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<User className="h-3 w-3 shrink-0 text-muted-foreground" />
|
|
|
|
|
Assign to me
|
|
|
|
|
</button>
|
|
|
|
|
)}
|
|
|
|
|
{issue.createdByUserId && issue.createdByUserId !== currentUserId && (
|
2026-02-26 16:08:39 -06:00
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
issue.assigneeUserId === issue.createdByUserId && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onUpdate({ assigneeAgentId: null, assigneeUserId: issue.createdByUserId });
|
|
|
|
|
setAssigneeOpen(false);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<User className="h-3 w-3 shrink-0 text-muted-foreground" />
|
2026-03-12 16:12:38 -05:00
|
|
|
{creatorUserLabel ? `Assign to ${creatorUserLabel}` : "Assign to requester"}
|
2026-02-26 16:08:39 -06:00
|
|
|
</button>
|
|
|
|
|
)}
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
{otherUserOptions
|
|
|
|
|
.filter((option) => {
|
|
|
|
|
if (!assigneeSearch.trim()) return true;
|
|
|
|
|
const q = assigneeSearch.toLowerCase();
|
|
|
|
|
return `${option.label} ${option.searchText ?? ""}`.toLowerCase().includes(q);
|
|
|
|
|
})
|
|
|
|
|
.map((option) => {
|
|
|
|
|
const userId = option.id.slice("user:".length);
|
|
|
|
|
return (
|
|
|
|
|
<button
|
|
|
|
|
key={option.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
issue.assigneeUserId === userId && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onUpdate({ assigneeAgentId: null, assigneeUserId: userId });
|
|
|
|
|
setAssigneeOpen(false);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<User className="h-3 w-3 shrink-0 text-muted-foreground" />
|
|
|
|
|
{option.label}
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2026-03-05 11:19:56 -06:00
|
|
|
{sortedAgents
|
2026-02-26 08:53:03 -06:00
|
|
|
.filter((a) => {
|
|
|
|
|
if (!assigneeSearch.trim()) return true;
|
|
|
|
|
const q = assigneeSearch.toLowerCase();
|
|
|
|
|
return a.name.toLowerCase().includes(q);
|
|
|
|
|
})
|
|
|
|
|
.map((a) => (
|
|
|
|
|
<button
|
|
|
|
|
key={a.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
a.id === issue.assigneeAgentId && "bg-accent"
|
|
|
|
|
)}
|
2026-03-05 11:19:56 -06:00
|
|
|
onClick={() => { trackRecentAssignee(a.id); onUpdate({ assigneeAgentId: a.id, assigneeUserId: null }); setAssigneeOpen(false); }}
|
2026-02-26 08:53:03 -06:00
|
|
|
>
|
|
|
|
|
<AgentIcon icon={a.icon} className="shrink-0 h-3 w-3 text-muted-foreground" />
|
|
|
|
|
{a.name}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
2026-04-06 19:14:40 -05:00
|
|
|
const executionParticipantsContent = (
|
|
|
|
|
stageType: "review" | "approval",
|
|
|
|
|
values: string[],
|
|
|
|
|
search: string,
|
|
|
|
|
setSearch: (value: string) => void,
|
|
|
|
|
onClear: () => void,
|
|
|
|
|
) => (
|
|
|
|
|
<>
|
|
|
|
|
<input
|
|
|
|
|
className="w-full px-2 py-1.5 text-xs bg-transparent outline-none border-b border-border mb-1 placeholder:text-muted-foreground/50"
|
|
|
|
|
placeholder={`Search ${stageType === "review" ? "reviewers" : "approvers"}...`}
|
|
|
|
|
value={search}
|
|
|
|
|
onChange={(e) => setSearch(e.target.value)}
|
|
|
|
|
autoFocus={!inline}
|
|
|
|
|
/>
|
|
|
|
|
<div className="max-h-48 overflow-y-auto overscroll-contain">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
values.length === 0 && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={onClear}
|
|
|
|
|
>
|
|
|
|
|
No {stageType === "review" ? "reviewers" : "approvers"}
|
|
|
|
|
</button>
|
|
|
|
|
{currentUserId && (
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
values.includes(`user:${currentUserId}`) && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => toggleExecutionParticipant(stageType, `user:${currentUserId}`)}
|
|
|
|
|
>
|
|
|
|
|
<User className="h-3 w-3 shrink-0 text-muted-foreground" />
|
|
|
|
|
Assign to me
|
|
|
|
|
</button>
|
|
|
|
|
)}
|
|
|
|
|
{issue.createdByUserId && issue.createdByUserId !== currentUserId && (
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
values.includes(`user:${issue.createdByUserId}`) && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => toggleExecutionParticipant(stageType, `user:${issue.createdByUserId}`)}
|
|
|
|
|
>
|
|
|
|
|
<User className="h-3 w-3 shrink-0 text-muted-foreground" />
|
|
|
|
|
{creatorUserLabel ? creatorUserLabel : "Requester"}
|
|
|
|
|
</button>
|
|
|
|
|
)}
|
feat: implement multi-user access and invite flows (#3784)
## Thinking Path
> - Paperclip is the control plane for autonomous AI companies.
> - V1 needs to stay local-first while also supporting shared,
authenticated deployments.
> - Human operators need real identities, company membership, invite
flows, profile surfaces, and company-scoped access controls.
> - Agents and operators also need the existing issue, inbox, workspace,
approval, and plugin flows to keep working under those authenticated
boundaries.
> - This branch accumulated the multi-user implementation, follow-up QA
fixes, workspace/runtime refinements, invite UX improvements,
release-branch conflict resolution, and review hardening.
> - This pull request consolidates that branch onto the current `master`
branch as a single reviewable PR.
> - The benefit is a complete multi-user implementation path with tests
and docs carried forward without dropping existing branch work.
## What Changed
- Added authenticated human-user access surfaces: auth/session routes,
company user directory, profile settings, company access/member
management, join requests, and invite management.
- Added invite creation, invite landing, onboarding, logo/branding,
invite grants, deduped join requests, and authenticated multi-user E2E
coverage.
- Tightened company-scoped and instance-admin authorization across
board, plugin, adapter, access, issue, and workspace routes.
- Added profile-image URL validation hardening, avatar preservation on
name-only profile updates, and join-request uniqueness migration cleanup
for pending human requests.
- Added an atomic member role/status/grants update path so Company
Access saves no longer leave partially updated permissions.
- Improved issue chat, inbox, assignee identity rendering,
sidebar/account/company navigation, workspace routing, and execution
workspace reuse behavior for multi-user operation.
- Added and updated server/UI tests covering auth, invites, membership,
issue workspace inheritance, plugin authz, inbox/chat behavior, and
multi-user flows.
- Merged current `public-gh/master` into this branch, resolved all
conflicts, and verified no `pnpm-lock.yaml` change is included in this
PR diff.
## Verification
- `pnpm exec vitest run server/src/__tests__/issues-service.test.ts
ui/src/components/IssueChatThread.test.tsx ui/src/pages/Inbox.test.tsx`
- `pnpm run preflight:workspace-links && pnpm exec vitest run
server/src/__tests__/plugin-routes-authz.test.ts`
- `pnpm exec vitest run server/src/__tests__/plugin-routes-authz.test.ts
server/src/__tests__/workspace-runtime-service-authz.test.ts
server/src/__tests__/access-validators.test.ts`
- `pnpm exec vitest run
server/src/__tests__/authz-company-access.test.ts
server/src/__tests__/routines-routes.test.ts
server/src/__tests__/sidebar-preferences-routes.test.ts
server/src/__tests__/approval-routes-idempotency.test.ts
server/src/__tests__/openclaw-invite-prompt-route.test.ts
server/src/__tests__/agent-cross-tenant-authz-routes.test.ts
server/src/__tests__/routines-e2e.test.ts`
- `pnpm exec vitest run server/src/__tests__/auth-routes.test.ts
ui/src/pages/CompanyAccess.test.tsx`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/db typecheck && pnpm --filter @paperclipai/server
typecheck`
- `pnpm --filter @paperclipai/shared typecheck && pnpm --filter
@paperclipai/server typecheck`
- `pnpm --filter @paperclipai/ui typecheck`
- `pnpm db:generate`
- `npx playwright test --config tests/e2e/playwright.config.ts --list`
- Confirmed branch has no uncommitted changes and is `0` commits behind
`public-gh/master` before PR creation.
- Confirmed no `pnpm-lock.yaml` change is staged or present in the PR
diff.
## Risks
- High review surface area: this PR contains the accumulated multi-user
branch plus follow-up fixes, so reviewers should focus especially on
company-boundary enforcement and authenticated-vs-local deployment
behavior.
- UI behavior changed across invites, inbox, issue chat, access
settings, and sidebar navigation; no browser screenshots are included in
this branch-consolidation PR.
- Plugin install, upgrade, and lifecycle/config mutations now require
instance-admin access, which is intentional but may change expectations
for non-admin board users.
- A join-request dedupe migration rejects duplicate pending human
requests before creating unique indexes; deployments with unusual
historical duplicates should review the migration behavior.
- Company member role/status/grant saves now use a new combined
endpoint; older separate endpoints remain for compatibility.
- Full production build was not run locally in this heartbeat; CI should
cover the full matrix.
## Model Used
- OpenAI Codex coding agent, GPT-5-based model, CLI/tool-use
environment. Exact deployed model identifier and context window were not
exposed by the runtime.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
Note on screenshots: this is a branch-consolidation PR for an
already-developed multi-user branch, and no browser screenshots were
captured during this heartbeat.
---------
Co-authored-by: dotta <dotta@example.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:44:19 -05:00
|
|
|
{otherUserOptions
|
|
|
|
|
.filter((option) => {
|
|
|
|
|
if (!search.trim()) return true;
|
|
|
|
|
return `${option.label} ${option.searchText ?? ""}`.toLowerCase().includes(search.toLowerCase());
|
|
|
|
|
})
|
|
|
|
|
.map((option) => (
|
|
|
|
|
<button
|
|
|
|
|
key={`${stageType}:${option.id}`}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
values.includes(option.id) && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => toggleExecutionParticipant(stageType, option.id)}
|
|
|
|
|
>
|
|
|
|
|
<User className="h-3 w-3 shrink-0 text-muted-foreground" />
|
|
|
|
|
{option.label}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
2026-04-06 19:14:40 -05:00
|
|
|
{sortedAgents
|
|
|
|
|
.filter((agent) => {
|
|
|
|
|
if (!search.trim()) return true;
|
|
|
|
|
return agent.name.toLowerCase().includes(search.toLowerCase());
|
|
|
|
|
})
|
|
|
|
|
.map((agent) => {
|
|
|
|
|
const encoded = `agent:${agent.id}`;
|
|
|
|
|
return (
|
|
|
|
|
<button
|
|
|
|
|
key={`${stageType}:${agent.id}`}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
values.includes(encoded) && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => toggleExecutionParticipant(stageType, encoded)}
|
|
|
|
|
>
|
|
|
|
|
<AgentIcon icon={agent.icon} className="shrink-0 h-3 w-3 text-muted-foreground" />
|
|
|
|
|
{agent.name}
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
const projectTrigger = issue.projectId ? (
|
|
|
|
|
<>
|
|
|
|
|
<span
|
|
|
|
|
className="shrink-0 h-3 w-3 rounded-sm"
|
2026-03-02 14:20:49 -06:00
|
|
|
style={{ backgroundColor: orderedProjects.find((p) => p.id === issue.projectId)?.color ?? "#6366f1" }}
|
2026-02-26 08:53:03 -06:00
|
|
|
/>
|
2026-04-10 22:26:21 -05:00
|
|
|
<span className="text-sm break-words min-w-0">{projectName(issue.projectId)}</span>
|
2026-02-26 08:53:03 -06:00
|
|
|
</>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<Hexagon className="h-3.5 w-3.5 text-muted-foreground" />
|
|
|
|
|
<span className="text-sm text-muted-foreground">No project</span>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const projectContent = (
|
|
|
|
|
<>
|
|
|
|
|
<input
|
|
|
|
|
className="w-full px-2 py-1.5 text-xs bg-transparent outline-none border-b border-border mb-1 placeholder:text-muted-foreground/50"
|
|
|
|
|
placeholder="Search projects..."
|
|
|
|
|
value={projectSearch}
|
|
|
|
|
onChange={(e) => setProjectSearch(e.target.value)}
|
|
|
|
|
autoFocus={!inline}
|
|
|
|
|
/>
|
|
|
|
|
<div className="max-h-48 overflow-y-auto overscroll-contain">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
|
|
|
|
|
!issue.projectId && "bg-accent"
|
|
|
|
|
)}
|
2026-03-10 09:03:31 -05:00
|
|
|
onClick={() => {
|
2026-03-13 17:12:25 -05:00
|
|
|
onUpdate({
|
|
|
|
|
projectId: null,
|
|
|
|
|
projectWorkspaceId: null,
|
|
|
|
|
executionWorkspaceId: null,
|
|
|
|
|
executionWorkspacePreference: null,
|
|
|
|
|
executionWorkspaceSettings: null,
|
|
|
|
|
});
|
2026-03-10 09:03:31 -05:00
|
|
|
setProjectOpen(false);
|
|
|
|
|
}}
|
2026-02-26 08:53:03 -06:00
|
|
|
>
|
|
|
|
|
No project
|
|
|
|
|
</button>
|
2026-03-02 14:20:49 -06:00
|
|
|
{orderedProjects
|
2026-02-26 08:53:03 -06:00
|
|
|
.filter((p) => {
|
|
|
|
|
if (!projectSearch.trim()) return true;
|
|
|
|
|
const q = projectSearch.toLowerCase();
|
|
|
|
|
return p.name.toLowerCase().includes(q);
|
|
|
|
|
})
|
|
|
|
|
.map((p) => (
|
|
|
|
|
<button
|
|
|
|
|
key={p.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50 whitespace-nowrap",
|
|
|
|
|
p.id === issue.projectId && "bg-accent"
|
|
|
|
|
)}
|
2026-03-10 09:03:31 -05:00
|
|
|
onClick={() => {
|
2026-03-13 17:12:25 -05:00
|
|
|
const defaultMode = defaultExecutionWorkspaceModeForProject(p);
|
2026-03-10 09:03:31 -05:00
|
|
|
onUpdate({
|
|
|
|
|
projectId: p.id,
|
2026-03-16 18:37:59 -05:00
|
|
|
projectWorkspaceId: defaultProjectWorkspaceIdForProject(p),
|
2026-03-13 17:12:25 -05:00
|
|
|
executionWorkspaceId: null,
|
2026-03-16 18:37:59 -05:00
|
|
|
executionWorkspacePreference: defaultMode,
|
|
|
|
|
executionWorkspaceSettings: p.executionWorkspacePolicy?.enabled
|
2026-03-13 17:12:25 -05:00
|
|
|
? { mode: defaultMode }
|
2026-03-10 09:03:31 -05:00
|
|
|
: null,
|
|
|
|
|
});
|
|
|
|
|
setProjectOpen(false);
|
|
|
|
|
}}
|
2026-02-26 08:53:03 -06:00
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
className="shrink-0 h-3 w-3 rounded-sm"
|
|
|
|
|
style={{ backgroundColor: p.color ?? "#6366f1" }}
|
|
|
|
|
/>
|
|
|
|
|
{p.name}
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
2026-04-04 13:56:04 -05:00
|
|
|
const blockedByIds = issue.blockedBy?.map((relation) => relation.id) ?? [];
|
2026-04-10 22:26:21 -05:00
|
|
|
const descendantIssueIds = useMemo(() => {
|
|
|
|
|
if (!allIssues?.length) return new Set<string>();
|
|
|
|
|
const childrenByParentId = new Map<string, string[]>();
|
|
|
|
|
for (const candidate of allIssues) {
|
|
|
|
|
if (!candidate.parentId) continue;
|
|
|
|
|
const children = childrenByParentId.get(candidate.parentId) ?? [];
|
|
|
|
|
children.push(candidate.id);
|
|
|
|
|
childrenByParentId.set(candidate.parentId, children);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const descendants = new Set<string>();
|
|
|
|
|
const stack = [...(childrenByParentId.get(issue.id) ?? [])];
|
|
|
|
|
while (stack.length > 0) {
|
|
|
|
|
const candidateId = stack.pop();
|
|
|
|
|
if (!candidateId || descendants.has(candidateId)) continue;
|
|
|
|
|
descendants.add(candidateId);
|
|
|
|
|
stack.push(...(childrenByParentId.get(candidateId) ?? []));
|
|
|
|
|
}
|
|
|
|
|
return descendants;
|
|
|
|
|
}, [allIssues, issue.id]);
|
|
|
|
|
const currentParentIssue = useMemo(() => {
|
|
|
|
|
if (!issue.parentId) return null;
|
|
|
|
|
return allIssues?.find((candidate) => candidate.id === issue.parentId) ?? null;
|
|
|
|
|
}, [allIssues, issue.parentId]);
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
const parentIdentifier = issue.ancestors?.[0]?.identifier ?? currentParentIssue?.identifier;
|
|
|
|
|
const parentTitle = issue.ancestors?.[0]?.title ?? currentParentIssue?.title ?? issue.parentId?.slice(0, 8);
|
2026-04-10 22:26:21 -05:00
|
|
|
const parentTrigger = issue.parentId ? (
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
<span className="text-sm break-words min-w-0 inline">
|
|
|
|
|
{parentIdentifier ? `${parentIdentifier} ` : ""}
|
|
|
|
|
{parentTitle}
|
2026-04-10 22:26:21 -05:00
|
|
|
</span>
|
|
|
|
|
) : (
|
|
|
|
|
<span className="text-sm text-muted-foreground">No parent</span>
|
|
|
|
|
);
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
const parentLink = issue.parentId ? (
|
|
|
|
|
<Link
|
|
|
|
|
to={`/issues/${parentIdentifier ?? issue.parentId}`}
|
|
|
|
|
className="inline-flex items-center justify-center h-5 w-5 rounded hover:bg-accent/50 transition-colors text-muted-foreground hover:text-foreground"
|
|
|
|
|
onClick={(e) => e.stopPropagation()}
|
|
|
|
|
>
|
|
|
|
|
<ArrowUpRight className="h-3 w-3" />
|
|
|
|
|
</Link>
|
|
|
|
|
) : undefined;
|
2026-04-10 22:26:21 -05:00
|
|
|
const parentOptions = (allIssues ?? [])
|
|
|
|
|
.filter((candidate) => candidate.id !== issue.id)
|
|
|
|
|
.filter((candidate) => !descendantIssueIds.has(candidate.id))
|
|
|
|
|
.filter((candidate) => {
|
|
|
|
|
if (!parentSearch.trim()) return true;
|
|
|
|
|
const query = parentSearch.toLowerCase();
|
|
|
|
|
return (
|
|
|
|
|
(candidate.identifier ?? "").toLowerCase().includes(query) ||
|
|
|
|
|
candidate.title.toLowerCase().includes(query)
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.sort((a, b) => {
|
|
|
|
|
const aLabel = `${a.identifier ?? ""} ${a.title}`.trim();
|
|
|
|
|
const bLabel = `${b.identifier ?? ""} ${b.title}`.trim();
|
|
|
|
|
return aLabel.localeCompare(bLabel);
|
|
|
|
|
});
|
|
|
|
|
const parentContent = (
|
|
|
|
|
<>
|
|
|
|
|
<input
|
|
|
|
|
className="w-full px-2 py-1.5 text-xs bg-transparent outline-none border-b border-border mb-1 placeholder:text-muted-foreground/50"
|
|
|
|
|
placeholder="Search issues..."
|
|
|
|
|
value={parentSearch}
|
|
|
|
|
onChange={(e) => setParentSearch(e.target.value)}
|
|
|
|
|
autoFocus={!inline}
|
|
|
|
|
/>
|
|
|
|
|
<div className="max-h-48 overflow-y-auto overscroll-contain">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
!issue.parentId && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onUpdate({ parentId: null });
|
|
|
|
|
setParentOpen(false);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
No parent
|
|
|
|
|
</button>
|
|
|
|
|
{parentOptions.map((candidate) => (
|
|
|
|
|
<button
|
|
|
|
|
key={candidate.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex w-full items-center gap-2 px-2 py-1.5 text-left text-xs rounded hover:bg-accent/50",
|
|
|
|
|
candidate.id === issue.parentId && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onUpdate({ parentId: candidate.id });
|
|
|
|
|
setParentOpen(false);
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<StatusIcon status={candidate.status} />
|
|
|
|
|
<span className="truncate">
|
|
|
|
|
{candidate.identifier ? `${candidate.identifier} ` : ""}
|
|
|
|
|
{candidate.title}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
);
|
2026-04-04 13:56:04 -05:00
|
|
|
const blockedByTrigger = blockedByIds.length > 0 ? (
|
|
|
|
|
<div className="flex items-center gap-1 flex-wrap min-w-0">
|
|
|
|
|
{(issue.blockedBy ?? []).slice(0, 2).map((relation) => (
|
|
|
|
|
<span key={relation.id} className="inline-flex max-w-full items-center rounded-full border border-border px-2 py-0.5 text-xs">
|
|
|
|
|
<span className="truncate">{relation.identifier ?? relation.title}</span>
|
|
|
|
|
</span>
|
|
|
|
|
))}
|
|
|
|
|
{(issue.blockedBy ?? []).length > 2 && (
|
|
|
|
|
<span className="text-xs text-muted-foreground">+{(issue.blockedBy ?? []).length - 2}</span>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<span className="text-sm text-muted-foreground">No blockers</span>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const blockingIssues = issue.blocks ?? [];
|
|
|
|
|
const blockerOptions = (allIssues ?? [])
|
|
|
|
|
.filter((candidate) => candidate.id !== issue.id)
|
|
|
|
|
.filter((candidate) => {
|
|
|
|
|
if (!blockedBySearch.trim()) return true;
|
|
|
|
|
const query = blockedBySearch.toLowerCase();
|
|
|
|
|
return (
|
|
|
|
|
(candidate.identifier ?? "").toLowerCase().includes(query) ||
|
|
|
|
|
candidate.title.toLowerCase().includes(query)
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.sort((a, b) => {
|
|
|
|
|
const aLabel = `${a.identifier ?? ""} ${a.title}`.trim();
|
|
|
|
|
const bLabel = `${b.identifier ?? ""} ${b.title}`.trim();
|
|
|
|
|
return aLabel.localeCompare(bLabel);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const toggleBlockedBy = (blockedByIssueId: string) => {
|
|
|
|
|
const nextBlockedByIds = blockedByIds.includes(blockedByIssueId)
|
|
|
|
|
? blockedByIds.filter((candidate) => candidate !== blockedByIssueId)
|
|
|
|
|
: [...blockedByIds, blockedByIssueId];
|
|
|
|
|
onUpdate({ blockedByIssueIds: nextBlockedByIds });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const blockedByContent = (
|
|
|
|
|
<>
|
|
|
|
|
<input
|
|
|
|
|
className="w-full px-2 py-1.5 text-xs bg-transparent outline-none border-b border-border mb-1 placeholder:text-muted-foreground/50"
|
|
|
|
|
placeholder="Search issues..."
|
|
|
|
|
value={blockedBySearch}
|
|
|
|
|
onChange={(e) => setBlockedBySearch(e.target.value)}
|
|
|
|
|
autoFocus={!inline}
|
|
|
|
|
/>
|
|
|
|
|
<div className="max-h-48 overflow-y-auto overscroll-contain">
|
|
|
|
|
<button
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-accent/50",
|
|
|
|
|
blockedByIds.length === 0 && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => onUpdate({ blockedByIssueIds: [] })}
|
|
|
|
|
>
|
|
|
|
|
No blockers
|
|
|
|
|
</button>
|
|
|
|
|
{blockerOptions.map((candidate) => {
|
|
|
|
|
const selected = blockedByIds.includes(candidate.id);
|
|
|
|
|
return (
|
|
|
|
|
<button
|
|
|
|
|
key={candidate.id}
|
|
|
|
|
className={cn(
|
|
|
|
|
"flex w-full items-center gap-2 px-2 py-1.5 text-left text-xs rounded hover:bg-accent/50",
|
|
|
|
|
selected && "bg-accent",
|
|
|
|
|
)}
|
|
|
|
|
onClick={() => toggleBlockedBy(candidate.id)}
|
|
|
|
|
>
|
|
|
|
|
<StatusIcon status={candidate.status} />
|
|
|
|
|
<span className="truncate">
|
|
|
|
|
{candidate.identifier ? `${candidate.identifier} ` : ""}
|
|
|
|
|
{candidate.title}
|
|
|
|
|
</span>
|
|
|
|
|
</button>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
return (
|
|
|
|
|
<div className="space-y-4">
|
|
|
|
|
<div className="space-y-1">
|
|
|
|
|
<PropertyRow label="Status">
|
|
|
|
|
<StatusIcon
|
|
|
|
|
status={issue.status}
|
|
|
|
|
onChange={(status) => onUpdate({ status })}
|
2026-02-20 10:32:32 -06:00
|
|
|
showLabel
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
/>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
|
|
|
|
|
<PropertyRow label="Priority">
|
|
|
|
|
<PriorityIcon
|
|
|
|
|
priority={issue.priority}
|
|
|
|
|
onChange={(priority) => onUpdate({ priority })}
|
2026-02-20 10:32:32 -06:00
|
|
|
showLabel
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
/>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Labels"
|
|
|
|
|
open={labelsOpen}
|
|
|
|
|
onOpenChange={(open) => { setLabelsOpen(open); if (!open) setLabelSearch(""); }}
|
|
|
|
|
triggerContent={labelsTrigger}
|
|
|
|
|
triggerClassName="min-w-0 max-w-full"
|
|
|
|
|
popoverClassName="w-64"
|
2026-04-10 22:26:21 -05:00
|
|
|
extra={labelsExtra}
|
2026-02-26 08:53:03 -06:00
|
|
|
>
|
|
|
|
|
{labelsContent}
|
|
|
|
|
</PropertyPicker>
|
2026-02-23 20:04:47 -06:00
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Assignee"
|
|
|
|
|
open={assigneeOpen}
|
|
|
|
|
onOpenChange={(open) => { setAssigneeOpen(open); if (!open) setAssigneeSearch(""); }}
|
|
|
|
|
triggerContent={assigneeTrigger}
|
|
|
|
|
popoverClassName="w-52"
|
|
|
|
|
extra={issue.assigneeAgentId ? (
|
2026-02-17 20:16:57 -06:00
|
|
|
<Link
|
2026-02-20 10:32:32 -06:00
|
|
|
to={`/agents/${issue.assigneeAgentId}`}
|
|
|
|
|
className="inline-flex items-center justify-center h-5 w-5 rounded hover:bg-accent/50 transition-colors text-muted-foreground hover:text-foreground"
|
|
|
|
|
onClick={(e) => e.stopPropagation()}
|
2026-02-17 20:16:57 -06:00
|
|
|
>
|
2026-02-20 10:32:32 -06:00
|
|
|
<ArrowUpRight className="h-3 w-3" />
|
2026-02-17 20:16:57 -06:00
|
|
|
</Link>
|
2026-02-26 08:53:03 -06:00
|
|
|
) : undefined}
|
|
|
|
|
>
|
|
|
|
|
{assigneeContent}
|
|
|
|
|
</PropertyPicker>
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
|
2026-02-26 08:53:03 -06:00
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Project"
|
|
|
|
|
open={projectOpen}
|
|
|
|
|
onOpenChange={(open) => { setProjectOpen(open); if (!open) setProjectSearch(""); }}
|
|
|
|
|
triggerContent={projectTrigger}
|
|
|
|
|
triggerClassName="min-w-0 max-w-full"
|
|
|
|
|
popoverClassName="w-fit min-w-[11rem]"
|
|
|
|
|
extra={issue.projectId ? (
|
2026-02-17 20:16:57 -06:00
|
|
|
<Link
|
2026-03-02 16:44:03 -06:00
|
|
|
to={projectLink(issue.projectId)!}
|
2026-02-20 10:32:32 -06:00
|
|
|
className="inline-flex items-center justify-center h-5 w-5 rounded hover:bg-accent/50 transition-colors text-muted-foreground hover:text-foreground"
|
|
|
|
|
onClick={(e) => e.stopPropagation()}
|
2026-02-17 20:16:57 -06:00
|
|
|
>
|
2026-02-20 10:32:32 -06:00
|
|
|
<ArrowUpRight className="h-3 w-3" />
|
2026-02-17 20:16:57 -06:00
|
|
|
</Link>
|
2026-02-26 08:53:03 -06:00
|
|
|
) : undefined}
|
|
|
|
|
>
|
|
|
|
|
{projectContent}
|
|
|
|
|
</PropertyPicker>
|
2026-02-17 20:16:57 -06:00
|
|
|
|
2026-04-10 22:26:21 -05:00
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Parent"
|
|
|
|
|
open={parentOpen}
|
|
|
|
|
onOpenChange={(open) => {
|
|
|
|
|
setParentOpen(open);
|
|
|
|
|
if (!open) setParentSearch("");
|
|
|
|
|
}}
|
|
|
|
|
triggerContent={parentTrigger}
|
|
|
|
|
triggerClassName="min-w-0 max-w-full"
|
|
|
|
|
popoverClassName="w-72"
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
extra={parentLink}
|
2026-04-10 22:26:21 -05:00
|
|
|
>
|
|
|
|
|
{parentContent}
|
|
|
|
|
</PropertyPicker>
|
|
|
|
|
|
2026-04-04 13:56:04 -05:00
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Blocked by"
|
|
|
|
|
open={blockedByOpen}
|
|
|
|
|
onOpenChange={(open) => {
|
|
|
|
|
setBlockedByOpen(open);
|
|
|
|
|
if (!open) setBlockedBySearch("");
|
|
|
|
|
}}
|
|
|
|
|
triggerContent={blockedByTrigger}
|
|
|
|
|
triggerClassName="min-w-0 max-w-full"
|
|
|
|
|
popoverClassName="w-72"
|
|
|
|
|
>
|
|
|
|
|
{blockedByContent}
|
|
|
|
|
</PropertyPicker>
|
|
|
|
|
|
|
|
|
|
<PropertyRow label="Blocking">
|
|
|
|
|
{blockingIssues.length > 0 ? (
|
|
|
|
|
<div className="flex flex-wrap gap-1">
|
|
|
|
|
{blockingIssues.map((relation) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={relation.id}
|
|
|
|
|
to={`/issues/${relation.identifier ?? relation.id}`}
|
|
|
|
|
className="inline-flex items-center rounded-full border border-border px-2 py-0.5 text-xs hover:bg-accent/50"
|
|
|
|
|
>
|
|
|
|
|
{relation.identifier ?? relation.title}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
2026-04-07 17:47:58 -05:00
|
|
|
) : null}
|
2026-04-04 13:56:04 -05:00
|
|
|
</PropertyRow>
|
|
|
|
|
|
2026-04-06 10:58:59 -05:00
|
|
|
<PropertyRow label="Sub-issues">
|
|
|
|
|
<div className="flex flex-wrap items-center gap-1.5">
|
2026-04-07 17:47:58 -05:00
|
|
|
{childIssues.length > 0
|
|
|
|
|
? childIssues.map((child) => (
|
2026-04-06 10:58:59 -05:00
|
|
|
<Link
|
|
|
|
|
key={child.id}
|
|
|
|
|
to={`/issues/${child.identifier ?? child.id}`}
|
|
|
|
|
className="inline-flex items-center rounded-full border border-border px-2 py-0.5 text-xs hover:bg-accent/50"
|
|
|
|
|
>
|
|
|
|
|
{child.identifier ?? child.title}
|
|
|
|
|
</Link>
|
|
|
|
|
))
|
2026-04-07 17:47:58 -05:00
|
|
|
: null}
|
2026-04-06 10:58:59 -05:00
|
|
|
{onAddSubIssue ? (
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
className="inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"
|
|
|
|
|
onClick={onAddSubIssue}
|
|
|
|
|
>
|
|
|
|
|
<Plus className="h-3 w-3" />
|
|
|
|
|
Add sub-issue
|
|
|
|
|
</button>
|
|
|
|
|
) : null}
|
|
|
|
|
</div>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
|
2026-04-06 08:40:38 -05:00
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Reviewers"
|
|
|
|
|
open={reviewersOpen}
|
|
|
|
|
onOpenChange={(open) => { setReviewersOpen(open); if (!open) setReviewerSearch(""); }}
|
|
|
|
|
triggerContent={reviewerTrigger}
|
|
|
|
|
triggerClassName="min-w-0 max-w-full"
|
|
|
|
|
popoverClassName="w-56"
|
|
|
|
|
>
|
|
|
|
|
{executionParticipantsContent(
|
|
|
|
|
"review",
|
|
|
|
|
reviewerValues,
|
|
|
|
|
reviewerSearch,
|
|
|
|
|
setReviewerSearch,
|
|
|
|
|
() => updateExecutionPolicy([], approverValues),
|
|
|
|
|
)}
|
|
|
|
|
</PropertyPicker>
|
2026-04-08 17:00:57 -05:00
|
|
|
{nextRunnableExecutionStage === "review" && reviewerValues.length > 0 ? runExecutionButton("review") : null}
|
2026-04-06 08:40:38 -05:00
|
|
|
|
|
|
|
|
<PropertyPicker
|
|
|
|
|
inline={inline}
|
|
|
|
|
label="Approvers"
|
|
|
|
|
open={approversOpen}
|
|
|
|
|
onOpenChange={(open) => { setApproversOpen(open); if (!open) setApproverSearch(""); }}
|
|
|
|
|
triggerContent={approverTrigger}
|
|
|
|
|
triggerClassName="min-w-0 max-w-full"
|
|
|
|
|
popoverClassName="w-56"
|
|
|
|
|
>
|
|
|
|
|
{executionParticipantsContent(
|
|
|
|
|
"approval",
|
|
|
|
|
approverValues,
|
|
|
|
|
approverSearch,
|
|
|
|
|
setApproverSearch,
|
|
|
|
|
() => updateExecutionPolicy(reviewerValues, []),
|
|
|
|
|
)}
|
|
|
|
|
</PropertyPicker>
|
2026-04-08 17:00:57 -05:00
|
|
|
{nextRunnableExecutionStage === "approval" && approverValues.length > 0 ? runExecutionButton("approval") : null}
|
2026-04-06 08:40:38 -05:00
|
|
|
|
|
|
|
|
{currentExecutionLabel && (
|
|
|
|
|
<PropertyRow label="Execution">
|
|
|
|
|
<span className="text-sm">{currentExecutionLabel}</span>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
|
|
|
|
|
2026-02-17 20:16:57 -06:00
|
|
|
{issue.requestDepth > 0 && (
|
|
|
|
|
<PropertyRow label="Depth">
|
|
|
|
|
<span className="text-sm font-mono">{issue.requestDepth}</span>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
</div>
|
|
|
|
|
|
[codex] Improve workspace navigation and runtime UI (#4089)
## Thinking Path
> - Paperclip agents do real work in project and execution workspaces.
> - Operators need workspace state to be visible, navigable, and
copyable without digging through raw run logs.
> - The branch included related workspace cards, navigation, runtime
controls, stale-service handling, and issue-property visibility.
> - These changes share the workspace UI and runtime-control surfaces
and can stand alone from unrelated access/profile work.
> - This pull request groups the workspace experience changes into one
standalone branch.
> - The benefit is a clearer workspace overview, better metadata copy
flows, and more accurate runtime service controls.
## What Changed
- Polished project workspace summary cards and made workspace metadata
copyable.
- Added a workspace navigation overview and extracted reusable project
workspace content.
- Squared and polished the execution workspace configuration page.
- Fixed stale workspace command matching and hid stopped stale services
in runtime controls.
- Showed live workspace service context in issue properties.
## Verification
- `pnpm install --frozen-lockfile`
- `pnpm exec vitest run
ui/src/components/ProjectWorkspaceSummaryCard.test.tsx
ui/src/lib/project-workspaces-tab.test.ts
ui/src/components/Sidebar.test.tsx
ui/src/components/WorkspaceRuntimeControls.test.tsx
ui/src/components/IssueProperties.test.tsx`
- `pnpm exec vitest run packages/shared/src/workspace-commands.test.ts
--config /dev/null` because the root Vitest project config does not
currently include `packages/shared` tests.
- Split integration check: merged after runtime/governance,
dev-infra/backups, and access/profiles with no merge conflicts.
- Confirmed this branch does not include `pnpm-lock.yaml`.
## Risks
- Medium risk: touches workspace navigation, runtime controls, and issue
property rendering.
- Visual layout changes may need browser QA, especially around smaller
screens and dense workspace metadata.
- No database migrations are included.
> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.
## Model Used
- OpenAI Codex, GPT-5.4 tool-enabled coding model, agentic
code-editing/runtime with local shell and GitHub CLI access; exact
context window and reasoning mode are not exposed by the Paperclip
harness.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-20 06:14:32 -05:00
|
|
|
{liveWorkspaceService || issue.currentExecutionWorkspace?.branchName || issue.currentExecutionWorkspace?.cwd || issue.executionWorkspaceId ? (
|
2026-04-06 08:10:38 -05:00
|
|
|
<>
|
|
|
|
|
<Separator />
|
|
|
|
|
<div className="space-y-1">
|
[codex] Improve workspace navigation and runtime UI (#4089)
## Thinking Path
> - Paperclip agents do real work in project and execution workspaces.
> - Operators need workspace state to be visible, navigable, and
copyable without digging through raw run logs.
> - The branch included related workspace cards, navigation, runtime
controls, stale-service handling, and issue-property visibility.
> - These changes share the workspace UI and runtime-control surfaces
and can stand alone from unrelated access/profile work.
> - This pull request groups the workspace experience changes into one
standalone branch.
> - The benefit is a clearer workspace overview, better metadata copy
flows, and more accurate runtime service controls.
## What Changed
- Polished project workspace summary cards and made workspace metadata
copyable.
- Added a workspace navigation overview and extracted reusable project
workspace content.
- Squared and polished the execution workspace configuration page.
- Fixed stale workspace command matching and hid stopped stale services
in runtime controls.
- Showed live workspace service context in issue properties.
## Verification
- `pnpm install --frozen-lockfile`
- `pnpm exec vitest run
ui/src/components/ProjectWorkspaceSummaryCard.test.tsx
ui/src/lib/project-workspaces-tab.test.ts
ui/src/components/Sidebar.test.tsx
ui/src/components/WorkspaceRuntimeControls.test.tsx
ui/src/components/IssueProperties.test.tsx`
- `pnpm exec vitest run packages/shared/src/workspace-commands.test.ts
--config /dev/null` because the root Vitest project config does not
currently include `packages/shared` tests.
- Split integration check: merged after runtime/governance,
dev-infra/backups, and access/profiles with no merge conflicts.
- Confirmed this branch does not include `pnpm-lock.yaml`.
## Risks
- Medium risk: touches workspace navigation, runtime controls, and issue
property rendering.
- Visual layout changes may need browser QA, especially around smaller
screens and dense workspace metadata.
- No database migrations are included.
> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.
## Model Used
- OpenAI Codex, GPT-5.4 tool-enabled coding model, agentic
code-editing/runtime with local shell and GitHub CLI access; exact
context window and reasoning mode are not exposed by the Paperclip
harness.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-20 06:14:32 -05:00
|
|
|
{liveWorkspaceService?.url && (
|
|
|
|
|
<PropertyRow label="Service">
|
|
|
|
|
<a
|
|
|
|
|
href={liveWorkspaceService.url}
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noreferrer"
|
|
|
|
|
className="inline-flex min-w-0 items-start gap-1 text-sm font-mono text-emerald-700 hover:text-emerald-800 hover:underline dark:text-emerald-300 dark:hover:text-emerald-200"
|
|
|
|
|
>
|
|
|
|
|
<span className="min-w-0 break-all">{liveWorkspaceService.url}</span>
|
|
|
|
|
<ExternalLink className="mt-1 h-3 w-3 shrink-0" />
|
|
|
|
|
</a>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
[codex] improve issue and routine UI responsiveness (#3744)
## Thinking Path
> - Paperclip orchestrates AI agents for zero-human companies
> - Operators rely on issue, inbox, and routine views to understand what
the company is doing in real time
> - Those views need to stay fast and readable even when issue lists,
markdown comments, and run metadata get large
> - The current branch had a coherent set of UI and live-update
improvements spread across issue search, issue detail rendering, routine
affordances, and workspace lookups
> - This pull request groups those board-facing changes into one
standalone branch that can merge independently of the heartbeat/runtime
work
> - The benefit is a faster, clearer issue and routine workflow without
changing the underlying task model
## What Changed
- Show routine execution issues by default and rename the filter to
`Hide routine runs` so the default state no longer looks like an active
filter.
- Show the routine name in the run dialog and tighten the issue
properties pane with a workspace link, copy-on-click behavior, and an
inline parent arrow.
- Reduce issue detail rerenders, keep queued issue chat mounted, improve
issues page search responsiveness, and speed up issues first paint.
- Add inbox "other search results", refresh visible issue runs after
status updates, and optimize workspace lookups through summary-mode
execution workspace queries.
- Improve markdown wrapping and scrolling behavior for long strings and
self-comment code blocks.
- Relax the markdown sanitizer assertion so the test still validates
safety after the new wrap-friendly inline styles.
## Verification
- `pnpm vitest run ui/src/components/IssuesList.test.tsx
ui/src/lib/inbox.test.ts ui/src/pages/Issues.test.tsx
ui/src/context/BreadcrumbContext.test.tsx
ui/src/context/LiveUpdatesProvider.test.ts
ui/src/components/MarkdownBody.test.tsx
ui/src/api/execution-workspaces.test.ts
server/src/__tests__/execution-workspaces-routes.test.ts`
## Risks
- This touches several issue-facing UI surfaces at once, so regressions
would most likely show up as stale rendering, search result mismatches,
or small markdown presentation differences.
- The workspace lookup optimization depends on the summary-mode route
shape staying aligned between server and UI.
## Model Used
- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.
## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
---------
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-15 15:54:05 -05:00
|
|
|
{issue.executionWorkspaceId && (
|
|
|
|
|
<PropertyRow label="Workspace">
|
|
|
|
|
<Link
|
|
|
|
|
to={`/execution-workspaces/${issue.executionWorkspaceId}`}
|
|
|
|
|
className="text-sm text-primary hover:underline inline-flex items-center gap-1"
|
|
|
|
|
>
|
|
|
|
|
View workspace
|
|
|
|
|
<ExternalLink className="h-3 w-3" />
|
|
|
|
|
</Link>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
2026-04-06 08:10:38 -05:00
|
|
|
{issue.currentExecutionWorkspace?.branchName && (
|
|
|
|
|
<PropertyRow label="Branch">
|
|
|
|
|
<TruncatedCopyable
|
|
|
|
|
value={issue.currentExecutionWorkspace.branchName}
|
|
|
|
|
icon={GitBranch}
|
|
|
|
|
/>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
|
|
|
|
{issue.currentExecutionWorkspace?.cwd && (
|
|
|
|
|
<PropertyRow label="Folder">
|
|
|
|
|
<TruncatedCopyable
|
|
|
|
|
value={issue.currentExecutionWorkspace.cwd}
|
|
|
|
|
icon={FolderOpen}
|
|
|
|
|
/>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
) : null}
|
|
|
|
|
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
<Separator />
|
|
|
|
|
|
|
|
|
|
<div className="space-y-1">
|
2026-03-06 17:16:39 +00:00
|
|
|
{(issue.createdByAgentId || issue.createdByUserId) && (
|
|
|
|
|
<PropertyRow label="Created by">
|
|
|
|
|
{issue.createdByAgentId ? (
|
|
|
|
|
<Link
|
|
|
|
|
to={`/agents/${issue.createdByAgentId}`}
|
|
|
|
|
className="hover:underline"
|
|
|
|
|
>
|
|
|
|
|
<Identity name={agentName(issue.createdByAgentId) ?? issue.createdByAgentId.slice(0, 8)} size="sm" />
|
|
|
|
|
</Link>
|
|
|
|
|
) : (
|
|
|
|
|
<>
|
|
|
|
|
<User className="h-3.5 w-3.5 text-muted-foreground" />
|
|
|
|
|
<span className="text-sm">{creatorUserLabel ?? "User"}</span>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
2026-02-17 10:53:20 -06:00
|
|
|
{issue.startedAt && (
|
|
|
|
|
<PropertyRow label="Started">
|
|
|
|
|
<span className="text-sm">{formatDate(issue.startedAt)}</span>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
|
|
|
|
{issue.completedAt && (
|
|
|
|
|
<PropertyRow label="Completed">
|
|
|
|
|
<span className="text-sm">{formatDate(issue.completedAt)}</span>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
)}
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
<PropertyRow label="Created">
|
|
|
|
|
<span className="text-sm">{formatDate(issue.createdAt)}</span>
|
|
|
|
|
</PropertyRow>
|
|
|
|
|
<PropertyRow label="Updated">
|
2026-02-17 10:53:20 -06:00
|
|
|
<span className="text-sm">{timeAgo(issue.updatedAt)}</span>
|
Add detail pages, property panels, and restyle list pages
New pages: AgentDetail, GoalDetail, IssueDetail, ProjectDetail, Inbox,
MyIssues. New feature components: AgentProperties, GoalProperties,
IssueProperties, ProjectProperties, GoalTree, NewIssueDialog. Add
heartbeats API client. Restyle all list pages (Agents, Issues, Goals,
Projects, Dashboard, Costs, Activity, Org) with EntityRow, FilterBar,
and improved layouts. Add routing for detail views.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:57:06 -06:00
|
|
|
</PropertyRow>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|