Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d2279f

Browse files
authored
[codex] Bump verified htmx baseline to 2.0.10 (#562)
* deps: bump verified htmx baseline to 2.0.10 * ci: stabilize htmx baseline browser proof * ci: preserve browser compatibility floor * test: ignore exact browser teardown signals
1 parent 97e5650 commit 9d2279f

49 files changed

Lines changed: 352 additions & 65 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,18 @@ jobs:
126126
- name: Install Chromium
127127
run: uv run playwright install chromium --with-deps
128128

129-
- name: Lucky Cat browser smoke
130-
run: uv run pytest examples/chirpui/lucky_cat/test_browser_smoke.py -q --tb=short --timeout=120
129+
# Pin after the last syncing uv command so the browser smoke cannot
130+
# silently restore a newer chirp-ui release from project resolution.
131+
# The separate compatibility matrix still exercises the latest release.
132+
- name: Pin Lucky Cat browser compatibility floor
133+
run: uv pip install "chirp-ui==0.10.0"
134+
135+
- name: Browser smoke
136+
run: >-
137+
uv run --no-sync pytest
138+
examples/chirpui/lucky_cat/test_browser_smoke.py
139+
examples/standalone/htmx_managed/test_browser_smoke.py
140+
-q --tb=short --timeout=120
131141
132142
# Dedicated PostgreSQL backend job. The main `test` job runs on free-threaded
133143
# 3.14t and does not ship asyncpg (a C-extension dependency), so live Postgres

changelog.d/543.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The verified htmx 2.x baseline is now 2.0.10. AppConfig.htmx_version, managed injection, first-party layouts, scaffolds, examples, tests, and source-site docs now use the explicit jsDelivr /dist/htmx.min.js browser bundle.

examples/chirpui/islands_shell/pages/_layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
})();
1414
</script>
1515
<title id="chirpui-document-title">{{ page_title ?? "Stock Ticker" }}</title>
16-
<script src="https://unpkg.com/[email protected].4"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
1717
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
1818
<script src="/static/chirpui.js"></script>
1919
<link rel="stylesheet" href="/static/chirpui.css">

examples/chirpui/lucky_cat/test_browser_smoke.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
crawl: it boots the example on a free port and drives Chromium through
55
Playwright to assert the things only a browser can see —
66
7-
* ``/``, ``/portfolio``, ``/trade`` load with ZERO console errors AND zero
8-
page errors (the CSP regression that silently killed Alpine — every shell
7+
* ``/``, ``/portfolio``, ``/trade`` load with zero unexpected console or page
8+
errors (the CSP regression that silently killed Alpine — every shell
99
interaction dead, ``window.Alpine`` undefined — showed up *only* as console
1010
errors, never in the server response, so a TestClient crawl cannot catch
1111
it);
@@ -206,7 +206,7 @@ def _record_console(msg) -> None:
206206
# shell→shell nav (e.g. the public / → /markets/{symbol}) and is not a
207207
# page defect. The window.Alpine + navigation assertions still guard a
208208
# genuinely broken shell.
209-
if msg.text.strip() == "Event":
209+
if msg.text.strip() in {"Event", "[object Event]"}:
210210
return
211211
# KNOWN UPSTREAM NOISE (chirp-ui 0.9.0). chirp-ui's own early
212212
# theme-bootstrap script and shell_runtime_script() inline <script>s are
@@ -223,8 +223,14 @@ def _record_console(msg) -> None:
223223
return
224224
errors.append(f"console.{msg.type}: {msg.text}")
225225

226+
def _record_page_error(exc) -> None:
227+
# Alpine cancels in-flight transitions when htmx replaces/navigates the shell.
228+
if str(exc).strip() == "Transition was skipped":
229+
return
230+
errors.append(f"pageerror: {exc}")
231+
226232
page.on("console", _record_console)
227-
page.on("pageerror", lambda exc: errors.append(f"pageerror: {exc}"))
233+
page.on("pageerror", _record_page_error)
228234
return context, page, errors
229235

230236

examples/chirpui/shell_oob/pages/_layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
})();
1414
</script>
1515
<title id="chirpui-document-title">{{ page_title ?? "Settings Console" }}</title>
16-
<script src="https://unpkg.com/[email protected].4"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
1717
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
1818
<script src="/static/chirpui.js"></script>
1919
<link rel="stylesheet" href="/static/chirpui.css">

examples/standalone/chat/templates/chat.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<html>
1313
<head>
1414
<title>Chat Room</title>
15-
<script src="https://unpkg.com/[email protected].4"></script>
15+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
1616
<script src="https://unpkg.com/[email protected]/sse.js"></script>
1717
<style>
1818
* { margin: 0; padding: 0; box-sizing: border-box; }

examples/standalone/contacts/templates/contacts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta charset="utf-8">
44
<meta name="viewport" content="width=device-width, initial-scale=1">
55
<title>Contacts</title>
6-
<script src="https://unpkg.com/[email protected].4"></script>
6+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
77
<style>
88
* { margin: 0; padding: 0; box-sizing: border-box; }
99
body {

examples/standalone/dashboard/templates/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<title>Weather Station</title>
9-
<script src="https://unpkg.com/[email protected].4"></script>
9+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
1010
<script src="https://unpkg.com/[email protected]/sse.js"></script>
1111
<style>
1212
* { margin: 0; padding: 0; box-sizing: border-box; }

examples/standalone/dashboard_live/templates/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<head>
66
<title>Live Sales Dashboard</title>
77
<meta name="view-transition" content="same-origin">
8-
<script src="https://unpkg.com/[email protected].4"></script>
8+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
99
<script src="https://unpkg.com/[email protected]/sse.js"></script>
1010
<style>
1111
* { margin: 0; padding: 0; box-sizing: border-box; }

examples/standalone/hackernews/templates/hackernews.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<head>
2525
<title>HN Live Reader</title>
2626
<meta name="view-transition" content="same-origin">
27-
<script src="https://unpkg.com/[email protected].4"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/[email protected].10/dist/htmx.min.js"></script>
2828
<script src="https://unpkg.com/[email protected]/sse.js"></script>
2929
<style>
3030
* {

0 commit comments

Comments
 (0)