<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cccms/app/controllers/admin_controller.rb, branch erdgeist-modernize-auth</title>
<subtitle>[no description]</subtitle>
<id>https://erdgeist.org/gitweb/cccms/atom?h=erdgeist-modernize-auth</id>
<link rel='self' href='https://erdgeist.org/gitweb/cccms/atom?h=erdgeist-modernize-auth'/>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/'/>
<updated>2026-07-16T22:42:54Z</updated>
<entry>
<title>Cutover to new Recent Changes widget</title>
<updated>2026-07-16T22:42:54Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-16T22:42:54Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=c810d1aa93a267dd8fcf8984c5d0b125629efa31'/>
<id>urn:sha1:c810d1aa93a267dd8fcf8984c5d0b125629efa31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rebuild the admin dashboard: icon nav, search, signposts, widgets</title>
<updated>2026-07-12T21:42:43Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-12T21:42:43Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=b271648f89cba7cafafa1b73b1658b1c1bc0e4b0'/>
<id>urn:sha1:b271648f89cba7cafafa1b73b1658b1c1bc0e4b0</id>
<content type='text'>
Replaces the old admin#index wizard -- accreted over years, never
designed as a whole -- with the dashboard settled on this session:
a three-icon nav (dashboard/search/log out, no locale selector), a
nodes-first search bar, four task signposts, and two symmetric
widgets (drafts/autosaves, recent changes) with a quiet housekeeping
row beneath them.

Node.recently_changed now filters and orders by the head page's own
updated_at instead of the node's blanket timestamp, so a lock/unlock
cycle with no actual publish no longer surfaces here, and the
original publisher is no longer misattributed to someone else's
housekeeping action. This also restores the "published" qualifier on
each entry, which the query previously couldn't guarantee was true.

@mynodes and its dedicated "My Work" table are retired along with the
old wizard -- "Continue my work" is a link to the existing, already-
correct NodesController#mine instead of a second, duplicate query.
Its one dedicated test (dedup across multiple revisions by the same
user) is ported to nodes_controller_test.rb, since mine already
carries the same .distinct protection the old query did; it just had
no test of its own until now.
</content>
</entry>
<entry>
<title>Add a grouped tag+node search endpoint for the upcoming dashboard</title>
<updated>2026-07-12T14:33:12Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-12T14:33:12Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=4ec70e5ecf792a56e868538738d6c7f63bb6cf24'/>
<id>urn:sha1:4ec70e5ecf792a56e868538738d6c7f63bb6cf24</id>
<content type='text'>
AdminController#dashboard_search returns tags and nodes as separate,
labeled groups (via ActsAsTaggableOn::Tag.named_like and
Node.editor_search) rather than the flat per-node list every existing
picker returns. initSearchPicker gains a renderResults callback option
that, when given, replaces the default per-node rendering entirely --
lets the dashboard render its two labeled groups without a second,
parallel picker implementation.

resultsHeaderHtml (the "Press Enter to see all results" hint) is now
threaded through as a third argument to renderResults, so a picker with
custom rendering can still show it -- previously only the default
per-node branch ever did.

Tags link straight to the existing /admin/nodes/tags/:tag view rather
than becoming an in-place filter chip.
</content>
</entry>
<entry>
<title>Unify the four field-level pickers, fix search visibility</title>
<updated>2026-07-12T11:58:36Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-12T11:58:36Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=19e0ee821d5b2b6d3397a81411f4f3a4cbd2fa83'/>
<id>urn:sha1:19e0ee821d5b2b6d3397a81411f4f3a4cbd2fa83</id>
<content type='text'>
menu_items/parent_search/move_to_search/event_search each duplicated
their own debounce-free AJAX call and result rendering. Replaced with
one shared initSearchPicker, taking each picker's distinctive
behavior (parent_search's live path preview, event_search's title
hint) as a callback rather than a whole reimplementation. Adds a real
debounce with an out-of-order-response guard -- none of the four had
either before. admin_search (the Alt+F top-bar search) now shares the
same function via its own url/isActive/header options, gaining the
same guard and fixing an inconsistency of its own (it previously
always slid its panel open, even on zero results).

