Dashboards and Team Chat
Where widgets are shown - adding a widget to a dashboard and arranging it on the grid, the corner menus, placing a widget in a Team Chat message with @ and what a widget token is, and who sees what.
A saved widget can be shown in three places: on any number of dashboards, in the Widgets gallery, and inside Team Chat messages. Each place runs it live in its own frame, with the viewer's own data. A widget that was never saved shows nowhere but its Studio; see Save, discard, and unsaved widgets.
Dashboards and Team Chat are extensions (ai.spacemix.dashboards with the widgets permission, ai.spacemix.chat with widgets:view). An extension of your own can show widgets the same way through host.widgets; see Widgets API.
Adding a widget to a dashboard
Dashboards are team-wide grids of widgets. Each dashboard is a tab in Dashboards. The + after the tabs makes a new dashboard; right-clicking a tab offers Rename and Delete dashboard (deleting a dashboard keeps its widgets).
| From | Control | What it does |
|---|---|---|
| A dashboard | + next to Create widget | Picks a saved widget, with a search box, and puts it in the first free spot. |
| A dashboard | An empty cell (hover over it) | The same picker, placing the widget at that cell; what's there is pushed down. |
| A dashboard | Create widget | Opens a widget session in the Studio; the new widget goes on this dashboard when first saved. |
| Widgets gallery | Add to dashboard in a widget's menu | Puts it on the dashboard you pick, or on a New dashboard. |
| A widget session in the Studio | Add to dashboard | The same, for the widget being edited (once saved). |
| A chat | dashboard_add_widget |
The assistant puts a widget at the end of a dashboard. |
A widget goes on at its own size (see Describe it). The same widget can sit on one dashboard more than once; each placement has its own position and size.
Arranging
- Move: drag a widget by its header, or focus the header and use the arrow keys (one cell per press).
- Resize: drag its bottom-right corner, use the arrow keys on the corner handle, or pick a preset under Resize in its … menu (Small 3×3, Medium 4×5, Large 6×8, Wide 12×4, Tall 3×8).
- Widgets in the way are pushed down, just far enough; nothing moves up to fill a gap.
- A widget is at least 2×2 cells and at most 12 columns × 24 rows.
- The layout can be changed only while the grid shows all 12 columns, which needs the dashboard to be at least 880 px wide. Narrower, the layout is fitted to 6 columns or 1 and is read-only; see On a phone.
Every change is saved for the whole team at once.
The corner menus
Hovering a widget on a dashboard shows two controls in its header.
The data dropdown (the refresh icon, with how long ago the data was fetched) says "Fetched <when> · kept <lifetime>", "Fetching…" or "No data yet", and has:
- Refresh: fetch the sources again now; what's shown stays up until the results are in.
- Purge cache: drop your cached data for this widget; it goes back to loading and fetches afresh.
Both act on your own cache only; see The data cache.
The … menu has Edit in Studio, Resize, Open in Widgets and Remove from dashboard. Removing takes that one placement off; the widget stays in the gallery and on other dashboards. To delete a widget everywhere, use Delete in its menu in the gallery. Edit in Studio and Delete take server:widgets: without it, Edit in Studio on a dashboard shows the Studio's notice that building needs a permission and starts no session, and the gallery's menu has no Delete.
The dot before the widget's name is its status; on an error, hovering it shows the message.
Placing a widget in a Team Chat message
In Team Chat's composer, @ offers the team's saved widgets along with people. @widget followed by a word (@widget sales) offers only widgets. Pick one and it shows as a chip in your text.
What is sent is a widget token in the message text: <widget:ID|Name>, the widget's id and its name. Readers see the widget as a live card under the message, with their own data, and Open in the card's header shows it in the gallery. Only picked widgets become tokens: typing @Sales by hand sends text.
- A message shows at most 3 widgets live. A card's frame runs only while it is near the screen.
- A deleted widget shows as its name with "· Widget removed".
- Wherever a widget can't be shown live, the name stands in for it: previews, notifications, copied text and the assistant's tools read a token as
[Name widget], and an extension without thewidgetsorwidgets:viewpermission gets only the text. - The assistant can place a widget too:
chat_sendturns<widget:ID|Name>in its text into a live widget.
The token format and the SDK helpers that build and read it (widgetToken, widgetTokens, widgetTokensToText, WIDGET_TOKEN_RE) are in Widgets in messages. The format is stable: tokens stay in message text for good.
Who sees what
| Thing | Whose | Notes |
|---|---|---|
| A saved widget (name, description, sources, HTML, size, lifetime, versions) | The team | Everyone on the server sees it. Anyone with server:widgets can change or delete it. |
| A dashboard and its layout | The team | Everyone sees the same arrangement. |
| A widget's data | Each viewer | Sources run as whoever looks, with their access; see Runs as the viewer. |
| The data cache, Refresh, Purge cache | Each viewer | Your purge doesn't touch anyone else's cache. |
| A Studio draft | The team's store, edited in one person's Studio chat | Others keep seeing the saved version until it is saved. |
| A never-saved widget | Listed in the gallery for everyone | It runs only in the Studio; someone else with server:widgets opens it in their own Studio after a review. Without it they see "Not saved yet." and no menu. |
| A widget in a message | The message's readers | Each reader sees it live with their own data. |
Stability
Stability: experimental. The dashboards, their menus and the Team Chat picker are the Dashboards and Team Chat extensions' behaviour and may change. The grid constants and the widget token format are stable; see Grid constants and Widgets in messages.