Page MenuHomePhabricator

Provide more advanced tools for developing against Phabricator and discovering PHIDs
Open, NormalPublic


See PHI699. An install is interested in easier access to developer-facing information like object PHIDs.

I don't want to implement this as weird undiscoverable stuff ("++D opens the secret debug menu") or clutter up the UI for everyone (since most users definitely don't care about this), but I think we can find a middle ground like this:

  • Add a "Show Developer Tools" setting next to the existing "DarkConsole" setting in SettingsDeveloper Settings.
    • Note that this panel is currently only visible if darkconsole.enabled is on in Config. I think the rule that disables it is just "panels don't show up if they have no content", not special casing.
  • "Show Developer Tools" has "Show", "Hide", or "Use Default (Hide)" options, as one might expect. Although enabling them globally is probably unusual for a legitimate production install, making this a global setting allows you to enable them globally in development, so you can use them as a logged-out user.
  • When a user enables the developer tools, enable new options in the UI.

Specific new options which I think would be nice:

  • Add a "Developer View" link to object curtains, using infrastructure similar to Subscriptions/Tokens. This should take you to a page which shows the PHID and other data for the object. One approach for fleshing this data out (beyond basics like PHID) might be to let objects define their *.search method, then just call that and show the data on the page. We could make this flexible and extend it as use cases arise.
  • We should NOT dump raw edges onto this page. It's okay to for every edge type and show anything that returns, but we should not dump the raw table since that may have policy problems.
  • On query pages, add a "View as API call..." option, similar to the existing "Add to Dashboard" and "Export Data" options. This should take you to a Conduit result page for the query. Ideally, the result page should parameterize all the constraints in the query (i.e., issue it as authors=x&statuses=y) but this may be impractically difficult; if so, the result page could reference the query directly (issue it as query=Avn32nQM).

Another nice thing might be to automatically link PHIDs in Conduit web UI results (Always? Only if this is enabled?), so the PHID goes to the "Developer View" page for the object and you can use Conduit + Developer View to explore/browse stuff to a greater degree.

Event Timeline

epriestley triaged this task as Normal priority.Jun 21 2018, 2:26 PM
epriestley created this task.

Maybe something like this gorgeous mock which I only spilled a little water on:

developer_mock.jpg (750×1 px, 138 KB)

To the issue in PHI699 in particular -- finding workboard column PHIDs -- a "Developer View" in the workboard "Manage" menu to take you to the project developer view, plus a "Workboards" section or EngineExtension would probably fit the bill.

avivey added a subscriber: avivey.

I have P2080 and P2081 for this :)

Ah, nice. Yeah, P2080 looks pretty much like the start of what I'm thinking here.

I've historically been uneasy about things in the vein of P2081, but practically bin/auth recover <username> does the same thing nowadays (and I'm probably going to give it an --and-bypass-mfa flag soon, too -- but also a --temporary flag, maybe?) so there's not much of a real distinction.

Also, when you global-search for an object PHID, we should maybe start taking you to the developer view instead of the main object page.