Each picker's results container gets its own id instead of sharing
was ever supposed to be on screen at once, an assumption with no
actual enforcement behind it. Styling moved from an id-pair
(#menu_search_results, #search_results) to a shared .search_results
class so a future picker never needs this file touched again.

menu_search and the admin top-bar search now call Node.editor_search
instead of the public, head-only Node.search -- both are admin-only,
authenticated views, and had no reason to inherit the public search's
"can't find a draft" limitation. The always-ignored :per_page =&gt; 1000
on the latter is gone too; Node.search's second argument was never
read by the method at all.

Also removed a stale #metadata a { text-transform: lowercase } rule,
found while verifying the above -- written for the pre-subnav-removal
expand-toggle, which no longer exists; it had been silently
lowercasing nodes#edit's own, unrelated #metadata div (including
move_to_search's results) by id coincidence ever since. #main_navigation
and #overview_toggle intentionally left capitalized rather than
special-cased -- both belong to the nav bar already slated to shrink
to three icons, not worth polishing on the way out.
</content>
</entry>
<entry>
<title>Fix current_user/uniq inconsistencies in admin#index, remove dead query</title>
<updated>2026-07-10T19:57:58Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-10T19:57:58Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=7d6a665b896252537b8b8df2f15e204d04417231'/>
<id>urn:sha1:7d6a665b896252537b8b8df2f15e204d04417231</id>
<content type='text'>
@mynodes used the bare @current_user ivar instead of the current_user
method (works today only because login_required already forces that
memoization; every other query and controller in this app uses the
method), and .uniq, which is plain Enumerable#uniq here, not
Relation#distinct -- it materializes every joined row into an Array
before deduplicating, rather than deduplicating in SQL.

@mypages had the same ivar pattern, no .order/.limit unlike every
sibling query in this action, and -- confirmed via a full grep -- is
referenced nowhere else in the codebase. Removed rather than bounded;
nothing was ever rendering it.
</content>
</entry>
<entry>
<title>Add head/draft/autosave layer comparison at three UI entry points</title>
<updated>2026-07-10T00:03:19Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-10T00:03:19Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=205e6216fc7850fe717122c189e5003d1f9e8afe'/>
<id>urn:sha1:205e6216fc7850fe717122c189e5003d1f9e8afe</id>
<content type='text'>
Node#resolve_page_reference and #available_layer_pairs let
Page#diff_against compare named layers (head/draft/autosave), not
just numbered revisions -- autosave was never part of Node#pages, so
this was the missing piece.

Wired into nodes#show's Status section, nodes#edit right after an
autosave gets resurrected ("What changed?"), and the admin wizard's
current-drafts table, which now also lists autosave-only nodes it
previously never showed.

revisions#diff hides the numbered-revision picker when comparing
named layers (it can't represent them), shows a plain label instead,
and offers buttons to switch between whichever other pairs make
sense for the node's current state. Destroying the topmost layer is
available directly from the diff view, reusing the existing revert!
path.

"Discard changes" is renamed "Discard Autosave" everywhere it
appears, to match "Destroy Draft".
</content>
</entry>
<entry>
<title>Replace awesome_nested_set with a plain parent_id-based NestedTree concern</title>
<updated>2026-07-07T00:46:37Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-07T00:46:37Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=7b6af89509e8439fe2474e623ee97e4db67ab011'/>
<id>urn:sha1:7b6af89509e8439fe2474e623ee97e4db67ab011</id>
<content type='text'>
Root-caused this session: appending a child to any node never widened
that parent's own rgt boundary, on the pinned revision (Gemfile tracked
main directly, chasing a too-conservative gemspec constraint - not, as
first assumed, a deliberate pin to avoid a known bug). Reproduced
cleanly on a single ordinary create with no concurrency and no bulk
operation involved, confirmed via the gem's own SetValidator, then
confirmed as the root cause of nodes_controller_test.rb's 3 long-standing
"pre-existing" failures - not three separate mysteries, one bug.

admin_controller's sitemap needed its own real conversion, not just a
drop-in: awesome_nested_set's lft column implicitly provided correct
depth-first tree order for free, which the old code combined with a
separate class-level each_with_level iterator. Both replaced by one
method, self_and_descendants_ordered_with_level, computing an ordered
[node, level] list in a single query-then-walk pass - checked against
the actual view template first (admin/index.html.erb) rather than
assumed, since it relies on list order alone to render correct visual
nesting.

lft/rgt/depth columns intentionally left in schema, unused - dropping
them is a separate, deliberately deferred migration once this is proven
running for a while, not bundled with the behavior change.
</content>
</entry>
<entry>
<title>Whitespace fixes</title>
<updated>2026-07-05T19:52:56Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-05T19:52:56Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=d95947f9d738fd74d1fc16c6a1843b7f46bc0484'/>
<id>urn:sha1:d95947f9d738fd74d1fc16c6a1843b7f46bc0484</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix admin search results colliding with other search widgets</title>
<updated>2026-07-05T19:49:21Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-07-05T19:49:21Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=1fa2f3821497d5529a6753cee84cf5ca679e8bcc'/>
<id>urn:sha1:1fa2f3821497d5529a6753cee84cf5ca679e8bcc</id>
<content type='text'>
layouts/admin.html.erb's top-bar search results div shared id
"search_results" with nodes#new/nodes#edit's parent-search widget -
since the layout renders on every admin page, whichever widget's JS
ran last silently won the shared ID, putting top-bar results into the
parent-search box on affected pages. Renamed to "menu_search_results"
and updated admin_search.js to match.

Also modernizes admin_search.js's event bindings from keyup/keydown/
keypress/paste/cut + .attr("value") to input + .val() throughout
(menu_items, parent_search, move_to_search) - the multi-event binding
was working around old IE compatibility that .val() + "input" already
handles correctly. parent_search's result rendering now matches
menu_search's convention (real &lt;p&gt;/&lt;a&gt; markup with a .result_path
span) instead of a bare &lt;a&gt; in a throwaway wrapper div, so the same
CSS rule now correctly applies to both.

