Visual sequences: ordered image + text steps inside a section #12

Closed
opened 2026-11-09 21:11:30 +00:00 by eric · 1 comment
Owner

Builds on #10 (images). Let any section hold visual sequences: an ordered series of images, each with optional text, to show something like how to log in to a bank website or how to cancel an online service that makes cancelling difficult. A sequence sits in the section where it belongs (e.g. right after the login record or checklist item) and is its own block, not part of a record or item. A section can have as many as wanted.

Where sequences can go (decided)

All four section kinds: records, steps, checklist, text.

  • records / steps / checklist: the sequence is an entry in the section's own ordered list, interleaved with records/items in any order (same add, rename, reorder, delete mechanics).
  • steps / checklist numbering: a sequence is not a step. It does not take a step number or a tick box, and the numbering of items around it continues unbroken.
  • text: the section keeps its single body, and its sequences print after the body, in order (no interleaving inside the prose).

Behavior

  • Each sequence has a title and any number of frames. A frame = one image plus an optional text box.
  • Per-frame text layout, user selectable: Right of image, Under image, or No text. 'No text' hides the box in view and print (text is kept in case the user switches back).
  • Frame mechanics match #10: import (multi-select creates several frames at once), drag/drop (new frame, or replace on an existing frame image), clipboard paste (new frame, or replace when a frame image is focused), reorder, delete, secret checkbox per frame (hidden until Show; [withheld] in masked print), click to enlarge.
  • Same image rules as #10: PNG/JPEG only by signature, downscaled to <= 1600 px long side, re-encoded, ~3 MB hard limit, encrypted with the rest of the document.
  • Frames are numbered (1, 2, 3...) in view and print so the order reads as a workflow.
  • Section 'Add' controls offer '+ Add visual sequence' alongside the existing add buttons for that kind.

Print

  • Frames print in order with their number. Right layout = image left, text right; under layout = text below. Frame blocks use break-inside: avoid so an image never splits across pages; image height capped (smaller cap for right layout so text has room).
  • A sequence inside a checklist/steps section prints in place between the items around it.
  • Running header and masked/unmasked secret rules unchanged.

Model (additive, schemaVersion stays 1)

  • A sequence entry: { id, kind: 'sequence', title, status, updated, frames: [{ image: dataUrl|'', text, layout: 'right'|'under'|'none', secret? }] }.
  • records section: entries live in section.records next to records. steps/checklist: entries live in section.items next to items. text section: optional section.sequences array after body.
  • validate(): accepts kind 'sequence' entries in those lists; frame image via isImageDataUrl, layout in the allowed set, text string, secret boolean; ids unique. Existing record/item checks must skip or branch on kind so sequences don't fail 'missing text' / 'fields must be an array'.
  • Code that iterates items (numbering, tick boxes, secret counting, allRecords, print) must handle or skip sequence entries.
  • Files saved by this version cannot be opened by older builds; the existing 'upgrade by opening an older file in a newer build' path still works.

Decided

  • Frame text allows line breaks (multi-line textarea; newlines preserved in view and print, as notes do). Plain text only, no markup.

