From d8a43ff47317efb8b292e149c216e996572c82cf Mon Sep 17 00:00:00 2001 From: "Wilhelmina \"Willow\" Poortenga" <156546731+wittywilla@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:18:28 -0500 Subject: [PATCH 1/2] SDUI core synced from the server; every text file checked out with LF - sdui/core: kit/sync-sdui-core.sh again, for the server's two SDUI changes of 2026-11-14 (a focusable list's rows stay focus stops; a List's rows carry their items' buttons). TestCoreIsTheServersCopy failed on them. - .gitattributes, and a kit template so module-kit gives every module one: Git for Windows checks text out as CRLF by default, and the core test (and others that compare files byte for byte) then fail on a PC. Co-Authored-By: Claude Opus 5.5 --- .gitattributes | 3 +++ kit/module-kit.sh | 1 + kit/templates/gitattributes | 3 +++ sdui/core/focus.go | 16 ++++++++++++---- sdui/core/render.go | 7 +++++++ 5 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .gitattributes create mode 100644 kit/templates/gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ad03d71 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Every text file is checked out with LF, on Windows too: Git for Windows otherwise makes them +# CRLF, and tests that compare files byte for byte, and what is built in, then differ by system. +* text=auto eol=lf diff --git a/kit/module-kit.sh b/kit/module-kit.sh index 4e3beab..2f36b67 100755 --- a/kit/module-kit.sh +++ b/kit/module-kit.sh @@ -214,6 +214,7 @@ To take a version back, run the *withdraw* workflow from the *Actions* tab. It a esac render "$templates/dependabot.yml" "$dir/.github/dependabot.yml" [ -f "$dir/.gitignore" ] || cp "$templates/gitignore" "$dir/.gitignore" + [ -f "$dir/.gitattributes" ] || cp "$templates/gitattributes" "$dir/.gitattributes" web_package "$dir" case " $words " in *" webpart "*) sdui_kit "$dir" ;; diff --git a/kit/templates/gitattributes b/kit/templates/gitattributes new file mode 100644 index 0000000..ad03d71 --- /dev/null +++ b/kit/templates/gitattributes @@ -0,0 +1,3 @@ +# Every text file is checked out with LF, on Windows too: Git for Windows otherwise makes them +# CRLF, and tests that compare files byte for byte, and what is built in, then differ by system. +* text=auto eol=lf diff --git a/sdui/core/focus.go b/sdui/core/focus.go index 480e511..2d369ee 100644 --- a/sdui/core/focus.go +++ b/sdui/core/focus.go @@ -25,7 +25,9 @@ func Focusable(n *Node, inHero bool) bool { if c, ok := n.Props["control"].(*Control); ok && c != nil { return !c.Disabled || n.Action != nil } - return n.Action != nil + // A row of a focusable list stays a stop without an action, so focus isn't lost when a + // refresh sends it without one for a while (Scan for changes while a scan runs). + return n.Action != nil || n.Props["focusable"] == true case "Hero": return len(n.Children) > 0 case "DetailHeader": @@ -50,14 +52,17 @@ func focusGroup(n *Node) bool { // 1. a SearchBox with autofocus; // 2. else the page's DetailHeader; // 3. else the first focusable node that isn't a Tab, a FilterBar or a -// SearchBox: the content, not the controls above it; +// SearchBox: the content, not the controls above it. A row of a +// focusable List that has no action (a line that only says how things +// stand, such as "Last scanned") is passed over for the next one; // 4. else the first focusable node. func stampFocus(root *Node) { order := 0 var first, content, header, search *Node var walk func(n *Node, group string, inHero bool) var stamp func(n *Node, group string, inHero bool) - inDock := false // the Dock's buttons are controls, not content: focus doesn't start there + inDock := false // the Dock's buttons are controls, not content: focus doesn't start there + passive := false // in a focusable List, whose rows without an action are stops but not starts walk = func(n *Node, group string, inHero bool) { if n.Type == "Dock" { inDock = true @@ -82,9 +87,12 @@ func stampFocus(root *Node) { if focusGroup(n) { group = n.ID } + was := passive + passive = listLike(n.Type) && n.Props["focusable"] == true for i := range n.Children { walk(&n.Children[i], group, inHero || n.Type == "Hero") } + passive = was } stamp = func(n *Node, group string, inHero bool) { n.Focus = nil @@ -106,7 +114,7 @@ func stampFocus(root *Node) { } fallthrough default: - if content == nil && !inDock { + if content == nil && !inDock && !(passive && n.Action == nil) { content = n } } diff --git a/sdui/core/render.go b/sdui/core/render.go index eed4624..7c18c19 100644 --- a/sdui/core/render.go +++ b/sdui/core/render.go @@ -1197,6 +1197,9 @@ func (r *renderer) collectionPage(n *Node, in instance, offset, limit int, allow row.Props["number"] = strconv.Itoa(num) } } + if propBool(p, "focusable", false) { + row.Props["focusable"] = true // a stop even while it has no action (a scan's choices while it runs) + } n.Children = append(n.Children, row) continue } @@ -1292,6 +1295,10 @@ func (r *renderer) listItem(parent string, it *Item) Node { if c := cleanControl(it.Control); c != nil { n.Props["control"] = c } + // The item's own buttons (a friend's Invite, a room's Join and Leave), as a card carries them. + if acts := cleanActions(it.Actions); len(acts) > 0 { + n.Props["actions"] = acts + } switch { case it.Action != nil: n.Action = it.Action From da0bc4d09f9a58be33c938f03a5cfa09fccca34e Mon Sep 17 00:00:00 2001 From: "Wilhelmina \"Willow\" Poortenga" <156546731+wittywilla@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:46:47 -0500 Subject: [PATCH 2/2] WittyModule 0.5.5: a patch version for #7, as CI asks for any change since the last tag Not a release: nothing is tagged. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ module.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccb2a2d..482d515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ What changed in WittyModule, newest first. What changed before it had a repository of its own is in the [WittyMediaServer changelog](https://github.com/wittywilla/WittyMediaServer/blob/master/CHANGELOG.md). +## 0.5.5 + +- SDUI core synced from the server (a focusable list's rows stay focus stops; a List's rows carry their items' buttons). Text files are checked out with LF, and module-kit gives every module a .gitattributes that says so (#7). + ## 0.5.4 - **Module API 5 only.** `MinAPI` is 5: `check` refuses a manifest of API 3 or 4, and `Supports` says to install a version built for module API 5. `SDUIFromAPI` and `IntegrationFromAPI` are gone: every helper, program and web module carries `sdui.json` and `integration.json`. This module's own manifest says API 5. Specification 5.0. diff --git a/module.json b/module.json index 2743bed..3912bf5 100644 --- a/module.json +++ b/module.json @@ -1,7 +1,7 @@ { "id": "wittymodule", "name": "WittyModule", - "version": "0.5.4", + "version": "0.5.5", "license": "AGPL-3.0-or-later", "repo": "wittywilla/WittyModule", "delivery": "library",