menu_search's JSON response gains node_path per result, matching what
admin_search's own results already provide - not yet consumed by
parent_search/move_to_search, which still render click-to-select links
rather than navigable ones (correct for their purpose - selecting a
value, not leaving the page).

Known remaining gap, not fixed here: menu_items, parent_search, and
move_to_search still all target the literal id "search_results"
between themselves. No live collision today since none of the three
currently share a page, but it's the same fragility as the bug above -
tracked alongside the existing menu_items/parent_search/move_to_search
consolidation backlog item rather than treated as resolved.
</content>
</entry>
<entry>
<title>Improve admin search overlay layout and behaviour</title>
<updated>2026-06-30T01:44:44Z</updated>
<author>
<name>erdgeist</name>
<email>erdgeist@erdgeist.org</email>
</author>
<published>2026-06-30T01:36:51Z</published>
<link rel='alternate' type='text/html' href='https://erdgeist.org/gitweb/cccms/commit/?id=97f51a73d4a2e7fb42ccf1107abf07e985cfa13a'/>
<id>urn:sha1:97f51a73d4a2e7fb42ccf1107abf07e985cfa13a</id>
<content type='text'>
- Widen overlay (300px -&gt; min(520px, 90vw)), centre instead of
  hardcoded left:400px, so it scales from mobile to desktop
- Split title and unique_name into separate JSON fields and DOM
  elements; two-line result layout (bold title, small grey
  monospace path) instead of "Title (path)" wrapping awkwardly
- Add small margin between title and path line
- Fix event handler stacking: keyup/escape/outside-click handlers
  were being rebound on every display_toggle call. Moved all
  bindings to initialize(), display_toggle() now only shows/hides
- Switch search input from keyup to input event, catching paste
  and cut via mouse which keyup misses
- Add Escape key and outside-click to dismiss the overlay
- Stop clearing search box and results on close; reopening now
  preserves prior search, matching standard search UI behaviour
- Link search results to node_path instead of edit_node_path,
  since opening edit auto-locks the node
- Add "press Enter to see all results" hint in dropdown
- Disable browser autocomplete on search input
</content>
</entry>
</feed>
