oddsdk/odd-devtools

TRACKING: ODD Devtools browser extension

Opened this issue · 3 comments

bgins commented

The ODD Devtools extension provides developers a devtools panel with information for debugging their ODD applications.

It should display the following information:

  • ODD SDK version
  • App namespace
  • Username
  • Account DID
  • Agent DID
  • Event log (shows filesystem events for v1, more events in a future version)
  • Data root CID
  • Capabilities (what parts of WNFS does the app have access to)

The information should only be exposed when the developer has set debug to true when initializing an ODD program.

Milestone 0.1

Tasks

Dependencies

Milestone 0.2

No milestone

Once we get through Milestone 0.1 we should run the design past nicoth and other relatively engaged devs to get feedback.

Overall

Needs an instructional state "Webnative wasn't detected on this page. You have to set DEBUG to true."

Filesystem view

We'll start with an event log. Highest value starting point, and simpler to implement.

Concerns:

  • may not have whole tree
  • performance could be slow loading the whole tree

Extra credit metadata:

  • CID
  • Creation time
  • Arbitrary metadata input by dev

Questions Filesystem tree helps answer:

  • Was the file written or not?
  • Builds a mental model for the FS heirarchy
  • Event log would be helpful — maybe this is where we start
  • Replay the state of the tree across time — probably for a later release

Capabilities:

Show which resources this app has been granted access to via UCANs.

  • Which authentication strategy was used?
  • More importantly: is this an origin resource or a resource projected into this local file space via a capability
  • From whom was this resource requested? To prep for a future when more than just the auth lobby exists as an authorization provider

Okay, here's my pencil sketch:
image

And the disconnected state:
image

Right now the settings pane would probably not contain much, but I'm following the tab pattern that Vue Devtools uses because we'll expand beyond just the event log in the near future. Was considering tossing some of the more stable session / app data in that pane, but it feels like it would be more ergonomic to have it available in the payload pane next to the event data for ease of access.