Ep device enrollment - #1796
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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
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>
Contributor
There was a problem hiding this comment.
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
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>
Contributor
There was a problem hiding this comment.
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.