Implementation sketch

  1. src/model.js: sequence entry + frame validation, FRAME_LAYOUTS constant, text-section sequences.
  2. src/ops.js: addSequence, addFrame helpers (reuse the #10 image processing).
  3. src/app.js: editSequence / viewSequence, frame row editor with layout dropdown, reuse drop/paste/pick handlers from #10; hook into the records, steps/checklist and text section editors and viewers.
  4. src/print.js and src/style.css: frame print layout, numbering, page-break rules, step numbering that skips sequences.
  5. Docs: README, docs/MAINTENANCE.md, executor README.txt if relevant.

Tests

  • Unit (node --test): validation (bad layout, bad image, duplicate id, sequence in each section kind), addSequence/addFrame, step numbering skips sequences, secret counting and display text for secret and 'none' layout frames.
  • Headless Chromium: build a 3-frame sequence with right/under/none layouts via picker, drop and paste in a records, a checklist and a text section; reorder and delete frames; save, reopen, decrypt round-trip; print to PDF and check numbering, layout and page breaks.
Builds on #10 (images). Let **any section** hold **visual sequences**: an ordered series of images, each with optional text, to show something like how to log in to a bank website or how to cancel an online service that makes cancelling difficult. A sequence sits in the section where it belongs (e.g. right after the login record or checklist item) and is its own block, not part of a record or item. A section can have as many as wanted. ## Where sequences can go (decided) All four section kinds: **records, steps, checklist, text**. - **records / steps / checklist:** the sequence is an entry in the section's own ordered list, interleaved with records/items in any order (same add, rename, reorder, delete mechanics). - **steps / checklist numbering:** a sequence is not a step. It does not take a step number or a tick box, and the numbering of items around it continues unbroken. - **text:** the section keeps its single body, and its sequences print after the body, in order (no interleaving inside the prose). ## Behavior - Each sequence has a title and any number of **frames**. A frame = one image plus an optional text box. - **Per-frame text layout, user selectable:** *Right of image*, *Under image*, or *No text*. 'No text' hides the box in view and print (text is kept in case the user switches back). - Frame mechanics match #10: import (multi-select creates several frames at once), drag/drop (new frame, or replace on an existing frame image), clipboard paste (new frame, or replace when a frame image is focused), reorder, delete, secret checkbox per frame (hidden until Show; [withheld] in masked print), click to enlarge. - Same image rules as #10: PNG/JPEG only by signature, downscaled to <= 1600 px long side, re-encoded, ~3 MB hard limit, encrypted with the rest of the document. - Frames are numbered (1, 2, 3...) in view and print so the order reads as a workflow. - Section 'Add' controls offer '+ Add visual sequence' alongside the existing add buttons for that kind. ## Print - Frames print in order with their number. Right layout = image left, text right; under layout = text below. Frame blocks use break-inside: avoid so an image never splits across pages; image height capped (smaller cap for right layout so text has room). - A sequence inside a checklist/steps section prints in place between the items around it. - Running header and masked/unmasked secret rules unchanged. ## Model (additive, schemaVersion stays 1) - A sequence entry: { id, kind: 'sequence', title, status, updated, frames: [{ image: dataUrl|'', text, layout: 'right'|'under'|'none', secret? }] }. - records section: entries live in section.records next to records. steps/checklist: entries live in section.items next to items. text section: optional section.sequences array after body. - validate(): accepts kind 'sequence' entries in those lists; frame image via isImageDataUrl, layout in the allowed set, text string, secret boolean; ids unique. Existing record/item checks must skip or branch on kind so sequences don't fail 'missing text' / 'fields must be an array'. - Code that iterates items (numbering, tick boxes, secret counting, allRecords, print) must handle or skip sequence entries. - Files saved by this version cannot be opened by older builds; the existing 'upgrade by opening an older file in a newer build' path still works. ## Decided - Frame text allows line breaks (multi-line textarea; newlines preserved in view and print, as notes do). Plain text only, no markup. ## Implementation sketch 1. src/model.js: sequence entry + frame validation, FRAME_LAYOUTS constant, text-section sequences. 2. src/ops.js: addSequence, addFrame helpers (reuse the #10 image processing). 3. src/app.js: editSequence / viewSequence, frame row editor with layout dropdown, reuse drop/paste/pick handlers from #10; hook into the records, steps/checklist and text section editors and viewers. 4. src/print.js and src/style.css: frame print layout, numbering, page-break rules, step numbering that skips sequences. 5. Docs: README, docs/MAINTENANCE.md, executor README.txt if relevant. ## Tests - Unit (node --test): validation (bad layout, bad image, duplicate id, sequence in each section kind), addSequence/addFrame, step numbering skips sequences, secret counting and display text for secret and 'none' layout frames. - Headless Chromium: build a 3-frame sequence with right/under/none layouts via picker, drop and paste in a records, a checklist and a text section; reorder and delete frames; save, reopen, decrypt round-trip; print to PDF and check numbering, layout and page breaks.
eric closed this issue 2026-11-09 23:35:31 +00:00
Author
Owner

Implemented in e9ac581.

Added

  • + Add visual sequence in all four section kinds. In records, steps and checklist sections a sequence is an entry in the section's ordered list (move/delete like any other entry). In a text section sequences print after the body.
  • A sequence is not a step: no number, no tick box, and numbering of the items around it continues unbroken.
  • Steps (frames): add by picking several files, drop on the sequence, paste a screenshot, or + Add step for an empty one. Drop/paste on an existing step's box replaces its picture. Reorder and delete steps. Numbered Step 1, 2, 3 in view and print.
  • Per-step text position: right of image, under image, or no text. Line breaks are kept. 'No text' hides the text but keeps it; empty text never takes room.
  • Per-step secret flag hides picture and text behind Show/Hide and prints as [withheld] in a masked print.
  • Same image rules as #10 (PNG/JPEG by signature, shrunk to 1600 px, ~3 MB limit). Click to enlarge. A step is kept on one printed page.

Differences from the issue

  • No status field on sequences (title + updated date only); TBD highlighting did not fit a series of pictures.
  • Files saved with sequences cannot be opened by older builds; opening an older file in this build still works.

Verified

  • Unit tests: 45 (44 pass, 1 skipped as before) covering validation in every section kind, ids, secret counting, layout and withholding rules.
  • Headless Chromium on a real page: picker with 3 files, replace by drop and by paste, add by paste/drop on the card, disguised GIF rejected, reorder/delete, right layout as two columns, lightbox, sequences in checklist/steps/text sections, secret step hidden until Show, save and reopen round trip with no image bytes outside the encrypted payload.
  • Printed to PDF masked and full and looked at the pages: numbering, text beside the image, [withheld] vs real text, steps not split across pages, step numbering around a sequence (1, sequence, 2).

Not verified

  • Firefox and Safari drop/paste.
  • Real login screenshots at print size (tests used plain coloured images).
  • Real data on a real thumbdrive.
Implemented in e9ac581. **Added** - **+ Add visual sequence** in all four section kinds. In records, steps and checklist sections a sequence is an entry in the section's ordered list (move/delete like any other entry). In a text section sequences print after the body. - A sequence is not a step: no number, no tick box, and numbering of the items around it continues unbroken. - Steps (frames): add by picking several files, drop on the sequence, paste a screenshot, or + Add step for an empty one. Drop/paste on an existing step's box replaces its picture. Reorder and delete steps. Numbered Step 1, 2, 3 in view and print. - Per-step text position: right of image, under image, or no text. Line breaks are kept. 'No text' hides the text but keeps it; empty text never takes room. - Per-step secret flag hides picture and text behind Show/Hide and prints as [withheld] in a masked print. - Same image rules as #10 (PNG/JPEG by signature, shrunk to 1600 px, ~3 MB limit). Click to enlarge. A step is kept on one printed page. **Differences from the issue** - No `status` field on sequences (title + updated date only); TBD highlighting did not fit a series of pictures. - Files saved with sequences cannot be opened by older builds; opening an older file in this build still works. **Verified** - Unit tests: 45 (44 pass, 1 skipped as before) covering validation in every section kind, ids, secret counting, layout and withholding rules. - Headless Chromium on a real page: picker with 3 files, replace by drop and by paste, add by paste/drop on the card, disguised GIF rejected, reorder/delete, right layout as two columns, lightbox, sequences in checklist/steps/text sections, secret step hidden until Show, save and reopen round trip with no image bytes outside the encrypted payload. - Printed to PDF masked and full and looked at the pages: numbering, text beside the image, [withheld] vs real text, steps not split across pages, step numbering around a sequence (1, sequence, 2). **Not verified** - Firefox and Safari drop/paste. - Real login screenshots at print size (tests used plain coloured images). - Real data on a real thumbdrive.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eric/final-wishes#12
No description provided.