oficina / slides Public

Smart door review fixes: no sameAnswer, doctor clean, team door tests

Fable on #49 (APPROVE AFTER FIXES at 49d5bcb):
- sameAnswer is gone: Begin's own problems are answered as they are
  (the same for any address), so a mistyped address is told so and a
  failed Keymail's force=1 survives a Begin error; reauth=1 and
  return_to still survive every answer. Tests for both, and the
  rate-limit test now compares two instances post for post.
- rastrillo doctor exits 0: migrate-templates -write (the $L localizer
  prelude, mechanical) over the 21 templates, the no-data icon calls
  pass their data, and rastrillo generate's empty stubs (gen/, api/v1.json,
  gen/locales with the English pack) are committed. AGENTS.md says how to
  keep it clean.
- Team-mode door tests: a removed member with a live session (/signin 303
  /, / 200, /decks/new 403, no loop); removed before choosing ("new" 403,
  no session); "new" over an app session (403); a stranger (403, no
  session, the door still draws).
- TestStoppingWithAStreamOpenExitsAtOnce puts its socket under /tmp: the
  macOS default TMPDIR ran past the 104-byte unix socket path limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 601d992443a866b797a49d683e615f0a3a262fcb parent 49d5bcb
35 files changed, +402 −238
  • AGENTS.md +11 −3
  • api/v1.json +4 −0
  • cmd/slides/shutdown_test.go +9 −1
  • gen/api.go +19 −0
  • gen/locales/packs.go +19 −0
  • gen/locales/packs_test.go +28 −0
  • gen/router.go +23 −0
  • internal/slides/app.go +2 −2
  • internal/slides/auth.go +31 −89
  • internal/slides/config.go +2 −2
  • internal/slides/signin_door_return_test.go +1 −1
  • internal/slides/signin_return.go +2 −2
  • internal/slides/team_access_test.go +80 −0
  • internal/slides/templates/agents.html +8 −8
  • internal/slides/templates/credits.html +1 −1
  • internal/slides/templates/deck_delete.html +4 −4
  • internal/slides/templates/deck_export.html +6 −6
  • internal/slides/templates/deck_new.html +4 −4
  • internal/slides/templates/deck_notes.html +3 −3
  • internal/slides/templates/deck_settings.html +7 −7
  • internal/slides/templates/decks.html +9 −9
  • internal/slides/templates/editor.html +33 −33
  • internal/slides/templates/errors.html +1 −1
  • internal/slides/templates/export_status.html +7 −7
  • internal/slides/templates/home_link.html +2 −2
  • internal/slides/templates/layout.html +1 −1
  • internal/slides/templates/present.html +3 −3
  • internal/slides/templates/present_notes.html +5 −5
  • internal/slides/templates/remote.html +4 −4
  • internal/slides/templates/remote_pair.html +5 −5
  • internal/slides/templates/share.html +9 −9
  • internal/slides/templates/signed_out.html +1 −1
  • internal/slides/templates/signin.html +3 −3
  • internal/slides/templates/viewer.html +2 −2
  • internal/slidestest/signin_test.go +53 −20

CI passed — run details

CI log
=== gate ===
=== rust: fmt
=== rust: clippy
    Updating crates.io index
 Downloading crates ...
  Downloaded ahash v0.8.12
  Downloaded downcast-rs v1.2.1
  Downloaded crossbeam-utils v0.8.22
  Downloaded indexmap v2.14.1
  Downloaded multi-stash v0.2.0
  Downloaded equivalent v1.0.2
  Downloaded wasmi_collections v0.32.3
  Downloaded dashmap v6.2.1
  Downloaded smallstr v0.3.1
  Downloaded autocfg v1.5.1
  Downloaded event-listener-strategy v0.5.4
  Downloaded cfg-if v1.0.4
  Downloaded indexmap-nostd v0.4.0
  Downloaded memchr v2.8.3
  Downloaded num-traits v0.2.19
  Downloaded hashbrown v0.14.5
  Downloaded paste v1.0.15
  Downloaded rustversion v1.0.23
  Downloaded semver v1.0.28
  Downloaded thiserror-impl v2.0.20
  Downloaded itoa v1.0.18
  Downloaded lock_api v0.4.14
  Downloaded quote v1.0.47
  Downloaded spin v0.9.9
  Downloaded zmij v1.0.23
  Downloaded async-trait v0.1.92
  Downloaded parking v2.2.1
  Downloaded scopeguard v1.2.0
  Downloaded version_check v0.9.5
  Downloaded foldhash v0.2.0
  Downloaded pin-project-lite v0.2.17
  Downloaded num-derive v0.4.2
  Downloaded serde v1.0.229
  Downloaded wasmi_core v0.32.3
  Downloaded string-interner v0.17.0
  Downloaded parking_lot_core v0.9.12
  Downloaded smallvec v1.15.2
  Downloaded bitflags v2.13.1
  Downloaded event-listener v5.4.2
  Downloaded once_cell v1.21.4
  Downloaded thiserror v2.0.20
  Downloaded arrayvec v0.7.8
  Downloaded serde_core v1.0.229
  Downloaded proc-macro2 v1.0.107
  Downloaded serde_derive v1.0.229
  Downloaded unicode-ident v1.0.24
  Downloaded async-lock v3.4.2
  Downloaded arc-swap v1.9.2
  Downloaded hashbrown v0.17.1
  Downloaded wasmparser-nostd v0.100.2
  Downloaded serde_json v1.0.151
  Downloaded libm v0.2.16
  Downloaded yrs v0.23.5
  Downloaded wasmparser v0.258.0
  Downloaded zerocopy v0.8.56
  Downloaded syn v2.0.119
  Downloaded syn v3.0.4
  Downloaded wasmi v0.32.3
  Downloaded libc v0.2.189
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.47
   Compiling serde_core v1.0.229
   Compiling zerocopy v0.8.56
   Compiling version_check v0.9.5
    Checking cfg-if v1.0.4
   Compiling serde v1.0.229
    Checking once_cell v1.21.4
    Checking smallvec v1.15.2
   Compiling libc v0.2.189
   Compiling parking_lot_core v0.9.12
   Compiling crossbeam-utils v0.8.22
    Checking parking v2.2.1
   Compiling rustversion v1.0.23
   Compiling autocfg v1.5.1
   Compiling zmij v1.0.23
    Checking pin-project-lite v0.2.17
    Checking event-listener v5.4.2
    Checking scopeguard v1.2.0
   Compiling paste v1.0.15
   Compiling thiserror v2.0.20
   Compiling libm v0.2.16
   Compiling serde_json v1.0.151
   Compiling ahash v0.8.12
   Compiling num-traits v0.2.19
    Checking event-listener-strategy v0.5.4
    Checking lock_api v0.4.14
    Checking foldhash v0.2.0
    Checking memchr v2.8.3
    Checking itoa v1.0.18
    Checking async-lock v3.4.2
    Checking smallstr v0.3.1
    Checking downcast-rs v1.2.1
    Checking equivalent v1.0.2
    Checking fastrand v2.5.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core/vendor/fastrand-2.5.0)
    Checking indexmap-nostd v0.4.0
    Checking multi-stash v0.2.0
    Checking semver v1.0.28
    Checking arrayvec v0.7.8
    Checking bitflags v2.13.1
    Checking wasmparser-nostd v0.100.2
    Checking spin v0.9.9
    Checking arc-swap v1.9.2
   Compiling syn v3.0.4
   Compiling syn v2.0.119
    Checking wasmi_core v0.32.3
    Checking hashbrown v0.17.1
    Checking indexmap v2.14.1
   Compiling num-derive v0.4.2
   Compiling serde_derive v1.0.229
   Compiling thiserror-impl v2.0.20
   Compiling async-trait v0.1.92
    Checking hashbrown v0.14.5
    Checking dashmap v6.2.1
    Checking string-interner v0.17.0
    Checking yrs v0.23.5
    Checking wasmparser v0.258.0
    Checking wasmi_collections v0.32.3
    Checking wasmi v0.32.3
    Checking slides-core v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.10s
=== the embedded wasm must be built from these sources
wasm-stamp: internal/slides/core/testdata/slides_core.wasm was built from these inputs
=== wasm: the artifact the host embeds
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
build-wasm: Linux/aarch64 builds natively; the result is not the canonical amd64 build
 Downloading crates ...
  Downloaded getrandom v0.4.3
   Compiling proc-macro2 v1.0.107
   Compiling quote v1.0.47
   Compiling unicode-ident v1.0.24
   Compiling cfg-if v1.0.4
   Compiling serde_core v1.0.229
   Compiling crossbeam-utils v0.8.22
   Compiling rustversion v1.0.23
   Compiling smallvec v1.15.2
   Compiling parking_lot_core v0.9.12
   Compiling getrandom v0.4.3
   Compiling zmij v1.0.23
   Compiling pin-project-lite v0.2.17
   Compiling thiserror v2.0.20
   Compiling serde_json v1.0.151
   Compiling scopeguard v1.2.0
   Compiling serde v1.0.229
   Compiling itoa v1.0.18
   Compiling memchr v2.8.3
   Compiling hashbrown v0.14.5
   Compiling event-listener v5.4.2
   Compiling lock_api v0.4.14
   Compiling once_cell v1.21.4
   Compiling fastrand v2.5.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core/vendor/fastrand-2.5.0)
   Compiling smallstr v0.3.1
   Compiling event-listener-strategy v0.5.4
   Compiling async-lock v3.4.2
   Compiling arc-swap v1.9.2
   Compiling dashmap v6.2.1
   Compiling syn v3.0.4
   Compiling serde_derive v1.0.229
   Compiling thiserror-impl v2.0.20
   Compiling async-trait v0.1.92
   Compiling yrs v0.23.5
   Compiling slides-core v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core)
    Finished `release` profile [optimized] target(s) in 10.25s
core/target/wasm32-unknown-unknown/release/slides_core.wasm (783045 bytes)
=== the embedded wasm must match a fresh build
gate: byte comparison skipped on Linux/aarch64: no build on this host reproduces the canonical amd64 bytes; the input stamp above holds freshness here
=== rust: test
   Compiling cfg-if v1.0.4
   Compiling once_cell v1.21.4
   Compiling smallvec v1.15.2
   Compiling parking v2.2.1
   Compiling pin-project-lite v0.2.17
   Compiling serde_core v1.0.229
   Compiling zerocopy v0.8.56
   Compiling libc v0.2.189
   Compiling scopeguard v1.2.0
   Compiling zmij v1.0.23
   Compiling crossbeam-utils v0.8.22
   Compiling memchr v2.8.3
   Compiling itoa v1.0.18
   Compiling foldhash v0.2.0
   Compiling thiserror v2.0.20
   Compiling arc-swap v1.9.2
   Compiling libm v0.2.16
   Compiling lock_api v0.4.14
   Compiling num-traits v0.2.19
   Compiling fastrand v2.5.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core/vendor/fastrand-2.5.0)
   Compiling event-listener v5.4.2
   Compiling smallstr v0.3.1
   Compiling equivalent v1.0.2
   Compiling indexmap-nostd v0.4.0
   Compiling downcast-rs v1.2.1
   Compiling bitflags v2.13.1
   Compiling spin v0.9.9
   Compiling multi-stash v0.2.0
   Compiling semver v1.0.28
   Compiling arrayvec v0.7.8
   Compiling event-listener-strategy v0.5.4
   Compiling wasmparser-nostd v0.100.2
   Compiling async-lock v3.4.2
   Compiling wasmi_core v0.32.3
   Compiling parking_lot_core v0.9.12
   Compiling serde v1.0.229
   Compiling hashbrown v0.17.1
   Compiling serde_json v1.0.151
   Compiling indexmap v2.14.1
   Compiling wasmparser v0.258.0
   Compiling ahash v0.8.12
   Compiling hashbrown v0.14.5
   Compiling string-interner v0.17.0
   Compiling dashmap v6.2.1
   Compiling wasmi_collections v0.32.3
   Compiling yrs v0.23.5
   Compiling wasmi v0.32.3
   Compiling slides-core v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 11.46s
     Running unittests src/lib.rs (core/target/debug/deps/slides_core-e2842964c29de994)

running 30 tests
test layout::tests::aside_region_rect ... ok
test check::tests::the_empty_document_passes ... ok
test layout::tests::heading_region_rect ... ok
test layout::tests::media_region_rect ... ok
test layout::tests::default_region_by_kind ... ok
test layout::tests::body_region_rect_narrows_for_an_aside ... ok
test markdown::tests::empty_input_is_no_paragraphs_and_lines_keep_blanks ... ok
test markdown::tests::inline_marks ... ok
test markdown::tests::marks_nest_and_links_carry_marks ... ok
test markdown::tests::paragraphs_split_on_blank_lines_and_list_markers ... ok
test layout::tests::to_canvas_narrows_body_when_an_aside_is_present ... ok
test schema::tests::an_empty_map_reads_as_a_set_mark ... ok
test layout::tests::to_flow_is_a_no_op_when_already_in_order ... ok
test schema::tests::an_href_map_without_a_string_url_reads_as_no_link ... ok
test schema::tests::href_is_written_as_a_one_key_map_and_reads_back ... ok
test schema::tests::href_written_as_a_plain_string_still_reads_back ... ok
test layout::tests::to_canvas_splits_a_shared_region_equally_and_sets_z_by_index ... ok
test layout::tests::to_flow_classifies_by_position_and_kind ... ok
test check::tests::what_the_ops_write_passes ... ok
test check::tests::bare_text_at_fragment_level_is_reported ... ok
test check::tests::an_element_inside_a_paragraph_is_reported ... ok
test check::tests::a_non_paragraph_child_is_reported ... ok
test check::tests::y_prosemirror_shapes_pass ... ok
test layout::tests::to_flow_orders_y_then_x ... ok
test check::tests::an_unknown_formatting_attribute_is_reported ... ok
test view::tests::assets_are_typed_or_skipped ... ok
test view::tests::malformed_background_is_the_default ... ok
test view::tests::malformed_box_is_null_and_phone_keeps_only_typed_fields ... ok
test view::tests::malformed_fonts_are_null ... ok
test layout::tests::to_flow_keeps_a_concurrent_text_edit ... ok

test result: ok. 30 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/no_host_imports.rs (core/target/debug/deps/no_host_imports-0da85e8553d154e5)

running 1 test
test no_host_imports ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/ops.rs (core/target/debug/deps/ops-ac5209169f357f96)

running 12 tests
test add_slide_then_view_lists_it ... ok
test ops_are_atomic ... ok
test add_block_with_markdown_produces_runs ... ok
test layout_switch_assigns_boxes ... ok
test remove_block_drops_it_from_columns_children ... ok
test columns_children_must_name_blocks_on_the_slide ... ok
test duplicate_slide_remaps_columns_children ... ok
test update_roundtrip ... ok
test columns_children_have_one_parent_and_no_cycles ... ok
test move_block_keeps_a_concurrent_text_edit ... ok
test move_slide_keeps_a_concurrent_text_edit ... ok
test remaining_ops_roundtrip ... ok

test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

   Doc-tests slides_core

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

=== rust: fmt (pdf)
=== rust: clippy (pdf)
    Updating crates.io index
 Downloading crates ...
  Downloaded arrayref v0.3.9
  Downloaded color_quant v1.1.0
  Downloaded core_maths v0.1.1
  Downloaded adler2 v2.0.1
  Downloaded byteorder-lite v0.1.0
  Downloaded crc32fast v1.5.1
  Downloaded base64 v0.22.1
  Downloaded euclid v0.22.14
  Downloaded gif v0.14.2
  Downloaded data-url v0.3.2
  Downloaded rgb v0.8.53
  Downloaded xmlwriter v0.1.0
  Downloaded imagesize v0.14.0
  Downloaded image-webp v0.2.4
  Downloaded png v0.18.1
  Downloaded simd-adler32 v0.3.10
  Downloaded unicode-bidi-mirroring v0.4.0
  Downloaded unicode-vo v0.1.0
  Downloaded pico-args v0.5.0
  Downloaded yoke-derive v0.8.2
  Downloaded zerofrom-derive v0.1.7
  Downloaded siphasher v1.0.3
  Downloaded zune-core v0.5.3
  Downloaded krilla-svg v0.8.1
  Downloaded polycool v0.4.0
  Downloaded smallvec v1.16.0
  Downloaded float-cmp v0.9.0
  Downloaded zerofrom v0.1.8
  Downloaded rustc-hash v2.1.3
  Downloaded stable_deref_trait v1.2.1
  Downloaded strict-num v0.1.1
  Downloaded tinyvec_macros v0.1.1
  Downloaded unicode-ccc v0.4.0
  Downloaded quick-error v2.0.1
  Downloaded simplecss v0.2.2
  Downloaded bytemuck_derive v1.12.0
  Downloaded font-types v0.11.3
  Downloaded subsetter v0.2.6
  Downloaded synstructure v0.13.2
  Downloaded fdeflate v0.3.7
  Downloaded memmap2 v0.9.11
  Downloaded roxmltree v0.20.0
  Downloaded tiny-skia-path v0.12.0
  Downloaded unicode-properties v0.1.4
  Downloaded yoke v0.8.3
  Downloaded fontconfig-parser v0.5.8
  Downloaded unicode-script v0.5.8
  Downloaded weezl v0.1.12
  Downloaded xmp-writer v0.3.3
  Downloaded unicode-bidi v0.3.18
  Downloaded svgtypes v0.16.1
  Downloaded bytemuck v1.25.2
  Downloaded ryu v1.0.23
  Downloaded log v0.4.34
  Downloaded roxmltree v0.21.1
  Downloaded miniz_oxide v0.9.1
  Downloaded slotmap v1.1.1
  Downloaded flate2 v1.1.10
  Downloaded tinyvec v1.13.2
  Downloaded miniz_oxide v0.8.9
  Downloaded resvg v0.47.0
  Downloaded zune-jpeg v0.5.15
  Downloaded bumpalo v3.20.3
  Downloaded fontdb v0.23.0
  Downloaded indexmap v2.14.2
  Downloaded kurbo v0.13.1
  Downloaded usvg v0.47.0
  Downloaded skrifa v0.42.1
  Downloaded krilla v0.8.2
  Downloaded ttf-parser v0.25.1
  Downloaded zlib-rs v0.6.7
  Downloaded rustybuzz v0.20.1
  Downloaded tiny-skia v0.12.0
  Downloaded write-fonts v0.48.1
  Downloaded syn v3.0.5
  Downloaded read-fonts v0.39.2
  Downloaded pdf-writer v0.15.0
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.47
   Compiling autocfg v1.5.1
   Compiling serde_core v1.0.229
    Checking simd-adler32 v0.3.10
   Compiling libm v0.2.16
    Checking log v0.4.34
    Checking arrayvec v0.7.8
    Checking smallvec v1.16.0
    Checking bitflags v2.13.1
   Compiling crc32fast v1.5.1
    Checking adler2 v2.0.1
    Checking cfg-if v1.0.4
    Checking foldhash v0.2.0
   Compiling libc v0.2.189
   Compiling version_check v0.9.5
    Checking arrayref v0.3.9
    Checking memchr v2.8.3
    Checking miniz_oxide v0.9.1
    Checking equivalent v1.0.2
    Checking fdeflate v0.3.7
    Checking miniz_oxide v0.8.9
    Checking unicode-bidi-mirroring v0.4.0
    Checking unicode-properties v0.1.4
    Checking polycool v0.4.0
    Checking unicode-ccc v0.4.0
    Checking roxmltree v0.20.0
    Checking unicode-script v0.5.8
    Checking siphasher v1.0.3
    Checking kurbo v0.13.1
    Checking tinyvec_macros v0.1.1
    Checking color_quant v1.1.0
   Compiling slotmap v1.1.1
    Checking tinyvec v1.13.2
    Checking quick-error v2.0.1
   Compiling num-traits v0.2.19
    Checking byteorder-lite v0.1.0
    Checking zune-core v0.5.3
    Checking base64 v0.22.1
    Checking weezl v0.1.12
    Checking flate2 v1.1.10
    Checking imagesize v0.14.0
    Checking roxmltree v0.21.1
    Checking fontconfig-parser v0.5.8
    Checking zune-jpeg v0.5.15
    Checking image-webp v0.2.4
    Checking simplecss v0.2.2
    Checking stable_deref_trait v1.2.1
    Checking rustc-hash v2.1.3
    Checking gif v0.14.2
    Checking data-url v0.3.2
    Checking pico-args v0.5.0
    Checking png v0.18.1
    Checking unicode-vo v0.1.0
    Checking xmlwriter v0.1.0
    Checking itoa v1.0.18
    Checking ryu v1.0.23
    Checking unicode-bidi v0.3.18
   Compiling serde v1.0.229
    Checking bumpalo v3.20.3
    Checking pdf-writer v0.15.0
    Checking xmp-writer v0.3.3
    Checking semver v1.0.28
   Compiling syn v3.0.5
   Compiling syn v2.0.119
    Checking svgtypes v0.16.1
    Checking core_maths v0.1.1
    Checking ttf-parser v0.25.1
    Checking float-cmp v0.9.0
    Checking strict-num v0.1.1
    Checking memmap2 v0.9.11
    Checking hashbrown v0.17.1
    Checking indexmap v2.14.2
   Compiling bytemuck_derive v1.12.0
    Checking fontdb v0.23.0
   Compiling synstructure v0.13.2
    Checking wasmparser v0.258.0
   Compiling zerofrom-derive v0.1.7
   Compiling yoke-derive v0.8.2
    Checking bytemuck v1.25.2
    Checking font-types v0.11.3
    Checking tiny-skia-path v0.12.0
    Checking rustybuzz v0.20.1
    Checking rgb v0.8.53
    Checking zerofrom v0.1.8
    Checking yoke v0.8.3
    Checking read-fonts v0.39.2
    Checking tiny-skia v0.12.0
    Checking usvg v0.47.0
    Checking resvg v0.47.0
    Checking skrifa v0.42.1
    Checking write-fonts v0.48.1
    Checking subsetter v0.2.6
    Checking krilla v0.8.2
    Checking krilla-svg v0.8.1
    Checking slides-pdf v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core/pdf)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.41s
