mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
Improve operator workflow QoL (#5291)
## Thinking Path > - Paperclip is a control plane operators use repeatedly to supervise agent companies. > - Common operator workflows depend on fast scanning of inboxes, issue sidebars, workspaces, cost totals, and runtime services. > - Several small UI and service gaps made those workflows slower or less clear. > - This pull request groups the operator-facing QoL changes that can stand alone from recovery and adapter work. > - The benefit is a denser, clearer board experience for issue triage and workspace operation. ## What Changed - Added inbox assignee/project grouping and issue list token/runtime totals. - Improved issue properties with removable blocker chips and workspace task links. - Improved execution workspace layout, runtime controls, issues tab default, and stopped-port reuse behavior. - Added mobile markdown/routine dialog fixes, page title company names, sidebar polish, and dashboard run task label cleanup. ## Verification - `pnpm install --frozen-lockfile` - `pnpm exec vitest run ui/src/lib/inbox.test.ts ui/src/components/IssueProperties.test.tsx ui/src/components/WorkspaceRuntimeControls.test.tsx server/src/__tests__/workspace-runtime.test.ts server/src/__tests__/costs-service.test.ts` ## Risks - Medium UI risk because this touches several operator surfaces. The branch is intentionally grouped around workflow/QoL files and keeps the file count below the Greptile limit. ## Model Used - OpenAI GPT-5 Codex via Paperclip `codex_local` adapter, with shell/git/GitHub CLI tool use. ## 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:
parent
11ffd6f2c5
commit
424e81d087
47 changed files with 1739 additions and 250 deletions
|
|
@ -3,7 +3,7 @@
|
|||
import { act } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { BreadcrumbProvider, useBreadcrumbs } from "./BreadcrumbContext";
|
||||
import { BreadcrumbProvider, buildDocumentTitle, useBreadcrumbs } from "./BreadcrumbContext";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true;
|
||||
|
|
@ -58,4 +58,21 @@ describe("BreadcrumbContext", () => {
|
|||
|
||||
expect(renderCounts).toHaveLength(2);
|
||||
});
|
||||
|
||||
it("builds page titles with the selected company name before Paperclip", () => {
|
||||
expect(buildDocumentTitle([{ label: "Inbox" }], "Anachronist Wiki")).toBe(
|
||||
"Inbox • Anachronist Wiki • Paperclip",
|
||||
);
|
||||
expect(
|
||||
buildDocumentTitle(
|
||||
[{ label: "Issues", href: "/issues" }, { label: "PAP-3515" }],
|
||||
"Anachronist Wiki",
|
||||
),
|
||||
).toBe("PAP-3515 • Issues • Anachronist Wiki • Paperclip");
|
||||
});
|
||||
|
||||
it("omits blank company names from page titles", () => {
|
||||
expect(buildDocumentTitle([{ label: "Inbox" }], " ")).toBe("Inbox • Paperclip");
|
||||
expect(buildDocumentTitle([], null)).toBe("Paperclip");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ interface BreadcrumbContextValue {
|
|||
setMobileToolbar: (node: ReactNode | null) => void;
|
||||
}
|
||||
|
||||
interface BreadcrumbProviderProps {
|
||||
children: ReactNode;
|
||||
companyName?: string | null;
|
||||
}
|
||||
|
||||
const BreadcrumbContext = createContext<BreadcrumbContextValue | null>(null);
|
||||
|
||||
function breadcrumbsEqual(left: Breadcrumb[], right: Breadcrumb[]) {
|
||||
|
|
@ -25,7 +30,16 @@ function breadcrumbsEqual(left: Breadcrumb[], right: Breadcrumb[]) {
|
|||
return true;
|
||||
}
|
||||
|
||||
export function BreadcrumbProvider({ children }: { children: ReactNode }) {
|
||||
export function buildDocumentTitle(breadcrumbs: Breadcrumb[], companyName?: string | null) {
|
||||
const pageParts = breadcrumbs.length === 0
|
||||
? []
|
||||
: [...breadcrumbs].reverse().map((breadcrumb) => breadcrumb.label);
|
||||
const companyPart = companyName?.trim() ? [companyName.trim()] : [];
|
||||
const parts = [...pageParts, ...companyPart, "Paperclip"];
|
||||
return parts.join(" • ");
|
||||
}
|
||||
|
||||
export function BreadcrumbProvider({ children, companyName }: BreadcrumbProviderProps) {
|
||||
const [breadcrumbs, setBreadcrumbsState] = useState<Breadcrumb[]>([]);
|
||||
const [mobileToolbar, setMobileToolbarState] = useState<ReactNode | null>(null);
|
||||
|
||||
|
|
@ -38,13 +52,8 @@ export function BreadcrumbProvider({ children }: { children: ReactNode }) {
|
|||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (breadcrumbs.length === 0) {
|
||||
document.title = "Paperclip";
|
||||
} else {
|
||||
const parts = [...breadcrumbs].reverse().map((b) => b.label);
|
||||
document.title = `${parts.join(" · ")} · Paperclip`;
|
||||
}
|
||||
}, [breadcrumbs]);
|
||||
document.title = buildDocumentTitle(breadcrumbs, companyName);
|
||||
}, [breadcrumbs, companyName]);
|
||||
|
||||
return (
|
||||
<BreadcrumbContext.Provider value={{ breadcrumbs, setBreadcrumbs, mobileToolbar, setMobileToolbar }}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue