summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2026-07-25Extract admin strings to i18n: users and tags clusterserdgeist
2026-07-25Extract admin strings to i18n: the nodes clustererdgeist
2026-07-24Extract admin strings to i18n: sessions, otp, users/editerdgeist
2026-07-24Rename layout classes to what they actually doerdgeist
2026-07-24Give all sessions a uniform absolute lifetime of one weekerdgeist
Enforced at restore via a login-time stamp, written only at genuine logins so the limit stays absolute rather than sliding. The cookie name rotation logs everyone out once at deploy. Second-factor users are deliberately not treated worse than password-only ones.
2026-07-24Complete the login only after the second factorerdgeist
Enrolled users get a pending marker instead of a session after the password step; a valid code through the challenge writes the real session via reset_session. otp_required without enrollment funnels into setup everywhere except the enrollment, user, and login machinery.
2026-07-24Add self-service TOTP enrollment UI and witnessed admin reseterdgeist
2026-07-24Add TOTP enrollment and verification to User, witnessed in the action logerdgeist
2026-07-23Zoom the action log on assetserdgeist
Asset names in summaries and publish deltas link to assets#show with an inline Chronik beside each, suppressed inside that asset's own zoom, per the node convention. assets#show gains a history button. Also renames the details summary (no longer only translations) and moves View Diff onto its own line.
2026-07-23Keep in-editor asset curation off the head, layering it like every editerdgeist
ensure_autosave! gives body keystrokes and asset curation one shared layer, so head is never mutated in place and every curation change surfaces in the publish delta. Stale rendered join ids are mapped across the clone via asset_id. Curation now requires holding the lock; a missing lock answers 423, matching the autosave endpoint.
2026-07-23Record asset deltas at publish, with changed assets as participantserdgeist
2026-07-23Witness asset uploads and out-of-band attaches in the action logerdgeist
2026-07-23Witness asset destruction, naming every node it stripserdgeist
2026-07-23Convert the log's node zoom to participants, completing subtree historieserdgeist
2026-07-23Add action_participants, recording every node a trash/destroy toucheserdgeist
2026-07-22Add tests for the asset<->nodes attach cycle and the flash notice survival fixerdgeist
2026-07-22Add attached nodes subsection in assets#show and thumbnail in nodes#createerdgeist
2026-07-22Add Node#attach_asset! attaching across all lifecycle rowserdgeist
2026-07-22Retire nodes#recent, superseded by the action logerdgeist
2026-07-22Fix Node#title ignoring autosaveerdgeist
head ? head.title : draft.title never accounted for a node with only an autosave, reuses editable_page
2026-07-21Render PDF headlines as document cards, not lightbox imageserdgeist
A starred PDF previously ran through the same crop-and-lightbox path a photo does -- exactly the awkward treatment explicit headline designation was meant to avoid. _headline_image.html.erb now branches on @headline_asset.pdf?: a PDF renders as a linked card (a :medium thumbnail, a file icon, its name), no gallery participation at all. The existing image-headline and gallery-fallback logic is otherwise unchanged, now scoped to an image-specific headline only. Other attached PDFs -- headlined or not -- list below as plain links, same reasoning as why non-headline photos still get a gallery trigger: an attached document shouldn't go invisible just because nothing's been starred yet. headline_image's own render guard needed widening to cover a page with PDFs attached but no images and no headline at all -- the one case none of the existing conditions accounted for.
2026-07-21PDFs currently should have no credits attached to them in displayerdgeist
2026-07-21More PDF headline eligibilityerdgeist
2026-07-21Make PDFs eligible for headline and allow searching assets by filenameerdgeist
2026-07-21Implement model side of PDF raster preview generationerdgeist
2026-07-21Add storage isolation for tests, preventing live data destructionerdgeist
2026-07-21Resolve preview's page-to-node lookup for every layererdgeist
pages_controller#preview loaded a page by id and rendered it directly, assuming @page.node was always present. True for head and draft, since both carry a real node_id: false for autosave, which deliberately has node_id: nil (the mechanism that excludes it from Node#pages and the revision count). A node with an autosave and no draft underneath it: lock, start editing, never explicitly save a draft: loads that autosave directly with no node at all, and any view code assuming @page.node is real (headline image, credits, gallery links) raises. When @page has no node, resolve it by checking autosave_id, then draft_id, then head_id on Node, and set @page.node in memory only: the autosave's node_id: nil is never persisted differently. The existing swap from draft to a fresher autosave, when both exist, is unchanged. Three tests: draft with a fresher autosave on top, autosave with no draft underneath, and the ordinary head-only case with neither.
2026-07-21Remove Page#update_assetserdgeist
Only caller left was the sort_images action removed last commit. Kept alive only as a test-setup convenience for diff_against coverage, which is what it actually was -- an implicit API with no deliberate contract, sitting there for anyone to call. Rewrote the one test to set up its fixture state directly via related_assets rather than through a method whose real job was already done.
2026-07-20Make headline images explicit, add asset creditserdgeist
- related_assets gains a `headline` boolean (DB-enforced: at most one per page), replacing "first image by position" as the headline rule. A rake task backfills the current first image on every live head/draft, so nothing changes visually until an editor changes it. - The image picker sidebar gets a star toggle reflecting the flag; the TinyMCE inline-image picker's badge now reads it too, instead of assuming position 0. - No headline chosen (or none attached) now falls back to the gallery-count caption itself becoming the lightbox trigger, instead of the gallery being unreachable. - Assets gain creator, source_url, and license_key (against a new config/asset_licenses.yml dictionary). asset_credit renders a degrading attribution line, reused as a hidden per-image glightbox caption so credit is one click away for every image, not only the headline's always-visible one. - Fixed: asset thumbnails rendered unconditionally regardless of whether a real variant exists on disk. Asset#has_variant? checks file existence, not content type -- some legacy PDFs have real pre-rewrite thumbnails a content-type check would have hidden. - assets#new/edit rebuilt onto the same node_description/node_content layout as assets#show, picking up the three new fields in the process.
2026-07-19Fix render gallery rename issue. We saw 500serdgeist
2026-07-18Accept blank template names in the allowlist validationserdgeist
2026-07-18Emit a report-only Content-Security-Policy with nonced inline scriptserdgeist
- dark-mode restore now travels nonced, the admin constants likewise - AUTH_TOKEN deleted in favour of the csrf meta tag - new report collector at /csp_reports
2026-07-18Give action log entries per-verb iconserdgeist
A muted glyph before each sentence makes both log surfaces scannable by verb: create, publish, move, trash, restore, destroy, and the discard pair. Rollback publishes get their own icon (history) distinct from ordinary promotion. Unknown verbs fall back to a dashed circle.
2026-07-18Annotate the History list with each revision's lifecycleerdgeist
Each row in nodes#show's History section now carries terse badges from the action log: created, published, and restored (rollback re-promotion), with date and actor, rendered from entry metadata alone. Backfilled entries wear the inferred marker, so reconstructed provenance stays distinguishable from witnessed history. A revision that was published and later restored shows both badges chronologically -- its true biography. Only create and publish entries carry page_id; trash, restore, and destroy annotate the node's own log zoom instead of any single revision, by design.
2026-07-18Give Trash a proper title on lazy constructionerdgeist
2026-07-18Keep the Trash out of the drafts surfaceserdgeist
2026-07-18Teach the action log reader the Trash vocabularyerdgeist
Sentences for trash (with the pre-trash path), restore_from_trash (with the destination), and destroy (with the final path, read from its flat create-symmetric key).
2026-07-18Add Trash affordances: cockpit, listing, dashboard entryerdgeist
nodes#show gains a Trash section on trashed nodes: provenance from the trash entry, a restore form whose parent picker pre-fills the old parent while it still lives, and permanent deletion. A Move-to-Trash button joins the status actions on living nodes. nodes#trashed lists trashed subtree roots with weight, provenance, and deletion; the dashboard housekeeping row links to it, and trash/destroy redirect there. Deletion from Trash now removes the whole subtree, deepest first, each node through a real destroy! so every per-node cascade runs -- amending the never-recursive rule for this one sanctioned path (both confirms state the count; the root entry carries destroyed_descendants). Bare Node#destroy still refuses children.
2026-07-17Route and control trash, restore, and permanent deletionerdgeist
2026-07-17Add trash!, restore_from_trash!, and destroy_from_trash! with log entrieserdgeist
Also update the node action contract to include the trash related verbs.
2026-07-17Bootstrap the Trash node: reserved slug, identity, guardserdgeist
2026-07-17Refuse destroying nodes that still have childrenerdgeist
NestedTree's before_destroy silently delete_all'd the whole subtree, bypassing every per-node cleanup. Nodes are never destroyed recursively; descendants must be removed individually.
2026-07-17Drop the orphaned nested-set columns lft and rgterdgeist
2026-07-17Allowlist aggregate order columns and template nameserdgeist
Page.aggregate interpolated order_by into SQL unchecked while already allowlisting order_direction; the column is now normalized and checked against the sortable columns, falling back to pages.id. Its values arrive from editor-authored aggregate shortcodes, so this was editor-gated, but the asymmetry was wrong regardless. template_name and default_template_name now validate inclusion in Page.custom_templates -- names render as filesystem paths, so only names actually present in the template directory are acceptable. Validated only on change: legacy rows whose template file has since vanished stay saveable, and valid_template's render-time fallback to standard_template continues to cover them. Two tests that wrote fabricated template names through the front door now arrange their state correctly (update_column for the stale-name fallback test, a real template for the update-persists test).
2026-07-17Allow updating migrated users without supplying a passworderdgeist
password_required? treated a blank crypted_password as "needs a password", but after bcrypt migration crypted_password is nil by design -- every subsequent save of a migrated or new user failed validation. The predicate now requires a password only when both the legacy and the bcrypt credential are absent, or when one is actually being set.
2026-07-17Implement transparent password hash migrationerdgeist
Add has_secure_password and bcrypt while retaining compatibility with legacy SHA-1 password hashes. Existing users are upgraded to password_digest on their next successful login. Add regression tests covering both legacy and modern authentication paths.
2026-07-17Add some more tests for the login basics while refactoringerdgeist
2026-07-17Improve test coverage for two-ordinal week selection in rrule humaniziererdgeist
2026-07-16Aggregate selected weeks in a more human friendly formerdgeist
Weekdays appearing on a subset of the weeks of the month are now aggregated into a simpler form.
2026-07-16managed RRULE constructs now include week selectionerdgeist
Improve the humanizer to also understand weekly patters that an editor can manually select, on top of the single week rules. Extend template and javascript controller to reflect these changes.