Skip to content

Ep device enrollment - #1796

Merged
codenem merged 7 commits into
mainfrom
ep-device-enrollment
Aug 28, 2026
Merged

Ep device enrollment#1796
codenem merged 7 commits into
mainfrom
ep-device-enrollment

Conversation

@codenem

@codenem codenem commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

The home query owned every card field, so adding
devices would keep growing it. Each card now
declares its own fragment; the page only spreads
them and keeps the counts that drive layout.

Signed-off-by: Émile Ré <emile@probo.com>
The homepage already linked to /devices/register, which
404'd. This ships the three-step flow so employees can
review collected data, download the agent, and finish
enrollment from the portal.

Signed-off-by: Émile Ré <emile@probo.com>
The 4-column grid made the stepper narrower
than the 244px Progress Step, and Card padding
5 was 32px against Figma's 64px. Keep the
shared max-w-5xl column so the page lines up
with signatures and approvals.

Signed-off-by: Émile Ré <emile@probo.com>

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 23 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/employee-portal/src/pages/HomePage.tsx">

<violation number="1" location="apps/employee-portal/src/pages/HomePage.tsx:126">
P2: When an employee has more than 20 devices, this card can miss an active device outside the first page and show the disconnected state. Use a server-side existence/count query or otherwise fetch all relevant devices before offering enrollment.</violation>
</file>

<file name="apps/employee-portal/src/pages/devices/_components/DownloadStep.tsx">

<violation number="1" location="apps/employee-portal/src/pages/devices/_components/DownloadStep.tsx:66">
P2: On narrow mobile viewports, the download rows exceed the card body and the list clips their controls. Make the rows responsive below the small breakpoint by reducing fixed spacing and/or stacking the metadata and download action.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread apps/employee-portal/src/pages/devices/RegisterDevicePage.tsx Outdated
Comment thread apps/employee-portal/src/pages/_components/DeviceCard.tsx
Comment thread apps/employee-portal/src/pages/devices/_components/ProgressStep.tsx Outdated
Comment thread apps/employee-portal/src/pages/devices/RegisterDevicePage.tsx Outdated
Comment thread apps/employee-portal/src/pages/HomePage.tsx
Comment thread apps/employee-portal/src/pages/devices/_components/DownloadStep.tsx
Comment thread apps/employee-portal/src/pages/devices/_lib/useEnrollDevice.ts
Comment thread apps/employee-portal/src/pages/devices/_components/RegisterDeviceCard.tsx Outdated
Comment thread apps/employee-portal/src/pages/devices/routes.ts
Comment thread apps/employee-portal/src/pages/devices/_lib/useEnrollDevice.ts
Employees can inspect enrolled machines and start registration
from /devices. The row layout follows Figma: hostname on the
left, last-active/OS/status clustered on the right.

Signed-off-by: Émile Ré <emile@probo.com>

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 14 files (changes from recent commits).

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/employee-portal/src/pages/_components/PageHeader.tsx">

<violation number="1" location="apps/employee-portal/src/pages/_components/PageHeader.tsx:62">
P3: The new `crumb` slot sets `text-sand-a11`, but the Link still passes `color="neutral"`, which emits `text-sand-11 hover:text-sand-12`. Two `color` utilities with equal specificity race on the same node, so the generated stylesheet order (not intent) decides the breadcrumb color. Drop the redundant link color by not passing `color="neutral"` (or removing the color from the crumb slot) so the two breadcrumbs render consistently.</violation>

<violation number="2" location="apps/employee-portal/src/pages/_components/PageHeader.tsx:71">
P2: On narrow viewports, the new title row cannot wrap the non-shrinking action button, so the device list header overflows horizontally. Allow the title row to wrap when the heading and action do not fit.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/employee-portal/src/pages/_components/PageHeader.tsx
Comment thread apps/employee-portal/src/pages/devices/_components/DeviceListItem.tsx Outdated
Comment thread apps/employee-portal/src/pages/_components/PageHeader.tsx
The list and empty state had no destination for
Add manually. Employees need a one-time token
and CLI instructions without the agent wizard.

Signed-off-by: Émile Ré <emile@probo.com>
Stepping back in the wizard dropped the in-flight
enrollment. The rest of the comments were a11y,
timeout, and header overflow gaps.

Signed-off-by: Émile Ré <emile@probo.com>

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

4 issues found across 21 files (changes from recent commits).

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/employee-portal/src/pages/devices/_components/CopyableCodeBlock.tsx">

<violation number="1" location="apps/employee-portal/src/pages/devices/_components/CopyableCodeBlock.tsx:40">
P2: When the portal runs in an insecure context or an unsupported embedded browser, `navigator.clipboard` is unavailable and this access throws before the failure toast is registered. Guard the API and catch synchronous `writeText` failures before showing the existing error toast.</violation>
</file>

<file name="apps/employee-portal/src/pages/devices/_components/OpenAgentStep.tsx">

<violation number="1" location="apps/employee-portal/src/pages/devices/_components/OpenAgentStep.tsx:128">
P3: When the enrollDevice mutation fails, the shared useMutation hook already shows an error toast (errorToast defaults to true), and the new `failed` state renders an inline `enroll.failed` message, so the user sees duplicate error feedback. Pass `errorToast: false` on the mutation (and rely on the inline message) or drop the inline message.</violation>
</file>

<file name="apps/employee-portal/src/pages/devices/_lib/useEnrollDeviceManually.ts">

<violation number="1" location="apps/employee-portal/src/pages/devices/_lib/useEnrollDeviceManually.ts:50">
P3: When the enrollDevice mutation fails, the shared useMutation notifier shows a global error toast on top of the inline ErrorState that AddManuallyPage already renders. Since the hook handles failure itself via catch/setFailed, disable the automatic error toast with `errorToast: false` to avoid duplicate error messaging.</violation>
</file>

<file name="apps/employee-portal/src/pages/devices/_components/EnrollmentInstructions.tsx">

<violation number="1" location="apps/employee-portal/src/pages/devices/_components/EnrollmentInstructions.tsx:37">
P2: When an operator follows either manual-install tab, the commands install an unverified release archive with elevated privileges. Verify the release checksum or signature before installation, not only during later self-updates.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread apps/employee-portal/src/pages/devices/_components/CopyableCodeBlock.tsx Outdated
Clipboard write threw in insecure contexts before the
failure toast. Enrollment mutations also stacked a global
error toast on the inline failed state.

Guard writeText and skip the automatic toast when the
hook already surfaces failure inline.

Signed-off-by: Émile Ré <emile@probo.com>
@codenem
codenem merged commit 80c78f4 into main Aug 28, 2026
18 checks passed
@codenem
codenem deleted the ep-device-enrollment branch August 28, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant