list and virtual collection widgets share device-side scroll operations. Local buttons and ui.knob execute without a Host round trip. A Host or a declared device data source can issue the same operation through Widget.scrollTo. No new permissions or Dock JavaScript are involved.
list
collection
ui.knob
Widget.scrollTo
scrollTo
key
index
offset
edge: "start" / "end"
ensureVisible
scrollBy
items
followEnd
enabled: true / false
Item alignment is start, center, end, or nearest. Defaults are start for scrollTo and nearest for ensureVisible. Pixel offsets are logical device pixels, including virtual rows; do not use the renderer's compressed physical scrollbar travel. Numbers are integers bounded to ±1,000,000,000 (negative only for relative movement). Keys are stable string IDs for collections and string/number option values for ordinary lists; request string keys fit 512 UTF-8 bytes.
start
center
end
nearest
User scrolling away pauses following; returning to the end resumes it while following remains enabled. Selecting a row and moving the viewport are separate operations. Data updates do not imply selection or an automatic jump.
Declare ui: {version: 1, cachePages: 1} and put an action on a native button:
ui: {version: 1, cachePages: 1}
{"id":"today","type":"button","x":24,"y":384,"w":240,"h":64,"label":"Current item", "action":{"type":"ensureVisible","target":"agenda","key":"current","align":"center"}}
target must name a declared list or collection, including one on an unmounted page. An offscreen target retains only its latest local command and applies it when shown; it does not switch pages. Hidden/disabled controls cannot dispatch actions. Optional Host event notifications remain read-only and make the plugin Host-dependent.
target
Native rotary mapping lives in the projection, separately from manifest Host events:
{"ui":{"version":1,"cachePages":1,"knob":{ "ccw":{"type":"scrollBy","target":"agenda","items":-1}, "cw":{"type":"scrollBy","target":"agenda","items":1}, "press":{"type":"ensureVisible","target":"agenda","key":"current","align":"center"} }}}
Local mapping takes precedence for its direction. Existing manifest knob.*.emit events retain their Host behavior when there is no local mapping. Studio, CLI and website interactive previews use the same local mapping. plugin_event still dispatches declared Host events; a fixture check alone does not certify local rotary, gesture or standalone behavior.
knob.*.emit
plugin_event
Set scrollTo: "view.jump" on the list, then publish a complete schema-valid state containing an explicit request:
scrollTo: "view.jump"
await ctx.publish({ rows, view: { jump: { revision: ++jumpRevision, type: 'scrollTo', key: issueId, align: 'center' } } });
Increment a positive safe-integer revision only for a new intent. Ordinary publications retain the same request and never replay it. Malformed/stale requests are ignored. A valid request for a missing key is consumed as a no-op; issue a new revision after the item becomes available. Requests do not replay uncertain business writes or grant additional access.
revision
A literal request sets the initial position, for example scrollTo: {revision: 1, type: "followEnd", enabled: true}. It runs once per view, including before the first data arrives for following. Revisions, follow mode and positions survive page eviction and editor view checkpoints. Collections retain their stable-key anchor across reordering; ordinary lists retain their pixel offset. A fresh reopened view starts a new baseline; this is not durable storage across device restart.
scrollTo: {revision: 1, type: "followEnd", enabled: true}
A container with scroll: "y" accepts the same revisioned scrollTo binding or literal request. It supports scrollTo with logical pixel offset or edge, scrollBy with pixel offset, and followEnd; item keys, indexes, items and ensureVisible remain list/collection operations. Children retain their normal interactive controls and one continuous vertical scroll.
container
scroll: "y"
edge
For a calendar, publish {revision: 1, offset: Math.max(0, Math.round(nowLineY - viewportHeight / 2))} and bind the container's scrollTo to that object. Retain revision 1 during ordinary refreshes so manual scrolling and Back preserve the reading position. Increment only for an explicit return-to-now intent. A fresh view applies the initial intent again; the renderer clamps offsets at the content edges. This requires list.scroll.v1 firmware.
{revision: 1, offset: Math.max(0, Math.round(nowLineY - viewportHeight / 2))}
list.scroll.v1
A collection accepts exactly one data source: bind or static value. For example:
bind
value
{"id":"agenda","type":"collection","x":24,"y":160,"w":806,"h":272, "value":[{"id":"current","title":"Current item"}],"itemKey":"id","rowHeight":72,"overscan":0, "children":[{"id":"title","type":"text","x":16,"y":16,"w":774,"h":40,"bind":"item.title"}]}
An opted-in local UI can run independently when all widget bindings use ui.*, declared sources.*, or item.* inside a collection template, and there are no Host events, permissions, streams or Host business-data bindings. Native execution never starts host.mjs. Static values must be actual packaged content, not fixture substitutes for unavailable live services.
ui.*
sources.*
item.*
host.mjs
For device-fed lists use bind: "sources.feed.data.rows" and optionally scrollTo: "sources.feed.data.jump". Existing source consent, size/frequency limits and network restrictions still apply. A mixed Host plugin continues to require Host activation and its connection dialog; saved layouts do not change that boundary.
bind: "sources.feed.data.rows"
scrollTo: "sources.feed.data.jump"
Firmware must advertise list.scroll.v1, ui.knob.v1 when a local knob is declared, and widgets.native.v1 for independent widgets, in addition to existing UI/collection capabilities. Older firmware must report incompatible instead of dropping operations. See the bundled native-list example.
ui.knob.v1
widgets.native.v1
native-list
Test key/index/offset/edge alignment, a visible ensureVisible no-op, missing keys followed by later data, unchanged/stale requests, manual scroll followed by publication, page eviction, data reorder/append, follow pause/resume, large virtual lists, ordinary lists, rotary input and Host disconnection. Preserve a bounded row pool. Browser fallback screenshots apply the initial list position; interactive and native SDL checks remain separate from physical Dock latency and endurance tests.