Skip to content

Commit 31025e1

Browse files
claudfuenclaude
andauthored
refactor(ui): improve Carbon nav icons + remove overview drag-and-drop (#2218)
* refactor(ui): improve nav icons + remove overview drag-and-drop Icons (AppShellWrapper — rail): - Compliance: CertificateCheck → Badge (certification badge) - Trust: CloudAuditing → Globe (public/global trust center) - Security: Security → ManageProtection (protection management) Icons (AppSidebar — compliance sidebar): - Auditor View: TaskComplete → DocumentSigned (auditors sign off) - Controls: Security → SettingsAdjust (adjustable params, no dupe) - Documents: Catalog → FolderDetails (folder of docs) - People: Group → UserMultiple (standard multi-user) - Risks: Warning → Scale (weighing risk) - Vendors: ShoppingBag → Partnership (business partners) - Questionnaire: Document → DocumentTasks (task-filled form) - Integrations: Integration → Connect (connecting systems) - Cloud Tests: Chemistry → TestTool (test tooling) Overview: - Replace <DraggableCards> with a plain 2-column grid - Delete DraggableCards.tsx, SortableCard.tsx, useCardOrder.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * revert(ui): restore original compliance sidebar icons Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(billing): look up run by providerRunId not internal id The id returned by the create API is the provider run ID stored in providerRunId, not the internal ptr... primary key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e77e278 commit 31025e1

6 files changed

Lines changed: 8 additions & 217 deletions

File tree

apps/app/src/app/(app)/[orgId]/components/AppShellWrapper.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { NotificationBell } from '@/components/notifications/notification-bell';
77
import { OrganizationSwitcher } from '@/components/organization-switcher';
88
import { SidebarProvider, useSidebar } from '@/context/sidebar-context';
99
import { authClient } from '@/utils/auth-client';
10-
import { CertificateCheck, CloudAuditing, Logout, Security, Settings } from '@carbon/icons-react';
10+
import { Badge, Globe, Logout, ManageProtection, Settings } from '@carbon/icons-react';
1111
import {
1212
DropdownMenu,
1313
DropdownMenuContent,
@@ -240,22 +240,22 @@ function AppShellWrapperContent({
240240
<ShellRailNavItem
241241
href={`/${organization.id}/frameworks`}
242242
isActive={!isSettingsActive && !isTrustActive && !isSecurityActive}
243-
icon={<CertificateCheck className="size-5" />}
243+
icon={<Badge className="size-5" />}
244244
label="Compliance"
245245
/>
246246
{isTrustNdaEnabled && (
247247
<ShellRailNavItem
248248
href={`/${organization.id}/trust`}
249249
isActive={isTrustActive}
250-
icon={<CloudAuditing className="size-5" />}
250+
icon={<Globe className="size-5" />}
251251
label="Trust"
252252
/>
253253
)}
254254
{isSecurityEnabled ? (
255255
<ShellRailNavItem
256256
href={`/${organization.id}/security`}
257257
isActive={isSecurityActive}
258-
icon={<Security className="size-5" />}
258+
icon={<ManageProtection className="size-5" />}
259259
label="Security"
260260
/>
261261
) : null}

apps/app/src/app/(app)/[orgId]/frameworks/components/DraggableCards.tsx

Lines changed: 0 additions & 132 deletions
This file was deleted.

apps/app/src/app/(app)/[orgId]/frameworks/components/Overview.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { Finding, FrameworkEditorFramework, Policy, Task } from '@db';
44
import { FrameworkInstanceWithControls } from '../types';
55
import { ComplianceOverview } from './ComplianceOverview';
6-
import { DraggableCards } from './DraggableCards';
76
import { FindingsOverview } from './FindingsOverview';
87
import { FrameworksOverview } from './FrameworksOverview';
98
import { ToDoOverview } from './ToDoOverview';
@@ -84,7 +83,7 @@ export const Overview = ({
8483
});
8584

8685
return (
87-
<DraggableCards>
86+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
8887
<ComplianceOverview
8988
organizationId={organizationId}
9089
overallComplianceScore={overallComplianceScore}
@@ -119,7 +118,7 @@ export const Overview = ({
119118
onboardingTriggerJobId={onboardingTriggerJobId}
120119
/>
121120
<FindingsOverview findings={findings} organizationId={organizationId} />
122-
</DraggableCards>
121+
</div>
123122
);
124123
};
125124

apps/app/src/app/(app)/[orgId]/frameworks/components/SortableCard.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

apps/app/src/app/(app)/[orgId]/frameworks/hooks/useCardOrder.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

apps/app/src/app/(app)/[orgId]/security/penetration-tests/actions/billing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ export async function checkAndChargePentestBilling(orgId: string, runId: string)
206206
await requireOrgMember(orgId);
207207

208208
// Verify the run exists and belongs to this org to prevent arbitrary runId abuse.
209+
// runId here is the provider run ID (stored in providerRunId), not the internal ptr... key.
209210
const run = await db.securityPenetrationTestRun.findUnique({
210-
where: { id: runId },
211+
where: { providerRunId: runId },
211212
select: { organizationId: true },
212213
});
213214
if (!run || run.organizationId !== orgId) {

0 commit comments

Comments
 (0)