Skip to content

ui: implement support for server extensions#4192

Merged
LalitMaganti merged 69 commits intomainfrom
dev/lalitm/server-extensions
Jan 13, 2026
Merged

ui: implement support for server extensions#4192
LalitMaganti merged 69 commits intomainfrom
dev/lalitm/server-extensions

Conversation

@LalitMaganti
Copy link
Member

This is an initial implementaton of RFC-0005
(#3227).

@LalitMaganti LalitMaganti requested a review from a team as a code owner December 27, 2025 02:12
@LalitMaganti LalitMaganti marked this pull request as draft December 27, 2025 02:12
Copy link
Member

@primiano primiano left a comment

Choose a reason for hiding this comment

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

I left some comments. overall LG with few minor comments here and there.
to me the biggest blocker part that needs to be figured out is the interaction between core and this.
my theory is that this cannot be a pure extension (sorry for the pun). the core needs to know "something" about dynamically loadable extensions.
What I don't like is the fragile dance, where this extension loads, and then injects stuff into core, and then some other code needs to carefully await that. it's very very brittle.

I don't have a fully fledged proposal on top off my head, but let's discuss more tomorrow (book some time, steve should be also around).

In my mind the core needs to know, at least in part, of server extensions.
At least part of that types.json imho should be in core.
I don't think core needs to know about how to fetch stuff (Which can be delegated to a plugin like you did).
But in my mind core needs to know at least that "some plugins can provide server extensions, and when you need stuff like sql modules or descriptors, the core needs to query them"

This is the problem I see:

  • Some of the stuff that a server offers, in theory is push-only, e.g. macros which could be injected at any time.
    -I say in "theory" because in reality we are better off ensuring that they are registered very early on. because somebody might end up triggering a macro early on (can they do progammatically) and being confused about the fact it's not there (unless we say macros for now can only be invoked via user action)
  • some other stuff instead is "pull": for instance sql modules. there is a precise point in time, i believe, when core initializes TP, where all the modules MUST have been gathered. same for proto descriptors (maybe?)

this is what needs to be defined.
If there is something that is a "pull at a specific point in time (e.g. while initializing TP)" core must know about that concept, and the dependency needs to be handled with something like "your plugin when initializes sets something into core like registerSqlModuleProvider(...)"

the only question I have is whether over time we'll end up promoting 80% of the extensions bits to the core, at which point we are better off promoting the whole extension thing right now?

this is the biggest open question i have: some part of this MUST be promoted to core: how much ?

This CL changes the CSP such that it allows all https: fetches.
This has a very nice property of allowing url= to now work for any
publicly accessible https trace which can be fetched via a GET call.

Also update the documentation to match.
This refactors the legacy "is_internal_user" script to be an
implementation of the first type of "server extension" (i.e. data which
can be loaded from a server separate to the UI). This allows for a
smoother implementation of RFC-0005 when we do proper server extensions.
@LalitMaganti LalitMaganti force-pushed the dev/lalitm/server-extensions branch 2 times, most recently from f1f7487 to 54662a3 Compare January 8, 2026 00:31
@LalitMaganti LalitMaganti changed the base branch from main to dev/lalitm/extension-1 January 8, 2026 00:33
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🎨 Perfetto UI Build

✅ UI build is ready: https://storage.googleapis.com/perfetto-ci-artifacts/gh-20962825552-1-ui/ui/index.html

@LalitMaganti LalitMaganti force-pushed the dev/lalitm/server-extensions branch from 54662a3 to 31e4eb9 Compare January 8, 2026 01:11
@LalitMaganti LalitMaganti changed the title [WIP] ui: implement UI server extension ui: implement UI server extension Jan 8, 2026
@LalitMaganti LalitMaganti marked this pull request as ready for review January 8, 2026 01:12
@LalitMaganti LalitMaganti changed the title ui: implement UI server extension ui: implement support for UI server extensions Jan 8, 2026
@LalitMaganti LalitMaganti changed the title ui: implement support for UI server extensions ui: implement support for server extensions Jan 8, 2026
@LalitMaganti
Copy link
Member Author

PTAL. There is a very interesting design question left about how we correctly namespace these things remaining but the code itself should now be in a much much better state.

@LalitMaganti LalitMaganti force-pushed the dev/lalitm/server-extensions branch 2 times, most recently from c6ab4fe to cf56c32 Compare January 8, 2026 01:36
@LalitMaganti LalitMaganti force-pushed the dev/lalitm/server-extensions branch from cf56c32 to 09d9600 Compare January 8, 2026 02:43
@LalitMaganti LalitMaganti requested a review from a team as a code owner January 8, 2026 17:34
Copy link
Member

@primiano primiano left a comment

Choose a reason for hiding this comment

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

LGTM % the comment on the modal.

@primiano
Copy link
Member

Sorry as discusse offline ignore my last comment on section.ts. I tought you were doing that in Modal.ts which is special as it isn't caled on every render function.
what you were doing (passing just children) was enough, as widgets are called on every render pass

Base automatically changed from dev/lalitm/setting to main January 13, 2026 15:40
@LalitMaganti LalitMaganti enabled auto-merge (squash) January 13, 2026 15:41
@LalitMaganti LalitMaganti merged commit 5bf8bcb into main Jan 13, 2026
18 checks passed
@LalitMaganti LalitMaganti deleted the dev/lalitm/server-extensions branch January 13, 2026 15:52
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