Adom Wiki
Public Made by Adomby adom
How the Adom Wiki (wiki.adom.inc) works and how to drive it with the adom-wiki CLI: the two storage layers (git page repo vs package registry), hosting source by pushing files (not a tarball), making packages, cutting per-platform releases, and the three-tier skill layout (user skills ship, dev-skills/ and publish-skills/ stay source-only). adom-wiki is the current tool; adompkg is deprecated. Read this first before publishing or installing.
Closed issues should sort by close date, not creation date
The closed-issues list sorts by creation date, so a long-running issue that was just resolved sinks to the bottom while a stale issue opened yesterday and closed immediately sits at the top. When you are looking at closed issues you almost always want "what got finished recently", and that is the one ordering the list cannot give you.
Current behaviour, server.js around the issues-tab query:
SELECT * FROM discussions
WHERE page_id = ? AND status = ? AND deleted_at IS NULL
ORDER BY is_pinned DESC, created_at DESC
The same ORDER BY serves both tabs. For open issues, created_at DESC is right. For closed issues it answers the wrong question.
Ask
When the closed tab is showing, order by closed_at DESC.
The column already exists and is already populated: the triage route sets closed_at, closed_by_id and closed_by_name on close, and nulls all three on reopen. So this is an ordering change, not a schema change.
Details worth getting right
- Reopen then re-close must move it back to the top. Since reopening nulls
closed_atand re-closing sets it fresh, ordering byclosed_atgets this for free, whereas ordering byupdated_atwould also be moved by an unrelated edit or a new comment. - Rows closed before
closed_atexisted will be NULL. They should sort last rather than first; SQLite sorts NULL lowest, soORDER BY closed_at DESCalready puts them at the bottom, but it is worth confirming against real data rather than assuming, and worth deciding whether they should instead fall back tocreated_at. - Pinning still wins. Keep
is_pinned DESCas the first key. - The same reasoning applies to pull requests if their list has the same shape, and probably to the per-user "My issues" view.
Not just the wiki page
adom-wiki issue list --status closed should agree with whatever the page does, or the CLI and the web UI will disagree about what "most recent" means.