@yuneta/gobj-ui 7.25.13 → 7.25.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -819,24 +819,29 @@ A write is known by its topic AND its serial (`<topic>^<form_write>`): each
819
819
  topic's form counts its serials from 1, and keyed by the serial alone two
820
820
  forms saving at once shared one entry.
821
821
 
822
- **A write cut by the drop is not a refusal** (7.25.13). A refused write
823
- reads its topic again at once, so a cell edited in place goes back to what the
824
- store has. A write that fails while the transport is NOT in session is the
825
- drop: a routing adapter (gui_agent's `C_AGENT_TREEDB_LINK`) settles what it
826
- had in flight when its session closes. The topic cannot be read then — the
827
- transport refuses the read (*"cannot route 'nodes' -- not in session"*) — so
828
- the view logs a warning and owes the read. Writes in flight on the
829
- disconnect edge are owed the same way. The first edge that finds the
830
- transport in session again pays it: each owed topic whose table is open is
831
- read once. An `EV_CONNECTION_STATE` "up" that comes before the view's own
832
- transport is in session leaves the read owed. A form is answered once, also
833
- when the edge answered it before the failure arrived.
822
+ **A drop is followed by a read of every open table** (7.25.13, 7.25.14). A
823
+ refused write reads its topic again at once, so a cell edited in place goes
824
+ back to what the store has. A write that fails while the transport is NOT in
825
+ session is the drop, not a refusal: a routing adapter (gui_agent's
826
+ `C_AGENT_TREEDB_LINK`) settles what it had in flight when its session closes.
827
+ The topic cannot be read then — the transport refuses the read (*"cannot route
828
+ 'nodes' -- not in session"*) — so the view logs a warning and waits.
829
+
830
+ A drop also hides the node events published while it lasts: another writer's
831
+ create, update or delete reaches no table. So the disconnect edge marks the
832
+ view, and the first edge that finds the transport in session again reads
833
+ EVERY open table once — as the schema editor reloads its model on the
834
+ reconnect. An `EV_CONNECTION_STATE` "up" that comes before the view's own
835
+ transport is in session does not read; the read waits for an edge that finds
836
+ the transport in session. An "up" with no drop before it reads nothing. A form
837
+ is answered once, also when the edge answered it before the failure arrived.
834
838
 
835
839
  ```js
836
- // Session up: a cell edit goes out as update-node.
837
- // Session drops; the adapter answers it {result: -1} -> no read, a warning
840
+ // Session up, tables `users` and `roles` open.
841
+ // Session drops -> writes in flight answered refused
842
+ // (another writer creates a user; its EV_TREEDB_NODE_CREATED is lost)
838
843
  // EV_TRANSPORT_STATE {connected: true}, transport in session
839
- // -> `nodes` of that topic, once
844
+ // -> `nodes` of users and of roles, once each
840
845
  ```
841
846
 
842
847
  **The pkey2 of an update goes back as the record had it** (7.25.5). It names
@@ -1785,6 +1790,25 @@ size. A card on its tier's default now saves its position and nothing else;
1785
1790
  a closed node saves no size at all (a square is not the card's size), its
1786
1791
  entry keeps what it had.
1787
1792
 
1793
+ **A Save that does not land is written again** (since `7.25.15`). `Save`
1794
+ writes one `__graphs__` record per topic that changed, and nothing answers such
1795
+ a write when it lands, so the engine takes it for granted when it leaves. A
1796
+ refused one was recorded as saved all the same: the next Save found nothing to
1797
+ write, and the arrangement was never stored. Now the host (`C_YUI_TREEDB_GRAPH`)
1798
+ tells the engine every way the write can fail -- the backend answers an error
1799
+ (shown as before), the transport refuses the command, or there is no session
1800
+ (the write is not sent) -- with `EV_GRAPHS_WRITE_REFUSED {topic}`. The engine
1801
+ forgets what it believed the backend holds for that topic
1802
+ (`forget_refused_graphs_write()` in `graph_save_plan.js`), logs a warning and
1803
+ lights Save again, so the next Save writes the topic. A host of its own that
1804
+ hosts `C_G6_NODES_TREE` sends the same event when its write of `__graphs__`
1805
+ fails:
1806
+
1807
+ ```js
1808
+ // in the host, when the answer to its update-node of __graphs__ is an error
1809
+ gobj_send_event(engine, "EV_GRAPHS_WRITE_REFUSED", {topic: record.topic}, gobj);
1810
+ ```
1811
+
1788
1812
  **Every saved look has a way back, in the context menu** (since `7.23.134`,
1789
1813
  replacing `reset sizes` / `reset topic sizes`). In edition, the node, the port
1790
1814
  and the edge menus each offer three resets — this one, its kind (`reset topic
@@ -2240,6 +2264,28 @@ else.
2240
2264
  gobj_send_event(editor, "EV_REFRESH", {}, host); // Save -> "wait for them"
2241
2265
  // ... the load lands (model_gen N+1): the form closes, the operator reopens it
2242
2266
  ```
2267
+ - **A move sent by the host closes the dialog of the screen it left**
2268
+ (7.25.15). `C_YUI_SHELL` keeps the overlays open on a move that changes only
2269
+ the subpath (a url typed in, a link), so a dialog outlived its screen: its
2270
+ Save, its import Preview or an orphan delete sent an event only that screen
2271
+ declares, answered *"Event NOT DEFINED"*, and the edit was lost with no word.
2272
+ Now an `EV_SHOW` that moves the view to another position -- at once, or when
2273
+ a load or a write in flight ends -- closes the column form, the topic form,
2274
+ the import (its plan goes with it) and the orphans, and tells the operator
2275
+ `the view moved: open the dialog again` (an i18n key the consumer's locales
2276
+ carry). The export and the check stay up: they show the texts they were
2277
+ opened with and send nothing a screen declares. The same position sent again
2278
+ closes nothing. A **confirmation** is a shell modal, which the move does not
2279
+ close; it carries the position it was asked on (`seg`), and a Yes answered
2280
+ on another position is refused with the same words. Before, a Yes to "delete
2281
+ this column?" asked on `db/users` and answered after a move to `db2/users`
2282
+ deleted `db2`'s column of the same name.
2283
+
2284
+ ```js
2285
+ gobj_send_event(editor, "EV_EDIT_COLUMN", {col: "id"}, host); // on db/users
2286
+ gobj_send_event(editor, "EV_SHOW", {subpath: "db"}, host); // form closed, said
2287
+ gobj_send_event(editor, "EV_SHOW", {subpath: "db"}, host); // same position: nothing
2288
+ ```
2243
2289
  - **A load refused IN session keeps the model it was replacing** (7.25.9): a
2244
2290
  routing adapter's deadline on a slow `nodes` answers -1 while the session
2245
2291
  is up. The records are put back, the screen and any open dialog stay, and