@rackbops/ac-plugin-contract 2.0.0-alpha.38 → 2.0.0-alpha.39

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.
Files changed (2) hide show
  1. package/AUTHORING.md +20 -7
  2. package/package.json +1 -1
package/AUTHORING.md CHANGED
@@ -376,12 +376,21 @@ it.
376
376
  until the operator navigates away: it never remounts one to refresh it. (It used to, on any return to the
377
377
  window more than a minute after the panel was opened, which reset every filter, selection and half-typed field
378
378
  the panel held, every time.) So a panel whose data goes stale while it is open refreshes it itself, in place,
379
- into the state already on screen: the Board polls every 15 minutes (with a Refresh now button for a click-
380
- driven read past the poll, #546), and Issues (`issues-classic`) reads its list
381
- again when the tab comes back (`focus` on `window`, or `visibilitychange` to visible) more than a minute after
382
- it opened or last refreshed. A panel that does neither -- Agents, the Admin board's cards -- reads when it is
383
- opened and after its own actions. Only Home is still refreshed by the shell, which remounts it for Refresh, the
384
- heartbeat and a return after a minute.
379
+ into the state already on screen: the Board polls every 15 minutes, and Issues (`issues-classic`) reads its
380
+ list again when the tab comes back (`focus` on `window`, or `visibilitychange` to visible) 15 minutes or more
381
+ after its last load or refresh; each also has a Refresh now button for a read on demand (#546, #550).
382
+ Navigating to another console tab does unmount a panel, so a panel that should not reload on every tab change
383
+ keeps its data at module scope: a plugin frontend is one ES module loaded once per page, so module-level state
384
+ outlives the unmount, until a full page reload. The Board, Issues and Home's open-issues card all do this
385
+ (#550). Coming back within 15 minutes of the last load shows the data it already had without reading it
386
+ again, and coming back later reads at once. After a read fails, the Board retries the list or the broken
387
+ card on its next remount; Issues re-reads on a remount only what has had no successful read in the last 15
388
+ minutes, and a return or Refresh now click on Issues restarts its 15 minutes whether or not that read
389
+ succeeds. For Issues, "the last load" is the oldest of its repo list's load and each listed repo's issues
390
+ load, so it is only as fresh as its stalest part. A panel that does neither -- Agents, the Admin board's
391
+ cards -- reads when it is opened and after its own actions. Only Home is still refreshed by the shell,
392
+ which remounts it for Refresh, the heartbeat and a return after a minute; Home's open-issues card keeps
393
+ its count across those remounts, so within 15 minutes of its last load none of them re-reads it (#550).
385
394
 
386
395
  ### The `@ac/host` browser module
387
396
 
@@ -516,7 +525,11 @@ still gets its own `Response` (`.clone()`), so two independent reads of a cache
516
525
  already-consumed body. Only `GET` may be cached (`cached` throws on any other method); a rejected fetch is
517
526
  never cached — the very next call retries. **A card reads through `cached`, never bare `fetch`, so Refresh
518
527
  and the Overview heartbeat (both call `invalidate`) actually reach it** — a card that bypasses `cached` keeps
519
- serving its own stale response until its own next poll, deaf to both:
528
+ serving its own stale response until its own next poll, deaf to both. A card that deliberately keeps its own
529
+ data across a remount (Home's open-issues card, #550) is a further exception on the other side: both Refresh
530
+ and the heartbeat arrive at it as a remount, and it ignores a remount within 15 minutes of its last load —
531
+ `invalidate()` clears `cached`'s own TTL cache, but the card's own freshness check skips calling `cached` at
532
+ all before it ever gets there.
520
533
 
521
534
  ```ts
522
535
  import { cached, invalidate } from "@ac/host"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rackbops/ac-plugin-contract",
3
- "version": "2.0.0-alpha.38",
3
+ "version": "2.0.0-alpha.39",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The artifact-console plugin ABI for out-of-repo plugin authors: HostApi, the acPlugin manifest contribution points, the generated manifest JSON Schema, and the @ac/host ambient browser declaration.",