=== the embedded pdf wasm must be built from these sources
wasm-stamp: internal/slides/pdfcore/testdata/slides_pdf.wasm was built from these inputs
=== wasm: the pdf artifact the host embeds
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
build-pdf-wasm: Linux/aarch64 builds natively; the result is not the canonical amd64 build
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.47
   Compiling autocfg v1.5.1
   Compiling log v0.4.34
   Compiling simd-adler32 v0.3.10
   Compiling libm v0.2.16
   Compiling arrayvec v0.7.8
   Compiling adler2 v2.0.1
   Compiling smallvec v1.16.0
   Compiling crc32fast v1.5.1
   Compiling cfg-if v1.0.4
   Compiling bitflags v2.13.1
   Compiling version_check v0.9.5
   Compiling arrayref v0.3.9
   Compiling memchr v2.8.3
   Compiling tinyvec_macros v0.1.1
   Compiling unicode-script v0.5.8
   Compiling equivalent v1.0.2
   Compiling unicode-bidi-mirroring v0.4.0
   Compiling miniz_oxide v0.9.1
   Compiling fdeflate v0.3.7
   Compiling miniz_oxide v0.8.9
   Compiling polycool v0.4.0
   Compiling unicode-ccc v0.4.0
   Compiling unicode-properties v0.1.4
   Compiling siphasher v1.0.3
   Compiling hashbrown v0.17.1
   Compiling slotmap v1.1.1
   Compiling tinyvec v1.13.2
   Compiling kurbo v0.13.1
   Compiling base64 v0.22.1
   Compiling imagesize v0.14.0
   Compiling num-traits v0.2.19
   Compiling zune-core v0.5.3
   Compiling flate2 v1.1.10
   Compiling quick-error v2.0.1
   Compiling color_quant v1.1.0
   Compiling memmap2 v0.9.11
   Compiling byteorder-lite v0.1.0
   Compiling indexmap v2.14.2
   Compiling weezl v0.1.12
   Compiling zune-jpeg v0.5.15
   Compiling png v0.18.1
   Compiling image-webp v0.2.4
   Compiling roxmltree v0.21.1
   Compiling syn v3.0.5
   Compiling syn v2.0.119
   Compiling simplecss v0.2.2
   Compiling core_maths v0.1.1
   Compiling ttf-parser v0.25.1
   Compiling float-cmp v0.9.0
   Compiling svgtypes v0.16.1
   Compiling strict-num v0.1.1
   Compiling gif v0.14.2
   Compiling stable_deref_trait v1.2.1
   Compiling unicode-vo v0.1.0
   Compiling unicode-bidi v0.3.18
   Compiling pico-args v0.5.0
   Compiling xmlwriter v0.1.0
   Compiling data-url v0.3.2
   Compiling ryu v1.0.23
   Compiling itoa v1.0.18
   Compiling rustc-hash v2.1.3
   Compiling pdf-writer v0.15.0
   Compiling xmp-writer v0.3.3
   Compiling bumpalo v3.20.3
   Compiling bytemuck_derive v1.12.0
   Compiling synstructure v0.13.2
   Compiling fontdb v0.23.0
   Compiling zerofrom-derive v0.1.7
   Compiling yoke-derive v0.8.2
   Compiling bytemuck v1.25.2
   Compiling zerofrom v0.1.8
   Compiling yoke v0.8.3
   Compiling font-types v0.11.3
   Compiling tiny-skia-path v0.12.0
   Compiling rustybuzz v0.20.1
   Compiling rgb v0.8.53
   Compiling read-fonts v0.39.2
   Compiling tiny-skia v0.12.0
   Compiling usvg v0.47.0
   Compiling resvg v0.47.0
   Compiling write-fonts v0.48.1
   Compiling skrifa v0.42.1
   Compiling subsetter v0.2.6
   Compiling krilla v0.8.2
   Compiling krilla-svg v0.8.1
   Compiling slides-pdf v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core/pdf)
    Finished `release` profile [optimized] target(s) in 17.09s
core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm (4157674 bytes)
=== the embedded pdf wasm must match a fresh build
gate: byte comparison skipped on Linux/aarch64: no build on this host reproduces the canonical amd64 bytes; the input stamp above holds freshness here
=== rust: test (pdf)
   Compiling simd-adler32 v0.3.10
   Compiling arrayvec v0.7.8
   Compiling log v0.4.34
   Compiling adler2 v2.0.1
   Compiling smallvec v1.16.0
   Compiling bitflags v2.13.1
   Compiling cfg-if v1.0.4
   Compiling foldhash v0.2.0
   Compiling serde_core v1.0.229
   Compiling libm v0.2.16
   Compiling memchr v2.8.3
   Compiling equivalent v1.0.2
   Compiling arrayref v0.3.9
   Compiling libc v0.2.189
   Compiling num-traits v0.2.19
   Compiling bytemuck v1.25.2
   Compiling crc32fast v1.5.1
   Compiling unicode-ccc v0.4.0
   Compiling unicode-properties v0.1.4
   Compiling miniz_oxide v0.9.1
   Compiling miniz_oxide v0.8.9
   Compiling fdeflate v0.3.7
   Compiling unicode-bidi-mirroring v0.4.0
   Compiling polycool v0.4.0
   Compiling roxmltree v0.20.0
   Compiling siphasher v1.0.3
   Compiling tinyvec_macros v0.1.1
   Compiling unicode-script v0.5.8
   Compiling slotmap v1.1.1
   Compiling tinyvec v1.13.2
   Compiling byteorder-lite v0.1.0
   Compiling font-types v0.11.3
   Compiling kurbo v0.13.1
   Compiling weezl v0.1.12
   Compiling flate2 v1.1.10
   Compiling float-cmp v0.9.0
   Compiling read-fonts v0.39.2
   Compiling fontconfig-parser v0.5.8
   Compiling zune-core v0.5.3
   Compiling color_quant v1.1.0
   Compiling strict-num v0.1.1
   Compiling imagesize v0.14.0
   Compiling base64 v0.22.1
   Compiling tiny-skia-path v0.12.0
   Compiling quick-error v2.0.1
   Compiling png v0.18.1
   Compiling core_maths v0.1.1
   Compiling memmap2 v0.9.11
   Compiling ttf-parser v0.25.1
   Compiling image-webp v0.2.4
   Compiling zune-jpeg v0.5.15
   Compiling gif v0.14.2
   Compiling roxmltree v0.21.1
   Compiling zerofrom v0.1.8
   Compiling simplecss v0.2.2
   Compiling unicode-bidi v0.3.18
   Compiling rustc-hash v2.1.3
   Compiling xmlwriter v0.1.0
   Compiling svgtypes v0.16.1
   Compiling data-url v0.3.2
   Compiling ryu v1.0.23
   Compiling stable_deref_trait v1.2.1
   Compiling unicode-vo v0.1.0
   Compiling itoa v1.0.18
   Compiling pico-args v0.5.0
   Compiling tiny-skia v0.12.0
   Compiling yoke v0.8.3
   Compiling rgb v0.8.53
   Compiling pdf-writer v0.15.0
   Compiling bumpalo v3.20.3
   Compiling xmp-writer v0.3.3
   Compiling semver v1.0.28
   Compiling hashbrown v0.17.1
   Compiling serde v1.0.229
   Compiling indexmap v2.14.2
   Compiling rustybuzz v0.20.1
   Compiling fontdb v0.23.0
   Compiling wasmparser v0.258.0
   Compiling usvg v0.47.0
   Compiling resvg v0.47.0
   Compiling write-fonts v0.48.1
   Compiling skrifa v0.42.1
   Compiling subsetter v0.2.6
   Compiling krilla v0.8.2
   Compiling krilla-svg v0.8.1
   Compiling slides-pdf v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__smart-door/core/pdf)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 18.11s
     Running unittests src/lib.rs (core/pdf/target/debug/deps/slides_pdf-7ec7cd25f86a82d7)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/no_host_imports.rs (core/pdf/target/debug/deps/no_host_imports-09d1f8ca96bf3a46)

running 1 test
test no_host_imports ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running tests/render.rs (core/pdf/target/debug/deps/render-888658dffec5d3c9)

running 6 tests
test a_null_zero_length_pair_is_no_frames_not_a_dereference ... ok
test text_with_no_fonts_at_all_still_renders_the_shapes ... ok
test raster_image_is_embedded ... ok
test abi_frames_round_trip ... ok
test renders_text_as_embedded_glyphs ... ok
test two_svgs_make_two_pages ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

   Doc-tests slides_pdf

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

=== fixtures: node dependencies
v22.23.4
10.9.9
=== fixtures: npm ci (needs the registry — see .amadan/README.md)

added 19 packages, and audited 20 packages in 2s

5 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 10.9.9 -> 12.2.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.3
npm notice To update run: npm install -g npm@12.2.3
npm notice
=== fixtures: the JS side's own tests
TAP version 13
# Subtest: one finished upload is register_asset plus the block that uses it, in one batch
ok 1 - one finished upload is register_asset plus the block that uses it, in one batch
  ---
  duration_ms: 8.846158
  type: 'test'
  ...
# Subtest: a record missing its numbers still makes an op the core accepts
ok 2 - a record missing its numbers still makes an op the core accepts
  ---
  duration_ms: 1.281862
  type: 'test'
  ...
# Subtest: unusedAssets is what no slide refers to, and remove_asset drops one
ok 3 - unusedAssets is what no slide refers to, and remove_asset drops one
  ---
  duration_ms: 4.092692
  type: 'test'
  ...
# Subtest: the Unused images list reconciles by id and names each Remove button
ok 4 - the Unused images list reconciles by id and names each Remove button
  ---
  duration_ms: 1.74789
  type: 'test'
  ...
# Subtest: an upload refusal is said in words the person can act on
ok 5 - an upload refusal is said in words the person can act on
  ---
  duration_ms: 0.22468
  type: 'test'
  ...
# Subtest: a request is the trimmed prompt, the scope, the slide and the model
ok 6 - a request is the trimmed prompt, the scope, the slide and the model
  ---
  duration_ms: 1.802829
  type: 'test'
  ...
# Subtest: an empty, blank or over-long prompt, or "this slide" with none, is never sent
ok 7 - an empty, blank or over-long prompt, or "this slide" with none, is never sent
  ---
  duration_ms: 0.577472
  type: 'test'
  ...
# Subtest: server words map onto the panel's strings, and anything else is generic
ok 8 - server words map onto the panel's strings, and anything else is generic
  ---
  duration_ms: 0.269985
  type: 'test'
  ...
# Subtest: an answer must be a list of op objects; anything else is generic
ok 9 - an answer must be a list of op objects; anything else is generic
  ---
  duration_ms: 0.874959
  type: 'test'
  ...
# Subtest: an answer is posted as JSON, applied through commit, saved, and focused
ok 10 - an answer is posted as JSON, applied through commit, saved, and focused
  ---
  duration_ms: 0.814857
  type: 'test'
  ...
# Subtest: a slide is focused only once its save is acknowledged
ok 11 - a slide is focused only once its save is acknowledged
  ---
  duration_ms: 0.245567
  type: 'test'
  ...
# Subtest: no ops is "nothing", and nothing is committed
ok 12 - no ops is "nothing", and nothing is committed
  ---
  duration_ms: 0.37086
  type: 'test'
  ...
# Subtest: every failure is a word, and nothing is applied
ok 13 - every failure is a word, and nothing is applied
  ---
  duration_ms: 1.167996
  type: 'test'
  ...
# Subtest: undo takes back the answer's own step, once
ok 14 - undo takes back the answer's own step, once
  ---
  duration_ms: 0.846974
  type: 'test'
  ...
# Subtest: a batch shaped as the server answers it applies through ops.mjs
ok 15 - a batch shaped as the server answers it applies through ops.mjs
  ---
  duration_ms: 11.644389
  type: 'test'
  ...
# Subtest: the toggle is lit while the panel is open, and opening focuses the prompt
ok 16 - the toggle is lit while the panel is open, and opening focuses the prompt
  ---
  duration_ms: 2.454442
  type: 'test'
  ...
# Subtest: a deck with no slide opens on "the whole deck"
ok 17 - a deck with no slide opens on "the whole deck"
  ---
  duration_ms: 0.507186
  type: 'test'
  ...
# Subtest: asking is busy, then says what was done and offers Undo
ok 18 - asking is busy, then says what was done and offers Undo
  ---
  duration_ms: 1.134692
  type: 'test'
  ...
# Subtest: an error is said in the catalog's words, marked, and offers no Undo
ok 19 - an error is said in the catalog's words, marked, and offers no Undo
  ---
  duration_ms: 0.832367
  type: 'test'
  ...
# Subtest: destroy takes every listener away
ok 20 - destroy takes every listener away
  ---
  duration_ms: 0.514973
  type: 'test'
  ...
# Subtest: rowsFor: a canvas box is arranged in layers and placed; a flow box by region
ok 21 - rowsFor: a canvas box is arranged in layers and placed; a flow box by region
  ---
  duration_ms: 1.745035
  type: 'test'
  ...
# Subtest: canOwnContextMenu: never in text being edited, anywhere else on a box
ok 22 - canOwnContextMenu: never in text being edited, anywhere else on a box
  ---
  duration_ms: 0.945115
  type: 'test'
  ...
# Subtest: boxKey: the box's keys, and Delete and the arrows only from the box itself
ok 23 - boxKey: the box's keys, and Delete and the arrows only from the box itself
  ---
  duration_ms: 0.341835
  type: 'test'
  ...
# Subtest: open draws only the rows that apply, and focuses the first
ok 24 - open draws only the rows that apply, and focuses the first
  ---
  duration_ms: 3.217851
  type: 'test'
  ...
# Subtest: a row runs its command and closes; a region row sets the region
ok 25 - a row runs its command and closes; a region row sets the region
  ---
  duration_ms: 1.388576
  type: 'test'
  ...
# Subtest: the arrows move through the rows drawn; Esc closes and focuses the box, and goes no further
ok 26 - the arrows move through the rows drawn; Esc closes and focuses the box, and goes no further
  ---
  duration_ms: 1.523265
  type: 'test'
  ...
# Subtest: place: the round button follows the selection, and an empty selection closes the menu
ok 27 - place: the round button follows the selection, and an empty selection closes the menu
  ---
  duration_ms: 1.327021
  type: 'test'
  ...
# Subtest: a right-click on a box opens the menu; in text being edited it is the browser's
ok 28 - a right-click on a box opens the menu; in text being edited it is the browser's
  ---
  duration_ms: 0.787748
  type: 'test'
  ...
# Subtest: the keys: from the box, from its text, and never from outside the stage
ok 29 - the keys: from the box, from its text, and never from outside the stage
  ---
  duration_ms: 1.231612
  type: 'test'
  ...
# Subtest: sync: the menu closes when the slide's layout changes, and its region checks follow the box
ok 30 - sync: the menu closes when the slide's layout changes, and its region checks follow the box
  ---
  duration_ms: 3.149788
  type: 'test'
  ...
# Subtest: a row that no longer applies to the box does nothing, and closes the menu
ok 31 - a row that no longer applies to the box does nothing, and closes the menu
  ---
  duration_ms: 0.772438
  type: 'test'
  ...
# Subtest: destroy takes every listener off the page's elements
ok 32 - destroy takes every listener off the page's elements
  ---
  duration_ms: 0.386144
  type: 'test'
  ...
# Subtest: place: a stage with no room docks the round button beside the view switch
ok 33 - place: a stage with no room docks the round button beside the view switch
  ---
  duration_ms: 0.945537
  type: 'test'
  ...
# Subtest: place: the round button follows the phone screen's scroll, and goes while its box is out of sight
ok 34 - place: the round button follows the phone screen's scroll, and goes while its box is out of sight
  ---
  duration_ms: 0.656504
  type: 'test'
  ...
# Subtest: buttonSpot: at the top end corner, inside the stage, clear of every handle
ok 35 - buttonSpot: at the top end corner, inside the stage, clear of every handle
  ---
  duration_ms: 1.686251
  type: 'test'
  ...
# Subtest: menuSpot: under its anchor, flipped and kept inside the window
ok 36 - menuSpot: under its anchor, flipped and kept inside the window
  ---
  duration_ms: 1.050997
  type: 'test'
  ...
# Subtest: buttonSpot: any box, a tiny one in a corner included, gets a spot that covers no handle
ok 37 - buttonSpot: any box, a tiny one in a corner included, gets a spot that covers no handle
  ---
  duration_ms: 74.461828
  type: 'test'
  ...
# Subtest: buttonSpot: the reviewer's box filling a small stage, and boxes filling stages
ok 38 - buttonSpot: the reviewer's box filling a small stage, and boxes filling stages
  ---
  duration_ms: 1.784041
  type: 'test'
  ...
# Subtest: buttonSpot: thousands of boxes, every answer fits, null only when nothing does
ok 39 - buttonSpot: thousands of boxes, every answer fits, null only when nothing does
  ---
  duration_ms: 34.65889
  type: 'test'
  ...
# Subtest: clip: what can be seen of a rect through a frame; the rect itself where the frame has no box
ok 40 - clip: what can be seen of a rect through a frame; the rect itself where the frame has no box
  ---
  duration_ms: 0.253536
  type: 'test'
  ...
# Subtest: buttonSpot: clear of the other boxes where it can be, over one only where nothing else fits
ok 41 - buttonSpot: clear of the other boxes where it can be, over one only where nothing else fits
  ---
  duration_ms: 0.636618
  type: 'test'
  ...
# Subtest: clampBox keeps the box inside the frame and no smaller than the minimum
ok 42 - clampBox keeps the box inside the frame and no smaller than the minimum
  ---
  duration_ms: 1.574999
  type: 'test'
  ...
# Subtest: fixBox writes four decimals
ok 43 - fixBox writes four decimals
  ---
  duration_ms: 0.304029
  type: 'test'
  ...
# Subtest: guides are the thirds plus every other block edge
ok 44 - guides are the thirds plus every other block edge
  ---
  duration_ms: 0.282799
  type: 'test'
  ...
# Subtest: snapMove pulls the nearest edge onto a guide within one per cent, and leaves a far one
ok 45 - snapMove pulls the nearest edge onto a guide within one per cent, and leaves a far one
  ---
  duration_ms: 0.391914
  type: 'test'
  ...
# Subtest: snapResize moves only the edges the handle drags
ok 46 - snapResize moves only the edges the handle drags
  ---
  duration_ms: 0.32734
  type: 'test'
  ...
# Subtest: moveBox and resizeBox by handle
ok 47 - moveBox and resizeBox by handle
  ---
  duration_ms: 0.29977
  type: 'test'
  ...
# Subtest: nudge: arrows move by half a per cent, Shift by two, Alt resizes
ok 48 - nudge: arrows move by half a per cent, Shift by two, Alt resizes
  ---
  duration_ms: 0.352057
  type: 'test'
  ...
