Skip to content

Commit 30c6495

Browse files
committed
chore(ui): bump htmx and jsdiff CDN assets
Upgrade the shared htmx bundle to 2.0.10 and the test detail page jsdiff bundle to 9.0.0, keeping the pinned CDN URLs and SRI hashes. Sync the public docs references with the shipped asset versions, integrity hashes, and the detail-page diff note.
1 parent 38ffb7c commit 30c6495

6 files changed

Lines changed: 27 additions & 11 deletions

File tree

docs/0-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ validation rules, see
4343
| Web framework | FastAPI + Starlette (ASGI) |
4444
| Application server | Uvicorn |
4545
| Templates | Jinja2 (`.html.j2`, `StrictUndefined`) |
46-
| Client interactivity | htmx 2.0.8 (CDN, fragment polling/swaps, OOB updates) |
46+
| Client interactivity | htmx 2.0.10 (CDN, fragment polling/swaps, OOB updates) |
4747
| Session management | itsdangerous `TimestampSigner` cookie sessions |
4848
| Database | MongoDB (pymongo) |
4949
| Validation | vtjson (schema-first validation; no Pydantic) |

docs/1-architecture.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ Client -> nginx -> Uvicorn -> ASGI middleware stack -> FastAPI router
188188

189189
### htmx integration
190190

191-
UI templates load htmx 2.0.8 from CDN in `base.html.j2`. The server remains
192-
fully server-rendered (Jinja2 + HTML responses). htmx adds three capabilities
193-
without client-side rendering or a JavaScript build step:
191+
UI templates load htmx 2.0.10 from CDN in `base.html.j2`. The server remains
192+
fully server-rendered (Jinja2 + HTML responses). The test detail page also
193+
loads a page-scoped diff renderer for the inline Diff panel. htmx adds three
194+
capabilities without client-side rendering or a JavaScript build step:
194195

195196
| Capability | Mechanism |
196197
|------------|-----------|

docs/4-ui-reference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ The full `/tests/view/{id}` page also remembers the `% c` checkbox with a
163163
browser cookie, so the checkbox reopens in its previous mode while live detail
164164
polling continues to update only the embedded SPSA data node.
165165

166+
The full `/tests/view/{id}` page also loads a dedicated client-side diff
167+
renderer for the inline Diff panel. That asset is page-scoped and is not part
168+
of the `/tests/view/{id}/detail` fragment contract.
169+
166170
The request submits the page's current canonical `expected` state from a
167171
server-owned hidden input:
168172

docs/9-references.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,23 @@ must use `{{ value|safe }}` or `{% autoescape false %}`.
249249

250250
### Project patterns
251251

252-
**CDN loading**: htmx 2.0.8 is loaded from `cdn.jsdelivr.net` in
252+
**CDN loading**: htmx 2.0.10 is loaded from `cdn.jsdelivr.net` in
253253
`base.html.j2` with an SRI integrity hash. No npm build step.
254254

255255
```html
256-
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"
257-
integrity="sha256-Iig+9oy3VFkU8KiKG97cclanA9HVgMHSVSF9ClDTExM="
256+
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.10/dist/htmx.min.js"
257+
integrity="sha256-cepnGFv6jJjDnTFxfG/OXYUjcPzf0SnbRUN3TTFFwN4="
258+
crossorigin="anonymous"
259+
referrerpolicy="no-referrer"></script>
260+
```
261+
262+
**Detail-page diff renderer**: `/tests/view/{id}` loads jsdiff from
263+
`cdn.jsdelivr.net` in `tests_view.html.j2` for the inline Diff panel. The
264+
asset is pinned and protected with SRI.
265+
266+
```html
267+
<script src="https://cdn.jsdelivr.net/npm/diff@9.0.0/dist/diff.min.js"
268+
integrity="sha256-tRqdKIXywJDcl7mBAnOV9+fmVYpGx1rjdH2yZ5E6ias="
258269
crossorigin="anonymous"
259270
referrerpolicy="no-referrer"></script>
260271
```

server/fishtest/templates/base.html.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@
8787
></script>
8888

8989
<script
90-
src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"
91-
integrity="sha256-Iig+9oy3VFkU8KiKG97cclanA9HVgMHSVSF9ClDTExM="
90+
src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.10/dist/htmx.min.js"
91+
integrity="sha256-cepnGFv6jJjDnTFxfG/OXYUjcPzf0SnbRUN3TTFFwN4="
9292
crossorigin="anonymous"
9393
referrerpolicy="no-referrer"
9494
></script>

server/fishtest/templates/tests_view.html.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
const runId = {{ run_id | tojson }};
99
</script>
1010
<script
11-
src="https://cdn.jsdelivr.net/npm/diff@8.0.3/dist/diff.min.js"
12-
integrity="sha256-g/bQGN3C0H+2VSdJbQs3iUM/y+M5E+qqBok29ZjwTWQ="
11+
src="https://cdn.jsdelivr.net/npm/diff@9.0.0/dist/diff.min.js"
12+
integrity="sha256-tRqdKIXywJDcl7mBAnOV9+fmVYpGx1rjdH2yZ5E6ias="
1313
crossorigin="anonymous"
1414
referrerpolicy="no-referrer"
1515
></script>

0 commit comments

Comments
 (0)