main
md 48 lines 2.55 KB
Rendered Raw
1 # WebUI Extensions DOX
2
3 ## Purpose
4
5 - Own built-in frontend extension contributions under `extensions/webui/`.
6 - Keep WebUI extension points compatible with the core loader and plugin extension model.
7
8 ## Ownership
9
10 - Each direct subdirectory is one frontend extension point.
11 - `.html` files are injected as component references through `<x-extension>`.
12 - `.js` and `.mjs` files export default functions called by `callJsExtensions`.
13
14 ## Local Contracts
15
16 - HTML contributions must be valid component fragments and include Alpine state only where needed.
17 - JavaScript extension modules must export a default function.
18 - Extension code must not assume a plugin is installed unless it guards that dependency.
19 - Keep extension point names synchronized with `x-extension` IDs and `callJsExtensions()` callers.
20
21 ## Work Guidance
22
23 - Prefer small extension modules that delegate to existing WebUI stores or helpers.
24 - Use the notification store for user-facing success, warning, or error feedback.
25 - Avoid global DOM queries when an extension hook provides scoped nodes or context.
26
27 ## Verification
28
29 - Manually load the WebUI or run targeted frontend/WebUI tests after changing visible extension behavior.
30 - Verify extension cache clearing paths when adding new extension points.
31
32 ## Child DOX Index
33
34 Direct child DOX files:
35
36 | Child | Scope |
37 | --- | --- |
38 | [fetch_api_call_after/AGENTS.md](fetch_api_call_after/AGENTS.md) | Frontend hooks after raw `fetchApi()` calls. |
39 | [fetch_api_call_before/AGENTS.md](fetch_api_call_before/AGENTS.md) | Frontend hooks before raw `fetchApi()` calls. |
40 | [get_message_handler/AGENTS.md](get_message_handler/AGENTS.md) | Message rendering handler extensions. |
41 | [initFw_end/AGENTS.md](initFw_end/AGENTS.md) | Post-WebUI-framework-initialization extensions. |
42 | [json_api_call_after/AGENTS.md](json_api_call_after/AGENTS.md) | Frontend hooks after `callJsonApi()` calls. |
43 | [json_api_call_before/AGENTS.md](json_api_call_before/AGENTS.md) | Frontend hooks before `callJsonApi()` calls. |
44 | [right-canvas-panels/AGENTS.md](right-canvas-panels/AGENTS.md) | Built-in right-canvas panel HTML contributions. |
45 | [right_canvas_register_surfaces/AGENTS.md](right_canvas_register_surfaces/AGENTS.md) | Built-in right-canvas surface registrations. |
46 | [set_messages_after_loop/AGENTS.md](set_messages_after_loop/AGENTS.md) | Frontend hooks after message DOM updates. |
47 | [set_messages_before_loop/AGENTS.md](set_messages_before_loop/AGENTS.md) | Frontend hooks before message DOM updates. |
48 | [webui_ws_push/AGENTS.md](webui_ws_push/AGENTS.md) | WebUI WebSocket push-event behavior. |