RFC 0076 — Views on the server: synced, and shared with a team
Status: implemented (2026-11-29) · Target: 0.65.0 · builds on RFC 0070, RFC 0071 and RFC 0007 · see Decisions
Summary
RFC 0070 gave a list the user's own views, "Overdue, Q3", "My customers", kept in the settings store on this machine. RFC 0070 left "views shared with a team, or synced between machines" for later, and RFC 0071 "views kept on the server". An app over a Laravel backend has a server and a user: a view saved at the office should be there on the laptop, and the view the team lead made for the month's close should be the team's.
This RFC keeps a list's views on the server when the app has a Laravel backend with the package's views routes:
// routes/api.php
Route::middleware('auth:sanctum')->group(function () {
Route::elyraViews();
});
- The user's views follow them: saved, renamed and deleted on the
server, under the user and the list (
persist's name), so every machine they sign in on has them. Offline, the last copy is used and a change is queued (RFC 0007), as any other write. - A view can be shared: Save view… has Share with the team for a
user who may (
elyra.views.share, an ability the app grants, RFC 0010). The Views menu has the app's, the team's and the user's own, each under its heading. A shared view is changed only by whoever made it, or by a user who may share. - Nothing changes in the page: a
Tablewithpersistandviewskeeps them on the server when the app has one, else in the settings store as in 0.63. The same{ name, filters, search, sort, direction, group, columns }. - The local views move once: the first time a machine finds the server's views, it saves its own there, and keeps no second copy.
Motivation
- A view is the user's, not the machine's. Users of a business app have a desk and a laptop; RFC 0070's views stay on the desk.
- Teams work from the same lists. "Overdue over 10,000" is the
collections team's list, made once by whoever knows the filters. Today
each user rebuilds it, and the app's
viewsare a release away. - The backend is already there. RFC 0005 signs the user in to Laravel, RFC 0010 says what they may do, RFC 0007 queues writes offline: views are a small table and five routes on top.
- It must stay optional. An app without a backend, or a backend without the routes, keeps 0.63's views on the machine.
Current state (0.65)
Tablewithviewsandpersistreads and writes the user's views underelyra-ui.table.<persist>.viewsin the settings store (store.get/store.set,/__store/), as[{ name, … }].keptViewsdrops what isn't a view; the app's names can't be taken.- The Laravel package registers opt-in route macros
(
Route::elyraAuth(),elyraNotifications(),elyraAbilities(), …);Backendsends the user's token; RFC 0007's outbox queues writes offline and replays them; RFC 0010's abilities come from the server. - Broadcasting (RFC 0006) reaches the desktop over the user's private channel.
Design
The runtime: views
@elyra/runtime gets views, the one place a Table keeps its views:
views.list(list: string): Promise<SavedView[]>
views.save(list: string, view: SavedView, options?: { shared?: boolean }): Promise<SavedView>
views.rename(list: string, id: string, name: string): Promise<SavedView>
views.remove(list: string, id: string): Promise<void>
views.subscribe(list, run): () => void // the list's views, as they change
A SavedView is RFC 0070's view with id, shared, mine (made by this
user) and owner (a name, for a shared view). Behind it, the shell
decides where they live: over a backend with the views routes, the server;
else the settings store, as in 0.63. Table calls views instead of
store for its views; its widths and columns stay in the settings store
(they're the machine's: its screen).
The shell: /__views/
Rust's elyra::views (with the backend feature) answers the runtime's
/__views/{list,save,rename,remove}:
- With a backend whose
GET /api/elyra/viewsanswers (asked once per sign-in; a404means the app hasn't the routes), it forwards to it with the user's token, and keeps the last answer per list in the settings store, the cache an offline start reads. - Writes offline go through RFC 0007's outbox (
queue_offline): the cache changes at once, the server when the connection is back. A write the server refuses (a name taken, a view gone) comes back as the outbox's refused writes do, and the list is read again. - Without one, it's the settings store, as 0.63's key, so an app that never had a backend sees no change.
- Changes from elsewhere arrive as a broadcast on the user's private
channel (
elyra.views.{user}) and, for shared views, onelyra.views.shared; the shell reads the list again and the runtime'ssubscribetells the tables.
The package: Route::elyraViews()
The Laravel package ships a migration (elyra_views: id, user_id,
list, name, definition JSON, shared, timestamps; a name unique per
user and list, and among a list's shared views) and the routes:
| Route | Does |
|---|---|
GET /elyra/views?list=customers |
the user's views of the list, and the shared ones |
POST /elyra/views |
saves one (list, name, definition, shared) |
PUT /elyra/views/{id} |
renames it, or saves its definition again |
DELETE /elyra/views/{id} |
deletes it |
- Who may: a user's own views are theirs.
sharedneeds the abilityelyra.views.share(a Gate the app defines; without it, no one shares). A shared view is changed or deleted by its owner, or by a user who may share. Every query is the user's, orshared = true. - The definition is stored as the desktop sends it, checked to be an object of RFC 0070's keys and at most 16 KB; the server doesn't read the filters (the list's own controller does, when they're asked).
- Events: each write broadcasts
ElyraViewsChangedto the owner's channel, and to the shared channel when the view is or was shared.
The Views menu
- Headings: the app's views, Shared (the team's, each with its owner's name for a screen reader and as a tooltip), Mine. A shared view of the user's own is in Shared, marked as theirs.
- Save view… asks for a name and, for a user who may share, has Share with the team. Save over a shared view of someone else's isn't offered: Save as new view… is.
- Rename and delete are offered on the user's own and, for a user who may share, on shared views; deleting a shared view asks first ("The team loses it too").
- A view that's gone (deleted elsewhere while in use) leaves the list as it asks, under All, said in the live region.
The move from the machine
When the shell first finds the server's views for a user, it saves each of the machine's views (0.63's key) for each list there, unshared, a name taken being given a number ("Overdue 2"), and then deletes the local key. It does this once per user and machine, and says nothing: the views are where they were in the menu.
make:resource --backend
The list it writes already has views={[]} and persist; nothing changes
in the page. Its printed hint adds Route::elyraViews() to the routes the
resource asks for. scripts/laravel-backend.sh registers them, and
framework/tests/laravel_views.rs tests them end to end.
Implementation plan
- The Laravel package: the migration (loaded by the provider),
ElyraView,ViewsController,Route::elyraViews(), theelyra.views.sharecheck,ElyraViewsChanged; its README and skill. elyra::views:/__views/overBackend(asked, cached, queued, refreshed on the broadcast), else the settings store; the move from the machine; its capability (RFC 0016) beside/__store/.@elyra/runtime:viewsand its types.@elyra/ui:Tablethroughviews; the menu's headings, Share with the team, the owner's name, the confirm; the words (en, nb).- Tests: the package against the real Laravel app (CI's step), the shell
with an
HttpFake, the table with the runtime's stand-in; the smoke harness's fake gains/__views/. - Docs:
table.md(Saved views),backend.md,offline.md, the skills; the CHANGELOG; the roadmap.
Open questions
- The views' own routes, or the settings store synced as a whole? Recommendation: views' own. A synced settings store would carry the machine's widths and window sizes to a laptop with another screen, and has no notion of sharing.
- Who may share: an ability, or anyone?
Recommendation: an ability,
elyra.views.share, that the app grants (none by default). A team's list that anyone can change is a list no one trusts; the app decides who curates. - The migration loaded by the provider, or published?
Recommendation: loaded (
loadMigrationsFrom) when the app callsRoute::elyraViews()'s companionElyraBackend::views()in a service provider, so an app that never uses views gets no table; published withvendor:publish --tag=elyra-viewsfor an app that wants to edit it. - The machine's views moved automatically? Recommendation: yes, once, unshared: they're the user's, and asking "move your views?" is a question with one answer.
- Live updates when a teammate changes a shared view? Recommendation: yes, through the broadcast the app already has (RFC 0006); without broadcasting configured, a list's views are read again each time its menu opens.
As built
elyra::views:local(RFC 0070's key in the settings store, a view's id its name) and, withbackend,Views(list,save,update,remove,forget), bound byBackend::views(). The shell's/__views/{list,save,update,remove}asksViewswhen it's bound, else the settings store;renameisupdatewith a name, andshareisupdatewithshared.- A
404on the list or a save means the server hasn't the routes: the views stay on the machine until the app restarts. - Offline, writes go through
queue_offline(): the cached copy changes at once, a new view with aqueued-…id until the server answers and the list is read again. - The cache is forgotten at sign-out and at a switch of user, rather than kept per user: a machine shared by two users never shows one the other's.
- Broadcasts:
ElyraViewsChangedon the user's own channel (which the desktop now follows for.views()alone, as for the abilities) reaches the windows onelyra:views; aTablereads its list again. A teammate's change to a shared view isn't broadcast to the team: a list's views are read again each time its menu opens (Dropdown's newonopen), the fallback the RFC named. - Sharing is a menu item, Share with the team / Stop sharing on the
user's own view, rather than a checkbox in Save view…: the runtime's
prompthas no checkbox, and sharing a view already saved is the common case. - The package:
ElyraView(visibleTo,editableBy,mayShare,toDesktop),ViewsController,ViewsChanged; the migration is added to the migrator byElyraBackend::views(), and published with--tag=elyra-views. The answer's views carryeditable. - Checked: against the real Laravel app (
framework/tests/laravel_views.rs, a CI step: saved, a name refused per field, renamed and shared; Bob sees the team's view, may not delete it or share one, his own is his; a machine's views moved once; a server without the routes keeps them on the machine), the runtime's bridge, theTablewith the stand-in (the headings, sharing, the confirm, a refusal, a change elsewhere, a view that's gone), and the resource smoke test (the list read through/__views/list).
Decisions
Accepted 2026-11-29, with every recommendation:
- Views have their own routes; the settings store isn't synced (widths are the screen's).
- Sharing needs the ability
elyra.views.share, which the app grants; by default no one shares. - The migration is loaded once the app turns views on, and can be
published with
vendor:publish --tag=elyra-views. - A machine's views move to the server once, unshared, without asking.
- Changes elsewhere arrive by broadcast (RFC 0006); without it, a list's views are read again each time its menu opens.
Not in this RFC
- Views shared with some, not all (a role, a department):
sharedis the whole team; finer sharing is the app's own policy on the same table, later. - The app's views from the server (
viewsstays the app's code). - Columns' widths synced: they're the screen's.
- Views for a list without a backend synced through another service.
Alternatives considered
- The settings store, synced. One mechanism for everything, but it mixes the user's with the machine's, conflicts at the level of a whole value, and has no sharing.
- Views as the app's own resource (
make:resource View). Every app would rebuild the same table, routes and rules; the package's routes are the same for every list and every app. - Sharing by link (a view encoded in a URL, sent to a teammate).
RFC 0070's
?view=names a view; carrying a whole definition in a link is useful but isn't a team's list: it doesn't change when the list's owner fixes it. A later RFC can add it beside this one.