summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
29 hoursRefuse 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.
29 hoursDrop the orphaned nested-set columns lft and rgterdgeist
32 hoursAllowlist 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).
33 hoursAllow 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.
33 hoursAdd migraton for bcrypt password digest on user modelerdgeist
33 hoursImplement 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.
33 hoursAdd some more tests for the login basics while refactoringerdgeist
33 hoursUse SecureRandom instead of the hand rolled implementationerdgeist
33 hoursImprove test coverage for two-ordinal week selection in rrule humaniziererdgeist
33 hoursFix computed_unique_name code and consumererdgeist
33 hoursFix grammar for unknown action and discard_autosaveerdgeist
33 hoursRetire recent changes widget, replace with action logerdgeist
33 hoursRetire recent changes widget, replace with action logerdgeist
2 daysGive all text and password inputs border-radiierdgeist
2 daysCutover to new Recent Changes widgeterdgeist
2 daysConstruct DOM elements using escaping helpers to prevent XSSerdgeist
2 daysAdd a script to backfill action log from existing recordserdgeist
2 daysMove rrule builder to a partial and share between events#new and events#editerdgeist
2 daysAggregate 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.
2 daysmanaged 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.
2 daysSplit current_unique_name in a setter and an accessorerdgeist
Also clean up some instance variable assignments on the way.
3 daysnodes#show's revisions subsection renamed to historyerdgeist
Now there's a separate revisions history and a full action log for a node. To reflect the extended scope, the section has been renamed to history.
3 daysCondense the action log into a scannable tableerdgeist
Several minor improvements to the action log presentation: * Now a table with date and human readable presentation as rows is displayed * If no changes in a title were detected, the old version is omitted * The "inferred" flag is demoted to the end of the line * You can zoom in on the node's history directly from a log line * byline for the first publish action is preserved * Revisions are directly linked to when a new one i published
3 daysDon't reference your own user as 'du' in action log. It breaks grammar.erdgeist
3 daysAdd a reader for the action log at admin/logerdgeist
NodeActionsController#index lists entries newest-first, filterable by node_id or user_id -- the two zoom shapes the log was designed around. Rendering goes through NodeActionsHelper.action_summary, which builds one sentence per entry from metadata alone, so entries referencing deleted users or nodes render from their snapshots; live associations only upgrade names to links. Unknown verbs degrade to a generic sentence rather than an error, since the log outlives its vocabulary. The helper is the escaping boundary: every metadata value passes through h() before assembly. Actor names link to the log's own user zoom rather than the unused users page -- inspecting a suspicious user's other actions is the intended workflow. Publish entries with a translation_diff expose a collapsed per-locale change table linking out to the revision itself. Sentences live in en.yml/de.yml following the existing widget-string convention. nodes#show links to its node's zoomed log.
3 daysRecord the full lifecycle contract in NodeAction entrieserdgeist
A contract comment above NodeAction.record! now specifies every verb's metadata shape. NodeAction.head_diff computes the publish diff between an outgoing head and its replacement -- default-locale title pair always, author/tags pairs and template/assets/abstract/ body flags only when changed, and a per-locale translation_diff with added/removed/changed status. It is a pure function of its two pages, shared by publish, rollback, and the future backfill, and reads translation rows directly so fallbacks never masquerade as content. publish entries carry via ("draft" or "revision"); restore_revision! is now transactional, takes the acting user, and logs through the same diff. Staged slug/parent changes applied at publish log a move entry with the path pair. Node creation logs a create entry with initial title and path. The draft-scoped translation_destroy writer is retired -- locale removal is recorded by the publish diff, where it becomes public fact.
3 daysProvide parent_unique_name in nodes#new if parent is already pre-seterdgeist
3 daysRemove some remnants of legacy admin wizard interfaceerdgeist
4 daysAdd NodeAction: an append-only log of who did what to a nodeerdgeist
node_id/page_id/user_id are lookup and ordering only -- all three nullify on delete, so an entry outlives its actor and its subject. Everything that must survive those deletions lives in a mandatory metadata jsonb written once at creation: the actor's username, the node's human-readable name (pinned to the default locale), and action-specific extras such as publish's title from/to. NodeAction.record! is the single constructor, so every entry gets the same baseline metadata without each call site re-implementing it. occurred_at is one field for live and backfilled entries alike; inferred_from distinguishes them -- nil means witnessed at the moment it happened, populated names how a backfilled entry was estimated. Instrumented so far: publish (crediting the actual publisher, threaded through from the controller -- previously nobody had the act of publishing recorded anywhere), revert's discard_autosave and destroy_draft branches, and translation destroy. publish_draft! now runs in a transaction so the promotion and its log entry land together. The remaining verbs follow once this mechanism has proven itself.
4 daysMake the recent-changes page match the widget it links fromerdgeist
nodes/recent rendered the generic node-listing partial (id, actions, current lock owner, revision number) -- nothing resembling what 'See all recent changes' actually promised to show more of. Both surfaces now render the same extracted partial, so they can't tell two different stories again. Also: head.editor correctly identifies who last wrote the content sitting in head, but publish_draft! never touches editor at all -- nobody has ever had the specific act of publishing recorded anywhere. 'Published by X' was a claim the data never supported, only incidentally true when the same person who drafted something also happened to publish it. Relabeled to 'last edited by' -- same data, accurately described. A real publish-actor is separate, future work, once the action log exists. Basic list styling added for the full page, which had never rendered outside the widget's own compact five-line context before.
4 daysRemove dead admin/_recent_changes partialerdgeist
4 daysAdd scaffolding for a proper tech documentation from everything I could remembererdgeist
4 daysSupply related-asset URLs/name and public inline-image CSSerdgeist
RelatedAssetsController#create's JSON includes large_url, original_url, and name alongside thumb_url/url; the related-asset list items in both editors carry them as data-large-url, data-original-url, and data-name. ccc.css gets the public-facing .inline-image--full/--half/--left/ --right rules -- admin.css and TinyMCE's content_style cover the cockpit and in-editor renderings respectively.
4 daysAdd inline image insertion for page bodies, plus a headline-conflict badgeerdgeist
Custom TinyMCE toolbar button opens a picker scoped to a page's own attached images. Selecting one and a placement (full width, left, right) inserts <a class="glightbox" data-gallery="page-N"> wrapping an <img>, sharing the existing headline-image lightbox gallery. No native TinyMCE image dialog or resize handles -- placement is fixed to the three options via CSS classes only. extended_valid_elements defines a and img explicitly and symmetrically; valid_classes allows the placement classes and glightbox specifically. content_style renders placement inside the editing iframe, since ccc.css doesn't load there. A pre-save pass removes any a.glightbox left without an img, covering in-editor deletion regardless of how it happened. Alt text comes from the asset's name, escaped. A badge marks whichever attached image sits at position 0, since _headline_image.html.erb always renders that position as the page's automatic headline. Shown in the sidebar Images list and in the picker grid.
4 daysExtend static-asset cache-busting to the public layouterdgeist
mtime_busted_path only ever covered the four admin-only static files. The public layout has the identical exposure -- ccc.css, glightbox's vendored CSS/JS, and public.js are all served straight from public/ with no pipeline fingerprinting either -- just never got the same treatment.
4 daysCrop headline images to aspect ratio instead of distorting themerdgeist
STYLES restructured from a single geometry: string per style to a full args: array, since this fix needs -gravity and -extent alongside -resize, which one geometry string can't express.
4 daysAdd a :large FileAttachment style for full-width inline body imageserdgeist
Sized generously (1600x1600>) rather than against today's cramped 490px content column specifically -- shrinking an oversized source to fit a narrow container is free and looks fine; a source too small for a future, wider redesign has no fix short of re-uploading every image. Purely additive: nothing reads :large yet, and generate_variants already loops over the whole STYLES hash generically, so no other code needed to change for new uploads to start getting it. Test suite's own hardcoded style lists updated in the same commit so they don't quietly drift out of sync with what the app actually defines.
5 daysRetire wipe_draft! and find_or_create_draft from production codeerdgeist
Both had already lost their reason to exist as production API: wipe_draft!'s one remaining callsite (nodes#show) was removed two sessions ago, and find_or_create_draft had zero production callers left at all -- confirmed by a fresh grep, not assumed -- every one of its ~65 call sites was test setup, unrelated to what those tests actually cover. wipe_draft! is deleted outright, along with its two tests -- the lock/draft/autosave cleanup it silently performed already has explicit, always-visible manual equivalents (Unlock, Discard Autosave, Destroy Draft), so nothing real is lost. find_or_create_draft moves to test_helper.rb as a plain method on ActiveSupport::TestCase, alongside the create_node_with_draft/ create_node_with_published_page helpers already living there -- extending the framework's own designated test-extension point rather than reopening the Node model from test code. Its three tests of real dispatch behavior (idempotency on repeat calls, and raising when a second user contends for the lock) are kept, since ~65 other tests depend on this helper actually working correctly; only the call syntax changed, from node.find_or_create_draft(user) to find_or_create_draft(node, user).
5 daysAdd chapter images: thumbnail on the list, headline image on the detail pageerdgeist
_chapter.html.erb (the aggregator partial used by the erfas/ chaostreffs overview pages) never rendered an image at all -- editors attaching a hackerspace photo via the asset picker would see zero visible effect on exactly the pages they'd check first. chapter_detail.html.erb (the individual page template) had the same gap. Both fixed by reusing existing infrastructure rather than inventing anything: the overview list gets a small, aspect-preserving :thumb image beside the heading; the detail page gets the app's existing headline_image helper, the same one every other full-page template already uses.
5 daysAdd a toggleable live preview panel to both editorserdgeist
Hidden by default, shares horizontal space with the body editor once opened rather than a separate section, and only requests the iframe's src on first toggle -- no preview traffic at all until someone actually wants to see it. Refreshes automatically on every successful autosave; a separate force-render button re-attempts a save-and- refresh cycle immediately, for when the normal 7-second cycle has been interrupted (a lock-lost error, a transient failure) and waiting for the next tick isn't good enough.
5 daysMake revisions locale awareerdgeist
5 daysAdd tooltips to all navbar itemserdgeist
5 daysMake tags a pill list on nodes#showerdgeist
5 daysStore return_to before resetting session in loging. Fixes returning to an admin page before logging inerdgeist
5 daysRe-add language selector, but fix the mis-nomer for english pageserdgeist
5 daysMerge branch 'erdgeist-revive-events'erdgeist
5 daysRemove orphaned language selector for admin viewserdgeist
5 daysAdd cache-buster using mtime of css and js files outside the asset pipelineerdgeist
5 daysRemove redundant default translation from the translations subsectionerdgeist
5 daysFix: p elements can't contain buttons. Convert it to a diverdgeist