> For the complete documentation index, see [llms.txt](https://vibemx.gitbook.io/neuronai-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vibemx.gitbook.io/neuronai-studio/extending/contributing-to-studio-ui.md).

# Contributing to Studio UI

Guide for developers modifying the React frontend bundles in NeuronAI Studio.

## Prerequisites

* Node.js 18+
* npm
* Local demo app or path repository setup

See [Demo App](/neuronai-studio/getting-started/demo-app.md).

## Development workflow

```bash
# From package root
npm install
npm run dev    # watch mode
# or
npm run build  # production build

# Publish to demo app public directory
php artisan vendor:publish --tag=neuronai-studio-assets --force
```

Refresh the browser after each build.

## Bundle map

| Directory                     | Bundle                      | Livewire host                      |
| ----------------------------- | --------------------------- | ---------------------------------- |
| `resources/js/studio-canvas/` | `workflow-canvas.bundle.js` | `Workflows/Editor`                 |
| `resources/js/studio-chat/`   | `studio-chat.bundle.js`     | `Agents/Playground`, workflow test |
| `resources/js/studio-forms/`  | `studio-forms.bundle.js`    | `Agents/Edit`, `Tools/Edit`        |
| `resources/js/studio-traces/` | (separate)                  | `Workflows/TraceDetail`            |

## Livewire bridge

React components call Livewire methods:

```javascript
window.Livewire.find(componentId).call('saveGraph', graphJson);
```

When adding new UI features, ensure corresponding Livewire component methods exist on the PHP side.

## Code style

* Match existing React patterns (functional components, hooks)
* Keep bundles isolated — avoid cross-imports between canvas/chat/forms unless necessary
* CSS lives in bundle-specific files (`canvas.css`, etc.) plus global `studio-ui.css`

## Testing UI changes

1. Build assets
2. Publish to demo app
3. Test in browser across agent form, tool builder, workflow canvas, and playground
4. Run PHP tests: `composer test`

## Pull request checklist

* [ ] `npm run build` succeeds
* [ ] Assets republished if JS/CSS changed
* [ ] Livewire methods documented if added
* [ ] Docs updated if user-facing behavior changed
* [ ] Screenshot tag added to `docs/assets/screenshots/PENDING.md` if UI changed

## See also

* [Frontend Bundles](/neuronai-studio/reference/frontend-bundles.md)
* [CONTRIBUTING.md](https://github.com/digitalelvis/neuronai-studio/blob/main/CONTRIBUTING.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vibemx.gitbook.io/neuronai-studio/extending/contributing-to-studio-ui.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