# Subtest: rectBox reads a block rectangle against its frame
ok 49 - rectBox reads a block rectangle against its frame
  ---
  duration_ms: 0.31587
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (a) the paste right after the refused x (Fable's probe)
ok 50 - a paste that waited for its font is kept: (a) the paste right after the refused x (Fable's probe)
  ---
  duration_ms: 21.713096
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (b) the refused x elsewhere, before the paste
ok 51 - a paste that waited for its font is kept: (b) the refused x elsewhere, before the paste
  ---
  duration_ms: 4.52444
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (g) the refused x after the paste point
ok 52 - a paste that waited for its font is kept: (g) the refused x after the paste point
  ---
  duration_ms: 5.904321
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (c) two refused x, the paste after the second
ok 53 - a paste that waited for its font is kept: (c) two refused x, the paste after the second
  ---
  duration_ms: 3.051205
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (i) the refused x mid-paragraph, the paste at its end
ok 54 - a paste that waited for its font is kept: (i) the refused x mid-paragraph, the paste at its end
  ---
  duration_ms: 2.968505
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (e) the paste over "paragraph.x"
ok 55 - a paste that waited for its font is kept: (e) the paste over "paragraph.x"
  ---
  duration_ms: 4.208861
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (f) a refused deletion elsewhere
ok 56 - a paste that waited for its font is kept: (f) a refused deletion elsewhere
  ---
  duration_ms: 2.964008
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (h) two paragraphs pasted after the refused x
ok 57 - a paste that waited for its font is kept: (h) two paragraphs pasted after the refused x
  ---
  duration_ms: 3.282179
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (j) a colleague's words before, the refused x after
ok 58 - a paste that waited for its font is kept: (j) a colleague's words before, the refused x after
  ---
  duration_ms: 7.136097
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (k) a colleague appended where the x was refused
ok 59 - a paste that waited for its font is kept: (k) a colleague appended where the x was refused
  ---
  duration_ms: 5.573897
  type: 'test'
  ...
# Subtest: a paste into a paragraph the refused change made cannot be kept: nothing is posted, the page is the server's
ok 60 - a paste into a paragraph the refused change made cannot be kept: nothing is posted, the page is the server's
  ---
  duration_ms: 2.003347
  type: 'test'
  ...
# Subtest: a paste made elsewhere carries as its own updates, not a replay
ok 61 - a paste made elsewhere carries as its own updates, not a replay
  ---
  duration_ms: 1.751581
  type: 'test'
  ...
# Subtest: the replay is one change for an undo manager tracking the carried origin
ok 62 - the replay is one change for an undo manager tracking the carried origin
  ---
  duration_ms: 3.044426
  type: 'test'
  ...
# Subtest: every update written on top of the refused text is held back, not only the first
ok 63 - every update written on top of the refused text is held back, not only the first
  ---
  duration_ms: 1.640448
  type: 'test'
  ...
# Subtest: a Backspace over the refused text is held back
ok 64 - a Backspace over the refused text is held back
  ---
  duration_ms: 0.972914
  type: 'test'
  ...
# Subtest: of an update that partly took, the part that took is posted, and nothing the server would hold pending
ok 65 - of an update that partly took, the part that took is posted, and nothing the server would hold pending
  ---
  duration_ms: 2.747791
  type: 'test'
  ...
# Subtest: an update that rewrites formatting and writes on top of the refused text posts the formatting, not the words
ok 66 - an update that rewrites formatting and writes on top of the refused text posts the formatting, not the words
  ---
  duration_ms: 1.567528
  type: 'test'
  ...
# Subtest: a paste elsewhere is posted and a keystroke after the refused x is not
ok 67 - a paste elsewhere is posted and a keystroke after the refused x is not
  ---
  duration_ms: 2.710818
  type: 'test'
  ...
# Subtest: took reads all, some and none from the update itself
ok 68 - took reads all, some and none from the update itself
  ---
  duration_ms: 1.242336
  type: 'test'
  ...
# Subtest: a Backspace over this tab's own saved words and its refused ones together posts the saved part (one delete range, one client)
ok 69 - a Backspace over this tab's own saved words and its refused ones together posts the saved part (one delete range, one client)
  ---
  duration_ms: 5.899139
  type: 'test'
  ...
# Subtest: a paste right after a refused repeated letter lands where it was made
ok 70 - a paste right after a refused repeated letter lands where it was made
  ---
  duration_ms: 5.627772
  type: 'test'
  ...
# Subtest: a change made in a clean spot is not lost with one held back on the refused text (on the refused text, then elsewhere)
ok 71 - a change made in a clean spot is not lost with one held back on the refused text (on the refused text, then elsewhere)
  ---
  duration_ms: 1.833379
  type: 'test'
  ...
# Subtest: a change made in a clean spot is not lost with one held back on the refused text (elsewhere, then on the refused text)
ok 72 - a change made in a clean spot is not lost with one held back on the refused text (elsewhere, then on the refused text)
  ---
  duration_ms: 2.260989
  type: 'test'
  ...
# Subtest: the keeper groups the updates of one held change into one entry, and hands the entries over once
ok 73 - the keeper groups the updates of one held change into one entry, and hands the entries over once
  ---
  duration_ms: 0.55998
  type: 'test'
  ...
# Subtest: every change made while diverged is kept, whatever it was written on
ok 74 - every change made while diverged is kept, whatever it was written on
  ---
  duration_ms: 6.46638
  type: 'test'
  ...
# Subtest: a change that cannot be kept in the middle loses nothing after it
ok 75 - a change that cannot be kept in the middle loses nothing after it
  ---
  duration_ms: 3.284422
  type: 'test'
  ...
# Subtest: a replay that cannot be made falls back to what of the change's own updates integrates
ok 76 - a replay that cannot be made falls back to what of the change's own updates integrates
  ---
  duration_ms: 1.480087
  type: 'test'
  ...
# Subtest: the carried changes undo in the steps they were made in
ok 77 - the carried changes undo in the steps they were made in
  ---
  duration_ms: 3.9926
  type: 'test'
  ...
# Subtest: a multi-step change replays each step where it was made: an insert, then an insert just before the refused text
ok 78 - a multi-step change replays each step where it was made: an insert, then an insert just before the refused text
  ---
  duration_ms: 0.800637
  type: 'test'
  ...
# Subtest: a multi-step change replays each step where it was made: an insert, then a mark over it, the refused text two letters on
ok 79 - a multi-step change replays each step where it was made: an insert, then a mark over it, the refused text two letters on
  ---
  duration_ms: 0.757274
  type: 'test'
  ...
# Subtest: a multi-step change replays each step where it was made: a delete, then an insert past the refused text
ok 80 - a multi-step change replays each step where it was made: a delete, then an insert past the refused text
  ---
  duration_ms: 0.28613
  type: 'test'
  ...
# Subtest: a mark made over an insertion in the same change covers all of it
ok 81 - a mark made over an insertion in the same change covers all of it
  ---
  duration_ms: 0.35305
  type: 'test'
  ...
# Subtest: a multi-step change on the refused text is replayed where it was made, on the page and the server
ok 82 - a multi-step change on the refused text is replayed where it was made, on the page and the server
  ---
  duration_ms: 1.998286
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: A: "abc" on the x; Backspace; undo the Backspace
ok 83 - an undo or a redo while diverged ends as the person saw it: A: "abc" on the x; Backspace; undo the Backspace
  ---
  duration_ms: 4.504765
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: B: "a" on the x; select it, type "b"; undo
ok 84 - an undo or a redo while diverged ends as the person saw it: B: "a" on the x; select it, type "b"; undo
  ---
  duration_ms: 6.147611
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: C: "a" on the x; Backspace; undo
ok 85 - an undo or a redo while diverged ends as the person saw it: C: "a" on the x; Backspace; undo
  ---
  duration_ms: 3.047248
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: D: "a" on the x; Backspace; undo; "b" typed
ok 86 - an undo or a redo while diverged ends as the person saw it: D: "a" on the x; Backspace; undo; "b" typed
  ---
  duration_ms: 3.708515
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: E: "a" on the x; Backspace; undo; redo
ok 87 - an undo or a redo while diverged ends as the person saw it: E: "a" on the x; Backspace; undo; redo
  ---
  duration_ms: 3.958151
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: F: "a" elsewhere; Backspace; undo
ok 88 - an undo or a redo while diverged ends as the person saw it: F: "a" elsewhere; Backspace; undo
  ---
  duration_ms: 2.403685
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: G: "a" on the x; undo; redo; undo; redo
ok 89 - an undo or a redo while diverged ends as the person saw it: G: "a" on the x; undo; redo; undo; redo
  ---
  duration_ms: 5.485698
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: H: "a" on the x; "b"; undo; undo; redo; redo; "c"
ok 90 - an undo or a redo while diverged ends as the person saw it: H: "a" on the x; "b"; undo; undo; redo; redo; "c"
  ---
  duration_ms: 6.293364
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: I: "a" on the x; Backspace over "xa"; undo
ok 91 - an undo or a redo while diverged ends as the person saw it: I: "a" on the x; Backspace over "xa"; undo
  ---
  duration_ms: 3.276897
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: J: "a" on the x; Backspace over ".xa"; undo
ok 92 - an undo or a redo while diverged ends as the person saw it: J: "a" on the x; Backspace over ".xa"; undo
  ---
  duration_ms: 3.210208
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: K: the x and "a" one undo step; undo; redo
ok 93 - an undo or a redo while diverged ends as the person saw it: K: the x and "a" one undo step; undo; redo
  ---
  duration_ms: 2.992364
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: L: "a" on the x; undo; "b"; undo; redo
ok 94 - an undo or a redo while diverged ends as the person saw it: L: "a" on the x; undo; "b"; undo; redo
  ---
  duration_ms: 5.978019
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: M: two words pasted on the x; the first deleted; undo
ok 95 - an undo or a redo while diverged ends as the person saw it: M: two words pasted on the x; the first deleted; undo
  ---
  duration_ms: 2.614763
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: N: "a" on the x; undo
ok 96 - an undo or a redo while diverged ends as the person saw it: N: "a" on the x; undo
  ---
  duration_ms: 2.051757
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: O: "a" on the x; undo; "b"
ok 97 - an undo or a redo while diverged ends as the person saw it: O: "a" on the x; undo; "b"
  ---
  duration_ms: 2.504881
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: P: "a" on the x; "b" elsewhere; undo; undo
ok 98 - an undo or a redo while diverged ends as the person saw it: P: "a" on the x; "b" elsewhere; undo; undo
  ---
  duration_ms: 2.299052
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: Q: "a" on the x; undo; redo; "c"
ok 99 - an undo or a redo while diverged ends as the person saw it: Q: "a" on the x; undo; redo; "c"
  ---
  duration_ms: 2.902065
  type: 'test'
  ...
# Subtest: an undo of a change saved before the refusal is still carried
ok 100 - an undo of a change saved before the refusal is still carried
  ---
  duration_ms: 1.94508
  type: 'test'
  ...
# Subtest: derivedStep turns one document into the other, and is null for the same one
ok 101 - derivedStep turns one document into the other, and is null for the same one
  ---
  duration_ms: 0.231814
  type: 'test'
  ...
# Subtest: carrying grows linearly over a long divergence: changes typed elsewhere, 1000 against 4000, under few client ids
ok 102 - carrying grows linearly over a long divergence: changes typed elsewhere, 1000 against 4000, under few client ids
  ---
  duration_ms: 2127.787317
  type: 'test'
  ...
# Subtest: carrying grows linearly over a long divergence: changes typed on the refused text, 500 against 2000, under few client ids
ok 103 - carrying grows linearly over a long divergence: changes typed on the refused text, 500 against 2000, under few client ids
  ---
  duration_ms: 3866.788605
  type: 'test'
  ...
# Subtest: a client id never collides with one the document already holds
ok 104 - a client id never collides with one the document already holds
  ---
  duration_ms: 0.44635
  type: 'test'
  ...
# Subtest: ProseMirror changes inside one window share an id; one held back there does not strand the next
ok 105 - ProseMirror changes inside one window share an id; one held back there does not strand the next
  ---
  duration_ms: 1.841775
  type: 'test'
  ...
# Subtest: typing into a block is a text change on its slide only
ok 106 - typing into a block is a text change on its slide only
  ---
  duration_ms: 8.384627
  type: 'test'
  ...
# Subtest: a block's props changing is structure on its slide
ok 107 - a block's props changing is structure on its slide
  ---
  duration_ms: 1.687601
  type: 'test'
  ...
# Subtest: adding, moving or removing a block is structure on its slide
ok 108 - adding, moving or removing a block is structure on its slide
  ---
  duration_ms: 2.614754
  type: 'test'
  ...
# Subtest: the notes are text on their slide
ok 109 - the notes are text on their slide
  ---
  duration_ms: 1.459219
  type: 'test'
  ...
# Subtest: a slide added, removed or moved is an order change
ok 110 - a slide added, removed or moved is an order change
  ---
  duration_ms: 3.411211
  type: 'test'
  ...
# Subtest: one transaction touching several things reports each once
ok 111 - one transaction touching several things reports each once
  ---
  duration_ms: 2.216299
  type: 'test'
  ...
# Subtest: what the ops write passes, and so does an empty document
ok 112 - what the ops write passes, and so does an empty document
  ---
  duration_ms: 9.3898
  type: 'test'
  ...
# Subtest: the shapes y-prosemirror and older documents write pass
ok 113 - the shapes y-prosemirror and older documents write pass
  ---
  duration_ms: 1.7046
  type: 'test'
  ...
# Subtest: an unknown formatting attribute is reported with the core's message
ok 114 - an unknown formatting attribute is reported with the core's message
  ---
  duration_ms: 2.375778
  type: 'test'
  ...
# Subtest: an element inside a paragraph, a non-paragraph child and bare text are reported
ok 115 - an element inside a paragraph, a non-paragraph child and bare text are reported
  ---
  duration_ms: 3.659471
  type: 'test'
  ...
# Subtest: the unknownmark poison shape is what the check refuses
ok 116 - the unknownmark poison shape is what the check refuses
  ---
  duration_ms: 3.631536
  type: 'test'
  ...
# Subtest: y-prosemirror 1.3.7 deletes the words under an unknown mark; sanitising first keeps them
ok 117 - y-prosemirror 1.3.7 deletes the words under an unknown mark; sanitising first keeps them
  ---
  duration_ms: 4.979159
  type: 'test'
  ...
# Subtest: the vocabulary is the five marks and nothing else
ok 118 - the vocabulary is the five marks and nothing else
  ---
  duration_ms: 0.142488
  type: 'test'
  ...
# Subtest: a reload reuses the id this tab stored for the deck
ok 119 - a reload reuses the id this tab stored for the deck
  ---
  duration_ms: 1.160345
  type: 'test'
  ...
# Subtest: two tabs, and two decks in one tab, get different ids
ok 120 - two tabs, and two decks in one tab, get different ids
  ---
  duration_ms: 1.25289
  type: 'test'
  ...
# Subtest: a stored value that is not an id, or storage that throws, gives a fresh id
ok 121 - a stored value that is not an id, or storage that throws, gives a fresh id
  ---
  duration_ms: 0.492535
  type: 'test'
  ...
# Subtest: a duplicated tab gives up the copied id; the original keeps it
ok 122 - a duplicated tab gives up the copied id; the original keeps it
  ---
  duration_ms: 8.163226
  type: 'test'
  ...
# Subtest: a reload finds no rival and keeps its id
ok 123 - a reload finds no rival and keeps its id
  ---
  duration_ms: 1.842828
  type: 'test'
  ...
# Subtest: presence switches id: beats carry the new one and the old one is somebody else
ok 124 - presence switches id: beats carry the new one and the old one is somebody else
  ---
  duration_ms: 1.225977
  type: 'test'
  ...
# Subtest: setTitle commits the deck's title, one set_meta
ok 125 - setTitle commits the deck's title, one set_meta
  ---
  duration_ms: 1.65842
  type: 'test'
  ...
# Subtest: accent-reset commits the theme's accent back, once
ok 126 - accent-reset commits the theme's accent back, once
  ---
  duration_ms: 0.230792
  type: 'test'
  ...
# Subtest: addBlock commits the kind after the selected box, then selects it; refused, selects nothing
ok 127 - addBlock commits the kind after the selected box, then selects it; refused, selects nothing
  ---
  duration_ms: 1.377804
  type: 'test'
  ...
# Subtest: addBlock with no slide on the stage commits nothing
ok 128 - addBlock with no slide on the stage commits nothing
  ---
  duration_ms: 0.353561
  type: 'test'
  ...
# Subtest: the box menu's rows into the card: Format and Position and size, for a selected box only
ok 129 - the box menu's rows into the card: Format and Position and size, for a selected box only
  ---
  duration_ms: 0.316278
  type: 'test'
  ...
# Subtest: a change that loads runs once and releases the queue in order
ok 130 - a change that loads runs once and releases the queue in order
  ---
  duration_ms: 6.049332
  type: 'test'
  ...
# Subtest: a refusal releases the queue in order and refills the inspector
ok 131 - a refusal releases the queue in order and refills the inspector
  ---
  duration_ms: 1.088485
  type: 'test'
  ...
# Subtest: a refusal whose notice throws still releases the queue
ok 132 - a refusal whose notice throws still releases the queue
  ---
  duration_ms: 1.182784
  type: 'test'
  ...
# Subtest: a change that throws still releases the queue, and is refused
ok 133 - a change that throws still releases the queue, and is refused
  ---
  duration_ms: 0.890578
  type: 'test'
  ...
# Subtest: a change that can no longer be made once its font is in is said as interrupted, not as a font that failed
ok 134 - a change that can no longer be made once its font is in is said as interrupted, not as a font that failed
  ---
  duration_ms: 0.994885
  type: 'test'
  ...
# Subtest: a second change during a wait is refused at once and never queued
ok 135 - a second change during a wait is refused at once and never queued
  ---
  duration_ms: 0.622569
  type: 'test'
  ...
# Subtest: free() with no wait on resolves at once
ok 136 - free() with no wait on resolves at once
  ---
  duration_ms: 0.563562
  type: 'test'
  ...
# Subtest: a wait makes the Deck settings dialog inert with the card
ok 137 - a wait makes the Deck settings dialog inert with the card
  ---
  duration_ms: 3.179082
  type: 'test'
  ...
# Subtest: the shared vectors have cases to check
ok 138 - the shared vectors have cases to check
  ---
  duration_ms: 1.222281
  type: 'test'
  ...
# Subtest: familiesOfView: an empty deck draws in nothing
ok 139 - familiesOfView: an empty deck draws in nothing
  ---
  duration_ms: 1.004462
  type: 'test'
  ...
# Subtest: familiesOfView: paper: serif headings, sans body
ok 140 - familiesOfView: paper: serif headings, sans body
  ---
  duration_ms: 0.547656
  type: 'test'
  ...
# Subtest: familiesOfView: ink: sans for both
ok 141 - familiesOfView: ink: sans for both
  ---
  duration_ms: 0.174843
  type: 'test'
  ...
# Subtest: familiesOfView: an unknown theme is paper
ok 142 - familiesOfView: an unknown theme is paper
  ---
  duration_ms: 0.139835
  type: 'test'
  ...
# Subtest: familiesOfView: a code block brings in mono
ok 143 - familiesOfView: a code block brings in mono
  ---
  duration_ms: 0.155339
  type: 'test'
  ...
# Subtest: familiesOfView: an empty code block still does
ok 144 - familiesOfView: an empty code block still does
  ---
  duration_ms: 0.265527
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in a text block
ok 145 - familiesOfView: a code mark in a text block
  ---
  duration_ms: 0.300168
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in a heading
ok 146 - familiesOfView: a code mark in a heading
  ---
  duration_ms: 0.552495
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in a table cell
ok 147 - familiesOfView: a code mark in a table cell
  ---
  duration_ms: 0.720112
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in the notes is the chrome's
ok 148 - familiesOfView: a code mark in the notes is the chrome's
  ---
  duration_ms: 0.253263
  type: 'test'
  ...
# Subtest: familiesOfView: bold, italic, highlight and links stay in the family
ok 149 - familiesOfView: bold, italic, highlight and links stay in the family
  ---
  duration_ms: 1.340866
  type: 'test'
  ...
# Subtest: familiesOfView: the inspector's system heading drops serif
ok 150 - familiesOfView: the inspector's system heading drops serif
  ---
  duration_ms: 0.231771
  type: 'test'
  ...
# Subtest: familiesOfView: system faces for both draw in no web face
ok 151 - familiesOfView: system faces for both draw in no web face
  ---
  duration_ms: 0.08249
  type: 'test'
  ...
# Subtest: familiesOfView: a body override naming mono
ok 152 - familiesOfView: a body override naming mono
  ---
  duration_ms: 0.084757
  type: 'test'
  ...
# Subtest: familiesOfView: a family anywhere in a stack counts
ok 153 - familiesOfView: a family anywhere in a stack counts
  ---
  duration_ms: 0.066323
  type: 'test'
  ...
# Subtest: familiesOfView: an override that fails the allowlist is the theme's
ok 154 - familiesOfView: an override that fails the allowlist is the theme's
  ---
  duration_ms: 0.071693
  type: 'test'
  ...
# Subtest: familiesOfView: a too-long override is the theme's
ok 155 - familiesOfView: a too-long override is the theme's
  ---
  duration_ms: 0.0673
  type: 'test'
  ...
# Subtest: familiesOfView: padded overrides are trimmed
ok 156 - familiesOfView: padded overrides are trimmed
  ---
  duration_ms: 0.059148
  type: 'test'
  ...
# Subtest: familiesOfView: a family named only on a later slide's code
ok 157 - familiesOfView: a family named only on a later slide's code
  ---
  duration_ms: 0.064784
  type: 'test'
  ...
# Subtest: a stack names a family wherever it appears, in any case, quoted or not
ok 158 - a stack names a family wherever it appears, in any case, quoted or not
  ---
  duration_ms: 0.157189
  type: 'test'
  ...
# Subtest: safeFontStack is render.go's allowlist
ok 159 - safeFontStack is render.go's allowlist
  ---
  duration_ms: 0.135381
  type: 'test'
  ...
# Subtest: a section names its heading and body families
ok 160 - a section names its heading and body families
  ---
  duration_ms: 0.319778
  type: 'test'
  ...
# Subtest: a section with code in it brings in the code family
ok 161 - a section with code in it brings in the code family
  ---
  duration_ms: 0.248981
  type: 'test'
  ...
# Subtest: only the two font properties are read off a section
ok 162 - only the two font properties are read off a section
  ---
  duration_ms: 0.315613
  type: 'test'
  ...
# Subtest: nothing joins the page until all four faces of a family are in, and then all four do
ok 163 - nothing joins the page until all four faces of a family are in, and then all four do
  ---
  duration_ms: 8.094494
  type: 'test'
  ...
# Subtest: every face is a block face of the manifest's family, weight and style
ok 164 - every face is a block face of the manifest's family, weight and style
  ---
  duration_ms: 2.563731
  type: 'test'
  ...
# Subtest: a family that misses the deadline is committed and never joins, even when it arrives
ok 165 - a family that misses the deadline is committed and never joins, even when it arrives
  ---
  duration_ms: 1.495522
  type: 'test'
  ...
# Subtest: a family whose file fails is committed by the gate: wrong but stable
ok 166 - a family whose file fails is committed by the gate: wrong but stable
  ---
  duration_ms: 0.945256
  type: 'test'
  ...
# Subtest: a person's action waits for its family and then may run, once it is in
ok 167 - a person's action waits for its family and then may run, once it is in
  ---
  duration_ms: 0.685569
  type: 'test'
  ...
# Subtest: a person's action is refused when its family fails or is late, and nothing is committed
ok 168 - a person's action is refused when its family fails or is late, and nothing is committed
  ---
  duration_ms: 1.86015
  type: 'test'
  ...
# Subtest: content from elsewhere waits for a new family, then is committed past the timeout, never held
ok 169 - content from elsewhere waits for a new family, then is committed past the timeout, never held
  ---
  duration_ms: 1.10271
  type: 'test'
  ...
# Subtest: a family on screen in its web face is never committed
ok 170 - a family on screen in its web face is never committed
  ---
  duration_ms: 1.596743
  type: 'test'
  ...
# Subtest: a composition commits a family that is not in, rather than waiting
ok 171 - a composition commits a family that is not in, rather than waiting
  ---
  duration_ms: 0.668738
  type: 'test'
  ...
# Subtest: prefetch loads the families not asked for yet, one at a time, and puts none on
ok 172 - prefetch loads the families not asked for yet, one at a time, and puts none on
  ---
  duration_ms: 1.67677
  type: 'test'
  ...
# Subtest: an unknown family is no family
ok 173 - an unknown family is no family
  ---
  duration_ms: 0.39132
  type: 'test'
  ...
# Subtest: the system session is ready for everything and loads nothing
ok 174 - the system session is ready for everything and loads nothing
  ---
  duration_ms: 0.247328
  type: 'test'
  ...
# Subtest: a range carrying the mark is pressed; one without is not
ok 175 - a range carrying the mark is pressed; one without is not
  ---
  duration_ms: 2.258464
  type: 'test'
  ...
# Subtest: at a cursor, the stored marks decide
ok 176 - at a cursor, the stored marks decide
  ---
  duration_ms: 0.629696
  type: 'test'
  ...
# Subtest: focus moving to another place to type lets go; to a button keeps the view
ok 177 - focus moving to another place to type lets go; to a button keeps the view
  ---
  duration_ms: 0.283873
  type: 'test'
  ...
# Subtest: the whole card is the bar: its own fields keep the view
ok 178 - the whole card is the bar: its own fields keep the view
  ---
  duration_ms: 0.214598
  type: 'test'
  ...
# Subtest: the marks act on the box the card shows, and on no other
ok 179 - the marks act on the box the card shows, and on no other
  ---
  duration_ms: 0.306763
  type: 'test'
  ...
# Subtest: a view's box is the nearest block around it: a table cell's is the table
ok 180 - a view's box is the nearest block around it: a table cell's is the table
  ---
  duration_ms: 0.186148
  type: 'test'
  ...
# Subtest: an empty body is no frames
ok 181 - an empty body is no frames
  ---
  duration_ms: 1.35939
  type: 'test'
  ...
# Subtest: frames come back in order with their exact bytes
ok 182 - frames come back in order with their exact bytes
  ---
  duration_ms: 0.384985
  type: 'test'
  ...
# Subtest: a length prefix is big-endian
ok 183 - a length prefix is big-endian
  ---
  duration_ms: 0.297873
  type: 'test'
  ...
# Subtest: a truncated frame throws rather than returning a short update
ok 184 - a truncated frame throws rather than returning a short update
  ---
  duration_ms: 1.572499
  type: 'test'
  ...
# Subtest: Format writes the cookie the server reads, and flips the card and its toggles
ok 185 - Format writes the cookie the server reads, and flips the card and its toggles
  ---
  duration_ms: 3.76488
  type: 'test'
  ...
# Subtest: the View menu row toggles the card too, and keeps aria-pressed with the button
ok 186 - the View menu row toggles the card too, and keeps aria-pressed with the button
  ---
  duration_ms: 0.608424
  type: 'test'
  ...
# Subtest: the first paint is the server's: mounting writes nothing and changes nothing
ok 187 - the first paint is the server's: mounting writes nothing and changes nothing
  ---
  duration_ms: 0.555648
  type: 'test'
  ...
# Subtest: an old localStorage 'off' with no cookie is applied once, moved to the cookie as closed, and removed
ok 188 - an old localStorage 'off' with no cookie is applied once, moved to the cookie as closed, and removed
  ---
  duration_ms: 1.797295
  type: 'test'
  ...
# Subtest: an old localStorage 'on' with no cookie is applied once, moved to the cookie as open, and removed
ok 189 - an old localStorage 'on' with no cookie is applied once, moved to the cookie as open, and removed
  ---
  duration_ms: 0.983001
  type: 'test'
  ...
# Subtest: with a cookie already set, an old localStorage key is dropped and not applied
ok 190 - with a cookie already set, an old localStorage key is dropped and not applied
  ---
  duration_ms: 0.729806
  type: 'test'
  ...
# Subtest: with cookies blocked, Format still shows and hides the card for this page
ok 191 - with cookies blocked, Format still shows and hides the card for this page
  ---
  duration_ms: 0.585849
  type: 'test'
  ...
# Subtest: with site data blocked (localStorage throws), the toggle still works
ok 192 - with site data blocked (localStorage throws), the toggle still works
  ---
  duration_ms: 0.347969
  type: 'test'
  ...
# Subtest: showInspector(true, {focus}) focuses the card's first showing control; hiding gives focus back
ok 193 - showInspector(true, {focus}) focuses the card's first showing control; hiding gives focus back
  ---
  duration_ms: 0.825307
  type: 'test'
  ...
# Subtest: Format from the keyboard moves focus into the card; from a pointer it does not
ok 194 - Format from the keyboard moves focus into the card; from a pointer it does not
  ---
  duration_ms: 0.746542
  type: 'test'
  ...
# Subtest: asking to delete a slide shows a hidden card, with focus
ok 195 - asking to delete a slide shows a hidden card, with focus
  ---
  duration_ms: 0.290346
  type: 'test'
  ...
# Subtest: on https the cookie is Secure
ok 196 - on https the cookie is Secure
  ---
  duration_ms: 1.029763
  type: 'test'
  ...
# Subtest: opened from the View menu by keyboard, the card gives focus back to the menu's button, not its hidden row
ok 197 - opened from the View menu by keyboard, the card gives focus back to the menu's button, not its hidden row
  ---
  duration_ms: 0.454517
  type: 'test'
  ...
# Subtest: dismissed from inside the card through the View row, focus goes to the menu's button
ok 198 - dismissed from inside the card through the View row, focus goes to the menu's button
  ---
  duration_ms: 0.289445
  type: 'test'
  ...
# Subtest: a return target that can no longer take focus falls back to Format
ok 199 - a return target that can no longer take focus falls back to Format
  ---
  duration_ms: 0.299299
  type: 'test'
  ...
# Subtest: asking to delete from a strip item's menu returns focus to that menu's button
ok 200 - asking to delete from a strip item's menu returns focus to that menu's button
  ---
  duration_ms: 0.311398
  type: 'test'
  ...
# Subtest: focus into the card reaches a radio group at its checked radio
ok 201 - focus into the card reaches a radio group at its checked radio
  ---
  duration_ms: 0.213484
  type: 'test'
  ...
# Subtest: the bar's title is the one place the deck's title is edited: a change is commitTitle
ok 202 - the bar's title is the one place the deck's title is edited: a change is commitTitle
  ---
  duration_ms: 0.449503
  type: 'test'
  ...
# Subtest: a menu row's dialog opens modal, and on close focus goes to the menu's title
ok 203 - a menu row's dialog opens modal, and on close focus goes to the menu's title
  ---
  duration_ms: 0.359723
  type: 'test'
  ...
# Subtest: an Insert row adds its kind through commands.addBlock, and closes the menu
ok 204 - an Insert row adds its kind through commands.addBlock, and closes the menu
  ---
  duration_ms: 0.571303
  type: 'test'
  ...
# Subtest: View → Outline opens the Outline under the View menu's title, and leaves the card alone
ok 205 - View → Outline opens the Outline under the View menu's title, and leaves the card alone
  ---
  duration_ms: 0.358415
  type: 'test'
  ...
# Subtest: it starts on the slide, as the server rendered it
ok 206 - it starts on the slide, as the server rendered it
  ---
  duration_ms: 3.032111
  type: 'test'
  ...
# Subtest: a box selected shows the box
ok 207 - a box selected shows the box
  ---
  duration_ms: 2.63694
  type: 'test'
  ...
# Subtest: nothing selected shows the slide
ok 208 - nothing selected shows the slide
  ---
  duration_ms: 0.239012
  type: 'test'
  ...
# Subtest: the selected box gone (deleted, or its creation undone) shows the slide, never an empty box
ok 209 - the selected box gone (deleted, or its creation undone) shows the slide, never an empty box
  ---
  duration_ms: 0.195704
  type: 'test'
  ...
# Subtest: the caret in the notes shows the notes
ok 210 - the caret in the notes shows the notes
  ---
  duration_ms: 0.310519
  type: 'test'
  ...
# Subtest: with the caret in the notes, nothing selected stays on the notes; a box selected shows the box
ok 211 - with the caret in the notes, nothing selected stays on the notes; a box selected shows the box
  ---
  duration_ms: 0.155974
  type: 'test'
  ...
# Subtest: the caret back on the stage leaves the kind to the selection
ok 212 - the caret back on the stage leaves the kind to the selection
  ---
  duration_ms: 0.330959
  type: 'test'
  ...
# Subtest: reset shows the slide, from anything
ok 213 - reset shows the slide, from anything
  ---
  duration_ms: 0.23351
  type: 'test'
  ...
# Subtest: onChange hears a change of kind only, never a repeat
ok 214 - onChange hears a change of kind only, never a repeat
  ---
  duration_ms: 0.522446
  type: 'test'
  ...
# Subtest: a box, the notes, then the same box again shows the box
ok 215 - a box, the notes, then the same box again shows the box
  ---
  duration_ms: 0.705851
  type: 'test'
  ...
# Subtest: no slide left (a colleague removed the last one) shows the deck, from the notes or a box
ok 216 - no slide left (a colleague removed the last one) shows the deck, from the notes or a box
  ---
  duration_ms: 0.338968
  type: 'test'
  ...
# Subtest: a slide shown keeps the card as it was: the notes stay the notes
ok 217 - a slide shown keeps the card as it was: the notes stay the notes
  ---
  duration_ms: 0.125812
  type: 'test'
  ...
# Subtest: deck controls are set_meta
ok 218 - deck controls are set_meta
  ---
  duration_ms: 13.000641
  type: 'test'
  ...
# Subtest: slide controls are set_slide, and background keeps its colour
ok 219 - slide controls are set_slide, and background keeps its colour
  ---
  duration_ms: 4.381239
  type: 'test'
  ...
# Subtest: move up and down are move_slide with the right after
ok 220 - move up and down are move_slide with the right after
  ---
  duration_ms: 2.276674
  type: 'test'
  ...
# Subtest: block props: value kinds, region, a shape label
ok 221 - block props: value kinds, region, a shape label
  ---
  duration_ms: 1.985339
  type: 'test'
  ...
# Subtest: box fields are set_block on the desktop and set_phone in the phone view
ok 222 - box fields are set_block on the desktop and set_phone in the phone view
  ---
  duration_ms: 1.7337
  type: 'test'
  ...
# Subtest: move block and the layer buttons
ok 223 - move block and the layer buttons
  ---
  duration_ms: 2.025469
  type: 'test'
  ...
# Subtest: add block: region after the selection on flow, a default box on canvas, a heading level that fits
ok 224 - add block: region after the selection on flow, a default box on canvas, a heading level that fits
  ---
  duration_ms: 7.286587
  type: 'test'
  ...
# Subtest: a block is named by its type and its first words
ok 225 - a block is named by its type and its first words
  ---
  duration_ms: 1.083013
  type: 'test'
  ...
# Subtest: blockChange: a control element to its op
ok 226 - blockChange: a control element to its op
  ---
  duration_ms: 1.977803
  type: 'test'
  ...
# Subtest: a segmented choice: setValue checks the radio for the value, and its change is the prop
ok 227 - a segmented choice: setValue checks the radio for the value, and its change is the prop
  ---
  duration_ms: 1.695476
  type: 'test'
  ...
# Subtest: corner radius shows for an image and a rectangle, not for a shape with no corners
ok 228 - corner radius shows for an image and a rectangle, not for a shape with no corners
  ---
  duration_ms: 2.858395
  type: 'test'
  ...
# Subtest: a shape's swatches show what the slide shows: no fill as none, no stroke in the ink
ok 229 - a shape's swatches show what the slide shows: no fill as none, no stroke in the ink
  ---
  duration_ms: 1.175114
  type: 'test'
  ...
# Subtest: Position and size keeps open or closed across a remount, in memory only
ok 230 - Position and size keeps open or closed across a remount, in memory only
  ---
  duration_ms: 3.075662
  type: 'test'
  ...
# Subtest: litFor: Free placement on a canvas slide, else the template
ok 231 - litFor: Free placement on a canvas slide, else the template
  ---
  duration_ms: 1.207985
  type: 'test'
  ...
# Subtest: pickOps: the four cases, op for op
ok 232 - pickOps: the four cases, op for op
  ---
  duration_ms: 0.963945
  type: 'test'
  ...
# Subtest: the pictures are the seven templates, then Free placement
ok 233 - the pictures are the seven templates, then Free placement
  ---
  duration_ms: 0.164374
  type: 'test'
  ...
# Subtest: fill lights exactly one picture: the template, or Free placement
ok 234 - fill lights exactly one picture: the template, or Free placement
  ---
  duration_ms: 2.120053
  type: 'test'
  ...
# Subtest: a choice on a flow slide commits its op, and asks nothing
ok 235 - a choice on a flow slide commits its op, and asks nothing
  ---
  duration_ms: 0.939642
  type: 'test'
  ...
# Subtest: a template on a canvas slide asks in the card first and commits nothing
ok 236 - a template on a canvas slide asks in the card first and commits nothing
  ---
  duration_ms: 2.202229
  type: 'test'
  ...
# Subtest: its action commits both ops in one commit call
ok 237 - its action commits both ops in one commit call
  ---
  duration_ms: 0.928399
  type: 'test'
  ...
# Subtest: cancel commits nothing and lights Free placement again
ok 238 - cancel commits nothing and lights Free placement again
  ---
  duration_ms: 1.037434
  type: 'test'
  ...
# Subtest: choosing Free placement again while asked withdraws the question
ok 239 - choosing Free placement again while asked withdraws the question
  ---
  duration_ms: 1.019832
  type: 'test'
  ...
# Subtest: fill after the slide became flow elsewhere withdraws the question, and the action commits nothing
ok 240 - fill after the slide became flow elsewhere withdraws the question, and the action commits nothing
  ---
  duration_ms: 1.591209
  type: 'test'
  ...
# Subtest: fill on another slide, or none, withdraws the question
ok 241 - fill on another slide, or none, withdraws the question
  ---
  duration_ms: 1.053786
  type: 'test'
  ...
# Subtest: Escape in a row's popover closes it, focuses its row, and goes no further
ok 242 - Escape in a row's popover closes it, focuses its row, and goes no further
  ---
  duration_ms: 0.889485
  type: 'test'
  ...
# Subtest: destroy takes every listener off the form
ok 243 - destroy takes every listener off the form
  ---
  duration_ms: 0.500062
  type: 'test'
  ...
# Subtest: open resolves to the button that closed it and the trimmed field
ok 244 - open resolves to the button that closed it and the trimmed field
  ---
  duration_ms: 1.588696
  type: 'test'
  ...
# Subtest: a second open while the dialog is up joins the first
ok 245 - a second open while the dialog is up joins the first
  ---
  duration_ms: 0.195995
  type: 'test'
  ...
# Subtest: a missing dialog mounts as nothing
ok 246 - a missing dialog mounts as nothing
  ---
  duration_ms: 0.145421
  type: 'test'
  ...
# Subtest: a tab advances its own cursor only when its POST is the very next row
ok 247 - a tab advances its own cursor only when its POST is the very next row
  ---
  duration_ms: 1.374204
  type: 'test'
  ...
# Subtest: the cursor never moves backwards when a response is overtaken by this tab's own write
ok 248 - the cursor never moves backwards when a response is overtaken by this tab's own write
  ---
  duration_ms: 0.634394
  type: 'test'
  ...
# Subtest: a later response still carries the cursor forward
ok 249 - a later response still carries the cursor forward
  ---
  duration_ms: 0.349684
  type: 'test'
  ...
# Subtest: a burst of notifications collapses into one fetch at a time
ok 250 - a burst of notifications collapses into one fetch at a time
  ---
  duration_ms: 0.245944
  type: 'test'
  ...
# Subtest: an event naming a seq the tab already has fetches nothing
ok 251 - an event naming a seq the tab already has fetches nothing
  ---
  duration_ms: 0.345298
  type: 'test'
  ...
# Subtest: a stopped subscriber drops a response that arrives late
ok 252 - a stopped subscriber drops a response that arrives late
  ---
  duration_ms: 0.256439
  type: 'test'
  ...
# Subtest: stop closes the stream, and start opens exactly one
ok 253 - stop closes the stream, and start opens exactly one
  ---
  duration_ms: 0.317508
  type: 'test'
  ...
# Subtest: a hidden tab closes its stream on a shortened deadline, and activity reopens it
ok 254 - a hidden tab closes its stream on a shortened deadline, and activity reopens it
  ---
  duration_ms: 0.847941
  type: 'test'
  ...
# Subtest: switching away and back inside the grace never drops the stream, so nothing has to be caught up
ok 255 - switching away and back inside the grace never drops the stream, so nothing has to be caught up
  ---
  duration_ms: 0.860824
  type: 'test'
  ...
# Subtest: a visible tab that is only being READ closes when idle and comes back on any activity
ok 256 - a visible tab that is only being READ closes when idle and comes back on any activity
  ---
  duration_ms: 0.721155
  type: 'test'
  ...
# Subtest: activity while streaming defers the idle close rather than reopening anything
ok 257 - activity while streaming defers the idle close rather than reopening anything
  ---
  duration_ms: 0.300286
  type: 'test'
  ...
# Subtest: a stream failure is never reported as a save failure, and heals on activity
ok 258 - a stream failure is never reported as a save failure, and heals on activity
  ---
  duration_ms: 0.24894
  type: 'test'
  ...
# Subtest: an empty response advances the cursor without applying anything
ok 259 - an empty response advances the cursor without applying anything
  ---
  duration_ms: 0.938278
  type: 'test'
  ...
# Subtest: a failed fetch leaves the cursor alone so the next notification retries it
ok 260 - a failed fetch leaves the cursor alone so the next notification retries it
  ---
  duration_ms: 0.213476
  type: 'test'
  ...
# Subtest: a decode failure retries once through the raw log, then gives up
ok 261 - a decode failure retries once through the raw log, then gives up
  ---
  duration_ms: 0.2324
  type: 'test'
  ...
# Subtest: updatesURL spells the query string exactly, in particular raw as the literal raw=1
ok 262 - updatesURL spells the query string exactly, in particular raw as the literal raw=1
  ---
  duration_ms: 0.133399
  type: 'test'
  ...
# Subtest: leaving the page closes the stream at once, and coming back reopens it and catches up
ok 263 - leaving the page closes the stream at once, and coming back reopens it and catches up
  ---
  duration_ms: 0.323105
  type: 'test'
  ...
# Subtest: a page left before its subscriber starts never opens a stream
ok 264 - a page left before its subscriber starts never opens a stream
  ---
  duration_ms: 0.13332
  type: 'test'
  ...
# Subtest: the keys are the ones the switch used, and the new height key
ok 265 - the keys are the ones the switch used, and the new height key
  ---
  duration_ms: 1.555742
  type: 'test'
  ...
# Subtest: the cookies are the ones the server reads
ok 266 - the cookies are the ones the server reads
  ---
  duration_ms: 0.251329
  type: 'test'
  ...
# Subtest: open, close and toggle set data-state and remember open/closed in the cookie
ok 267 - open, close and toggle set data-state and remember open/closed in the cookie
  ---
  duration_ms: 1.427445
  type: 'test'
  ...
# Subtest: mounting keeps the state the server painted and writes nothing
ok 268 - mounting keeps the state the server painted and writes nothing
  ---
  duration_ms: 1.061316
  type: 'test'
  ...
# Subtest: a localStorage preference from before the cookies is honoured once, moved to the cookies and removed
ok 269 - a localStorage preference from before the cookies is honoured once, moved to the cookies and removed
  ---
  duration_ms: 1.152326
  type: 'test'
  ...
# Subtest: cookies and storage that throw leave the notes working for the visit
ok 270 - cookies and storage that throw leave the notes working for the visit
  ---
  duration_ms: 0.730501
  type: 'test'
  ...
# Subtest: the × closes and moves focus to the tab; the tab opens and moves focus into the notes
ok 271 - the × closes and moves focus to the tab; the tab opens and moves focus into the notes
  ---
  duration_ms: 1.423071
  type: 'test'
  ...
# Subtest: mounting does not take focus
ok 272 - mounting does not take focus
  ---
  duration_ms: 0.362152
  type: 'test'
  ...
# Subtest: HEAD_PX is the card less its body as editor.css draws it: a hairline (1 + 1) and 12px of padding above and below
ok 273 - HEAD_PX is the card less its body as editor.css draws it: a hairline (1 + 1) and 12px of padding above and below
  ---
  duration_ms: 0.375644
  type: 'test'
  ...
# Subtest: clampHeight: at least two lines and the head, at most half the desk
ok 274 - clampHeight: at least two lines and the head, at most half the desk
  ---
  duration_ms: 0.526751
  type: 'test'
  ...
# Subtest: the height is the remembered one, clamped, written as a CSS length and as the separator's value
ok 275 - the height is the remembered one, clamped, written as a CSS length and as the separator's value
  ---
  duration_ms: 0.529365
  type: 'test'
  ...
# Subtest: ArrowUp and ArrowDown move the height by 16px, Home and End go to the limits, each remembered
ok 276 - ArrowUp and ArrowDown move the height by 16px, Home and End go to the limits, each remembered
  ---
  duration_ms: 0.44386
  type: 'test'
  ...
# Subtest: dragging the top edge up makes the notes taller, within the limits, and remembers on release
ok 277 - dragging the top edge up makes the notes taller, within the limits, and remembers on release
  ---
  duration_ms: 0.361167
  type: 'test'
  ...
# Subtest: a stored height clamped on mount: ArrowDown moves from what is shown, and that is remembered
ok 278 - a stored height clamped on mount: ArrowDown moves from what is shown, and that is remembered
  ---
  duration_ms: 0.20963
  type: 'test'
  ...
# Subtest: a desk that shrinks after mount: the next key starts from the height now shown
ok 279 - a desk that shrinks after mount: the next key starts from the height now shown
  ---
  duration_ms: 0.293158
  type: 'test'
  ...
# Subtest: a window resize narrows what is shown and keeps the preferred height for when the room comes back
ok 280 - a window resize narrows what is shown and keeps the preferred height for when the room comes back
  ---
  duration_ms: 0.219801
  type: 'test'
  ...
# Subtest: a drag after clamping moves from the shown height on its first pixel
ok 281 - a drag after clamping moves from the shown height on its first pixel
  ---
  duration_ms: 0.194875
  type: 'test'
  ...
# Subtest: refresh() writes the tab's text: the word for notes, and the count of words when there are any
ok 282 - refresh() writes the tab's text: the word for notes, and the count of words when there are any
  ---
  duration_ms: 0.271165
  type: 'test'
  ...
# Subtest: refresh() writes nothing when the tab already says it (the server's first paint)
ok 283 - refresh() writes nothing when the tab already says it (the server's first paint)
  ---
  duration_ms: 0.246797
  type: 'test'
  ...
# Subtest: countWords: what the server counts (strings.Fields of the plain text), through paragraphs and runs
ok 284 - countWords: what the server counts (strings.Fields of the plain text), through paragraphs and runs
  ---
  duration_ms: 0.615435
  type: 'test'
  ...
# Subtest: empty_doc_views_as_defaults
ok 285 - empty_doc_views_as_defaults
  ---
  duration_ms: 3.820279
  type: 'test'
  ...
# Subtest: set_meta
ok 286 - set_meta
  ---
  duration_ms: 2.943093
  type: 'test'
  ...
# Subtest: slides: add, move, remove, set_slide, set_notes
ok 287 - slides: add, move, remove, set_slide, set_notes
  ---
  duration_ms: 6.820723
  type: 'test'
  ...
# Subtest: duplicate_slide
ok 288 - duplicate_slide
  ---
  duration_ms: 3.620364
  type: 'test'
  ...
# Subtest: blocks: add, move, remove, set_block
ok 289 - blocks: add, move, remove, set_block
  ---
  duration_ms: 4.538583
  type: 'test'
  ...
# Subtest: set_phone
ok 290 - set_phone
  ---
  duration_ms: 1.337916
  type: 'test'
  ...
# Subtest: table cells follow rows and cols
ok 291 - table cells follow rows and cols
  ---
  duration_ms: 1.319374
  type: 'test'
  ...
# Subtest: canvas blocks: box defaults from the region, z from the index
ok 292 - canvas blocks: box defaults from the region, z from the index
  ---
  duration_ms: 1.38869
  type: 'test'
  ...
# Subtest: assets: register and remove
ok 293 - assets: register and remove
  ---
  duration_ms: 1.335132
  type: 'test'
  ...
# Subtest: markdown: every mark, code blocks are plain lines
ok 294 - markdown: every mark, code blocks are plain lines
  ---
  duration_ms: 1.824287
  type: 'test'
  ...
# Subtest: batch_is_atomic
ok 295 - batch_is_atomic
  ---
  duration_ms: 2.189529
  type: 'test'
  ...
# Subtest: a batch applies in one transaction with the given origin
ok 296 - a batch applies in one transaction with the given origin
  ---
  duration_ms: 0.621076
  type: 'test'
  ...
# Subtest: columns_children_validated
ok 297 - columns_children_validated
  ---
  duration_ms: 1.520427
  type: 'test'
  ...
# Subtest: layout_switch_round_trip
ok 298 - layout_switch_round_trip
  ---
  duration_ms: 1.800724
  type: 'test'
  ...
# Subtest: view_matches_snapshot_fixtures
ok 299 - view_matches_snapshot_fixtures
  ---
  duration_ms: 16.674516
  type: 'test'
  ...
# Subtest: columns children have one parent and no cycles (codex 7)
ok 300 - columns children have one parent and no cycles (codex 7)
  ---
  duration_ms: 1.520427
  type: 'test'
  ...
# Subtest: canvas-to-flow keeps a concurrent text edit (codex 4)
ok 301 - canvas-to-flow keeps a concurrent text edit (codex 4)
  ---
  duration_ms: 4.048091
  type: 'test'
  ...
# Subtest: move_block keeps a concurrent text edit, and later inserts land where after says (codex 4)
ok 302 - move_block keeps a concurrent text edit, and later inserts land where after says (codex 4)
  ---
  duration_ms: 3.58599
  type: 'test'
  ...
# Subtest: move_slide keeps a concurrent text edit, and later inserts land where after says (codex 4 at slide level)
ok 303 - move_slide keeps a concurrent text edit, and later inserts land where after says (codex 4 at slide level)
  ---
  duration_ms: 2.486815
  type: 'test'
  ...
# Subtest: the Outline's list reconciles by id and keeps its rows
ok 304 - the Outline's list reconciles by id and keeps its rows
  ---
  duration_ms: 2.976179
  type: 'test'
  ...
# Subtest: open fills the list by kind and first words, and focuses the selected box's row
ok 305 - open fills the list by kind and first words, and focuses the selected box's row
  ---
  duration_ms: 1.107087
  type: 'test'
  ...
# Subtest: with no box on the slide it says so, and focus goes to the popover
ok 306 - with no box on the slide it says so, and focus goes to the popover
  ---
  duration_ms: 0.597247
  type: 'test'
  ...
# Subtest: a row selects its box and closes, leaving focus to the box
ok 307 - a row selects its box and closes, leaving focus to the box
  ---
  duration_ms: 0.576039
  type: 'test'
  ...
# Subtest: Escape closes it, gives focus back, and goes no further
ok 308 - Escape closes it, gives focus back, and goes no further
  ---
  duration_ms: 0.341435
  type: 'test'
  ...
# Subtest: closed by the browser (a click outside), it fills no more; destroy takes its listeners off
ok 309 - closed by the browser (a click outside), it fills no more; destroy takes its listeners off
  ---
  duration_ms: 0.415551
  type: 'test'
  ...
# Subtest: a row from the template takes its words in its label, and keeps its check
ok 310 - a row from the template takes its words in its label, and keeps its check
  ---
  duration_ms: 0.246257
  type: 'test'
  ...
# Subtest: open keeps the panel inside the window: moved back from the end edge, no taller than the room under its title
ok 311 - open keeps the panel inside the window: moved back from the end edge, no taller than the room under its title
  ---
  duration_ms: 0.76607
  type: 'test'
  ...
# Subtest: the scale is the room over the phone height, never above 1
ok 312 - the scale is the room over the phone height, never above 1
  ---
  duration_ms: 0.995266
  type: 'test'
  ...
# Subtest: the scale fits the width as well: the smaller of the two
ok 313 - the scale fits the width as well: the smaller of the two
  ---
  duration_ms: 0.174861
  type: 'test'
  ...
# Subtest: the scale never rounds up past the room it was given
ok 314 - the scale never rounds up past the room it was given
  ---
  duration_ms: 0.335853
  type: 'test'
  ...
# Subtest: mountPhoneFrame writes the scale on every frame, and again when the stages resize
ok 315 - mountPhoneFrame writes the scale on every frame, and again when the stages resize
  ---
  duration_ms: 2.175339
  type: 'test'
  ...
# Subtest: update() measures again when the room changes and the stages do not resize
ok 316 - update() measures again when the room changes and the stages do not resize
  ---
  duration_ms: 0.450049
  type: 'test'
  ...
# Subtest: reads a cookie by its exact name; absent is null
ok 317 - reads a cookie by its exact name; absent is null
  ---
  duration_ms: 0.970113
  type: 'test'
  ...
# Subtest: a cookie jar that throws reads as absent and writes nothing
ok 318 - a cookie jar that throws reads as absent and writes nothing
  ---
  duration_ms: 0.417491
  type: 'test'
  ...
# Subtest: written for a year, site-wide, Lax, and Secure on https only
ok 319 - written for a year, site-wide, Lax, and Secure on https only
  ---
  duration_ms: 0.156479
  type: 'test'
  ...
# Subtest: format: {name} and {n} interpolate; an unknown key is left as text
ok 320 - format: {name} and {n} interpolate; an unknown key is left as text
  ---
  duration_ms: 0.842029
  type: 'test'
  ...
# Subtest: a beat on connect, then one every twenty seconds
ok 321 - a beat on connect, then one every twenty seconds
  ---
  duration_ms: 1.822371
  type: 'test'
  ...
# Subtest: a move posts once, 200ms after the last of a burst, and re-arms the beat
ok 322 - a move posts once, 200ms after the last of a burst, and re-arms the beat
  ---
  duration_ms: 0.993608
  type: 'test'
  ...
# Subtest: a hidden tab stops beating; coming back posts at once
ok 323 - a hidden tab stops beating; coming back posts at once
  ---
  duration_ms: 0.38164
  type: 'test'
  ...
# Subtest: applySet leaves this tab out and answers what changed
ok 324 - applySet leaves this tab out and answers what changed
  ---
  duration_ms: 0.932041
  type: 'test'
  ...
# Subtest: a set with rubbish in it is read for what it does carry
ok 325 - a set with rubbish in it is read for what it does carry
  ---
  duration_ms: 0.26959
  type: 'test'
  ...
# Subtest: initials, and a client id per tab
ok 326 - initials, and a client id per tab
  ---
  duration_ms: 2.50345
  type: 'test'
  ...
# Subtest: a resync that fails is retried with backoff until it succeeds, without ever running twice at once
ok 327 - a resync that fails is retried with backoff until it succeeds, without ever running twice at once
  ---
  duration_ms: 1.836705
  type: 'test'
  ...
# Subtest: the browser's online event retries immediately, not just on the next backoff tick
ok 328 - the browser's online event retries immediately, not just on the next backoff tick
  ---
  duration_ms: 0.303371
  type: 'test'
  ...
# Subtest: reportDivergence before any failure runs the first attempt without a caller ever calling online
ok 329 - reportDivergence before any failure runs the first attempt without a caller ever calling online
  ---
  duration_ms: 1.356053
  type: 'test'
  ...
# Subtest: a permanent 4xx drops its batch instead of retrying it, and does not poison the next edit
ok 330 - a permanent 4xx drops its batch instead of retrying it, and does not poison the next edit
  ---
  duration_ms: 75.2918
  type: 'test'
  ...
# Subtest: a network failure or a 5xx is retried, not dropped
ok 331 - a network failure or a 5xx is retried, not dropped
  ---
  duration_ms: 41.598078
  type: 'test'
  ...
# Subtest: a 500 is retried the same way a network failure is, never dropped
ok 332 - a 500 is retried the same way a network failure is, never dropped
  ---
  duration_ms: 40.289304
  type: 'test'
  ...
# Subtest: flush with nothing queued waits for the save already on the wire
ok 333 - flush with nothing queued waits for the save already on the wire
  ---
  duration_ms: 0.976939
  type: 'test'
  ...
# Subtest: an edit made while a save is on the wire waits for it, and both stay owed until answered
ok 334 - an edit made while a save is on the wire waits for it, and both stay owed until answered
  ---
  duration_ms: 2.103112
  type: 'test'
  ...
# Subtest: a flush resolves only once every earlier update is answered, whichever save answers last
ok 335 - a flush resolves only once every earlier update is answered, whichever save answers last
  ---
  duration_ms: 20.988033
  type: 'test'
  ...
# Subtest: a flush through a retry waits for the retry, and a successful retry is a save
ok 336 - a flush through a retry waits for the retry, and a successful retry is a save
  ---
  duration_ms: 1.737627
  type: 'test'
  ...
# Subtest: a network failure is retried the same way
ok 337 - a network failure is retried the same way
  ---
  duration_ms: 0.715193
  type: 'test'
  ...
# Subtest: a refusal resolves the flush false and is final; later edits still save
ok 338 - a refusal resolves the flush false and is final; later edits still save
  ---
  duration_ms: 1.419973
  type: 'test'
  ...
# Subtest: edits made during a flush are not what that flush waits for
ok 339 - edits made during a flush are not what that flush waits for
  ---
  duration_ms: 1.118274
  type: 'test'
  ...
# Subtest: the queue says saving, not ok, while an answered save leaves another to send
ok 340 - the queue says saving, not ok, while an answered save leaves another to send
  ---
  duration_ms: 0.784501
  type: 'test'
  ...
# Subtest: a save is sent keepalive, and given up if it is never answered
ok 341 - a save is sent keepalive, and given up if it is never answered
  ---
  duration_ms: 21.452027
  type: 'test'
  ...
# Subtest: a batch carries at most maxBatchBytes, and the rest follow in order once it is answered
ok 342 - a batch carries at most maxBatchBytes, and the rest follow in order once it is answered
  ---
  duration_ms: 1.484355
  type: 'test'
  ...
# Subtest: an update bigger than maxBatchBytes still goes, on its own
ok 343 - an update bigger than maxBatchBytes still goes, on its own
  ---
  duration_ms: 0.73245
  type: 'test'
  ...
# Subtest: a save never answered is given up, retried with a real request, and its late answer ignored
ok 344 - a save never answered is given up, retried with a real request, and its late answer ignored
  ---
  duration_ms: 0.861383
  type: 'test'
  ...
# Subtest: resume sends again at once what was on the wire as the page left, without saying it failed
ok 345 - resume sends again at once what was on the wire as the page left, without saying it failed
  ---
  duration_ms: 1.023436
  type: 'test'
  ...
# Subtest: a keepalive save on the wire is left out of what the unload beacons; a plain one is kept
ok 346 - a keepalive save on the wire is left out of what the unload beacons; a plain one is kept
  ---
  duration_ms: 0.759682
  type: 'test'
  ...
# Subtest: a save refused with no answer says retrying only if the server cannot be reached either
ok 347 - a save refused with no answer says retrying only if the server cannot be reached either
  ---
  duration_ms: 2.004138
  type: 'test'
  ...
# Subtest: retries the browser refuses while the server answers back off, and reset once one is answered
ok 348 - retries the browser refuses while the server answers back off, and reset once one is answered
  ---
  duration_ms: 1.391565
  type: 'test'
  ...
# Subtest: reachable tries a keepalive request, then an ordinary one
ok 349 - reachable tries a keepalive request, then an ordinary one
  ---
  duration_ms: 0.455002
  type: 'test'
  ...
# Subtest: a large save is gzipped, and goes keepalive if what is sent fits
ok 350 - a large save is gzipped, and goes keepalive if what is sent fits
  ---
  duration_ms: 2.709422
  type: 'test'
  ...
# Subtest: a gzipped save a server refuses is sent again uncompressed, and later saves skip gzip
ok 351 - a gzipped save a server refuses is sent again uncompressed, and later saves skip gzip
  ---
  duration_ms: 77.430054
  type: 'test'
  ...
# Subtest: a refused save that was not gzipped is not sent again
ok 352 - a refused save that was not gzipped is not sent again
  ---
  duration_ms: 2.063065
  type: 'test'
  ...
# Subtest: the core-written structure reads as ProseMirror marks
ok 353 - the core-written structure reads as ProseMirror marks
  ---
  duration_ms: 6.379557
  type: 'test'
  ...
# Subtest: a y-prosemirror round trip preserves bold and the link
ok 354 - a y-prosemirror round trip preserves bold and the link
  ---
  duration_ms: 2.685973
  type: 'test'
  ...
# Subtest: y-prosemirror writes href as the one-key map and marks as {}
ok 355 - y-prosemirror writes href as the one-key map and marks as {}
  ---
  duration_ms: 1.060449
  type: 'test'
  ...
# Subtest: a plain-string href, written before the map shape, still reads
ok 356 - a plain-string href, written before the map shape, still reads
  ---
  duration_ms: 1.007457
  type: 'test'
  ...
# Subtest: textFragment writes the same shape as writeText
ok 357 - textFragment writes the same shape as writeText
  ---
  duration_ms: 0.659991
  type: 'test'
  ...
# Subtest: safeHref is the server allowlist, and a disallowed href never draws an anchor
ok 358 - safeHref is the server allowlist, and a disallowed href never draws an anchor
  ---
  duration_ms: 0.467907
  type: 'test'
  ...
# Subtest: parseHash splits the slide and the block, and survives a stray %
ok 359 - parseHash splits the slide and the block, and survives a stray %
  ---
  duration_ms: 1.507752
  type: 'test'
  ...
# Subtest: destroy takes the listeners off, and a second mount leaves one of each
ok 360 - destroy takes the listeners off, and a second mount leaves one of each
  ---
  duration_ms: 1.951898
  type: 'test'
  ...
# Subtest: formatHash is the inverse
ok 361 - formatHash is the inverse
  ---
  duration_ms: 0.297221
  type: 'test'
  ...
# Subtest: selecting the selected block again is heard; a new one is too
ok 362 - selecting the selected block again is heard; a new one is too
  ---
  duration_ms: 0.777727
  type: 'test'
  ...
# Subtest: each layout makes its template and its empty blocks, and passes the gate
ok 363 - each layout makes its template and its empty blocks, and passes the gate
  ---
  duration_ms: 14.184369
  type: 'test'
  ...
# Subtest: a layout goes after the slide it is asked to follow
ok 364 - a layout goes after the slide it is asked to follow
  ---
  duration_ms: 1.269346
  type: 'test'
  ...
# Subtest: an unknown layout still makes a slide, and plain New slide follows the one before
ok 365 - an unknown layout still makes a slide, and plain New slide follows the one before
  ---
  duration_ms: 0.164785
  type: 'test'
  ...
# Subtest: refresh makes each box with no text a named group in the tab order, and leaves text to its editor
ok 366 - refresh makes each box with no text a named group in the tab order, and leaves text to its editor
  ---
  duration_ms: 4.38897
  type: 'test'
  ...
# Subtest: focus on a box with no text selects it; focus in text is the text editor's to say
ok 367 - focus on a box with no text selects it; focus in text is the text editor's to say
  ---
  duration_ms: 1.280554
  type: 'test'
  ...
# Subtest: on a canvas slide focus on a box goes on to the overlay
ok 368 - on a canvas slide focus on a box goes on to the overlay
  ---
  duration_ms: 1.805613
  type: 'test'
  ...
# Subtest: Tab and Shift+Tab on the overlay walk the boxes in the slide's order
ok 369 - Tab and Shift+Tab on the overlay walk the boxes in the slide's order
  ---
  duration_ms: 1.299336
  type: 'test'
  ...
# Subtest: Tab and Shift+Tab on the overlay pass a box that is not drawn
ok 370 - Tab and Shift+Tab on the overlay pass a box that is not drawn
  ---
  duration_ms: 1.503994
  type: 'test'
  ...
# Subtest: focus(id) puts focus on the box: its text, the box itself, or on a canvas slide the overlay
ok 371 - focus(id) puts focus on the box: its text, the box itself, or on a canvas slide the overlay
  ---
  duration_ms: 0.768127
  type: 'test'
  ...
# Subtest: destroy takes every listener off the stage
ok 372 - destroy takes every listener off the stage
  ---
  duration_ms: 0.396909
  type: 'test'
  ...
# Subtest: held and restore keep focus on a box across a load
ok 373 - held and restore keep focus on a box across a load
  ---
  duration_ms: 0.99955
  type: 'test'
  ...
# Subtest: held on a canvas slide is the selected box, from its overlay
ok 374 - held on a canvas slide is the selected box, from its overlay
  ---
  duration_ms: 0.632904
  type: 'test'
  ...
# Subtest: after Delete, focus goes to the next box, else the previous, else the slide
ok 375 - after Delete, focus goes to the next box, else the previous, else the slide
  ---
  duration_ms: 1.890121
  type: 'test'
  ...
# Subtest: after a move, focus in the box's text is held across the load too
ok 376 - after a move, focus in the box's text is held across the load too
  ---
  duration_ms: 0.562969
  type: 'test'
  ...
# Subtest: textBlocks finds the text-bearing blocks and skips the rest
ok 377 - textBlocks finds the text-bearing blocks and skips the rest
  ---
  duration_ms: 1.921261
  type: 'test'
  ...
# Subtest: mountTarget is the element whose children are the paragraphs
ok 378 - mountTarget is the element whose children are the paragraphs
  ---
  duration_ms: 0.241854
  type: 'test'
  ...
# Subtest: paragraphTag keeps the renderer's own markup per type
ok 379 - paragraphTag keeps the renderer's own markup per type
  ---
  duration_ms: 0.280226
  type: 'test'
  ...
# Subtest: blockFragment finds a block's text by slide and block id
ok 380 - blockFragment finds a block's text by slide and block id
  ---
  duration_ms: 7.688357
  type: 'test'
  ...
# Subtest: notesFragment finds the slide's notes
ok 381 - notesFragment finds the slide's notes
  ---
  duration_ms: 1.365251
  type: 'test'
  ...
# Subtest: blockIDs and slideIDs are the orders on the stage and the strip
ok 382 - blockIDs and slideIDs are the orders on the stage and the strip
  ---
  duration_ms: 1.651675
  type: 'test'
  ...
# Subtest: cellFragments are a table's cells, row-major
ok 383 - cellFragments are a table's cells, row-major
  ---
  duration_ms: 2.424806
  type: 'test'
  ...
# Subtest: a load that fails leaves the stage on the slide it was showing and says so
ok 384 - a load that fails leaves the stage on the slide it was showing and says so
  ---
  duration_ms: 1.534726
  type: 'test'
  ...
# Subtest: slideAfter is the slide to show once one is gone
ok 385 - slideAfter is the slide to show once one is gone
  ---
  duration_ms: 0.638666
  type: 'test'
  ...
# Subtest: the queue words map to savestatus states, failed staying failed
ok 386 - the queue words map to savestatus states, failed staying failed
  ---
  duration_ms: 0.950114
  type: 'test'
  ...
# Subtest: a dropped batch outranks the queue, for the rest of the session
ok 387 - a dropped batch outranks the queue, for the rest of the session
  ---
  duration_ms: 0.17898
  type: 'test'
  ...
# Subtest: the editor status: the save line and the load error are two lines
ok 388 - the editor status: the save line and the load error are two lines
  ---
  duration_ms: 0.356452
  type: 'test'
  ...
# Subtest: mountSaveStatus loads estilo's module and mounts it on the line
ok 389 - mountSaveStatus loads estilo's module and mounts it on the line
  ---
  duration_ms: 1.55229
  type: 'test'
  ...
# Subtest: a save-status module that will not load says so and refuses to mount
ok 390 - a save-status module that will not load says so and refuses to mount
  ---
  duration_ms: 0.504268
  type: 'test'
  ...
# Subtest: dropTarget: before puts it ahead of the item, after behind it, null means first
ok 391 - dropTarget: before puts it ahead of the item, after behind it, null means first
  ---
  duration_ms: 0.957855
  type: 'test'
  ...
# Subtest: a drop that leaves the order as it is is no move
ok 392 - a drop that leaves the order as it is is no move
  ---
  duration_ms: 0.189713
  type: 'test'
  ...
# Subtest: dropOp is the move_slide
ok 393 - dropOp is the move_slide
  ---
  duration_ms: 0.718963
  type: 'test'
  ...
# Subtest: labelFor is the slide's first heading, else the numbered fallback
ok 394 - labelFor is the slide's first heading, else the numbered fallback
  ---
  duration_ms: 6.79286
  type: 'test'
  ...
# Subtest: flush re-points every dirty thumbnail and relabels it
ok 395 - flush re-points every dirty thumbnail and relabels it
  ---
  duration_ms: 3.74897
  type: 'test'
  ...
# Subtest: destroy takes the item-menu listener off; a second mount leaves one
ok 396 - destroy takes the item-menu listener off; a second mount leaves one
  ---
  duration_ms: 0.459177
  type: 'test'
  ...
# Subtest: plan says what to add, drop and where each item goes
ok 397 - plan says what to add, drop and where each item goes
  ---
  duration_ms: 1.095759
  type: 'test'
  ...
# Subtest: sync moves only the items out of place and keeps focus
ok 398 - sync moves only the items out of place and keeps focus
  ---
  duration_ms: 2.976755
  type: 'test'
  ...
# Subtest: sync keeps the New slide row last
ok 399 - sync keeps the New slide row last
  ---
  duration_ms: 2.668131
  type: 'test'
  ...
# Subtest: relabel keeps the link's title the label
ok 400 - relabel keeps the link's title the label
  ---
  duration_ms: 1.559247
  type: 'test'
  ...
# Subtest: a contextmenu on an item opens its menu
ok 401 - a contextmenu on an item opens its menu
  ---
  duration_ms: 0.583903
  type: 'test'
  ...
# Subtest: sync renumbers both numbers after an add, a remove and a reorder
ok 402 - sync renumbers both numbers after an add, a remove and a reorder
  ---
  duration_ms: 2.558979
  type: 'test'
  ...
# Subtest: desktop view: box and size are the block; hidden and order are always the phone map
ok 403 - desktop view: box and size are the block; hidden and order are always the phone map
  ---
  duration_ms: 1.754633
  type: 'test'
  ...
# Subtest: phone view: everything goes to set_phone, carrying the rest of the map
ok 404 - phone view: everything goes to set_phone, carrying the rest of the map
  ---
  duration_ms: 0.546946
  type: 'test'
  ...
# Subtest: the ops it makes are ones the document takes
ok 405 - the ops it makes are ones the document takes
  ---
  duration_ms: 9.309301
  type: 'test'
  ...
# Subtest: phoneMap reads only the four keys, and only well-typed
ok 406 - phoneMap reads only the four keys, and only well-typed
  ---
  duration_ms: 0.202665
  type: 'test'
  ...
# Subtest: the stored view is read defensively
ok 407 - the stored view is read defensively
  ---
  duration_ms: 0.421767
  type: 'test'
  ...
# Subtest: linkAt reads the link under the cursor and nothing elsewhere
ok 408 - linkAt reads the link under the cursor and nothing elsewhere
  ---
  duration_ms: 2.601471
  type: 'test'
  ...
# Subtest: setLink marks the selection
ok 409 - setLink marks the selection
  ---
  duration_ms: 2.414086
  type: 'test'
  ...
# Subtest: setLink on a collapsed cursor inside a link replaces that link
ok 410 - setLink on a collapsed cursor inside a link replaces that link
  ---
  duration_ms: 0.95845
  type: 'test'
  ...
# Subtest: setLink with nothing selected and no link does nothing
ok 411 - setLink with nothing selected and no link does nothing
  ---
  duration_ms: 0.322359
  type: 'test'
  ...
# Subtest: removeLink clears the link under the cursor
ok 412 - removeLink clears the link under the cursor
  ---
  duration_ms: 0.738155
  type: 'test'
  ...
# Subtest: the keymap binds every documented shortcut
ok 413 - the keymap binds every documented shortcut
  ---
  duration_ms: 0.238373
  type: 'test'
  ...
# Subtest: Mod-b toggles bold through the keymap
ok 414 - Mod-b toggles bold through the keymap
  ---
  duration_ms: 0.847136
  type: 'test'
  ...
# Subtest: setLink refuses an address outside the allowlist and writes nothing
ok 415 - setLink refuses an address outside the allowlist and writes nothing
  ---
  duration_ms: 1.60615
  type: 'test'
  ...
# Subtest: the state machine runs choose → sign → put → register → op
ok 416 - the state machine runs choose → sign → put → register → op
  ---
  duration_ms: 3.068374
  type: 'test'
  ...
# Subtest: a file the deck will not take never reaches the network
ok 417 - a file the deck will not take never reaches the network
  ---
  duration_ms: 0.683853
  type: 'test'
  ...
# Subtest: alt text is required before the bytes move, unless the image is decorative
ok 418 - alt text is required before the bytes move, unless the image is decorative
  ---
  duration_ms: 0.463604
  type: 'test'
  ...
# Subtest: a step that fails stops the ones after it and reports its own code
ok 419 - a step that fails stops the ones after it and reports its own code
  ---
  duration_ms: 0.560161
  type: 'test'
  ...
# Subtest: a failure that is not ours still becomes an UploadError
ok 420 - a failure that is not ours still becomes an UploadError
  ---
  duration_ms: 0.544386
  type: 'test'
  ...
# Subtest: a second pick while one is in flight is refused, not raced
ok 421 - a second pick while one is in flight is refused, not raced
  ---
  duration_ms: 0.417524
  type: 'test'
  ...
# Subtest: an unreadable size is zero rather than a failure
ok 422 - an unreadable size is zero rather than a failure
  ---
  duration_ms: 0.443283
  type: 'test'
  ...
# Subtest: a per-call applyOp wins, so an upload lands on the block it was chosen for
ok 423 - a per-call applyOp wins, so an upload lands on the block it was chosen for
  ---
  duration_ms: 0.25939
  type: 'test'
  ...
# Subtest: checkFile takes exactly the four types
ok 424 - checkFile takes exactly the four types
  ---
  duration_ms: 0.94895
  type: 'test'
  ...
# Subtest: sha256Hex is the hex digest of the bytes
ok 425 - sha256Hex is the hex digest of the bytes
  ---
  duration_ms: 10.629214
  type: 'test'
  ...
# Subtest: refusal reads this app's JSON error shape, and survives one that is not
ok 426 - refusal reads this app's JSON error shape, and survives one that is not
  ---
  duration_ms: 0.473577
  type: 'test'
  ...
# Subtest: malformed fonts are null
ok 427 - malformed fonts are null
  ---
  duration_ms: 3.545286
  type: 'test'
  ...
# Subtest: a malformed background is the theme default
ok 428 - a malformed background is the theme default
  ---
  duration_ms: 1.905566
  type: 'test'
  ...
# Subtest: a malformed box is null
ok 429 - a malformed box is null
  ---
  duration_ms: 1.239935
  type: 'test'
  ...
# Subtest: the phone layer keeps only its typed fields, order as a whole number
ok 430 - the phone layer keeps only its typed fields, order as a whole number
  ---
  duration_ms: 0.934957
  type: 'test'
  ...
# Subtest: assets are typed or skipped
ok 431 - assets are typed or skipped
  ---
  duration_ms: 0.637298
  type: 'test'
  ...
# Subtest: every poison update is deterministic bytes that apply to any deck
ok 432 - every poison update is deterministic bytes that apply to any deck
  ---
  duration_ms: 9.255379
  type: 'test'
  ...
1..432
# tests 432
# suites 0
# pass 432
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 8179.281721
=== the vectors must match a fresh generation
canvas: 22 ops, 3715 bytes
columns: 23 ops, 3134 bytes
every-block: 36 ops, 3180 bytes
table: 14 ops, 1509 bytes
title-only: 6 ops, 1136 bytes
=== the editor bundle must match a fresh build
wrote internal/slides/static/editor.bb2824a28193657f.js (425971 bytes)
wrote internal/slides/static/fontsgate.971e476eab8b8588.js (10991 bytes)
wrote internal/slides/static/fontshold.876f3d8d396da42f.js (314 bytes)
=== go: vet, gofmt, test, migration check
go vet ./...
go test ./...
ok  	amadan.net/oficina/slides/cmd/slides	1.798s
?   	amadan.net/oficina/slides/cmd/slides-contract	[no test files]
?   	amadan.net/oficina/slides/gen	[no test files]
ok  	amadan.net/oficina/slides/gen/locales	0.002s
ok  	amadan.net/oficina/slides/internal/slides	84.933s
ok  	amadan.net/oficina/slides/internal/slides/assist	(cached)
ok  	amadan.net/oficina/slides/internal/slides/core	3.332s
ok  	amadan.net/oficina/slides/internal/slides/deck	(cached)
ok  	amadan.net/oficina/slides/internal/slides/fonts	0.010s
?   	amadan.net/oficina/slides/internal/slides/icons	[no test files]
?   	amadan.net/oficina/slides/internal/slides/keymailtest	[no test files]
ok  	amadan.net/oficina/slides/internal/slides/layout	0.013s
ok  	amadan.net/oficina/slides/internal/slides/live	(cached)
ok  	amadan.net/oficina/slides/internal/slides/pdfcore	(cached)
ok  	amadan.net/oficina/slides/internal/slides/present	(cached)
ok  	amadan.net/oficina/slides/internal/slides/render	0.013s
ok  	amadan.net/oficina/slides/internal/slides/svg	(cached)
?   	amadan.net/oficina/slides/internal/slides/teamstate	[no test files]
ok  	amadan.net/oficina/slides/internal/slidestest	69.855s
?   	amadan.net/oficina/slides/scripts/writeestilo	[no test files]
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo migration check
rastrillo migration check: models and migrations agree
python3 scripts/credits.py --check
credits: checked
gate: ok
diff --git a/AGENTS.md b/AGENTS.md
index 2db4072..574a049 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -100,8 +100,11 @@ seeded on first sign-in — and comes back out as a PDF.
- `/signed-out` offers Forget me on this device (`/signin/forget`,
auth's `Forget`); with Home the form chains on to
`{issuer}/forget?return=<origin>/signed-out`.
- - `sameAnswer` still answers Begin's `?err=` outcomes as Sent, keeping
- only a step-up's `reauth=1` and the `return_to`.
+ - Begin's own problems (`?err=rate`, `?err=address`) are answered as
+ they are, the same for an address on the list and off it; the old
+ `sameAnswer` rewrite to Sent is gone (it told a mistyped address "We
+ sent a link" and dropped `force=1`). A step-up's `reauth=1` and the
+ `return_to` survive every answer.
- **Decks**: list, create, settings, delete, three rungs (private,
granted, team) per suite ruling 15. A deck opens in the editor, as a
document does in Docs: the list links `/d/{sqid}/edit`, and the bare
@@ -228,7 +231,12 @@ hub: seqs and presence), `teamstate` (team mode's Home-only users).
`internal/slides/static/` holds the vendored
stylesheets and the committed editor bundle. `core/` at the repo root is
the Rust crate. `manifest/` and `gen/` are rastrillo's declarative path,
-unused here.
+unused here: `gen/` and `api/v1.json` are what `rastrillo generate` writes
+for an app with no resources (empty stubs nothing imports, plus
+`gen/locales`, the English pack), committed so that `rastrillo doctor`
+is clean. Keep it clean on every rastrillo upgrade: `doctor --fix`,
+`migrate-templates -write internal/slides/templates` (templates take
+their localizer first, `$L`), `generate`, then `doctor` exits 0.
`core/pdf/` is a second Rust crate beside the CRDT core: `slides_pdf.wasm`
wraps `krilla` and `krilla-svg` and takes one SVG per page plus the
diff --git a/api/v1.json b/api/v1.json
new file mode 100644
index 0000000..62e4351
--- /dev/null
+++ b/api/v1.json
@@ -0,0 +1,4 @@
+{
+ "version": 1,
+ "operations": []
+}
diff --git a/cmd/slides/shutdown_test.go b/cmd/slides/shutdown_test.go
index f9465b8..7055472 100644
--- a/cmd/slides/shutdown_test.go
+++ b/cmd/slides/shutdown_test.go
@@ -47,7 +47,15 @@ func TestStoppingWithAStreamOpenExitsAtOnce(t *testing.T) {
t.Fatalf("build: %v\n%s", err, out)
}
- socket := filepath.Join(dir, "slides.sock")
+ // The socket in a short directory of its own: a unix socket's path is
+ // capped at 104 bytes on macOS, and t.TempDir under macOS's default
+ // $TMPDIR (/var/folders/…) runs past it, so the server cannot listen.
+ sockets, err := os.MkdirTemp("/tmp", "slides")
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() { os.RemoveAll(sockets) })
+ socket := filepath.Join(sockets, "slides.sock")
output := &lockedBuffer{}
server := exec.CommandContext(ctx, binary, "-env", "development", "-socket", socket, "-db", filepath.Join(dir, "slides.db"))
server.Env = append(os.Environ(), "SLIDES_ORIGIN=http://localhost")
diff --git a/gen/api.go b/gen/api.go
new file mode 100644
index 0000000..7cc96e7
--- /dev/null
+++ b/gen/api.go
@@ -0,0 +1,19 @@
+// Code generated by rastrillo generate. DO NOT EDIT.
+
+package gen
+
+import (
+ "amadan.net/rastrillo/rastrillo/api"
+ "amadan.net/rastrillo/rastrillo/op"
+)
+
+// APIRoutes is every exposed resource's API doors, for api.New. This app
+// exposes none.
+func APIRoutes() []api.Route { return nil }
+
+// Operations is every resource's operations. This app has none.
+func Operations() []op.Descriptor { return nil }
+
+// ExposedOperations is the operations on the API, for mcp.New. This app
+// exposes none.
+func ExposedOperations() []op.Descriptor { return nil }
diff --git a/gen/locales/packs.go b/gen/locales/packs.go
new file mode 100644
index 0000000..e6dbf2e
--- /dev/null
+++ b/gen/locales/packs.go
@@ -0,0 +1,19 @@
+// Code generated by rastrillo generate; DO NOT EDIT.
+
+// Package locales links the formatting packs manifest/app.toml's
+// locales need. Wire DefaultLocale and Locales into rastrillo.Options.
+package locales
+
+import (
+ _ "amadan.net/rastrillo/rastrillo/locales/en"
+)
+
+// DefaultLocale is manifest/app.toml's default_locale.
+const DefaultLocale = "en"
+
+// Locales is manifest/app.toml's locales. It is nil when the app
+// offers one locale, so a one-locale app gets no /xx/ prefixes and no
+// switcher.
+var Locales []string
+
+var offered = []string{"en"}
diff --git a/gen/locales/packs_test.go b/gen/locales/packs_test.go
new file mode 100644
index 0000000..1e01a5c
--- /dev/null
+++ b/gen/locales/packs_test.go
@@ -0,0 +1,28 @@
+// Code generated by rastrillo generate; DO NOT EDIT.
+
+package locales
+
+import (
+ "os"
+ "slices"
+ "testing"
+
+ "amadan.net/rastrillo/rastrillo/budget"
+ "amadan.net/rastrillo/rastrillo/locales"
+)
+
+func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
+
+// The packs this package imports are exactly the ones its offered
+// locales need. generate --check proves this file matches
+// manifest/app.toml; the RASTRILLO_CHECK_CONFIG probe proves main links
+// this package.
+func TestPacksMatchOfferedLocales(t *testing.T) {
+ want, err := locales.PacksFor(append([]string{DefaultLocale}, offered...))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if got := locales.LinkedPacks(); !slices.Equal(got, want) {
+ t.Errorf("gen/locales links %v, manifest/app.toml needs %v: run rastrillo generate", got, want)
+ }
+}
diff --git a/gen/router.go b/gen/router.go
new file mode 100644
index 0000000..0f957d1
--- /dev/null
+++ b/gen/router.go
@@ -0,0 +1,23 @@
+// Code generated by rastrillo generate. DO NOT EDIT.
+
+package gen
+
+import (
+ "net/http"
+
+ "amadan.net/rastrillo/rastrillo"
+)
+
+// Router builds the app's mux. ctxFactory constructs the *rastrillo.Ctx
+// a request runs with; see cmd/<app>/main.go. Each request gets a copy
+// of what the factory returns, so a factory may hand every request the
+// same Ctx. An actor stamped on the request context (rastrillo.WithActor,
+// the API tree's doing) lands on Ctx.Actor after the factory runs.
+// Failing that, a factory that left Actor zero gets the signed-in person
+// (sessions.ActorFrom), so op.Check sees the subject the scoped store
+// filters by and the caller is attributed even when the factory never
+// thinks about actors.
+func Router(ctxFactory func(*http.Request) *rastrillo.Ctx) *http.ServeMux {
+ mux := http.NewServeMux()
+ return mux
+}
diff --git a/internal/slides/app.go b/internal/slides/app.go
index cd8c5a0..7743ca1 100644
--- a/internal/slides/app.go
+++ b/internal/slides/app.go
@@ -96,10 +96,10 @@ func New(d *db.DB, cfg Config) (*http.ServeMux, *app, error) {
// The sign-in door is rastrillo's screen in estilo's door (signin.go).
// POST /signin is Begin through beginSignin, which keeps the page the
// sign-in began from in the return memory (signin_return.go), and
- // gateBegin. POST /signin/forget is auth's Forget: "Use a different
+ // nothing else. POST /signin/forget is auth's Forget: "Use a different
// email" on the door and "Forget me on this device" on the signed-out
// page, a same-origin POST inside the app-wide CSRF check like any form.
- begin := a.beginSignin(gateBegin(authPlugin.Begin, a.logger))
+ begin := a.beginSignin(authPlugin.Begin)
if a.homeRoutes == nil {
r.Get(signinPath, a.standaloneSignin)
r.Post(signinPath, begin)
diff --git a/internal/slides/auth.go b/internal/slides/auth.go
index 32c15ed..c9baa70 100644
--- a/internal/slides/auth.go
+++ b/internal/slides/auth.go
@@ -18,7 +18,8 @@
// places that cannot be observed from the form: the mail worker
// (mailQueue — a non-permitted address is never mailed) and
// rauth's Authorize, after Keymail or the link has verified the
-// address. Neither changes what POST /signin answers (gateBegin).
+// address. Neither changes what POST /signin answers (see the note on
+// POST /signin, below).
//
// This file is a port of oficina/docs' internal/docs/auth.go, adapted
// to rastrillo v0.26.0 and to Config.AllowedAddresses being a slice
@@ -153,12 +154,12 @@ func resolveAllowlist(cfg Config) (allowlist, error) {
return allowlist{}, fmt.Errorf("slides: Config.AllowedAddresses is empty and Env is %q, not %q — refusing to start with no allowlist: an instance admitting nobody is indistinguishable from one working correctly, since every POST /signin answers the same 303 either way; set $SLIDES_ALLOWED_ADDRESSES", cfg.Env, EnvDevelopment)
}
-// gateBegin is POST /signin: rauth.Auth.Begin for EVERY address,
-// permitted or not, so what the form answers depends on the address's
-// domain and never on the allowlist. That is the whole guarantee, and
-// any difference at all would turn this endpoint into a membership
-// oracle, letting anyone learn who this instance admits by watching how
-// its answers differ.
+// POST /signin is rauth.Auth.Begin for EVERY address, permitted or not
+// (through beginSignin, signin_return.go, which only keeps the page),
+// so what the form answers depends on the address's domain and never on
+// the allowlist. That is the whole guarantee, and any difference at all
+// would turn this endpoint into a membership oracle, letting anyone learn
+// who this instance admits by watching how its answers differ.
//
// Every address therefore takes the same road through Begin: the same
// per-IP and per-address budgets, the same classification, the same
@@ -168,38 +169,33 @@ func resolveAllowlist(cfg Config) (allowlist, error) {
// SigninScreen on, Begin continues on the door (/signin?continue=),
// whose meta refresh leaves for Keymail, never a 303 off this origin
// (Safari applies form-action to the whole redirect chain of a form
-// POST, and ours is 'self'). Whether
-// the address may sign in here is asked only after Keymail has
-// verified it, by rauth's Authorize, and a refusal is the sign-in
-// door saying so (refused, rauth's Refused hook) — told only to
-// somebody who has just proved they hold the address.
-// - Any other address is answered `303 /signin?sent=1`, and a link is
-// mailed only if it is permitted: mailQueue drops the rest, after
-// the response, so not even its timing differs (mailqueue.go).
+// POST, and ours is 'self'). Whether the address may sign in here is
+// asked only after Keymail has verified it, by rauth's Authorize, and
+// a refusal is the sign-in door saying so (refused, rauth's Refused
+// hook) — told only to somebody who has just proved they hold the
+// address.
+// - Any other address is answered `303 /signin?sent=1&attempt=…`, and a
+// link is mailed only if it is permitted: mailQueue drops the rest,
+// after the response, so not even its timing differs (mailqueue.go).
// So this instance's sending identity is no open relay for whatever
// a stranger types, which is why a gate exists at all
// (rauth.Config.Authorize alone runs only after a link was mailed
// and clicked).
//
-// force (any non-empty value) is passed through as the form sent it.
-// Only the recovery form carries it — the page rastrillo lands a failed
-// Keymail exchange on, `?force=1&err=keymail` — and it selects an
-// emailed link over Keymail, so a person whose Keymail failed is never
-// stuck. A stranger posting force for any address gets exactly the
-// plain-email answer above.
+// force=1 is passed through as the form sent it: only the recovery form
+// carries it (a failed Keymail exchange lands on `?force=1&err=keymail`),
+// and it selects an emailed link over Keymail, so a person whose Keymail
+// failed is never stuck.
//
-// No outcome of Begin depends on admission any more: both kinds of
-// address spend the same budgets and parse the same way, and the send
-// that only a permitted address reaches happens in mailQueue's worker,
-// after the response, where its failures are logged rather than
-// answered. sameAnswer still rewrites `?err=rate|address|1` to sent, as
-// it always has; giving rate and address back their own sentences is a
-// separate, safe change, not made here.
-func gateBegin(next http.HandlerFunc, logger *slog.Logger) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- next(&sameAnswer{ResponseWriter: w, logger: logger}, r)
- }
-}
+// No outcome of Begin depends on admission: both kinds of address spend
+// the same budgets and parse the same way, and the send that only a
+// permitted address reaches happens in mailQueue's worker, after the
+// response, where its failures are logged rather than answered. So
+// Begin's own problems (?err=rate, ?err=address) are answered as they
+// are, the same for an address on the list and one off it. Slides used to
+// rewrite them as Sent (sameAnswer), which told a mistyped address "We
+// sent a link" and dropped force=1 after a failed Keymail; it was removed
+// with the smart door.
// refused is rauth's Refused hook: Keymail or an emailed link verified
// the address and the allowlist does not hold it. It answers with the
@@ -228,61 +224,6 @@ func (a *app) renderConfirm(w http.ResponseWriter, r *http.Request, _ rauth.Conf
a.signinDoor(w, r)
}
-// sentLocation is the answer POST /signin gives every address that is
-// not going to Keymail — see gateBegin. Spelled once so the paths that
-// write it cannot drift apart by a character.
-const sentLocation = signinPath + "?sent=1"
-
-// sameAnswer is the ResponseWriter gateBegin hands to Begin: it
-// rewrites any `?err=…` outcome back to sentLocation before the status
-// line goes out, so a permitted address cannot be told apart from a
-// denied one by a failed send. See gateBegin's own doc comment for
-// which outcomes that still matters for.
-//
-// It hooks WriteHeader rather than the Location header itself because
-// that is the last moment a header is still settable: http.Redirect
-// sets Location and then calls WriteHeader, so by intercepting the
-// second we see the first already written and can still change it. The
-// body is not a concern on this route — http.Redirect writes its little
-// HTML body only for GET and HEAD, and this handler is mounted on POST
-// alone.
-type sameAnswer struct {
- http.ResponseWriter
- logger *slog.Logger
-}
-
-func (s *sameAnswer) WriteHeader(status int) {
- if loc := s.Header().Get("Location"); loc != "" && loc != sentLocation && strings.HasPrefix(loc, signinPath+"?err=") {
- // Logged, not swallowed: the person who submitted the form is
- // told nothing, so the operator has to be told everything.
- s.logger.Warn("slides: sign-in refused; answering as if sent, to keep the allowlist unobservable",
- "outcome", loc)
- s.Header().Set("Location", sentAnswer(loc))
- }
- s.ResponseWriter.WriteHeader(status)
-}
-
-// sentAnswer is sentLocation for a refused outcome at loc, keeping what
-// the door carries across a post: a step-up (reauth=1, so the next door
-// still offers local ways only) and the page the sign-in began from
-// (return_to). Nothing else of the outcome survives.
-func sentAnswer(loc string) string {
- u, err := url.Parse(loc)
- if err != nil {
- return sentLocation
- }
- kept := url.Values{}
- for _, key := range []string{"reauth", "return_to"} {
- if v := u.Query().Get(key); v != "" {
- kept.Set(key, v)
- }
- }
- if len(kept) == 0 {
- return sentLocation
- }
- return sentLocation + "&" + kept.Encode()
-}
-
// newAuthPlugin wires rastrillo/auth per SKILL.md §5: exactly one *Auth
// per process (the rate limiter's budget lives on the value, so a plugin
// per request would silently have no rate limiting at all), Origin as
@@ -796,7 +737,8 @@ func signedOutAfter(signout http.HandlerFunc) http.HandlerFunc {
}
// toSignedOut rewrites Signout's Location, at the last moment a header is
-// still settable (sameAnswer's technique).
+// still settable: http.Redirect sets Location and then calls
+// WriteHeader, so intercepting the second sees the first.
type toSignedOut struct{ http.ResponseWriter }
func (t *toSignedOut) WriteHeader(status int) {
diff --git a/internal/slides/config.go b/internal/slides/config.go
index a32e971..372a218 100644
--- a/internal/slides/config.go
+++ b/internal/slides/config.go
@@ -116,7 +116,7 @@ type Config struct {
// sending identity from being an open relay for any address a
// stranger types into the form, since Authorize fires only after
// a link has been mailed and clicked. Neither changes what POST
- // /signin answers (gateBegin).
+ // /signin answers (auth.go's note on POST /signin).
//
// Empty is allowed only in development, where it means "admit
// everyone" so the dev script and the suite need no setup.
@@ -124,7 +124,7 @@ type Config struct {
// nobody": an instance admitting nobody boots looking perfectly
// healthy — /signin renders, POST /signin answers as it would for
// anyone, because an answer that does not depend on the list is
- // the whole point of gateBegin — and the only symptom is that no
+ // the whole point of POST /signin — and the only symptom is that no
// link ever arrives.
AllowedAddresses []string
diff --git a/internal/slides/signin_door_return_test.go b/internal/slides/signin_door_return_test.go
index 08189cc..5145c72 100644
--- a/internal/slides/signin_door_return_test.go
+++ b/internal/slides/signin_door_return_test.go
@@ -186,7 +186,7 @@ func TestABadReturnCookieLandsOnTheList(t *testing.T) {
}
}
-// A step-up's reauth=1 survives Begin's answer (sameAnswer's too) and the
+// A step-up's reauth=1 survives Begin's answer and the
// page the sign-in began from, for a bad address and for Sent alike: the
// next door is still local ways only, for the same page.
func TestAStepUpPostKeepsReauthAndTheReturn(t *testing.T) {
diff --git a/internal/slides/signin_return.go b/internal/slides/signin_return.go
index bc5957d..a6e6ae5 100644
--- a/internal/slides/signin_return.go
+++ b/internal/slides/signin_return.go
@@ -68,8 +68,8 @@ func (a *app) rememberSigninReturn(w http.ResponseWriter, r *http.Request, st *r
}
}
-// beginSignin is POST /signin, in both modes: rastrillo's Begin (through
-// gateBegin), with the destination kept Slides' way.
+// beginSignin is POST /signin, in both modes: rastrillo's Begin, with the
+// destination kept Slides' way.
//
// The door's forms post return_to, and rastrillo would carry it across
// the round trip and land the new session there itself, skipping
diff --git a/internal/slides/team_access_test.go b/internal/slides/team_access_test.go
index 9a0d8b1..e4ecf90 100644
--- a/internal/slides/team_access_test.go
+++ b/internal/slides/team_access_test.go
@@ -379,3 +379,83 @@ func TestTeamChooseCopyIsConnects(t *testing.T) {
}
})).ServeHTTP(httptest.NewRecorder(), httptest.NewRequest(http.MethodGet, "/", nil))
}
+
+// The door in team mode, for a member the roster has removed who still
+// holds a session: removed people keep their session and reach only
+// grants (as in Docs and Sheets), so the gate admits them and /signin
+// sends them on to the list, which answers 200 with what was shared;
+// anything a member does is refused; and nothing loops.
+func TestTeamARemovedMemberAtTheDoorDoesNotLoop(t *testing.T) {
+ f := newTeamFixture(t)
+ f.member(teamSubject('a'), "member")
+ f.dir.Set(teamSubject('a'), "")
+ f.refreshed()
+ for i := 0; i < 2; i++ {
+ if rec := f.get("/signin"); rec.Code != http.StatusSeeOther || rec.Header().Get("Location") != "/" {
+ t.Fatalf("GET /signin as a removed member: %d %q, want 303 /", rec.Code, rec.Header().Get("Location"))
+ }
+ if rec := f.get("/"); rec.Code != http.StatusOK {
+ t.Fatalf("GET / as a removed member: %d %q, want 200 (grants only)", rec.Code, rec.Header().Get("Location"))
+ }
+ }
+ if rec := f.get("/decks/new"); rec.Code != http.StatusForbidden {
+ t.Fatalf("GET /decks/new as a removed member: %d, want 403", rec.Code)
+ }
+ if _, ok := f.sessionNow(); !ok {
+ t.Fatal("the door signed a removed member out")
+ }
+}
+
+// A member the roster removes between the proof and the choice: "I'm new
+// here" is refused and signs nobody in, since connect asks Admit again.
+func TestTeamAMemberRemovedBeforeChoosingIsRefused(t *testing.T) {
+ f := newTeamFixture(t)
+ f.dir.Set(teamSubject('a'), "member")
+ f.refreshed()
+ if fin := f.signInHomeChoosing(teamSubject('a')); fin.Header().Get("Location") != connect.ChoosePath {
+ t.Fatalf("finish = %d %q, want the choice", fin.Code, fin.Header().Get("Location"))
+ }
+ f.dir.Set(teamSubject('a'), "")
+ f.refreshed()
+ if got := f.choose("new"); got.Code != http.StatusForbidden {
+ t.Fatalf("I'm new here after removal = %d %q, want 403", got.Code, got.Header().Get("Location"))
+ }
+ if _, ok := f.sessionNow(); ok {
+ t.Fatal("a removed member was signed in")
+ }
+}
+
+// "I'm new here" with any app session present is refused: allocation is
+// reachable only with no session at all.
+func TestTeamNewWithASessionIsRefused(t *testing.T) {
+ f := newTeamFixture(t, "x@example.com")
+ f.localUser("x@example.com")
+ f.dir.Set(teamSubject('a'), "member")
+ f.refreshed()
+ if fin := f.signInHomeChoosing(teamSubject('a')); fin.Header().Get("Location") != connect.ChoosePath {
+ t.Fatalf("finish = %d %q, want the choice", fin.Code, fin.Header().Get("Location"))
+ }
+ f.localSession("x@example.com")
+ if got := f.choose("new"); got.Code != http.StatusForbidden {
+ t.Fatalf("I'm new here over a session = %d %q, want 403", got.Code, got.Header().Get("Location"))
+ }
+ if s, ok := f.sessionNow(); !ok || s.Subject != "x@example.com" {
+ t.Fatalf("the session is now %+v (%v), want the local one untouched", s, ok)
+ }
+}
+
+// A stranger to the roster is refused at the finish (connect's unknown),
+// signed in nowhere, and the door still draws for them.
+func TestTeamAStrangerIsRefusedAndTheDoorStillDraws(t *testing.T) {
+ f := newTeamFixture(t)
+ fin := f.signInHomeChoosing(teamSubject('z'))
+ if fin.Code != http.StatusForbidden {
+ t.Fatalf("a stranger's finish = %d %q, want 403", fin.Code, fin.Header().Get("Location"))
+ }
+ if _, ok := f.sessionNow(); ok {
+ t.Fatal("a stranger was signed in")
+ }
+ if rec := f.get("/signin"); rec.Code != http.StatusOK || !strings.Contains(rec.Body.String(), "estilo-signin-screen") {
+ t.Fatalf("GET /signin for a stranger: %d", rec.Code)
+ }
+}
diff --git a/internal/slides/templates/agents.html b/internal/slides/templates/agents.html
index 047b87c..10ee9d9 100644
--- a/internal/slides/templates/agents.html
+++ b/internal/slides/templates/agents.html
@@ -11,12 +11,12 @@
line of prose, because the whole job of this screen at that moment
is "select this and copy it", and a field is what a browser lets
you select cleanly with no script at all. */}}
-{{define "content"}}
-{{template "page-header" dict "Title" .Title}}
+{{define "content"}}{{$L := localizer $}}
+{{template "page-header" dict "L" $L "Title" .Title}}
{{if .NewToken}}
<div rst-box>
- {{template "callout" dict "Tone" "warning" "Title" .NewTitle "Body" .NewHint}}
+ {{template "callout" dict "L" $L "Tone" "warning" "Title" .NewTitle "Body" .NewHint}}
{{/* Hand-written rather than {{template "field-text"}} for one
attribute: readonly, which that partial's contract does not
carry. The markup is field-text's own, attribute for attribute,
@@ -38,7 +38,7 @@
<p>{{.Lead}}</p>
</div>
-{{template "callout" dict "Tone" "warning" "Title" .WarningTitle "Body" .Warning}}
+{{template "callout" dict "L" $L "Tone" "warning" "Title" .WarningTitle "Body" .Warning}}
{{if .Agents}}
<div rst-list>
@@ -48,7 +48,7 @@
{{.Principal}}
<small rst-row-sub>{{.Created}}</small>
</span>
- {{template "status-pill" dict "Tone" .StatusTone "Label" .StatusLabel}}
+ {{template "status-pill" dict "L" $L "Tone" .StatusTone "Label" .StatusLabel}}
{{if not .Revoked}}
{{/* aria-label, because "Revoke" repeated down a list does not say
which agent it revokes — list-row-action's ActionAria rule,
@@ -63,17 +63,17 @@
</div>
{{else}}
<div rst-box>
- {{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
+ {{template "empty-state" dict "L" $L "Title" .EmptyTitle "Body" .EmptyBody}}
</div>
{{end}}
<div rst-box>
<form method="post" action="{{.Action}}" rst-form>
- {{template "field-text" dict
+ {{template "field-text" dict "L" $L
"Name" "name" "Label" .NameLabel "Hint" .NameHint
"Value" .NameValue "Required" true
"Error" (index .Errors "Name")}}
- {{template "form-foot" dict "Submit" .CreateLabel}}
+ {{template "form-foot" dict "L" $L "Submit" .CreateLabel}}
</form>
</div>
{{end}}
diff --git a/internal/slides/templates/credits.html b/internal/slides/templates/credits.html
index a424e6d..372513f 100644
--- a/internal/slides/templates/credits.html
+++ b/internal/slides/templates/credits.html
@@ -1,2 +1,2 @@
{{define "page-head"}}<link rel="stylesheet" href="/static/credits.css">{{end}}
-{{define "content"}}{{template "estilo/credits" .Credits}}{{end}}
+{{define "content"}}{{$L := localizer $}}{{template "estilo/credits" (withL (.Credits) $L)}}{{end}}
diff --git a/internal/slides/templates/deck_delete.html b/internal/slides/templates/deck_delete.html
index 3e77ed8..960df70 100644
--- a/internal/slides/templates/deck_delete.html
+++ b/internal/slides/templates/deck_delete.html
@@ -6,12 +6,12 @@
nothing, Cancel is a real link and comes first in the DOM, and the
whole thing works with scripts off — which is the point of a page
rather than a modal. */}}
-{{define "content"}}
-{{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}}
-{{template "page-header" dict "Title" .Title}}
+{{define "content"}}{{$L := localizer $}}
+{{template "back-nav" dict "L" $L "Href" .BackHref "Label" .BackLabel}}
+{{template "page-header" dict "L" $L "Title" .Title}}
<div rst-box>
<p>{{.Body}}</p>
- {{template "confirm-form" dict
+ {{template "confirm-form" dict "L" $L
"Action" .Action "Label" .Label "Danger" true
"CancelHref" .CancelHref "CancelLabel" .CancelLabel}}
</div>
diff --git a/internal/slides/templates/deck_export.html b/internal/slides/templates/deck_export.html
index f99cdbf..152e5c7 100644
--- a/internal/slides/templates/deck_export.html
+++ b/internal/slides/templates/deck_export.html
@@ -8,16 +8,16 @@
The notice is where a refused start lands: a deck over the slide
cap, or a person who already has four exports running. Neither is
a fault, so neither is an error page. */}}
-{{define "content"}}
-{{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}}
-{{template "page-header" dict "Title" .Title}}
-{{template "form-error" .Notice}}
+{{define "content"}}{{$L := localizer $}}
+{{template "back-nav" dict "L" $L "Href" .BackHref "Label" .BackLabel}}
+{{template "page-header" dict "L" $L "Title" .Title}}
+{{template "form-error" (withL (.Notice) $L)}}
<form method="post" action="{{.Action}}">
<div rst-box>
<p>{{.Body}}</p>
- {{template "field-check" dict "Name" "notes" "Label" .NotesLabel "Value" "1"}}
+ {{template "field-check" dict "L" $L "Name" "notes" "Label" .NotesLabel "Value" "1"}}
<p rst-text-muted>{{.Held}}</p>
</div>
- {{template "form-foot" dict "Submit" .Submit "CancelHref" .BackHref "CancelLabel" .BackLabel}}
+ {{template "form-foot" dict "L" $L "Submit" .Submit "CancelHref" .BackHref "CancelLabel" .BackLabel}}
</form>
{{end}}
diff --git a/internal/slides/templates/deck_new.html b/internal/slides/templates/deck_new.html
index 90f3dbe..cccf3c4 100644
--- a/internal/slides/templates/deck_new.html
+++ b/internal/slides/templates/deck_new.html
@@ -5,12 +5,12 @@
one primary button, a cancel that is a real link. It also carries
the one refusal POST /decks can make of a browser, a theme that is
not one of the six, which only a hand-made request can send. */}}
-{{define "content"}}
-{{template "page-header" dict "Title" .Title "Sub" .Body}}
+{{define "content"}}{{$L := localizer $}}
+{{template "page-header" dict "L" $L "Title" .Title "Sub" .Body}}
<div rst-box>
- {{with .Error}}{{template "callout" dict "Tone" "negative" "Body" .}}{{end}}
+ {{with .Error}}{{template "callout" dict "L" $L "Tone" "negative" "Body" .}}{{end}}
<form rst-form method="post" action="/decks">
- {{template "form-foot" dict
+ {{template "form-foot" dict "L" $L
"Submit" .Submit "CancelHref" .CancelHref "CancelLabel" .CancelLabel}}
</form>
</div>
diff --git a/internal/slides/templates/deck_notes.html b/internal/slides/templates/deck_notes.html
index 5e5e3fb..073f10e 100644
--- a/internal/slides/templates/deck_notes.html
+++ b/internal/slides/templates/deck_notes.html
@@ -9,9 +9,9 @@
A slide with no notes says so. On a page being read while
presenting, a heading over nothing is indistinguishable from a
page that failed to load. */}}
-{{define "content"}}
-{{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}}
-{{template "page-header" dict "Title" .Title}}
+{{define "content"}}{{$L := localizer $}}
+{{template "back-nav" dict "L" $L "Href" .BackHref "Label" .BackLabel}}
+{{template "page-header" dict "L" $L "Title" .Title}}
<div rst-box>
<p>{{.Body}}</p>
</div>
diff --git a/internal/slides/templates/deck_settings.html b/internal/slides/templates/deck_settings.html
index 298d747..cfc77bc 100644
--- a/internal/slides/templates/deck_settings.html
+++ b/internal/slides/templates/deck_settings.html
@@ -9,21 +9,21 @@
Deleting is not a control on this form. It is a link to its own
page, which asks the question and carries the only button that
answers it. */}}
-{{define "content"}}
-{{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}}
-{{template "page-header" dict "Title" .Title}}
+{{define "content"}}{{$L := localizer $}}
+{{template "back-nav" dict "L" $L "Href" .BackHref "Label" .BackLabel}}
+{{template "page-header" dict "L" $L "Title" .Title}}
<div rst-box>
<form rst-form method="post" action="{{.Action}}">
- {{template "field-text" dict
+ {{template "field-text" dict "L" $L
"Name" "title" "Label" .TitleLabel "Value" .TitleValue
"Required" true "Primary" true
"Error" (index .Errors "Title")}}
- {{template "field-select" dict
+ {{template "field-select" dict "L" $L
"ID" "theme" "Name" "theme" "Label" .ThemeLabel
"Options" .Themes "Required" true
"Error" (index .Errors "Theme")}}
- {{template "form-error" (index .Errors "Rung")}}
- {{template "form-foot" dict
+ {{template "form-error" (withL ((index .Errors "Rung")) $L)}}
+ {{template "form-foot" dict "L" $L
"Submit" .Submit "CancelHref" .CancelHref "CancelLabel" .CancelLabel}}
</form>
</div>
diff --git a/internal/slides/templates/decks.html b/internal/slides/templates/decks.html
index fb41550..a13ddab 100644
--- a/internal/slides/templates/decks.html
+++ b/internal/slides/templates/decks.html
@@ -43,12 +43,12 @@
<span slides-tile-meta><time datetime="{{.WhenISO}}" title="{{.WhenTitle}}">{{.When}}</time>{{if .Shared}}<span slides-tile-rung>{{.RungLabel}}</span>{{end}}</span>
{{with .Sub}}<span slides-tile-sub>{{.}}</span>{{end}}
</a></li>{{end}}
-{{define "deck-row"}}<div rst-row slides-lit>
+{{define "deck-row"}}{{$L := localizer $}}<div rst-row slides-lit>
<span slides-cover aria-hidden="true"{{if .Cover.Bg}} style="background-color: {{.Cover.Bg}}"{{end}}>{{with .Cover.Src}}<img src="{{.}}?w=160" alt="" loading="lazy" decoding="async" width="64" height="36">{{end}}</span>
<span rst-row-main><a href="{{.Href}}">{{.Title}}</a>{{with .Sub}}<small rst-row-sub>{{.}}</small>{{end}}</span>
- <span slides-row-trail>{{template "status-pill" dict "Tone" .RungTone "Label" .RungLabel}}<time slides-row-when datetime="{{.WhenISO}}" title="{{.WhenTitle}}">{{.When}}</time></span>
+ <span slides-row-trail>{{template "status-pill" dict "L" $L "Tone" .RungTone "Label" .RungLabel}}<time slides-row-when datetime="{{.WhenISO}}" title="{{.WhenTitle}}">{{.When}}</time></span>
</div>{{end}}
-{{define "content"}}
+{{define "content"}}{{$L := localizer $}}
<div slides-decks>
<header slides-decks-head>
<h1>{{.Title}}</h1>
@@ -69,28 +69,28 @@
list is what this person reaches without the team — the decks
granted to them — and says so, rather than the whole page
answering 503. Rendered only then, and nothing at all otherwise. */}}<div data-partial>
-{{template "callout" dict "Tone" "warning" "Title" .PartialTitle "Body" .PartialBody}}
+{{template "callout" dict "L" $L "Tone" "warning" "Title" .PartialTitle "Body" .PartialBody}}
</div>
{{end}}
{{- if .Searching}}
{{if .Rows}}
<div rst-list>
- {{range .Rows}}{{template "deck-row" .}}{{end}}
+ {{range .Rows}}{{template "deck-row" (withL (.) $L)}}{{end}}
</div>
{{else}}
-{{template "empty-state" dict "Title" .NoneTitle "Body" .NoneBody}}
+{{template "empty-state" dict "L" $L "Title" .NoneTitle "Body" .NoneBody}}
{{end}}
<p slides-search-clear><a href="/">{{.ClearLabel}}</a></p>
{{- else if or .Recent .Rows}}
{{if .Recent}}<ul slides-shelf>
- {{range .Recent}}{{template "deck-tile" .}}{{end}}
+ {{range .Recent}}{{template "deck-tile" (withL (.) $L)}}{{end}}
</ul>{{end}}
{{if .Rows}}<div rst-list>
<h2 slides-rows-label>{{.EarlierLabel}}</h2>
- {{range .Rows}}{{template "deck-row" .}}{{end}}
+ {{range .Rows}}{{template "deck-row" (withL (.) $L)}}{{end}}
</div>{{end}}
{{- else if not .Partial}}
-{{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
+{{template "empty-state" dict "L" $L "Title" .EmptyTitle "Body" .EmptyBody}}
{{end}}
</div>
{{end}}
diff --git a/internal/slides/templates/editor.html b/internal/slides/templates/editor.html
index ffefd85..788b6d2 100644
--- a/internal/slides/templates/editor.html
+++ b/internal/slides/templates/editor.html
@@ -46,7 +46,7 @@
is still the page's banner and its commands still reach the bundle,
which listens on the root. */}}
{{define "bar"}}<!-- the editor draws its own header, inside [slides-editor] -->{{end}}
-{{define "main"}}
+{{define "main"}}{{$L := localizer $}}
<div slides-editor
data-view="desktop"
data-inspect="slide"
@@ -143,7 +143,7 @@
<summary estilo-menubar-title>{{.L "menu.insert"}}</summary>
<div estilo-menu>
<p slides-menu-heading>{{.L "insert.slide"}}</p>
- {{range .Layouts}}<button estilo-menu-item type="button" data-layout-choice="{{.Name}}"><span slides-menu-glyph aria-hidden="true">{{template "slides-layout-glyph" .Name}}</span><span estilo-menu-label>{{.Label}}</span></button>
+ {{range .Layouts}}<button estilo-menu-item type="button" data-layout-choice="{{.Name}}"><span slides-menu-glyph aria-hidden="true">{{template "slides-layout-glyph" (withL (.Name) $L)}}</span><span estilo-menu-label>{{.Label}}</span></button>
{{end}}
<hr>
<p slides-menu-heading>{{.L "insert.block"}}</p>
@@ -172,12 +172,12 @@
is on, never colour; the bundle keeps them in step with the
switcher's radios and the notes switch, which stay the
controls of record. */}}
- <button estilo-menu-item type="button" data-view-choice="desktop" aria-pressed="true"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "view.desktop"}}</span></button>
- <button estilo-menu-item type="button" data-view-choice="phone" aria-pressed="false"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "view.phone"}}</span></button>
- <button estilo-menu-item type="button" data-view-choice="both" aria-pressed="false"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "view.both"}}</span></button>
+ <button estilo-menu-item type="button" data-view-choice="desktop" aria-pressed="true"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "view.desktop"}}</span></button>
+ <button estilo-menu-item type="button" data-view-choice="phone" aria-pressed="false"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "view.phone"}}</span></button>
+ <button estilo-menu-item type="button" data-view-choice="both" aria-pressed="false"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "view.both"}}</span></button>
<hr>
- <button estilo-menu-item type="button" data-view-toggle="notes" aria-pressed="{{.NotesPressed}}"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "view.notes"}}</span></button>
- <button estilo-menu-item type="button" data-view-toggle="inspector" aria-pressed="{{.InspectorExpanded}}"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "view.inspector"}}</span></button>
+ <button estilo-menu-item type="button" data-view-toggle="notes" aria-pressed="{{.NotesPressed}}"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "view.notes"}}</span></button>
+ <button estilo-menu-item type="button" data-view-toggle="inspector" aria-pressed="{{.InspectorExpanded}}"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "view.inspector"}}</span></button>
{{/* The slide's boxes by name, in a popover (fixtures/outline.mjs):
not a check, so its check column is empty. */}}
<button estilo-menu-item type="button" data-view-toggle="outline" aria-haspopup="dialog" aria-controls="slides-outline" data-needs-slide{{if not .HasSlides}} disabled{{end}}><span estilo-menu-check aria-hidden="true"></span><span estilo-menu-label>{{.L "view.outline"}}</span></button>
@@ -202,7 +202,7 @@
<h2 estilo-menu-heading id="slides-outline-title">{{.L "view.outline"}}</h2>
<p slides-outline-none hidden>{{.L "outline.none"}}</p>
<div slides-outline-list></div>
- <template slides-outline-row-template><button estilo-menu-item type="button" data-select-block aria-pressed="false"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label></span></button></template>
+ <template slides-outline-row-template><button estilo-menu-item type="button" data-select-block aria-pressed="false"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label></span></button></template>
</div>
</div>
<div estilo-bar-end slides-head-end>
@@ -214,7 +214,7 @@
state, so it is said in a line of its own beside it, from
data-text-error above. Both are role="status": a change is read
out without stealing focus. */}}
- {{template "estilo-save-status" .SaveStatus}}
+ {{template "estilo-save-status" (withL (.SaveStatus) $L)}}
<span slides-load-error role="status" aria-live="polite" aria-atomic="true"></span>
{{/* Presence's one announcement (spec §3.3): somebody arriving in
the deck or leaving it, said once and politely. Where each of
@@ -271,10 +271,10 @@
<button type="button" slides-assist-close slides-press popovertarget="slides-assist" popovertargetaction="hide" aria-label="{{$.L "assist.close"}}" title="{{$.L "assist.close"}}">{{icon "x"}}</button>
</div>
<form rst-form slides-assist-form data-busy="false">
- {{template "field-textarea" dict "Name" "slides-assist-prompt" "Label" ($.L "assist.prompt") "Rows" 4 "Hint" ($.L "assist.prompt.hint")}}
+ {{template "field-textarea" dict "L" $L "Name" "slides-assist-prompt" "Label" ($.L "assist.prompt") "Rows" 4 "Hint" ($.L "assist.prompt.hint")}}
<div slides-assist-choices>
- {{template "field-select" dict "ID" "slides-assist-scope" "Name" "slides-assist-scope" "Label" ($.L "assist.scope") "Options" .Scopes "Plain" true}}
- {{template "field-select" dict "ID" "slides-assist-model" "Name" "slides-assist-model" "Label" ($.L "assist.model") "Options" .Models "Plain" true}}
+ {{template "field-select" dict "L" $L "ID" "slides-assist-scope" "Name" "slides-assist-scope" "Label" ($.L "assist.scope") "Options" .Scopes "Plain" true}}
+ {{template "field-select" dict "L" $L "ID" "slides-assist-model" "Name" "slides-assist-model" "Label" ($.L "assist.model") "Options" .Models "Plain" true}}
</div>
<p slides-assist-privacy>{{$.L "assist.privacy"}}</p>
<div slides-assist-actions>
@@ -301,10 +301,10 @@
<button rst-btn="primary" type="submit">{{icon "play"}}<span>{{.PresentLabel}}</span></button>
</form></div>
{{- with .Frame.Chrome.Switcher}}
- {{template "estilo-switcher" .}}
+ {{template "estilo-switcher" (withL (.) $L)}}
{{- end}}
{{- with .Frame.Chrome.Account}}
- {{template "estilo-account" .}}
+ {{template "estilo-account" (withL (.) $L)}}
{{- end}}
</div>
</header>
@@ -402,7 +402,7 @@
paints over it, and a dropdown inside either is clipped. */}}
<button rst-btn type="button" slides-layouts-toggle popovertarget="slides-layouts" aria-label="{{.L "head.layouts"}}" title="{{.L "head.layouts"}}"><span aria-hidden="true">{{icon "chevron-down"}}</span></button>
<div popover id="slides-layouts" slides-layout-grid role="group" aria-label="{{.L "head.layouts"}}">
- {{range .Layouts}}<button type="button" slides-lit slides-press data-layout-choice="{{.Name}}"><span slides-layout-glyph aria-hidden="true">{{template "slides-layout-glyph" .Name}}</span><span>{{.Label}}</span></button>
+ {{range .Layouts}}<button type="button" slides-lit slides-press data-layout-choice="{{.Name}}"><span slides-layout-glyph aria-hidden="true">{{template "slides-layout-glyph" (withL (.Name) $L)}}</span><span>{{.Label}}</span></button>
{{end}}
</div>
</div>
@@ -443,7 +443,7 @@
<div slides-stages>
<div slides-stage-frame>
<div slides-stage data-vp="desktop">{{if .HasSlides}}{{.Stage}}{{else}}<div rst-box slides-stage-empty>
- {{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
+ {{template "empty-state" dict "L" $L "Title" .EmptyTitle "Body" .EmptyBody}}
</div>{{end}}</div>
</div>
<div slides-stage-phone role="region" aria-label="{{.L "view.phone.readonly"}}" hidden><div slides-phone-screen></div></div>
@@ -469,10 +469,10 @@
<hr>
<button estilo-menu-item type="button" role="menuitem" data-row="block-place" data-command="block-place" tabindex="-1"><span estilo-menu-label>{{.L "box.place"}}</span></button>
<div role="group" slides-box-region data-row="region" aria-labelledby="slides-box-region-label"><p estilo-menu-heading id="slides-box-region-label">{{.L "box.region"}}</p>
- <button estilo-menu-item type="button" role="menuitemradio" data-region="heading" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "region.heading"}}</span></button>
- <button estilo-menu-item type="button" role="menuitemradio" data-region="body" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "region.body"}}</span></button>
- <button estilo-menu-item type="button" role="menuitemradio" data-region="aside" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "region.aside"}}</span></button>
- <button estilo-menu-item type="button" role="menuitemradio" data-region="media" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check"}}</span><span estilo-menu-label>{{.L "region.media"}}</span></button>
+ <button estilo-menu-item type="button" role="menuitemradio" data-region="heading" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "region.heading"}}</span></button>
+ <button estilo-menu-item type="button" role="menuitemradio" data-region="body" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "region.body"}}</span></button>
+ <button estilo-menu-item type="button" role="menuitemradio" data-region="aside" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "region.aside"}}</span></button>
+ <button estilo-menu-item type="button" role="menuitemradio" data-region="media" aria-checked="false" tabindex="-1"><span estilo-menu-check aria-hidden="true">{{template "estilo-icon-check" .}}</span><span estilo-menu-label>{{.L "region.media"}}</span></button>
</div>
<hr>
<button estilo-menu-item="danger" type="button" role="menuitem" data-row="block-delete" data-command="block-delete" tabindex="-1"><span estilo-menu-label>{{.L "box.delete"}}</span><kbd estilo-menu-key aria-hidden="true">{{index .Keys "block-delete"}}</kbd></button>
@@ -566,14 +566,14 @@
named by its tooltip and its accessible name. The painted
slide's is lit by the server, so the first paint is final. */}}
<fieldset slides-layout-pick aria-labelledby="slides-g-slide">
- {{template "slides-layout-pick-item" dict "Value" "title" "Label" (.L "template.title") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "title-body" "Label" (.L "template.title-body") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "two-column" "Label" (.L "template.two-column") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "section" "Label" (.L "template.section") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "image-full" "Label" (.L "template.image-full") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "quote" "Label" (.L "template.quote") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "blank" "Label" (.L "template.blank") "Lit" .SlideLit}}
- {{template "slides-layout-pick-item" dict "Value" "free" "Label" (.L "layout.free") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "title" "Label" (.L "template.title") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "title-body" "Label" (.L "template.title-body") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "two-column" "Label" (.L "template.two-column") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "section" "Label" (.L "template.section") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "image-full" "Label" (.L "template.image-full") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "quote" "Label" (.L "template.quote") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "blank" "Label" (.L "template.blank") "Lit" .SlideLit}}
+ {{template "slides-layout-pick-item" dict "L" $L "Value" "free" "Label" (.L "layout.free") "Lit" .SlideLit}}
</fieldset>
{{/* Two quiet rows, each opening a popover (the top layer) that
holds the field the card used to show. In the DOM each
@@ -877,7 +877,7 @@
<dialog slides-deck-dialog id="slides-deck-dialog" aria-labelledby="slides-deck-title">
<form rst-form slides-inspector-form data-section="deck" method="dialog">
<h2 id="slides-deck-title">{{.L "deck.settings"}}</h2>
- {{template "field-select" dict "ID" "rst-deck-theme" "Name" "rst-deck-theme" "Label" (.L "deck.theme") "Options" .Themes "Plain" true}}
+ {{template "field-select" dict "L" $L "ID" "rst-deck-theme" "Name" "rst-deck-theme" "Label" (.L "deck.theme") "Options" .Themes "Plain" true}}
<div rst-field-row slides-accent>
<div rst-field>
<label rst-field-label for="rst-deck-accent">{{.L "deck.accent"}}</label>
@@ -958,7 +958,7 @@
(spec §3.1), a label wrapping its radio and its drawing; dict
Value (a template, or "free"), Label, and Lit, the painted slide's
picture. */}}
-{{define "slides-layout-pick-item"}}<label slides-layout-pick-item title="{{.Label}}" aria-label="{{.Label}}"><input type="radio" name="slides-layout-pick" value="{{.Value}}"{{if eq .Value .Lit}} checked{{end}}><span slides-pick-glyph aria-hidden="true">{{template "slides-template-glyph" .Value}}</span></label>{{end}}
+{{define "slides-layout-pick-item"}}{{$L := localizer $}}<label slides-layout-pick-item title="{{.Label}}" aria-label="{{.Label}}"><input type="radio" name="slides-layout-pick" value="{{.Value}}"{{if eq .Value .Lit}} checked{{end}}><span slides-pick-glyph aria-hidden="true">{{template "slides-template-glyph" (withL (.Value) $L)}}</span></label>{{end}}
{{/* slides-template-glyph: a slide template drawn small, for the
card's layout pictures; keyed by template value, plus "free". Each
@@ -966,9 +966,9 @@
(title-body is title-text's, image-full is picture's; blank is the
empty frame); Free placement is three boxes, offset, in the same
48×27 frame and inks. */}}
-{{define "slides-template-glyph"}}
+{{define "slides-template-glyph"}}{{$L := localizer $}}
{{- if eq . "free"}}<svg viewBox="0 0 48 27" width="48" height="27" fill="none"><rect x="0.5" y="0.5" width="47" height="26" rx="2.5" fill="var(--slides-glyph-paper)" stroke="var(--slides-glyph-edge)"/><rect x="5" y="4.5" width="18" height="8" rx="1" fill="var(--slides-glyph-ink)"/><rect x="26" y="8" width="16" height="10" rx="1" fill="var(--slides-glyph-soft)" stroke="var(--slides-glyph-edge)" stroke-width=".6"/><rect x="10" y="15.5" width="13" height="7" rx="1" fill="var(--slides-glyph-accent)"/></svg>
-{{- else if eq . "title-body"}}{{template "slides-layout-glyph" "title-text"}}
-{{- else if eq . "image-full"}}{{template "slides-layout-glyph" "picture"}}
+{{- else if eq . "title-body"}}{{template "slides-layout-glyph" (withL ("title-text") $L)}}
+{{- else if eq . "image-full"}}{{template "slides-layout-glyph" (withL ("picture") $L)}}
{{- else}}{{template "slides-layout-glyph" .}}
{{- end}}{{end}}
diff --git a/internal/slides/templates/errors.html b/internal/slides/templates/errors.html
index da57366..034c6fa 100644
--- a/internal/slides/templates/errors.html
+++ b/internal/slides/templates/errors.html
@@ -5,4 +5,4 @@
hard-codes "Start page". The bar shows whoever is signed in: the
page used to be in the public template group and always looked
signed out. Data: errorView. */}}
-{{define "content"}}{{template "estilo-error" .Error}}{{end}}
+{{define "content"}}{{$L := localizer $}}{{template "estilo-error" (withL (.Error) $L)}}{{end}}
diff --git a/internal/slides/templates/export_status.html b/internal/slides/templates/export_status.html
index 1cf0f5c..e5d2d6e 100644
--- a/internal/slides/templates/export_status.html
+++ b/internal/slides/templates/export_status.html
@@ -15,17 +15,17 @@
or a finished page would refresh for ever. */}}
{{define "page-head"}}{{if .Running}}<noscript><meta http-equiv="refresh" content="{{.PollSeconds}}"></noscript>{{end}}{{end}}
-{{define "export-body"}}
+{{define "export-body"}}{{$L := localizer $}}
{{- if .Running}}
-{{template "job-status" dict
+{{template "job-status" dict "L" $L
"Name" .Name "Status" .Status "Progress" .Progress
"PollURL" .PollURL "PollSeconds" .PollSeconds "PushURL" .PushURL}}
{{- else}}
<div slides-export>
{{- if .Failed}}
- {{template "callout" dict "Tone" "negative" "Title" .Name "Body" .Err "Alert" true}}
+ {{template "callout" dict "L" $L "Tone" "negative" "Title" .Name "Body" .Err "Alert" true}}
{{- else if .Gone}}
- {{template "callout" dict "Tone" "warning" "Title" .Name "Body" .Gone}}
+ {{template "callout" dict "L" $L "Tone" "warning" "Title" .Name "Body" .Gone}}
{{- else}}
<p>{{.Done}}</p>
<p><a rst-btn="primary lg" href="{{.DownloadHref}}">{{.DownloadLabel}}</a></p>
@@ -45,8 +45,8 @@
{{- end}}
{{end}}
-{{define "content"}}
-{{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}}
-{{template "page-header" dict "Title" .Title "Sub" .Name}}
+{{define "content"}}{{$L := localizer $}}
+{{template "back-nav" dict "L" $L "Href" .BackHref "Label" .BackLabel}}
+{{template "page-header" dict "L" $L "Title" .Title "Sub" .Name}}
{{template "export-body" .}}
{{end}}
diff --git a/internal/slides/templates/home_link.html b/internal/slides/templates/home_link.html
index 13e634d..717653f 100644
--- a/internal/slides/templates/home_link.html
+++ b/internal/slides/templates/home_link.html
@@ -1,4 +1,4 @@
-{{define "content"}}{{if .Choice}}
+{{define "content"}}{{$L := localizer $}}{{if .Choice}}
<header rst-page-header><div rst-page-header-titles><h1>{{.Title}}</h1></div></header>
<div rst-box>
<p>{{.Body}}</p>
@@ -8,4 +8,4 @@
<form method="post" action="{{.Choice.Action}}"><input type="hidden" name="token" value="{{.Choice.Token}}"><button rst-btn="primary" type="submit" name="choice" value="connect">{{.Choice.ConnectLabel}}</button></form>
<form method="post" action="{{.Choice.Action}}"><input type="hidden" name="token" value="{{.Choice.Token}}"><button rst-btn="ghost" type="submit" name="choice" value="new">{{.Choice.NewLabel}}</button></form></div>
</div>
-{{else}}{{template "home-connect" .PageData}}{{end}}{{end}}
+{{else}}{{template "home-connect" (withL (.PageData) $L)}}{{end}}{{end}}
diff --git a/internal/slides/templates/layout.html b/internal/slides/templates/layout.html
index 2934a6e..ee1533f 100644
--- a/internal/slides/templates/layout.html
+++ b/internal/slides/templates/layout.html
@@ -86,7 +86,7 @@
editor's (I2, after Docs) holds the deck's title and menus, and
sits inside the editor's own root so its commands reach the bundle.
Every other page takes estilo's bar as it is. */}}
-{{block "bar" .}}{{template "estilo-bar" .Frame.Chrome}}{{end}}
+{{block "bar" .}}{{$L := localizer $}}{{template "estilo-bar" (withL (.Frame.Chrome) $L)}}{{end}}
{{- end}}
{{block "main" .}}<main rst-page id="main">
{{template "content" .}}
diff --git a/internal/slides/templates/present.html b/internal/slides/templates/present.html
index ea356cf..7f39026 100644
--- a/internal/slides/templates/present.html
+++ b/internal/slides/templates/present.html
@@ -102,7 +102,7 @@
}
</style>{{end}}
{{define "main"}}<main id="main" slides-present-stage>{{template "content" .}}</main>{{end}}
-{{define "content"}}
+{{define "content"}}{{$L := localizer $}}
{{/* The two URLs the script reads come DOWN rather than being built up
there: which capability this surface reads under is the handler's
decision (presentation.go's surfaceOptions), and the audience's
@@ -123,7 +123,7 @@
<div slides-stage>{{.Slide}}</div>
<p slides-blackout{{if not .Blackout}} hidden{{end}}>{{.BlackoutLabel}}</p>
<div slides-bar>
- {{if .Controls}}{{template "present-controls" .Controls}}{{end}}
+ {{if .Controls}}{{template "present-controls" (withL (.Controls) $L)}}{{end}}
{{if .PrevHref}}<a rst-btn href="{{.PrevHref}}" rel="prev">{{.PrevLabel}}</a>{{end}}
{{if .NextHref}}<a rst-btn href="{{.NextHref}}" rel="next">{{.NextLabel}}</a>{{end}}
{{/* "3 / 12" alone is terse read aloud, so the counter carries what
@@ -137,7 +137,7 @@
</div>
{{else}}
<div rst-box>
- {{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
+ {{template "empty-state" dict "L" $L "Title" .EmptyTitle "Body" .EmptyBody}}
</div>
{{end}}
</div>
diff --git a/internal/slides/templates/present_notes.html b/internal/slides/templates/present_notes.html
index 8c7b1b8..472c68b 100644
--- a/internal/slides/templates/present_notes.html
+++ b/internal/slides/templates/present_notes.html
@@ -84,8 +84,8 @@
flex: 1 1 18rem;
}
</style>{{end}}
-{{define "content"}}
-{{template "page-header" dict "Title" .Title "Sub" .DeckTitle}}
+{{define "content"}}{{$L := localizer $}}
+{{template "page-header" dict "L" $L "Title" .Title "Sub" .DeckTitle}}
<div slides-clock>
<p slides-clock-now data-clock>{{.Clock}}</p>
@@ -97,11 +97,11 @@
{{if .Blackout}}
{{/* State in words, never in colour alone: the presenter's own screen
is the one place that has to say the room is looking at nothing. */}}
-{{template "status-pill" dict "Tone" "neutral" "Label" .BlackoutLabel}}
+{{template "status-pill" dict "L" $L "Tone" "neutral" "Label" .BlackoutLabel}}
{{end}}
{{if .Controls}}
-<div slides-commands>{{template "present-controls" .Controls}}</div>
+<div slides-commands>{{template "present-controls" (withL (.Controls) $L)}}</div>
{{end}}
{{/* The script's root: the session it is watching, and — only when
@@ -129,7 +129,7 @@
{{if .Pair}}
<div rst-box>
- {{template "callout" dict "Tone" "info" "Title" .PairTitle "Body" .PairBody}}
+ {{template "callout" dict "L" $L "Tone" "info" "Title" .PairTitle "Body" .PairBody}}
<div slides-pair>
{{.QR}}
<div slides-pair-fields>
diff --git a/internal/slides/templates/remote.html b/internal/slides/templates/remote.html
index 17e3769..20acd6f 100644
--- a/internal/slides/templates/remote.html
+++ b/internal/slides/templates/remote.html
@@ -56,8 +56,8 @@
margin: 0;
}
</style>{{end}}
-{{define "content"}}
-{{template "page-header" dict "Title" .Title "Sub" .DeckTitle}}
+{{define "content"}}{{$L := localizer $}}
+{{template "page-header" dict "L" $L "Title" .Title "Sub" .DeckTitle}}
<div slides-remote data-session="{{.Session}}" data-remote-token="{{.Controls.Token}}"
data-slide="{{.Now}}"
@@ -74,10 +74,10 @@
</div>
<p slides-counter>{{.Counter}}</p>
{{if .Blackout}}
- {{template "status-pill" dict "Tone" "neutral" "Label" .BlackoutLabel}}
+ {{template "status-pill" dict "L" $L "Tone" "neutral" "Label" .BlackoutLabel}}
{{end}}
- <div slides-remote-commands>{{template "present-controls" .Controls}}</div>
+ <div slides-remote-commands>{{template "present-controls" (withL (.Controls) $L)}}</div>
<div rst-box>
<h2>{{.NotesLabel}}</h2>
diff --git a/internal/slides/templates/remote_pair.html b/internal/slides/templates/remote_pair.html
index e40c941..bbc8efb 100644
--- a/internal/slides/templates/remote_pair.html
+++ b/internal/slides/templates/remote_pair.html
@@ -9,17 +9,17 @@
resolves a code and a key to a URL — so the answer is a redirect
to the remote, and a person who bookmarks that has bookmarked
their remote rather than a form submission they cannot repeat. */}}
-{{define "content"}}
-{{template "page-header" dict "Title" .Title "Sub" .Body}}
+{{define "content"}}{{$L := localizer $}}
+{{template "page-header" dict "L" $L "Title" .Title "Sub" .Body}}
<div rst-box>
<form rst-form method="get" action="{{.Action}}">
- {{template "field-text" dict
+ {{template "field-text" dict "L" $L
"Name" "code" "Label" .CodeLabel "Value" .Code
"Hint" .CodeHint "Required" true "Primary" true}}
- {{template "field-text" dict
+ {{template "field-text" dict "L" $L
"Name" "t" "Label" .TokenLabel "Hint" .TokenHint
"Required" true "Error" .Error}}
- {{template "form-foot" dict "Submit" .Submit}}
+ {{template "form-foot" dict "L" $L "Submit" .Submit}}
</form>
</div>
{{end}}
diff --git a/internal/slides/templates/share.html b/internal/slides/templates/share.html
index cddde74..e49ef3d 100644
--- a/internal/slides/templates/share.html
+++ b/internal/slides/templates/share.html
@@ -13,9 +13,9 @@
of prose, because the whole job of this screen at that moment is
"select this and copy it", and a field is the thing a browser lets
you select cleanly with no script at all. */}}
-{{define "content"}}
-{{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}}
-{{template "page-header" dict "Title" .Title "Sub" .DeckTitle}}
+{{define "content"}}{{$L := localizer $}}
+{{template "back-nav" dict "L" $L "Href" .BackHref "Label" .BackLabel}}
+{{template "page-header" dict "L" $L "Title" .Title "Sub" .DeckTitle}}
{{/* Who can open the deck. The owner chooses (mayChangeRung); a roster
owner on an orphan, who may share it but not move it, reads it. */}}
@@ -24,8 +24,8 @@
<div rst-box>
{{if .Rungs}}
<form rst-form method="post" action="{{.AccessAction}}">
- {{template "choice-field" dict "Legend" .AccessLegend "LegendHidden" true "Name" "rung" "Options" .Rungs}}
- {{template "form-error" .AccessError}}
+ {{template "choice-field" dict "L" $L "Legend" .AccessLegend "LegendHidden" true "Name" "rung" "Options" .Rungs}}
+ {{template "form-error" (withL (.AccessError) $L)}}
<div rst-form-foot><button rst-btn="primary" type="submit">{{.AccessSubmit}}</button></div>
</form>
{{else}}
@@ -40,7 +40,7 @@
{{if .NewURL}}
<div rst-box>
- {{template "callout" dict "Tone" "warning" "Title" .NewTitle "Body" .NewHint}}
+ {{template "callout" dict "L" $L "Tone" "warning" "Title" .NewTitle "Body" .NewHint}}
{{/* Hand-written rather than {{template "field-text"}} for one
attribute: readonly, which that partial's contract does not
carry. The markup is field-text's own, attribute for attribute,
@@ -60,7 +60,7 @@
<p>{{.Lead}}</p>
</div>
-{{template "callout" dict "Tone" "warning" "Title" .WarningTitle "Body" .Warning}}
+{{template "callout" dict "L" $L "Tone" "warning" "Title" .WarningTitle "Body" .Warning}}
{{if .Links}}
<div rst-list>
@@ -70,7 +70,7 @@
{{.Created}}
<small rst-row-sub>{{.Views}}</small>
</span>
- {{template "status-pill" dict "Tone" .StatusTone "Label" .StatusLabel}}
+ {{template "status-pill" dict "L" $L "Tone" .StatusTone "Label" .StatusLabel}}
{{if not .Revoked}}
{{/* aria-label, because "Revoke" repeated down a list does not say
which link it revokes, and a link's only name is when it was
@@ -85,7 +85,7 @@
</div>
{{else}}
<div rst-box>
- {{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
+ {{template "empty-state" dict "L" $L "Title" .EmptyTitle "Body" .EmptyBody}}
</div>
{{end}}
diff --git a/internal/slides/templates/signed_out.html b/internal/slides/templates/signed_out.html
index 899947f..0439d7e 100644
--- a/internal/slides/templates/signed_out.html
+++ b/internal/slides/templates/signed_out.html
@@ -3,4 +3,4 @@
Sign in. Before this, standalone Sign out dropped a person on the
sign-in form with no word about it, which read like an error. Data:
signedOutView. */}}
-{{define "content"}}{{template "estilo-signed-out" .Notice}}{{end}}
+{{define "content"}}{{$L := localizer $}}{{template "estilo-signed-out" (withL (.Notice) $L)}}{{end}}
diff --git a/internal/slides/templates/signin.html b/internal/slides/templates/signin.html
index b13b8f0..b527810 100644
--- a/internal/slides/templates/signin.html
+++ b/internal/slides/templates/signin.html
@@ -9,9 +9,9 @@
opens (GET /auth/verify, auth's RenderConfirm), whose one Sign in
button POSTs the token back because a GET must spend nothing.
- The form POSTs to rastrillo/auth's Begin through beginSignin and
- gateBegin (signin_return.go, auth.go). The bar shows the brand only:
+ The form POSTs to rastrillo/auth's Begin through beginSignin
+ (signin_return.go). The bar shows the brand only:
nobody is signed in here to have an account, and everything the brand
could link to is behind the session gate (chrome.go's signinPage).
Data: signinView. */}}
-{{define "content"}}{{template "estilo-signin-screen" .Screen}}{{end}}
+{{define "content"}}{{$L := localizer $}}{{template "estilo-signin-screen" (withL (.Screen) $L)}}{{end}}
diff --git a/internal/slides/templates/viewer.html b/internal/slides/templates/viewer.html
index 6e0e9eb..e08f4bc 100644
--- a/internal/slides/templates/viewer.html
+++ b/internal/slides/templates/viewer.html
@@ -265,7 +265,7 @@
}
}
</style>{{end}}
-{{define "content"}}
+{{define "content"}}{{$L := localizer $}}
{{/* The slide's announcement when the script changes it in place
(fixtures/viewer-nav.mjs): a polite live region outside what is
swapped, so it is in the page before its text changes and is heard;
@@ -340,7 +340,7 @@
{{end}}
{{else}}
<div rst-box>
- {{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody "ActionHref" .EditHref "ActionLabel" .EditLabel}}
+ {{template "empty-state" dict "L" $L "Title" .EmptyTitle "Body" .EmptyBody "ActionHref" .EditHref "ActionLabel" .EditLabel}}
</div>
{{end}}
</div>
diff --git a/internal/slidestest/signin_test.go b/internal/slidestest/signin_test.go
index 841655b..4057696 100644
--- a/internal/slidestest/signin_test.go
+++ b/internal/slidestest/signin_test.go
@@ -91,33 +91,32 @@ func TestSigninMailsAllowedAddressOnly(t *testing.T) {
// TestSigninAnswerIsIdenticalOverTheRateLimitBudget is the sharp end of
// the no-oracle guarantee, and the case the first version of gateBegin
-// got wrong.
-//
-// That version short-circuited a denied address before rastrillo/auth's
+// got wrong: it short-circuited a denied address before rastrillo/auth's
// Begin, so it answered ?sent=1 forever, while a permitted address
-// reached Begin's per-address budget of 5 and got ?err=rate: six POSTs
-// of one candidate address separated "on the list" from "not on it".
-// Every address reaches Begin now (gateBegin), so the budgets are the
-// same for both; sameAnswer still answers ?err=rate as sent, and this
-// pins that.
+// reached Begin's per-address budget of 5 and got ?err=rate: six POSTs of
+// one candidate address separated "on the list" from "not on it".
//
-// Seven POSTs of each, on two fresh instances, answered alike post for
-// post: the Sent answer while the per-address budget lasts (with
-// rastrillo's attempt id, masked here because it is random), and past it
-// the ?err=rate that sameAnswer answers as sent, for both. The mailer
-// stops at 5, which is the other half of the proof: the answers are the
-// same because the failure is hidden, not because the budget quietly
-// stopped being enforced.
+// Every address reaches Begin, so the budgets are the same for both.
+// Seven POSTs of each, on two fresh instances, are answered alike post
+// for post: Sent while the per-address budget lasts (with rastrillo's
+// attempt id, masked because it is random), then the same ?err=rate for
+// both. The mailer stops at 5: the budget is enforced, and enforced the
+// same way whoever is on the list.
func TestSigninAnswerIsIdenticalOverTheRateLimitBudget(t *testing.T) {
const attempts = 7
answers := func(app *testApp, address string) []string {
var got []string
for i := 1; i <= attempts; i++ {
rec := post(t, app, "/signin", url.Values{"address": {address}})
- if rec.Code != http.StatusSeeOther || !isSent(rec.Header().Get("Location")) {
- t.Fatalf("POST /signin %q (attempt %d): %d %q, want the Sent answer", address, i, rec.Code, rec.Header().Get("Location"))
+ loc := rec.Header().Get("Location")
+ want := isSent(loc)
+ if i > 5 {
+ want = loc == "/signin?err=rate"
+ }
+ if rec.Code != http.StatusSeeOther || !want {
+ t.Fatalf("POST /signin %q (attempt %d): %d %q", address, i, rec.Code, loc)
}
- got = append(got, fmt.Sprintf("%d %s %q", rec.Code, masked(rec.Header().Get("Location")), rec.Body.String()))
+ got = append(got, fmt.Sprintf("%d %s %q", rec.Code, masked(loc), rec.Body.String()))
}
return got
}
@@ -128,13 +127,47 @@ func TestSigninAnswerIsIdenticalOverTheRateLimitBudget(t *testing.T) {
t.Errorf("attempt %d: permitted %s, denied %s — must be identical", i+1, allowed[i], denied[i])
}
}
- // signin's per-address budget is 5; the two attempts past it are
- // the ones whose ?err=rate the guard rewrote.
if n := len(permitted.mailer.messages()); n != 5 {
t.Errorf("mailer captured %d messages over %d attempts, want the 5 the per-address budget allows", n, attempts)
}
}
+// TestAMistypedAddressIsToldSo: Begin's ?err=address is answered as it
+// is, the same for anybody, and the door says so beside the field rather
+// than "We sent a link" (Slides' old sameAnswer rewrite). Nothing is
+// mailed.
+func TestAMistypedAddressIsToldSo(t *testing.T) {
+ app := newApp(t)
+ rec := post(t, app, "/signin", url.Values{"address": {"not an address"}})
+ if rec.Code != http.StatusSeeOther || rec.Header().Get("Location") != "/signin?err=address" {
+ t.Fatalf("POST /signin a mistyped address: %d %q, want 303 /signin?err=address", rec.Code, rec.Header().Get("Location"))
+ }
+ body := get(t, app, rec.Header().Get("Location")).Body.String()
+ if !strings.Contains(body, "That doesn") || !strings.Contains(body, `name="address"`) || strings.Contains(body, "We sent a link") {
+ t.Fatalf("the door after a mistyped address:\n%s", body)
+ }
+ if n := len(app.mailer.messages()); n != 0 {
+ t.Errorf("mailed %d messages for a mistyped address", n)
+ }
+}
+
+// TestAFailedKeymailKeepsForceThroughABeginError: after a failed Keymail
+// exchange the door posts force=1; a Begin problem on that post (here a
+// mistyped address) comes back with force kept, so the next post still
+// asks for a link instead of returning to the Keymail that failed.
+func TestAFailedKeymailKeepsForceThroughABeginError(t *testing.T) {
+ app := newApp(t)
+ rec := post(t, app, "/signin", url.Values{"address": {"not an address"}, "force": {"1"}})
+ loc := rec.Header().Get("Location")
+ u, err := url.Parse(loc)
+ if rec.Code != http.StatusSeeOther || err != nil || u.Query().Get("err") != "address" || u.Query().Get("force") != "1" {
+ t.Fatalf("forced POST with a mistyped address: %d %q, want the door with err=address and force=1", rec.Code, loc)
+ }
+ if body := get(t, app, loc).Body.String(); !strings.Contains(body, `name="force" value="1"`) {
+ t.Fatalf("the door dropped force:\n%s", body)
+ }
+}
+
// TestSigninAcceptsALegacyOriginOnlyPost covers the path a
// Sec-Fetch-Site header hides: csrf.Protect checks that header first
// when a browser sends it, and only falls back to comparing Origin