Skip to content

[comp] Production Deploy#2586

Merged
Marfuen merged 3 commits intoreleasefrom
main
Apr 17, 2026
Merged

[comp] Production Deploy#2586
Marfuen merged 3 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 17, 2026

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Moves heavy People data fetching to client hooks and adds a unified Findings tab; aligns Auditor View with the app layout and adds an evidence export. This improves navigation performance and simplifies people-scoped workflows.

  • New Features

    • Added a unified People Findings tab with a cross-area list and an in-form scope picker in CreateFindingSheet.
    • Added ExportEvidenceButton to Auditor View; header now uses PageLayout and PageHeader.
  • Refactors

    • Shifted device, fleet, and org chart queries to client SWR hooks (useAgentDevices, useFleetHosts, useOrgChart) backed by new API routes (/api/people/agent-devices, /api/people/fleet-hosts) with org-scoped keys.
    • Updated People tabs and linking (people findings now route to ?tab=findings); removed legacy per-scope findings components/tests and redundant auditor (overview)/layout; replaced custom sections with Section and Stack from @trycompai/design-system.
    • Fixed export popover hydration by using the Button render pattern; added loading and error states in Devices tab and a device-status skeleton in MemberRow; guarded host.mdm access in /api/people/fleet-hosts to prevent runtime errors.

Written for commit ca71fa8. Summary will update on new commits.

github-actions bot and others added 2 commits April 16, 2026 23:24
* perf(people): move heavy data fetches off the shared server page

The People page server component was re-running every expensive query
(Fleet API, S3 signed URL, device-agent + Fleet + org-chart queries) on
every tab click because `router.replace()` triggers a full re-render.
Strip page.tsx to just auth + the member query needed to decide whether
the Tasks tab shows, and push tab-specific data into client components
that fetch via SWR hooks. Also:

- Add Next.js API routes for agent devices and fleet hosts
  (`/api/people/agent-devices`, `/api/people/fleet-hosts`) so client
  hooks can call them.
- `DevicesTabContent`, `OrgChartTabContent`, and `TeamMembersClient`
  now use `useAgentDevices` / `useFleetHosts` / `useOrgChart`. SWR's
  shared cache means devices are fetched once across People + Devices
  tabs.
- Consolidate the four per-scope `PeopleFindings` sections into a
  single `Findings` tab with a unified list. `CreateFindingSheet`
  accepts `scopeOptions` so the picker lives inside the form.
- `FindingsOverview` now links people-scoped findings to
  `?tab=findings` since they no longer live on the per-area tabs.

Also align the auditor view with the rest of the app:

- Drop the redundant `(overview)/layout.tsx` wrapper (PageLayout
  already handles the container).
- Use `PageLayout header={<PageHeader>}` pattern from `/frameworks`.
- Extract `ExportEvidenceButton` and fix the nested `<button>`
  hydration error by styling PopoverTrigger directly (same pattern
  as `TasksPageClient`).
- Replace the custom `<Section>` with `@trycompai/design-system`
  `Section` + `Stack`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(people): address review feedback for SWR scoping, perf, and data correctness

Scope SWR keys by orgId to prevent stale cross-org data, pre-index
fleet policy results for O(1) lookups, batch Fleet API calls to limit
concurrency, validate both x/y in org chart positions, and filter
deactivated members from agent device queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Lewis Carhart <lewis@trycomp.ai>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Apr 17, 2026 6:23pm
comp-framework-editor Ready Ready Preview, Comment Apr 17, 2026 6:23pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Apr 17, 2026 6:23pm

Request Review

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 25 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/app/src/app/(app)/[orgId]/people/devices/components/DevicesTabContent.tsx">

<violation number="1" location="apps/app/src/app/(app)/[orgId]/people/devices/components/DevicesTabContent.tsx:15">
P2: Neither loading nor error states from the hooks are handled. `DeviceComplianceChart` renders unconditionally with empty arrays while data is still being fetched, which can flash a misleading zero-state chart. Consider destructuring `isLoading`/`error` and showing a loading indicator or error message.</violation>
</file>

<file name="apps/app/src/app/api/people/fleet-hosts/route.ts">

<violation number="1" location="apps/app/src/app/api/people/fleet-hosts/route.ts:96">
P1: Use optional chaining on `host.mdm` to avoid a runtime `TypeError` if the Fleet API returns a host without MDM data.</violation>
</file>

<file name="apps/app/src/app/(app)/[orgId]/auditor/(overview)/components/ExportEvidenceButton.tsx">

<violation number="1" location="apps/app/src/app/(app)/[orgId]/auditor/(overview)/components/ExportEvidenceButton.tsx:43">
P2: Use `PopoverTrigger asChild` with a `Button` instead of hand-rolling button styles. The design system already supports this pattern (e.g., `MultiRoleCombobox`), and these inline classes will drift from the actual `Button` component over time.</violation>
</file>

<file name="apps/app/src/app/(app)/[orgId]/people/all/components/TeamMembersClient.tsx">

<violation number="1" location="apps/app/src/app/(app)/[orgId]/people/all/components/TeamMembersClient.tsx:71">
P2: The `isLoading` state from both `useAgentDevices()` and `useFleetHosts()` is ignored. While data is loading, all members will briefly show a 'not-installed' device status because the `useMemo` runs on empty arrays. Consider either gating the table/device-status column on the loading state, or passing a loading indicator so `MemberRow` can show a skeleton/spinner for the device column.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread apps/app/src/app/api/people/fleet-hosts/route.ts Outdated
Comment thread apps/app/src/app/(app)/[orgId]/people/devices/components/DevicesTabContent.tsx Outdated
Comment thread apps/app/src/app/(app)/[orgId]/people/all/components/TeamMembersClient.tsx Outdated
)

- Guard host.mdm access in fleet-hosts route to avoid runtime TypeError
- Show loading/error states in DevicesTabContent so the compliance chart no longer flashes an empty-state while fetching
- Render a skeleton in the MemberRow device column while device data loads instead of defaulting to 'Not Installed'
- Replace hand-rolled button styles on PopoverTrigger with base-ui render pattern using Button

Co-authored-by: Lewis Carhart <lewis@Lewiss-MacBook-Air.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 5 files (changes from recent commits).

Requires human review: Auto-approval blocked by 4 unresolved issues from previous reviews.

@Marfuen Marfuen merged commit ad4af04 into release Apr 17, 2026
14 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.23.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants