Skip to content

Conversation

@ChayanDass
Copy link

@ChayanDass ChayanDass commented Jan 18, 2026

#2459

Summary

This PR adds a new DHT Provide diagnostics screen to the IPFS WebUI, providing a graphical view of
ipfs provide stat data for the DHT Sweep provider (enabled by default in Kubo v0.39+).

The screen gives node operators a clear overview of:

  • Reprovide cycle progress
  • Current batch and queue status
  • Worker utilization
  • Network health and throughput
  • Capacity warnings

This makes it possible to monitor DHT provide health without relying on the CLI.


Key Features

  • New Diagnostics → DHT Provide screen
  • Visualize cycle progress with ETA
  • Current batch and queue metrics
  • Worker utilization (periodic vs on-demand)
  • Network connectivity and success rate
  • Auto-refresh (60s) with manual refresh
  • Graceful handling of unsupported Kubo versions
  • UI built using reusable Card components (WebUI style)

Screenshots

Initial DHT Provide Screen

Screenshot from 2026-01-20 15-17-30

Technical Details

Data Source

  • RPC endpoint: POST /api/v0/provide/stat
  • Accessed via ipfs.provide.stat() through context (ProvideProvider)

Architecture

  • New ProvideStat context for data fetching and refresh lifecycle
  • UI composed of small, focused components:
    • ReprovideCycle
    • CurrentBatch
    • QueueStatus
    • Workers
    • Network
  • Uses local Card primitives

next

  • More detailed warnings and recommendations
  • Tooltips for metrics
  • Historical trend visualization

Checklist

  • UI follows existing WebUI conventions
  • No breaking changes
  • Handles unsupported Kubo versions
  • Screenshots included

Signed-off-by: Chayan Das <01chayandas@gmail.com>
@ChayanDass ChayanDass requested a review from a team as a code owner January 18, 2026 20:22
@welcome
Copy link

welcome bot commented Jan 18, 2026

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

@ChayanDass ChayanDass marked this pull request as draft January 18, 2026 20:23
Signed-off-by: Chayan Das <01chayandas@gmail.com>
@ChayanDass
Copy link
Author

HI @lidel, could you confirm the UI design?

Signed-off-by: Chayan Das <01chayandas@gmail.com>
@lidel lidel mentioned this pull request Jan 23, 2026
56 tasks
lidel added 10 commits January 23, 2026 20:04
- use teal uppercase card titles (ttu tracked f6 fw4)
- replace help tooltips with muted GlyphInfo icons
- add muted opacity to progress bars
- hide TourHelper on diagnostics pages
- add className prop to IconTooltip component
- prevent uppercase text in tooltips with ttn class
reorganize cards to match `ipfs provide stat -a --compact`:
- rename cards: Connectivity, Queues, Schedule, Operations, Network, Workers
- update labels to match CLI terminology (Peers swept, Avg record holders, etc.)
- remove Timings card, redistribute content to Connectivity and Schedule
- group Operations by temporal flow (live stats, then cumulative)
- add visual separators for logical grouping in Workers and Operations
- Schedule: inline last cycle count, add reprovide interval, compact progress
- extract shared formatting utilities to format-utils.ts
replace page title with short description explaining this is a visual
summary, linking to `ipfs provide stat` command documentation
- add null/undefined checks with optional chaining across all components
- extract shared formatting utilities to format-utils.ts with safe defaults
- improve Workers tooltip to explain periodic vs burst worker types
…ndicator

- rename region_reprovide_duration to reprovide_duration
- add Accelerated DHT client (FullRT) indicator to Network card
includes provide API support for DHT provide stats
- use i18n.language instead of browser locale for Intl.NumberFormat
- add formatInteger helper for thousand separators
- update all components to use locale-aware formatting
@lidel lidel marked this pull request as ready for review January 23, 2026 23:36
storybook doesn't resolve the src/ path alias from tsconfig
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thanks @Chayandas07 for putting this together!

The foundations you built were solid (kubo-rpc-client v6.1 includes support for ipfs.provide.stat) + the GUI here did not require significant changes 👍

I pushed some follow-up commits to adjust the presentation and fix a few papercuts:

  • Made the page robust to potential breaking API changes (defensive null handling)
  • Wired up translations and locale-specific number formatting
  • Aligned labels with ipfs provide stat CLI output
  • Added links to configuration and metric documentation
  • Minor UI polish (tooltips, layout tweaks)

This is a great addition to the webui and if there are no concerns during review, we're excited to ship it with Kubo 0.40 in a few weeks!

@guillaumemichel could you do a quick sanity check on the layout and labels? We can always move things around later, but want to catch any awkward phrasing before release.

UI Preview

In the middle of schedule

2026-01-24_00-15

After reboot

2026-01-24_00-46

@lidel lidel changed the title feat(provide_stat): add new page for provide stat feat: DHT Provide Sweep Diagnostic Screen Jan 23, 2026
@lidel lidel force-pushed the feat/provide-stat branch from 67297f8 to c54aaab Compare January 24, 2026 05:23
- add e2e tests for the DHT provide diagnostic screen
- fix global-setup.js to use page.evaluate instead of addInitScript
  (addInitScript registers for future page loads, so localStorage values
  were not captured by storageState before browser closed)
- enable DHT in test backend: Routing.Type=autoclient, Provide.Strategy=pinned+mfs
- bump kubo dependency to 0.39.0 (required for provide stats API)
- add 10 minute timeout to e2e workflow
- remove --repeat-each 10 from e2e workflow (no longer needed)
@lidel lidel force-pushed the feat/provide-stat branch from c54aaab to 511ec39 Compare January 24, 2026 05:55
- grid-view: add focusGrid() helper that tries multiple approaches
  to establish keyboard focus before tests
- grid-view: reload page after creating test folder to ensure clean state
- grid helper: wait for files view before checking mode in selectViewMode()
- files: only verify uploaded files, not all MFS contents (avoids
  test pollution from parallel runs)
without this, Kubo tries to connect to bootstrap peers which hangs
on CI where network access may be restricted
- add timeout wrappers to kubo spawn (30s) and setup (60s)
- add logging to global-setup and ipfs-backend for debugging
- remove all process.env.CI checks from playwright config
- add globalTimeout (5min) to catch runaway test suites
- use --reporter=list in CI for better output
@lidel
Copy link
Member

lidel commented Jan 24, 2026

CI is broken for reasons unrelated to this PR.
I'm fixing that in #2466, will rebase this PR once that one is done.

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.

2 participants