update
This commit is contained in:
1 parent
0cd65521b8
commit
48daca9ba0
18 files changed
+192
-91
No files matched your search
+6
-22
@@ -314,22 +314,6 @@ export function App() {
|
||||
const companyId = snapshot.currentCompanyId;
|
||||
let cancelled = false;
|
||||
|
||||
if (section === "inbox") {
|
||||
setInboxItems([]);
|
||||
}
|
||||
|
||||
if (section === "performance") {
|
||||
setCompanyMetrics(null);
|
||||
}
|
||||
|
||||
if (section === "standup") {
|
||||
setStandupReport(null);
|
||||
}
|
||||
|
||||
if (section === "social") {
|
||||
setSocialAccounts([]);
|
||||
}
|
||||
|
||||
if (section === "inbox") {
|
||||
void window.agentCompany.getInbox(companyId).then((result) => {
|
||||
if (!cancelled && result.ok) setInboxItems(result.data);
|
||||
@@ -1266,7 +1250,7 @@ export function App() {
|
||||
<SprintManager companyId={currentCompany.id} sprints={companySprints} onRefresh={refresh} />
|
||||
) : null}
|
||||
|
||||
{section === "workspaces" ? (
|
||||
{section === "workspaces" && currentCompany ? (
|
||||
<EntityWorkspace
|
||||
title="Workspaces"
|
||||
eyebrow={undefined}
|
||||
@@ -1304,7 +1288,7 @@ export function App() {
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{section === "settings" ? (
|
||||
{section === "settings" && currentCompany ? (
|
||||
<div className="space-y-10">
|
||||
<Panel title="Profile and release">
|
||||
<SettingsPane snapshot={snapshot} secrets={companySecrets} companyId={currentCompany!.id} onSaved={refresh} />
|
||||
@@ -1340,10 +1324,10 @@ export function App() {
|
||||
compact
|
||||
value={selectedRun?.id ?? ""}
|
||||
onChange={setSelectedRunId}
|
||||
options={(runs.length > 0 ? runs : [{ id: "", summary: "No runs" } as RunRecord]).map((run) => ({
|
||||
value: run.id,
|
||||
label: run.summary || `Run ${run.id.slice(0, 8)}`,
|
||||
}))}
|
||||
options={runs.length > 0
|
||||
? runs.map((run) => ({ value: run.id, label: run.summary || `Run ${run.id.slice(0, 8)}` }))
|
||||
: [{ value: "", label: "No runs" }]
|
||||
}
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -37,8 +37,10 @@ const triggerConfig: Record<AutomationTrigger, { label: string; description: str
|
||||
task_status_changed: { label: "Task Status Changed", description: "When a task transitions to a new status", icon: ArrowsClockwise },
|
||||
task_created: { label: "Task Created", description: "When a new task is added to the system", icon: Plus },
|
||||
task_blocked: { label: "Task Blocked", description: "When a task becomes blocked by a dependency", icon: Pause },
|
||||
task_reassigned: { label: "Task Reassigned", description: "When a task is reassigned to a different agent", icon: ArrowsClockwise },
|
||||
run_completed: { label: "Run Completed", description: "When an agent run finishes successfully", icon: Play },
|
||||
run_failed: { label: "Run Failed", description: "When an agent run encounters an error", icon: Trash },
|
||||
approval_created: { label: "Approval Created", description: "When a new approval request needs review", icon: Eye },
|
||||
approval_resolved: { label: "Approval Resolved", description: "When a pending approval is decided", icon: Eye },
|
||||
budget_threshold: { label: "Budget Threshold", description: "When spending exceeds a configured limit", icon: Funnel },
|
||||
agent_idle: { label: "Agent Idle", description: "When an agent has no tasks and becomes idle", icon: Robot },
|
||||
|
||||
@@ -501,10 +501,11 @@ export function DocumentCenter({
|
||||
title="Delete document"
|
||||
message="This removes the document from the company knowledge surface."
|
||||
onCancel={() => setDeleteId(null)}
|
||||
onConfirm={() => {
|
||||
onConfirm={async () => {
|
||||
if (!deleteId) return;
|
||||
void window.agentCompany.deleteDocument({ id: deleteId, companyId }).then(() => onRefresh());
|
||||
const result = await window.agentCompany.deleteDocument({ id: deleteId, companyId });
|
||||
setDeleteId(null);
|
||||
if (result.ok) await onRefresh();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -568,10 +569,11 @@ export function KnowledgeBaseManager({
|
||||
title="Delete knowledge entry"
|
||||
message="This removes the entry from the shared company knowledge base."
|
||||
onCancel={() => setDeleteId(null)}
|
||||
onConfirm={() => {
|
||||
onConfirm={async () => {
|
||||
if (!deleteId) return;
|
||||
void window.agentCompany.deleteKnowledgeEntry({ id: deleteId, companyId }).then(() => onRefresh());
|
||||
const result = await window.agentCompany.deleteKnowledgeEntry({ id: deleteId, companyId });
|
||||
setDeleteId(null);
|
||||
if (result.ok) await onRefresh();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -638,10 +640,11 @@ export function MeetingsManager({
|
||||
title="Delete meeting"
|
||||
message="This removes the meeting and its operational context from the company timeline."
|
||||
onCancel={() => setDeleteId(null)}
|
||||
onConfirm={() => {
|
||||
onConfirm={async () => {
|
||||
if (!deleteId) return;
|
||||
void window.agentCompany.deleteMeeting({ id: deleteId, companyId }).then(() => onRefresh());
|
||||
const result = await window.agentCompany.deleteMeeting({ id: deleteId, companyId });
|
||||
setDeleteId(null);
|
||||
if (result.ok) await onRefresh();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -705,10 +708,11 @@ export function SprintManager({
|
||||
title="Delete sprint"
|
||||
message="This removes the sprint board entry. Historical run and task records remain."
|
||||
onCancel={() => setDeleteId(null)}
|
||||
onConfirm={() => {
|
||||
onConfirm={async () => {
|
||||
if (!deleteId) return;
|
||||
void window.agentCompany.deleteSprint({ id: deleteId, companyId }).then(() => onRefresh());
|
||||
const result = await window.agentCompany.deleteSprint({ id: deleteId, companyId });
|
||||
setDeleteId(null);
|
||||
if (result.ok) await onRefresh();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from "@phosphor-icons/react";
|
||||
import type { AgentRecord, ApprovalRecord } from "@shared/types";
|
||||
import { getAgentInitials } from "../lib/formatters";
|
||||
import { unwrap } from "../lib/desktop";
|
||||
import { ActionButton, EmptyState, Panel, StatusPill } from "./ui";
|
||||
|
||||
interface HiringPipelineProps {
|
||||
@@ -189,12 +190,12 @@ export function HiringPipeline({ agents, approvals, onRefresh, onNavigateToAgent
|
||||
icon={Check}
|
||||
tone="accent"
|
||||
onClick={async () => {
|
||||
await window.agentCompany.decideApproval({
|
||||
unwrap(await window.agentCompany.decideApproval({
|
||||
companyId: a.companyId,
|
||||
approvalId: a.id,
|
||||
state: "approved",
|
||||
decisionNote: "Hire approved via hiring pipeline",
|
||||
});
|
||||
}));
|
||||
await onRefresh();
|
||||
}}
|
||||
/>
|
||||
@@ -203,12 +204,12 @@ export function HiringPipeline({ agents, approvals, onRefresh, onNavigateToAgent
|
||||
icon={X}
|
||||
tone="danger"
|
||||
onClick={async () => {
|
||||
await window.agentCompany.decideApproval({
|
||||
unwrap(await window.agentCompany.decideApproval({
|
||||
companyId: a.companyId,
|
||||
approvalId: a.id,
|
||||
state: "rejected",
|
||||
decisionNote: "Hire rejected via hiring pipeline",
|
||||
});
|
||||
}));
|
||||
await onRefresh();
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user