Polish operator UI task controls (#5427)
## Thinking Path > - Paperclip orchestrates AI agents for zero-human companies > - Operators spend most of their day scanning skills, routines, inbox groups, and activity cards > - Several small UI rough edges made those surfaces harder to scan or easier to crash on real API payloads > - These fixes are grouped together because they are low-risk operator quality-of-life improvements rather than separate control-plane contracts > - This pull request polishes skills metadata, routine run-now access, grouped issue creation defaults, monitor activity rendering, and activity row identity layout > - The benefit is a smoother board workflow with fewer small interruptions while keeping the change set compact ## What Changed - Improves company skill source display and the used-by agent list. - Truncates long skill source paths and adds a copy affordance. - Adds a row-level run-now button to the routines table. - Adds grouped issue creation defaults for inbox issue groups and aligns grouped add buttons to the right. - Fixes `IssueMonitorActivityCard` when `monitorNextCheckAt` arrives as an ISO string. - Polishes activity row actor avatar/name layout by using the shared avatar primitive. ## Verification - `pnpm run preflight:workspace-links && pnpm exec vitest run ui/src/pages/Routines.test.tsx ui/src/components/IssuesList.test.tsx ui/src/lib/inbox.test.ts ui/src/components/IssueMonitorActivityCard.test.tsx` — 91 passed. - The routines test emitted the pre-existing Radix warning about missing `DialogTitle`/description in dialog content; tests still passed. - Pairwise merge checks against the other two PR branches reported no textual conflicts. ## Risks - Low: changes are UI-focused and covered by targeted component/lib tests. - Low-to-medium: activity row layout changes could affect dense feed scanability; the implementation uses the shared avatar component and keeps truncation behavior. > 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 coding agent, GPT-5 model family (`gpt-5`), tool-enabled Paperclip heartbeat environment. Context window and internal reasoning mode are 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 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>
This commit is contained in:
@@ -20,6 +20,8 @@ import { EmptyState } from "../components/EmptyState";
|
||||
import { MarkdownBody } from "../components/MarkdownBody";
|
||||
import { MarkdownEditor } from "../components/MarkdownEditor";
|
||||
import { PageSkeleton } from "../components/PageSkeleton";
|
||||
import { CopyText } from "../components/CopyText";
|
||||
import { Identity } from "../components/Identity";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
@@ -49,6 +51,7 @@ import {
|
||||
Paperclip,
|
||||
Pencil,
|
||||
Plus,
|
||||
Copy,
|
||||
RefreshCw,
|
||||
Save,
|
||||
Search,
|
||||
@@ -171,6 +174,12 @@ function shortRef(ref: string | null | undefined) {
|
||||
return ref.slice(0, 7);
|
||||
}
|
||||
|
||||
function middleTruncate(value: string, maxLength = 72) {
|
||||
if (value.length <= maxLength) return value;
|
||||
const edgeLength = Math.floor((maxLength - 3) / 2);
|
||||
return `${value.slice(0, edgeLength)}...${value.slice(value.length - edgeLength)}`;
|
||||
}
|
||||
|
||||
function formatProjectScanSummary(result: CompanySkillProjectScanResult) {
|
||||
const parts = [
|
||||
`${result.discovered} found`,
|
||||
@@ -530,8 +539,6 @@ function SkillPane({
|
||||
onSave: () => void;
|
||||
savePending: boolean;
|
||||
}) {
|
||||
const { pushToast } = useToastActions();
|
||||
|
||||
if (!detail) {
|
||||
if (loading) {
|
||||
return <PageSkeleton variant="detail" />;
|
||||
@@ -550,6 +557,7 @@ function SkillPane({
|
||||
const body = file?.markdown ? stripFrontmatter(file.content) : file?.content ?? "";
|
||||
const currentPin = shortRef(detail.sourceRef);
|
||||
const latestPin = shortRef(updateStatus?.latestRef);
|
||||
const displaySourcePath = detail.sourcePath ? middleTruncate(detail.sourcePath) : null;
|
||||
const removeBlocked = usedBy.length > 0;
|
||||
const removeDisabledReason = removeBlocked
|
||||
? "Detach this skill from all agents before removing it."
|
||||
@@ -595,20 +603,28 @@ function SkillPane({
|
||||
|
||||
<div className="mt-4 space-y-3 border-t border-border pt-4 text-sm">
|
||||
<div className="flex flex-wrap items-center gap-x-6 gap-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
<span className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground">Source</span>
|
||||
<span className="flex items-center gap-2">
|
||||
<span className="flex min-w-0 items-center gap-2">
|
||||
<SourceIcon className="h-3.5 w-3.5 text-muted-foreground" />
|
||||
{detail.sourcePath ? (
|
||||
<button
|
||||
className="truncate hover:text-foreground text-muted-foreground transition-colors cursor-pointer"
|
||||
onClick={() => {
|
||||
navigator.clipboard.writeText(detail.sourcePath!);
|
||||
pushToast({ title: "Copied path to workspace" });
|
||||
}}
|
||||
>
|
||||
{source.label}
|
||||
</button>
|
||||
{detail.sourcePath && displaySourcePath ? (
|
||||
<>
|
||||
<span
|
||||
className="block min-w-0 max-w-[min(34rem,55vw)] truncate font-mono text-xs text-muted-foreground"
|
||||
title={detail.sourcePath}
|
||||
>
|
||||
{displaySourcePath}
|
||||
</span>
|
||||
<CopyText
|
||||
text={detail.sourcePath}
|
||||
copiedLabel="Copied path"
|
||||
ariaLabel="Copy source path"
|
||||
title="Copy source path"
|
||||
className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-sm border border-border text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
|
||||
>
|
||||
<Copy className="h-3.5 w-3.5" />
|
||||
</CopyText>
|
||||
</>
|
||||
) : (
|
||||
<span className="truncate">{source.label}</span>
|
||||
)}
|
||||
@@ -662,14 +678,14 @@ function SkillPane({
|
||||
{usedBy.length === 0 ? (
|
||||
<span className="text-muted-foreground">No agents attached</span>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-x-3 gap-y-1">
|
||||
<div className="grid w-full grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{usedBy.map((agent) => (
|
||||
<Link
|
||||
key={agent.id}
|
||||
to={`/agents/${agent.urlKey}/skills`}
|
||||
className="text-foreground no-underline hover:underline"
|
||||
className="group rounded-md border border-transparent p-2 no-underline hover:border-border hover:bg-accent/40"
|
||||
>
|
||||
{agent.name}
|
||||
<Identity name={agent.name} size="sm" />
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user