Skip to content

Add Frontend Support for Peer Debug Bundle Trigger and History#485

Merged
heisbrot merged 6 commits intonetbirdio:mainfrom
aliamerj:job-ui
Jan 20, 2026
Merged

Add Frontend Support for Peer Debug Bundle Trigger and History#485
heisbrot merged 6 commits intonetbirdio:mainfrom
aliamerj:job-ui

Conversation

@aliamerj
Copy link
Copy Markdown
Contributor

@aliamerj aliamerj commented Aug 25, 2025

This PR completes the frontend implementation for the Debug Bundle feature, allowing administrators and owners to remotely trigger debug jobs from the dashboard instead of relying on CLI commands.
issues netbirdio/netbird#4354
related PR
netbirdio/netbird#4367
netbirdio/netbird#4418
netbirdio/netbird#4428

10.1.mp4

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Remote Jobs tab to peer management for creating and monitoring debug jobs.
    • Debug jobs now include configurable parameters: log file count, anonymization, and bundle duration settings.
    • New job details table displays job status, type, creation time, completion time, parameters, and output results.

✏️ Tip: You can customize this high-level summary in your review settings.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 25, 2025

CLA assistant check
All committers have signed the CLA.

Comment thread src/modules/peer/PeerRemoteJobsTable.tsx Outdated
Comment thread src/interfaces/Job.ts Outdated
Comment thread src/app/(dashboard)/peer/page.tsx Outdated
Comment thread src/modules/peer/PeerRemoteJobsTable.tsx Outdated
Comment thread src/modules/peer/PeerRemoteJobsTable.tsx Outdated
Comment thread src/modules/peer/PeerRemoteJobsTable.tsx Outdated
Comment thread src/modules/jobs/CreateDebugJobModal.tsx Outdated
Comment thread src/modules/jobs/CreateDebugJobModal.tsx Outdated
Comment thread src/modules/peer/PeerRemoteJobsTable.tsx Outdated
Comment thread src/modules/peer/RemoteJobDropdownButton.tsx
@aliamerj
Copy link
Copy Markdown
Contributor Author

aliamerj commented Sep 3, 2025

I removed the disable button when the peer is not connected because the API already returns a 400 error in that case. Handling it this way is safer since it prevents users from triggering an invalid action in the first place.

For jobs, the idea is that we’ll eventually support multiple job types, each with different result and params. Right now we can keep it result like this or create a dedicated component for each job type’s result so we can customize the display more easily.

… for upload key, show error reason in tooltip
@heisbrot
Copy link
Copy Markdown
Contributor

LGTM

Have adjusted some ui things and added a tooltip when peer is not connected.
Better to show directly that its not possible to run remote jobs instead of letting the user find out.

CleanShot 2025-09-24 at 17 07 32 CleanShot 2025-09-24 at 17 08 45

heisbrot
heisbrot previously approved these changes Sep 24, 2025
heisbrot
heisbrot previously approved these changes Jan 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 20, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR introduces a Remote Jobs feature for peers, enabling users to create and manage debug bundle jobs. It adds job-related TypeScript interfaces, a modal for job creation, table components for displaying job details, and integrates everything into the peer detail page under a new "Remote Jobs" tab.

Changes

Cohort / File(s) Summary
Core Data Models
src/interfaces/Job.ts
Introduces Job, Workload, and BundleJobParameters interfaces to model remote job metadata, including status tracking, workload configuration, and bundle job parameters (anonymize, bundle_for, bundle_for_time, log_file_count).
Peer Page Integration
src/app/(dashboard)/peer/page.tsx, src/modules/peer/PeerRemoteJobsSection.tsx, src/modules/peer/RemoteJobDropdownButton.tsx
Wires Remote Jobs feature into peer detail page via new tab trigger and content rendering. Section component fetches jobs and renders lazy-loaded table with Suspense. Dropdown button provides access to debug job creation modal, gated by peer connection status and delete permissions.
Job Management UI
src/modules/jobs/CreateDebugJobModal.tsx, src/modules/jobs/table/JobTypeCell.tsx, src/modules/jobs/table/JobStatusCell.tsx, src/modules/jobs/table/JobParametersCell.tsx, src/modules/jobs/table/JobOutputCell.tsx, src/modules/jobs/table/PeerRemoteJobsTable.tsx
Provides complete job creation and display workflow: modal for configurable debug bundle creation with validation, table columns for type/status/parameters/output display, and full DataTable with sorting, pagination, and cache invalidation on refresh.
Shared Components
src/components/TooltipListItem.tsx
New reusable component for two-column list items with optional icons, used by job parameters tooltip display.
Activity Tracking
src/modules/activity/ActivityDescription.tsx
Adds handler for "peer.job.create" activity events to render job creation descriptions in activity logs.
Minor Updates
src/modules/peer/AddRouteDropdownButton.tsx
Adds size="small" prop to SquareIcon usages for visual consistency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • mlsmaycon

Poem

🐰 A warren of jobs now takes flight,
Debug bundles bundled just right,
Parameters dance, outputs glow,
Peer jobs steal the dashboard show! ✨

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@heisbrot heisbrot merged commit 3a30f76 into netbirdio:main Jan 20, 2026
2 of 4 checks passed
This was referenced Jan 24, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Feb 12, 2026
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.

4 participants