oficina / docs Public

Save status: the editor drives the toast, the subtitle and the inline line by placement

Fable on 5bcd269 (#179), B1, with S1 and S2. The editor mounted the first
[estilo-save-status] in the page, and the phone's subtitle now comes
before the corner toast: a desktop's "Trouble saving" and "were lost"
went to an element inside display:none, so they were never shown or
announced; a folded phone mirrored a toast that never changed; and at rest
ok's idle emptied the subtitle, moving the paper.

- fixtures/editor-entry.js mounts [estilo-save-status~="floating"] by its
  placement, and drives the subtitle and the folded bar's inline line
  ([docs-inline-state]) itself, with the toast's idle said as "Saved"
  there. Bundle rebuilt (node build-bundles.mjs).
- brand/phone.js no longer mirrors anything. It marks the page
  (data-docs-phone), and only then does the toast give way on a phone:
  without the script the bar never folds and the toast keeps saying a
  failure wherever the page has scrolled to (S1).
- The inline line opens with the state, in the subtitle's tones, before
  the sharing note, so an ellipsis never cuts a failure (S2).
- The tests and engine drives that watched the first save status
  (saving_browser_test.go, resync_browser_test.go, fixtures/engines'
  saving.mjs and replay.mjs) watch the toast by its placement.

TestASaveFailureIsSaidAtEveryWidth deletes the document under the open
page, types, and asserts the refusal is shown and announced at 1280px
(the toast), on a phone at rest (the subtitle) and folded (the inline
line, first and toned). Before this it timed out at 1280px: the toast
never said "failed".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev c68caa231bb2777f5235311b59e57d71b8cc1780 parent 5bcd269
13 files changed, +184 −46
  • fixtures/editor-entry.js +26 −2
  • fixtures/engines/replay.mjs +1 −1
  • fixtures/engines/saving.mjs +1 −1
  • internal/docs/brand/phone.js +9 −18
  • internal/docs/handlers.go +3 −3
  • internal/docs/phone.go +3 −0
  • internal/docs/phone_browser_test.go +105 −0
  • internal/docs/phone_test.go +6 −0
  • internal/docs/resync_browser_test.go +1 −1
  • internal/docs/saving_browser_test.go +1 −1
  • internal/docs/static/{editor.764c2a5845d72784.js => editor.051495d35798f7b9.js} +13 −13
  • internal/docs/views/partials/editor_bar.html +4 −3
  • internal/docs/views/show.html +11 −3
fixtures/editor-entry.js

Loading diff…

fixtures/engines/replay.mjs

Loading diff…

fixtures/engines/saving.mjs

Loading diff…

internal/docs/brand/phone.js

Loading diff…

internal/docs/handlers.go

Loading diff…

internal/docs/phone.go

Loading diff…

internal/docs/phone_browser_test.go

Loading diff…

internal/docs/phone_test.go

Loading diff…

internal/docs/resync_browser_test.go

Loading diff…

internal/docs/saving_browser_test.go

Loading diff…

internal/docs/static/{editor.764c2a5845d72784.js => editor.051495d35798f7b9.js}

Loading diff…

internal/docs/views/partials/editor_bar.html

Loading diff…

internal/docs/views/show.html

Loading diff…