Skip to content

Conversation

SgtPooki
Copy link
Member

@SgtPooki SgtPooki commented Jul 28, 2025

Adds diagnostics screen to the webui.

The page has tabs support, but only the logs tab is implemented currently.

  • Add expandable log viewer window with icon
  • Add pause/resume button when in that view
  • fix mobile view for log viewer
  • Fix IPFSConnected functionality when node shuts down while viewing diagnostics screen
  • Fix forward ref error in console (see comment)

Related ipfs/go-log#160
Related ipfs/kubo#10885
Fixes #1925
DependsOn #2388
DependsOn #2396

With unsupported kubo versions:

image

Main view

image

Demo

2025-09-02.at.19.16.08.-.Salmon.Cheetah.webm

@SgtPooki SgtPooki changed the base branch from main to feat/connect-provider July 28, 2025 19:41
@SgtPooki SgtPooki force-pushed the feat/diagnostics-screen branch from 2d2e976 to 6e04400 Compare July 28, 2025 19:45
@SgtPooki
Copy link
Member Author

latest changes using tooltip causes issue:

hook.js:608 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of `Tooltip`.
    in SvgGlyphMoveDown (at log-viewer.tsx:101)
    in div (at Tooltip.tsx:43)
    in div (at Tooltip.tsx:42)

@SgtPooki SgtPooki marked this pull request as ready for review September 2, 2025 23:08
@SgtPooki SgtPooki requested a review from a team as a code owner September 2, 2025 23:08
@SgtPooki
Copy link
Member Author

SgtPooki commented Sep 2, 2025

I have completed the logs screen changes and pushed them all, though there are several additional improvements I wanted to get to that I didn't..

  • Currently, the system can handle around 200 logs per second (lps) quite comfortably and can manage spikes of up to 500 lps. I have set the default limit to 100 lps, which will show a warning when reached, and 500 lps will trigger an auto-disable feature.
  • log streaming logic -- I wanted to tighten the logic between getting the stream of logs, adding to indexedDB, and rendering to the UI.. so that we're always rendering from indexedDB, (with a buffered/delayed stream) but I think it's sufficient now until someone gets the urge to improve it
  • I wanted to create a download logs button so folks could export the full indexedDB content.. but that would require a much larger amount of changes.

I added a bunch of unit tests and other functions.. hopefully it's self documenting enough. The useBatchProcessor and reducer logic is a little wonky, but folks should be able to follow most pipelines easily enough.

I am currently rendering a demo video, which I will upload to the PR description.

Please let me know if you have any feedback. Also, be sure to check out the mobile view!

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.

Feature: Diagnostics view
1 participant