Speak the suite's sign-in door copy in Slides
The door's button reads 'Sign in'; sent and signed-out pages and titles come from estilo; the email subject is 'Sign in to Slides'. Reviewed by GPT-6-Astra via Codex (#18). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from chore/door-copy into main.
6 files changed,
+77
−69
go.mod+1 −1go.sum+2 −14internal/slides/auth.go+14 −30internal/slides/home_test.go+6 −1internal/slides/locales/en.toml+6 −23internal/slidestest/signin_door_test.go+48 −0
CI passed — run details
CI log
=== gate ===
=== rust: fmt
=== rust: clippy
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
=== wasm: the artifact the host embeds
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
Finished `release` profile [optimized] target(s) in 0.09s
core/target/wasm32-unknown-unknown/release/slides_core.wasm (1228229 bytes)
=== the embedded wasm must match a fresh build
=== rust: test
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.04s
Running unittests src/lib.rs (core/target/debug/deps/slides_core-929bfceb2edd4a94)
running 30 tests
test layout::tests::aside_region_rect ... ok
test layout::tests::body_region_rect_narrows_for_an_aside ... ok
test layout::tests::media_region_rect ... ok
test layout::tests::default_region_by_kind ... ok
test layout::tests::heading_region_rect ... ok
test markdown::tests::empty_input_is_no_paragraphs_and_lines_keep_blanks ... ok
test markdown::tests::marks_nest_and_links_carry_marks ... ok
test markdown::tests::inline_marks ... ok
test markdown::tests::paragraphs_split_on_blank_lines_and_list_markers ... ok
test check::tests::the_empty_document_passes ... 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::an_empty_map_reads_as_a_set_mark ... ok
test layout::tests::to_canvas_narrows_body_when_an_aside_is_present ... ok
test layout::tests::to_flow_is_a_no_op_when_already_in_order ... 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 layout::tests::to_flow_orders_y_then_x ... ok
test view::tests::malformed_background_is_the_default ... ok
test view::tests::malformed_fonts_are_null ... ok
test check::tests::an_element_inside_a_paragraph_is_reported ... ok
test view::tests::assets_are_typed_or_skipped ... ok
test check::tests::what_the_ops_write_passes ... ok
test check::tests::a_non_paragraph_child_is_reported ... ok
test check::tests::bare_text_at_fragment_level_is_reported ... ok
test view::tests::malformed_box_is_null_and_phone_keeps_only_typed_fields ... ok
test check::tests::y_prosemirror_shapes_pass ... ok
test check::tests::an_unknown_formatting_attribute_is_reported ... 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-184c0d8bf00e14f9)
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-256addce27f366d1)
running 12 tests
test ops_are_atomic ... ok
test add_slide_then_view_lists_it ... ok
test add_block_with_markdown_produces_runs ... ok
test remove_block_drops_it_from_columns_children ... ok
test layout_switch_assigns_boxes ... 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)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
=== wasm: the pdf artifact the host embeds
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
Finished `release` profile [optimized] target(s) in 0.10s
core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm (5301002 bytes)
=== the embedded pdf wasm must match a fresh build
=== rust: test (pdf)
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.06s
Running unittests src/lib.rs (core/pdf/target/debug/deps/slides_pdf-891fafaa44f9fd64)
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-17ccbb1d62120093)
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/render.rs (core/pdf/target/debug/deps/render-2e1d7e8b19d78595)
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 two_svgs_make_two_pages ... ok
test renders_text_as_embedded_glyphs ... 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
v24.19.0
11.17.0
=== fixtures: npm ci (needs the registry — see .amadan/README.md)
added 19 packages, and audited 20 packages in 504ms
5 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts esbuild@0.28.2 (postinstall: node install.js)
npm warn allow-scripts
npm warn allow-scripts Run `npm approve-scripts --allow-scripts-pending` to review, or `npm approve-scripts <pkg>` to allow.
=== fixtures: the JS side's own tests
✔ one finished upload is register_asset plus the block that uses it, in one batch (13.877234ms)
✔ a record missing its numbers still makes an op the core accepts (1.295873ms)
✔ unusedAssets is what no slide refers to, and remove_asset drops one (4.821338ms)
✔ the Unused images list reconciles by id and names each Remove button (1.667716ms)
✔ an upload refusal is said in words the person can act on (0.286795ms)
✔ clampBox keeps the box inside the frame and no smaller than the minimum (2.038225ms)
✔ fixBox writes four decimals (0.35405ms)
✔ guides are the thirds plus every other block edge (0.311601ms)
✔ snapMove pulls the nearest edge onto a guide within one per cent, and leaves a far one (0.567517ms)
✔ snapResize moves only the edges the handle drags (0.291913ms)
✔ moveBox and resizeBox by handle (0.495563ms)
✔ nudge: arrows move by half a per cent, Shift by two, Alt resizes (0.299958ms)
✔ rectBox reads a block rectangle against its frame (0.331377ms)
✔ typing into a block is a text change on its slide only (6.765419ms)
✔ a block's props changing is structure on its slide (1.20824ms)
✔ adding, moving or removing a block is structure on its slide (1.990557ms)
✔ the notes are text on their slide (0.885288ms)
✔ a slide added, removed or moved is an order change (1.065645ms)
✔ one transaction touching several things reports each once (0.677702ms)
✔ what the ops write passes, and so does an empty document (7.508765ms)
✔ the shapes y-prosemirror and older documents write pass (1.332591ms)
✔ an unknown formatting attribute is reported with the core's message (1.679147ms)
✔ an element inside a paragraph, a non-paragraph child and bare text are reported (2.735534ms)
✔ the unknownmark poison shape is what the check refuses (1.576816ms)
✔ y-prosemirror 1.3.7 deletes the words under an unknown mark; sanitising first keeps them (3.569037ms)
✔ the vocabulary is the five marks and nothing else (0.121296ms)
✔ a reload reuses the id this tab stored for the deck (1.050807ms)
✔ two tabs, and two decks in one tab, get different ids (0.236951ms)
✔ a stored value that is not an id, or storage that throws, gives a fresh id (0.349982ms)
✔ a duplicated tab gives up the copied id; the original keeps it (5.446723ms)
✔ a reload finds no rival and keeps its id (3.74207ms)
✔ presence switches id: beats carry the new one and the old one is somebody else (1.576767ms)
✔ an empty body is no frames (1.566777ms)
✔ frames come back in order with their exact bytes (0.373386ms)
✔ a length prefix is big-endian (0.205303ms)
✔ a truncated frame throws rather than returning a short update (1.742065ms)
✔ deck controls are set_meta (15.809964ms)
✔ slide controls are set_slide, and background keeps its colour (5.002526ms)
✔ move up and down are move_slide with the right after (2.72752ms)
✔ block props: value kinds, region, a shape label (3.442942ms)
✔ box fields are set_block on the desktop and set_phone in the phone view (4.283127ms)
✔ move block and the layer buttons (1.484455ms)
✔ add block: region after the selection on flow, a default box on canvas, a heading level that fits (6.822066ms)
✔ a block is named by its type and its first words (1.007496ms)
✔ blockChange: a control element to its op (1.314488ms)
✔ the Blocks list reconciles by id and keeps its buttons (0.861674ms)
✔ open resolves to the button that closed it and the trimmed field (1.905428ms)
✔ a second open while the dialog is up joins the first (0.225801ms)
✔ a missing dialog mounts as nothing (0.14468ms)
✔ a tab advances its own cursor only when its POST is the very next row (2.69509ms)
✔ the cursor never moves backwards when a response is overtaken by this tab's own write (0.589608ms)
✔ a later response still carries the cursor forward (0.255375ms)
✔ a burst of notifications collapses into one fetch at a time (0.226732ms)
✔ an event naming a seq the tab already has fetches nothing (0.183041ms)
✔ a stopped subscriber drops a response that arrives late (0.26266ms)
✔ stop closes the stream, and start opens exactly one (0.367585ms)
✔ a hidden tab closes its stream on a shortened deadline, and activity reopens it (0.942726ms)
✔ switching away and back inside the grace never drops the stream, so nothing has to be caught up (0.707638ms)
✔ a visible tab that is only being READ closes when idle and comes back on any activity (1.05806ms)
✔ activity while streaming defers the idle close rather than reopening anything (0.19318ms)
✔ a stream failure is never reported as a save failure, and heals on activity (0.229618ms)
✔ an empty response advances the cursor without applying anything (0.509179ms)
✔ a failed fetch leaves the cursor alone so the next notification retries it (0.59609ms)
✔ a decode failure retries once through the raw log, then gives up (1.708041ms)
✔ updatesURL spells the query string exactly, in particular raw as the literal raw=1 (0.190013ms)
✔ empty_doc_views_as_defaults (8.171768ms)
✔ set_meta (3.418686ms)
✔ slides: add, move, remove, set_slide, set_notes (6.556822ms)
✔ duplicate_slide (2.618837ms)
✔ blocks: add, move, remove, set_block (2.403696ms)
✔ set_phone (1.065164ms)
✔ table cells follow rows and cols (1.177082ms)
✔ canvas blocks: box defaults from the region, z from the index (0.787797ms)
✔ assets: register and remove (0.651252ms)
✔ markdown: every mark, code blocks are plain lines (1.560126ms)
✔ batch_is_atomic (1.762964ms)
✔ a batch applies in one transaction with the given origin (0.594076ms)
✔ columns_children_validated (1.322062ms)
✔ layout_switch_round_trip (1.481449ms)
✔ view_matches_snapshot_fixtures (15.96374ms)
✔ columns children have one parent and no cycles (codex 7) (1.291415ms)
✔ canvas-to-flow keeps a concurrent text edit (codex 4) (3.478848ms)
✔ move_block keeps a concurrent text edit, and later inserts land where after says (codex 4) (2.941157ms)
✔ move_slide keeps a concurrent text edit, and later inserts land where after says (codex 4 at slide level) (2.541204ms)
✔ format: {name} and {n} interpolate; an unknown key is left as text (1.189395ms)
✔ a beat on connect, then one every twenty seconds (2.665514ms)
✔ a move posts once, 200ms after the last of a burst, and re-arms the beat (0.337689ms)
✔ a hidden tab stops beating; coming back posts at once (0.42942ms)
✔ applySet leaves this tab out and answers what changed (0.653207ms)
✔ a set with rubbish in it is read for what it does carry (0.270765ms)
✔ initials, and a client id per tab (4.36577ms)
✔ a resync that fails is retried with backoff until it succeeds, without ever running twice at once (2.050579ms)
✔ the browser's online event retries immediately, not just on the next backoff tick (0.334904ms)
✔ reportDivergence before any failure runs the first attempt without a caller ever calling online (1.08469ms)
✔ a permanent 4xx drops its batch instead of retrying it, and does not poison the next edit (82.778301ms)
✔ a network failure or a 5xx is retried, not dropped (60.142967ms)
✔ a 500 is retried the same way a network failure is, never dropped (60.225531ms)
✔ the core-written structure reads as ProseMirror marks (6.634357ms)
✔ a y-prosemirror round trip preserves bold and the link (2.595343ms)
✔ y-prosemirror writes href as the one-key map and marks as {} (0.963144ms)
✔ a plain-string href, written before the map shape, still reads (0.53153ms)
✔ textFragment writes the same shape as writeText (0.550946ms)
✔ safeHref is the server allowlist, and a disallowed href never draws an anchor (0.366652ms)
✔ parseHash splits the slide and the block, and survives a stray % (1.43919ms)
✔ destroy takes the listeners off, and a second mount leaves one of each (0.722045ms)
✔ formatHash is the inverse (1.080632ms)
✔ textBlocks finds the text-bearing blocks and skips the rest (2.055167ms)
✔ mountTarget is the element whose children are the paragraphs (0.265675ms)
✔ paragraphTag keeps the renderer's own markup per type (0.183211ms)
✔ blockFragment finds a block's text by slide and block id (8.280552ms)
✔ notesFragment finds the slide's notes (1.108665ms)
✔ blockIDs and slideIDs are the orders on the stage and the strip (1.104336ms)
✔ cellFragments are a table's cells, row-major (1.523998ms)
✔ a load that fails leaves the stage on the slide it was showing and says so (1.615118ms)
✔ slideAfter is the slide to show once one is gone (0.239145ms)
✔ the queue words map to savestatus states, failed staying failed (0.880189ms)
✔ a dropped batch outranks the queue, for the rest of the session (0.186056ms)
✔ the editor status: the save line and the load error are two lines (0.288497ms)
✔ mountSaveStatus loads estilo's module and mounts it on the line (1.248284ms)
✔ a save-status module that will not load says so and refuses to mount (0.481066ms)
✔ dropTarget: before puts it ahead of the item, after behind it, null means first (0.991416ms)
✔ a drop that leaves the order as it is is no move (0.228054ms)
✔ dropOp is the move_slide (0.786575ms)
✔ labelFor is the slide's first heading, else the numbered fallback (4.405764ms)
✔ flush re-points every dirty thumbnail and relabels it (1.475808ms)
✔ destroy takes the item-menu listener off; a second mount leaves one (0.288618ms)
✔ plan says what to add, drop and where each item goes (0.638008ms)
✔ sync moves only the items out of place and keeps focus (0.96142ms)
✔ desktop view: box and size are the block; hidden and order are always the phone map (1.355093ms)
✔ phone view: everything goes to set_phone, carrying the rest of the map (0.423659ms)
✔ the ops it makes are ones the document takes (8.32748ms)
✔ phoneMap reads only the four keys, and only well-typed (0.162092ms)
✔ the stored view is read defensively (0.265545ms)
✔ linkAt reads the link under the cursor and nothing elsewhere (2.112284ms)
✔ setLink marks the selection (1.592295ms)
✔ setLink on a collapsed cursor inside a link replaces that link (0.460027ms)
✔ setLink with nothing selected and no link does nothing (0.165758ms)
✔ removeLink clears the link under the cursor (0.33834ms)
✔ the keymap binds every documented shortcut (0.189854ms)
✔ Mod-b toggles bold through the keymap (0.48881ms)
✔ setLink refuses an address outside the allowlist and writes nothing (0.399013ms)
✔ the state machine runs choose → sign → put → register → op (2.724314ms)
✔ a file the deck will not take never reaches the network (0.53183ms)
✔ alt text is required before the bytes move, unless the image is decorative (0.280112ms)
✔ a step that fails stops the ones after it and reports its own code (0.5154ms)
✔ a failure that is not ours still becomes an UploadError (0.283748ms)
✔ a second pick while one is in flight is refused, not raced (0.501774ms)
✔ an unreadable size is zero rather than a failure (0.366503ms)
✔ a per-call applyOp wins, so an upload lands on the block it was chosen for (0.4938ms)
✔ checkFile takes exactly the four types (0.396268ms)
✔ sha256Hex is the hex digest of the bytes (9.436625ms)
✔ refusal reads this app's JSON error shape, and survives one that is not (0.401938ms)
✔ malformed fonts are null (3.294264ms)
✔ a malformed background is the theme default (1.520622ms)
✔ a malformed box is null (0.662043ms)
✔ the phone layer keeps only its typed fields, order as a whole number (0.557448ms)
✔ assets are typed or skipped (1.537794ms)
✔ every poison update is deterministic bytes that apply to any deck (6.463929ms)
ℹ tests 158
ℹ suites 0
ℹ pass 158
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 290.00793
=== 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.0463180baf5aab9f.js (376416 bytes)
=== go: vet, gofmt, test, migration check
go vet ./...
go test ./...
? amadan.net/oficina/slides/cmd/slides [no test files]
ok amadan.net/oficina/slides/internal/slides 11.108s
ok amadan.net/oficina/slides/internal/slides/core 2.441s
ok amadan.net/oficina/slides/internal/slides/deck (cached)
ok amadan.net/oficina/slides/internal/slides/fonts (cached)
? amadan.net/oficina/slides/internal/slides/icons [no test files]
ok amadan.net/oficina/slides/internal/slides/layout (cached)
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 (cached)
ok amadan.net/oficina/slides/internal/slides/svg (cached)
ok amadan.net/oficina/slides/internal/slidestest 35.691s
? 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/go.mod b/go.mod| index 031a7ea..cb506be 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -5,7 +5,7 @@ go 1.25.0 |
| toolchain go1.26.5 |
| require ( |
| - amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22 |
| + amadan.net/oficina/estilo.git v0.0.0-20261001084202-0b4d92c3dc16 |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 |
| amadan.net/rastrillo/rastrillo v0.26.1-0.20260908075707-29e4491631bd |
diff --git a/go.sum b/go.sum| index 17bb1ce..b322140 100644 |
| --- a/go.sum |
| +++ b/go.sum |
| @@ -1,17 +1,5 @@ |
| -amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9 h1:vHOkWeJ7mRwLjPbMihf0f7aqz4CLSe0/NseQsHcJUYQ= |
| -amadan.net/oficina/estilo.git v0.0.0-20260924071126-894afdcb71a9/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773 h1:9DIAhG3TaGG+LE2+8LvU73ZEhfK+oNn2y2p4kFjAAi0= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929070530-5b2ce835e773/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095046-d0664ee49914 h1:V0AyxXYCxqGZClOLqvppw+cCTXsn3b9NmRQ8CV5ZlXY= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095046-d0664ee49914/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095838-0994675f496e h1:LTSmIWUS8RjPb6m94Ynf7moyFYeBXr08rdOr3nmNqvg= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929095838-0994675f496e/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929165053-846b39772f3c h1:YYocIz3r3b4oIA0K/58JkSsmyTOCzMT/2GaW/MFbbPo= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929165053-846b39772f3c/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929183653-cc2c1e56fb4b h1:UOxYBKsOSRHcHHYNKt0i6cB1Z4yT2soywOTWURYvBWo= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929183653-cc2c1e56fb4b/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22 h1:RR9qP85FU1cZdn788v1zSLgZbKMGBmSk6Q7Rezj5JYI= |
| -amadan.net/oficina/estilo.git v0.0.0-20260929185827-41201439fd22/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| +amadan.net/oficina/estilo.git v0.0.0-20261001084202-0b4d92c3dc16 h1:F5v3x25dEj1rJNnBm71G7shN+fM+T2actUlaGPvoeH8= |
| +amadan.net/oficina/estilo.git v0.0.0-20261001084202-0b4d92c3dc16/go.mod h1:4u0jNBtIdMLOsJyrScfqoEuYDJF7BBM3qM9YWbzt6aw= |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9 h1:K/PaOVdQqRMwifPD6ipiwLeGR5nbFSxm9FxjrDJlZcg= |
| amadan.net/oficina/home/connect v0.0.0-20260923190447-01166fcfc0a9/go.mod h1:YroavXe43Wietec+po8mtSk4a9Bir2h31Q3iAf4MWxI= |
| amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489 h1:RPKtyry/71i06o8L+gjAaUyexbmG56kO1YPs601URAM= |
diff --git a/internal/slides/auth.go b/internal/slides/auth.go| index 94a1cd5..884fea1 100644 |
| --- a/internal/slides/auth.go |
| +++ b/internal/slides/auth.go |
| @@ -278,6 +278,7 @@ func newAuthPlugin(cfg Config, writer *sql.DB, list allowlist) (*rauth.Auth, err |
| Origin: cfg.Origin, |
| InstanceKey: cfg.InstanceKey, |
| Mailer: cfg.Mailer, |
| + Subject: chrome.EmailSubject("Slides"), |
| Authorize: list.allows, |
| SigninPath: signinPath, |
| Logger: cfg.Logger, |
| @@ -608,30 +609,20 @@ func (a *app) signin(w http.ResponseWriter, r *http.Request) { |
| if remembered, ok := a.rememberedReturn(r); ok { |
| again += "?return_to=" + url.QueryEscape(remembered) |
| } |
| + sent := chrome.SignInNotice{Icon: brand.Path("slides"), App: "Slides", Sky: sky.For(r.Host)}.Sent(again) |
| render(w, "signin", signinView{ |
| - shell: a.publicShell(r, frame{parts: []string{rastrillo.T(r, "slides.signin.sent.title")}, signinPage: true}), |
| - Sent: &chrome.SignInNotice{ |
| - Icon: brand.Path("slides"), |
| - App: "Slides", |
| - Sky: sky.For(r.Host), |
| - Heading: rastrillo.T(r, "slides.signin.sent.title"), |
| - Body: rastrillo.T(r, "slides.signin.sent"), |
| - Link: &chrome.Link{Href: again, Label: rastrillo.T(r, "slides.signin.again")}, |
| - }, |
| + shell: a.publicShell(r, frame{parts: []string{sent.Page()}, signinPage: true}), |
| + Sent: &sent, |
| }) |
| return |
| } |
| form := chrome.SignIn{ |
| - Icon: brand.Path("slides"), |
| - App: "Slides", |
| - Sky: sky.For(r.Host), |
| - Heading: rastrillo.T(r, "slides.signin.title"), |
| - Action: signinPath, |
| - Hidden: []chrome.Hidden{{Name: "force", Value: "1"}}, |
| - AddressLabel: rastrillo.T(r, "slides.signin.address.label"), |
| - Help: rastrillo.T(r, "slides.signin.help"), |
| - Submit: rastrillo.T(r, "slides.signin.submit"), |
| - OpenSource: &chrome.Link{Href: "/help/open-source", Label: rastrillo.T(r, "slides.credits.title")}, |
| + Icon: brand.Path("slides"), |
| + App: "Slides", |
| + Sky: sky.For(r.Host), |
| + Action: signinPath, |
| + Hidden: []chrome.Hidden{{Name: "force", Value: "1"}}, |
| + OpenSource: &chrome.Link{Href: "/help/open-source", Label: rastrillo.T(r, "slides.credits.title")}, |
| } |
| if hasReturn { |
| form.Return = ret |
| @@ -655,7 +646,7 @@ func (a *app) signin(w http.ResponseWriter, r *http.Request) { |
| form.Error = rastrillo.T(r, "slides.signin.error.unknown") |
| } |
| render(w, "signin", signinView{ |
| - shell: a.publicShell(r, frame{parts: []string{form.Heading}, signinPage: true}), |
| + shell: a.publicShell(r, frame{parts: []string{form.Page()}, signinPage: true}), |
| SignIn: form, |
| }) |
| } |
| @@ -871,18 +862,11 @@ type signedOutView struct { |
| // renderSignedOut is where Sign out lands, standalone and with Home |
| // alike: "You're signed out", and a primary Sign in. |
| func (a *app) renderSignedOut(w http.ResponseWriter, r *http.Request, status int) { |
| - title := rastrillo.T(r, "slides.signedout.title") |
| + notice := chrome.SignInNotice{Icon: brand.Path("slides"), App: "Slides", Sky: sky.For(r.Host)}.SignedOut(signinPath) |
| var buf strings.Builder |
| err := pages["signed_out"].ExecuteTemplate(&buf, "layout", signedOutView{ |
| - shell: a.publicShell(r, frame{parts: []string{title}, signinPage: true}), |
| - Notice: chrome.SignInNotice{ |
| - Icon: brand.Path("slides"), |
| - App: "Slides", |
| - Sky: sky.For(r.Host), |
| - Heading: rastrillo.T(r, "slides.signedout.heading"), |
| - Body: rastrillo.T(r, "slides.signedout.body"), |
| - Link: &chrome.Link{Href: signinPath, Label: rastrillo.T(r, "slides.chrome.signin")}, |
| - }, |
| + shell: a.publicShell(r, frame{parts: []string{notice.Page()}, signinPage: true}), |
| + Notice: notice, |
| }) |
| if err != nil { |
| a.logger.Error("slides: render signed-out page", "err", err) |
diff --git a/internal/slides/home_test.go b/internal/slides/home_test.go| index 79b323d..b089805 100644 |
| --- a/internal/slides/home_test.go |
| +++ b/internal/slides/home_test.go |
| @@ -201,6 +201,11 @@ func TestHomeFrontDoorLocalRecoveryAndCallbackGuard(t *testing.T) { |
| if tc.path == "/signin/local" && !strings.Contains(w.Body.String(), "estilo-signin-form") { |
| t.Error("local form missing") |
| } |
| + // connect's "signedout" state draws the door's signed-out page, |
| + // never connect's own "Sign in with Home". |
| + if tc.path == "/signed-out" && (!strings.Contains(w.Body.String(), "You’re signed out") || strings.Contains(w.Body.String(), "with Home")) { |
| + t.Errorf("Home-mode signed-out page is not the door's:\n%s", w.Body.String()) |
| + } |
| } |
| r := httptest.NewRequest("GET", homeTestOrigin+"/signin/local", nil) |
| c := homeSession(t, a, "home-person", connect.HomeMethod) |
| @@ -258,7 +263,7 @@ func TestHomeDifferentAddressStaysInLocalRecovery(t *testing.T) { |
| if sentPage.Code != http.StatusOK { |
| t.Fatalf("sent page: %d", sentPage.Code) |
| } |
| - m := regexp.MustCompile(`href="([^"]+)">slides\.signin\.again`).FindStringSubmatch(sentPage.Body.String()) |
| + m := regexp.MustCompile(`href="([^"]+)">Use a different address`).FindStringSubmatch(sentPage.Body.String()) |
| if m == nil { |
| t.Fatal("sent page has no Use a different address link") |
| } |
diff --git a/internal/slides/locales/en.toml b/internal/slides/locales/en.toml| index da32d6e..334e5f6 100644 |
| --- a/internal/slides/locales/en.toml |
| +++ b/internal/slides/locales/en.toml |
| @@ -7,38 +7,24 @@ |
| # Adding a language means adding a file beside this one with the same |
| # keys; nothing else in the app has to change. |
| -# slides.signin.* — GET /signin (auth.go's signin handler), estilo's |
| -# sign-in pages with the suite's copy deck (shared chrome spec §9.2). The |
| -# page renders the form and, on the way back from rastrillo/auth, |
| -# whichever outcome it was redirected here with (?sent=1, or |
| -# ?err=rate|address|expired|keymail|removed|1). |
| +# slides.signin.* — GET /signin (auth.go's signin handler): the errors |
| +# estilo's sign-in door shows, on the way back from rastrillo/auth, for |
| +# whichever outcome it was redirected here with |
| +# (?err=rate|address|expired|keymail|removed|1). The door's own words |
| +# (form, check-your-email, signed out) are estilo's chrome.English, not |
| +# keys here, so no app can drift from the others (shared chrome spec §9.2). |
| # |
| # error.unknown covers both the keymail outcome and a bare failure: |
| # rastrillo/auth's Verify deliberately answers the same way for an |
| # unknown, a used and an expired token, so there is no finer |
| # distinction for this page to draw — and every outcome on this screen |
| # means one operational thing, "ask for a new link". |
| -# |
| -# sent says "that address", not the address: gateBegin answers every |
| -# POST with the same bare ?sent=1, so the page has no address to echo. |
| -slides.signin.title = "Sign in" |
| -slides.signin.address.label = "Email address" |
| -slides.signin.help = "We’ll email you a link that signs you in. It works once and expires in 15 minutes." |
| -slides.signin.submit = "Email me a link" |
| -slides.signin.sent.title = "Check your email" |
| -slides.signin.sent = "If that address can sign in here, we’ve sent it a link. It works once and expires in 15 minutes." |
| -slides.signin.again = "Use a different address" |
| slides.signin.error.rate = "Too many attempts. Wait a few minutes, then try again." |
| slides.signin.error.address = "That doesn’t look like an email address." |
| slides.signin.error.expired = "That link has expired or was already used. Enter your email to get a new one." |
| slides.signin.error.unknown = "We couldn’t sign you in. Enter your email to get a new link." |
| slides.signin.error.removed = "Your access has been removed, so you’ve been signed out. Ask whoever runs this team if that’s wrong." |
| -# slides.signedout.* — where Sign out lands, standalone and with Home. |
| -slides.signedout.title = "Signed out" |
| -slides.signedout.heading = "You’re signed out" |
| -slides.signedout.body = "You’ve signed out of Slides on this device." |
| - |
| # slides.chrome.* — estilo's shared bar and account menu (chrome.go). |
| slides.chrome.skip = "Skip to content" |
| slides.chrome.menu = "Menu" |
| @@ -604,9 +590,6 @@ slides.export.error.store = "The PDF was made but couldn't be stored. Try again. |
| # slides.home.* — connect's account-connection pages. The hub is never |
| # named: it is "your Oficina account", and the verb is Connect (Paul's |
| # answer 3 to the shared chrome spec's §13). |
| -slides.home.signedout_title = "Signed out" |
| -slides.home.signedout_body = "You’ve signed out of Slides on this device." |
| -slides.home.signedout_action = "Sign in" |
| slides.home.start_title = "Connect your Oficina account" |
| slides.home.start_body = "Use your Oficina account to sign in to this Slides account. Your decks and sharing settings stay as they are." |
| slides.home.start_action = "Continue" |
diff --git a/internal/slidestest/signin_door_test.go b/internal/slidestest/signin_door_test.go| index 8557cf0..52e88ce 100644 |
| --- a/internal/slidestest/signin_door_test.go |
| +++ b/internal/slidestest/signin_door_test.go |
| @@ -35,3 +35,51 @@ func TestSignInPageIsTheDoor(t *testing.T) { |
| t.Error("sign-in page does not link sky.css") |
| } |
| } |
| + |
| +// TestDoorCopyIsEstilos pins the door's words, which are estilo's, not |
| +// this app's: the submit reads "Sign in" and never "Email me a link" |
| +// (Paul, 2026-10-01), the hub is never named, and the three tab titles |
| +// are "<Page> · Slides". |
| +func TestDoorCopyIsEstilos(t *testing.T) { |
| + h := newApp(t) |
| + title := regexp.MustCompile(`<title>([^<]*)</title>`) |
| + for _, tc := range []struct { |
| + path, title string |
| + want []string |
| + }{ |
| + {"/signin", "Sign in · Slides", []string{ |
| + "Email address", |
| + "We’ll email you a link that signs you in. It works once and expires in 15 minutes.", |
| + ">Sign in</button>", |
| + }}, |
| + {"/signin?sent=1", "Check your email · Slides", []string{ |
| + "Check your email", |
| + "If that address can sign in here, we’ve sent it a link. It works once and expires in 15 minutes.", |
| + ">Use a different address</a>", |
| + }}, |
| + {"/signed-out", "Signed out · Slides", []string{ |
| + "You’re signed out", |
| + "You’ve signed out of Slides on this device.", |
| + `href="/signin"`, |
| + }}, |
| + } { |
| + rec := get(t, h, tc.path) |
| + body := rec.Body.String() |
| + if rec.Code != http.StatusOK { |
| + t.Fatalf("GET %s: %d", tc.path, rec.Code) |
| + } |
| + if m := title.FindStringSubmatch(body); m == nil || m[1] != tc.title { |
| + t.Errorf("GET %s: title %v, want %q", tc.path, m, tc.title) |
| + } |
| + for _, w := range tc.want { |
| + if !strings.Contains(body, w) { |
| + t.Errorf("GET %s lacks %q", tc.path, w) |
| + } |
| + } |
| + for _, bad := range []string{"Email me a link", "Home"} { |
| + if strings.Contains(body, bad) { |
| + t.Errorf("GET %s says %q", tc.path, bad) |
| + } |
| + } |
| + } |
| +} |