Skip to content

feat(tvOS): engine logs, Troubleshoot upload, and in-app Debug Log viewer - #193

Open
CicerBro wants to merge 2 commits into
netbirdio:mainfrom
CicerBro:pr/tvos-engine-logs
Open

feat(tvOS): engine logs, Troubleshoot upload, and in-app Debug Log viewer#193
CicerBro wants to merge 2 commits into
netbirdio:mainfrom
CicerBro:pr/tvos-engine-logs

Conversation

@CicerBro

@CicerBro CicerBro commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Merge order (🚨important!)

Merge this PR last. It depends on the writable-paths and login/connect PRs in this series (shared Preferences / extension / settings files). Please merge those first:

Opening this against main before those land will conflict or look incomplete.

What this fixes

tvOS had no practical way to collect or inspect engine logs.

  1. Logging + support bundles — The extension could not write Trace Logging to the App Group container, and Troubleshoot had no debug-bundle upload path comparable to iOS.
  2. In-app viewing / control — Settings had no toggle for engine file logging, and there was no Siri Remote–friendly way to read extension logs on the device.

Change

  • Use a writable caches log path, wire Trace Logging through the extension client, and add tvOS Troubleshoot debug-bundle upload.
  • Add an Engine Logs toggle, a GetLog IPC, and a focusable chunk-based Debug Log viewer.

Wire Trace Logging into the extension with a writable log path, and
add Troubleshoot upload parity with iOS so support can collect bundles.
Add an on/off switch for engine log file output, GetLog IPC, and a
focusable chunk-based log viewer so the Siri Remote can scroll logs.
Copilot AI lite review requested due to automatic review settings August 10, 2026 19:48
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@CicerBro, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c73f9a6-17f7-46f7-96dd-e730b973887a

📥 Commits

Reviewing files that changed from the base of the PR and between 5e68621 and acf011b.

📒 Files selected for processing (7)
  • NetBird/Source/App/ViewModels/MainViewModel.swift
  • NetBird/Source/App/Views/TV/TVSettingsView.swift
  • NetBirdTVNetworkExtension/PacketTunnelProvider.swift
  • NetbirdKit/AppLogger.swift
  • NetbirdKit/NetworkExtensionAdapter.swift
  • NetbirdKit/Preferences.swift
  • NetbirdNetworkExtension/NetBirdAdapter.swift

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds tvOS support for collecting, uploading, and viewing NetBird engine logs by routing Go Trace Logging to a writable cache location, exposing log/debug-bundle IPC endpoints from the network extension, and adding a remote-friendly in-app Debug Log viewer in tvOS Settings.

Changes:

  • Add tvOS engine log file output control and a chunked, focusable Debug Log viewer UI.
  • Add IPC support for fetching the extension log tail (GetLog) and generating/uploading debug bundles (DebugBundle:*).
  • Update log path handling to use a writable caches location on tvOS and pass that into the Go SDK client initialization.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
NetBirdTVNetworkExtension/PacketTunnelProvider.swift Initializes Go logging to a writable tvOS path; adds IPC handlers for debug bundle upload and log tail retrieval.
NetbirdNetworkExtension/NetBirdAdapter.swift Passes a writable log file path to the Go SDK client on tvOS so trace logging/debug bundles work.
NetbirdKit/Preferences.swift Makes logFilePath() return a tvOS caches-based path (instead of app group container).
NetbirdKit/NetworkExtensionAdapter.swift Sends engineLogsEnabled as a start option and adds an app-side IPC helper to fetch log tail text.
NetbirdKit/AppLogger.swift Allows tvOS to locate a Go log file via Preferences.logFilePath() when present.
NetBird/Source/App/Views/TV/TVSettingsView.swift Adds Troubleshoot section with engine logs toggle, debug bundle upload UI, and full-screen Debug Log viewer.
NetBird/Source/App/ViewModels/MainViewModel.swift Adds persisted engine logs toggle, tvOS debug log text state, and tvOS debug bundle fallback behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread NetBirdTVNetworkExtension/PacketTunnelProvider.swift
@CicerBro

Copy link
Copy Markdown
Contributor Author

Do notice the original PR notes up top. Merge this after the other PRs :-)

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.

3 participants