Conversation
Toolbar no longer models toolbar items at all - ToolbarItem, add_button/add_checkbox/ add_select/add_separator, and remove are gone. A toolbar button is always defined and rendered by the frontend (built-in or installed from an npm package); the backend can only reference an existing button by its id and flip visible/enabled via set_visible/set_enabled, sent as a single overrides map (dispatch: "toolbar_control") under the toolbar's existing stable persisted obj_id. - Wires Toolbar up for real: Workspace owns one, and App.toolbar delegates to it the same way background_color/world_axis/etc. do, so app.toolbar.set_visible(id, False) now actually works. - Keeps Inbox/App's register_toggle_action/register_select_action - still needed so a custom or npm-installed toolbar button (which drives itself via runtime.handleUiAction(name, value) on the frontend) can register a backend callback, independent of the now-removed Toolbar item model. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4 tasks
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Shows app.toolbar.set_visible/set_enabled toggling two of the frontend's built-in
toolbar buttons ("add_objects", "move") from Checkbox UI elements - the only two
things the backend can do to a toolbar button: show/hide or enable/disable one the
frontend already defines, by id.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ericgozzi
added this pull request to stack #56
September 21, 2026 13:04
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
set_visible/set_enabled, sent as a single overrides map (dispatch: "toolbar_control") under the toolbar's existing stable persistedobj_id.Toolbarup for real:Workspaceowns one, andApp.toolbardelegates to it the same waybackground_color/world_axis/etc. do, soapp.toolbar.set_visible(id, False)now actually works.Inbox/App'sregister_toggle_action/register_select_action- still needed so a custom or npm-installed toolbar button (which drives itself viaruntime.handleUiAction(name, value)on the frontend) can register a backend callback.Companion PR on the TS side: gramaziokohler/compas_threejs_ts (same branch name,
feature/toolbar-schema).Test plan
pytest(full suite, 14 tests including newregister_action/register_toggle_action/register_select_actionround-trip coverage)