Artifacts Associated With Ticket cf8bc23c0b
Ticket change [9b420fdf68] (rid 904) by dmestas on 2026-08-18 20:41:09:
- Untracked field cmimetype: "text/x-markdown"
- comment initialized to:
Worth building, but only as a second view — the corpus says it is right for some trackers and actively wrong for others. ## What the data says Grouping every repository by status, after case-folding: | repo | columns | largest column | |---|---|---| | quarry | 2 | 26 cards | | pikchr | 2 | 1 card | | sqlite | 7 | 806 cards | | tk | 5 | 6,309 cards | Status vocabularies are small — 2 to 7 per repo — so the board is genuinely board-shaped rather than a wall of columns. That was the thing most likely to sink the idea and it does not. What sinks it for the archives is volume. A column holding 6,309 cards is a list with worse ergonomics, and tk and sqlite are the repositories quarry mostly serves. So a board must be OFFERED, never imposed, and must not be the default for a tracker above a few hundred open tickets. ## Fix this first, independently Status is stored unnormalised (`validate:"max=40"`, no case handling), and quarry own repository already holds both `Open`/`open` and `Closed`/`closed` — 4 apparent columns where there are 2. Grouping must case-fold and display the most common casing. It must NOT normalise on WRITE: a fossil ticket schema defines its own status vocabulary and some legitimately use lowercase. This is a display-and-grouping concern, not a data one, exactly like statusClass already is. ## No drag-and-drop in v1 Dragging needs JavaScript and quarry allows one script. A read-only grouped board needs none, and moving a card can be a per-card status select that submits — the same shape the branch selector used, and it works with JavaScript off. Drag is a later, separate argument about the script budget, not something to smuggle in with a view. ## Shape `/r/{repo}/ticket?view=board`, reusing `ticket.list` with a larger limit and grouping in the handler. The list stays the default and the canonical surface; the board is a lens on the same op, so nothing new has to be indexed. - severity initialized to: "Minor"
- status initialized to: "Open"
- title initialized to:
Kanban view for tickets, as a toggle rather than a replacement
- type initialized to: "Feature_Request"
Ticket change [473bc6d0dd] (rid 986) by dmestas on 2026-08-19 01:31:36:
- icomment:
Correcting the "no drag in v1" reasoning recorded when this was filed. It said dragging needs JavaScript beyond the one script quarry allows. That is wrong: **drag needs no new script.** Datastar's `on` plugin ends in `addEventListener(kebab(key))`, so it binds ANY DOM event — `dragstart`, `dragover`, `drop` — and it carries a `prevent` modifier, which is exactly what native drag-and-drop requires on `dragover` to permit a drop. The browser's drag API does the dragging; Datastar only wires the handlers and posts the result. Nothing is vendored. So the script budget is not the reason to defer drag. Two real reasons remain, and they change the DESIGN rather than the schedule: 1. **Native HTML5 drag does not work on touch.** Mobile browsers do not synthesise drag events from touch gestures. A drag-only board is unusable on a phone. 2. **Native drag is not keyboard operable.** This is most of why Morpheus's own sortable is 52 KB of TypeScript: it adds a keyboard drag path and a shadow-DOM live region so screen readers are told what moved. We would not be reimplementing that, so we must not depend on drag as the only way to move a card. ## What that means for the build The per-card status control is NOT a no-JS fallback. It is the primary mechanism, present for everyone, always: - **Base**: each card carries a status `<select>` that submits. Works with scripting off, on touch, and from the keyboard. - **Enhancement**: `draggable="true"` on the card plus `data-on:dragstart`, `data-on:dragover__prevent`, `data-on:drop="@post(...)"`. A mouse user gets dragging; everyone else loses nothing. Treating the select as a fallback to hide once JavaScript loads would reproduce exactly the trap the tooltip work already hit — an affordance that exists only for people with a pointer. ## Order Board first, read-only and grouped, with the select. Drag second, as a genuine enhancement over a board that already works.
- mimetype: "text/x-markdown"
- icomment:
Ticket change [2dfb47f4dc] (rid 987) by dmestas on 2026-08-19 01:50:50:
- icomment:
Correcting my own correction. The previous comment said native drag does not fire from touch, so a drag board would be unusable on a phone. That is true of the native HTML5 drag API and IRRELEVANT to Morpheus, which does not use it. Checked the source rather than assuming this time. `neo-sortable.ts` contains **zero** references to `dragstart`, `dragover`, `dataTransfer` or `draggable`. It is built entirely on Pointer Events — `pointerdown`, `pointermove`, `pointerup`, `pointercancel`, with `setPointerCapture` — which unify mouse, touch and pen. It works on a phone because it never touches the API that does not. That is also most of why it is 52 KB: it implements the drag engine instead of delegating to a browser API that would have been free but mouse-only. ## The actual trade, restated - **Datastar alone** can bind any event, but it wires handlers; it cannot BE a drag engine. Reaching for drag with Datastar alone means the native HTML5 API — which is the mouse-only one. So Datastar-only drag is mouse-only, and the touch objection lands on THAT plan, not on Morpheus. - **Touch-capable drag** needs a pointer-event drag engine: position tracking, a placeholder occupying a flow slot, drop hit-testing, autoscroll, and pointer capture. That is the 52 KB, and writing our own would be rediscovering it. I also overstated the cost earlier as 413 KB. That is the full bundle of all 48 components. `neo-sortable` imports only `command`, `internal-state` and `neo-morph-resilient` (5.9 KB of source between them), and the project builds per-component with esbuild, so a targeted build is a fraction of the bundle. The real figure needs measuring, not quoting. ## What this changes The choice is no longer "drag or no drag". It is: 1. **Native DnD via Datastar** — no new script, mouse only. The status select stays the mechanism for touch and keyboard. 2. **Vendor neo-sortable** — touch and keyboard both work, at the cost of a second script and a dependency on a project at 21 stars and open alpha. Option 1 is still the right first move, because the board is worth having before either kind of dragging and the select is needed regardless. But option 2 is a much better proposition than the previous comment implied, and the deciding question is the dependency, not the capability.
- mimetype: "text/x-markdown"
- icomment:
Ticket change [3277786dbe] (rid 988) by dmestas on 2026-08-19 01:54:49:
- icomment:
Scoping a rewrite rather than a dependency: keep Datastar as the only script, and implement the drag engine ourselves at the size our board actually needs. Sized against Morpheus's `neo-sortable.ts` (1,519 lines) by reading it, not by guessing. ## What the 1,519 lines are spent on morph reconciliation ~214 drag survives a server repaint mid-gesture FLIP animation ~180 neighbours slide rather than jump keyboard drag ~170 pick/move/drop from the keyboard + live region scroll / autoscroll ~127 edge autoscroll and scroll-into-view grid layout ~92 two-dimensional grids placeholder ~50 the gap that follows the pointer ## What a column board needs The pointer engine itself: pointer capture and move tracking, a placeholder occupying a flow slot, hit-testing which column and index the pointer is over, and committing the result. promote 115 pointerdown -> float the card, install listeners dragMoveTo 52 follow the pointer, re-target targetIndexIn 21 which slot is the pointer over finishPointer 36 drop, settle, release capture rebuildPlaceholder 27 applyPointerFloatStyles 23 items/logicalEls/idOf/itemContaining/placeItemAt/gripOf/cancel/release ~77 ---------------------------------------------------------------- CORE 351 lines So roughly 350 lines against their 1,519, before minification. Pointer Events give us mouse, touch and pen from one code path — that is why theirs works on a phone and why native HTML5 drag is not the thing to reach for. ## What we can drop, and why - **Grid (92)**: our board is columns of cards. One dimension. - **FLIP (180)**: pure polish. A CSS transition on the placeholder gets most of the feel for a few lines. - **Keyboard (170)**: the per-card status select is the primary mechanism and is already keyboard- and screen-reader-operable. Their 170 lines exist because their component must stand alone; ours does not. This is the one to revisit if the select is ever removed — it must not be. - **Morph reconciliation (214)**: the largest chunk, and we can delete it by construction. It exists because their sortable expects to live inside a server-morphed region. quarry already has the opposite rule, asserted in a test: no stateful widget inside `#fleet` or `#tl`. Put the board outside the morphed region — the same move that fixed the fleet filter being torn out mid-keystroke — and a repaint cannot land on a drag in progress. ## What we should keep beyond the core Autoscroll (~127 lines, probably less for one axis). Dragging a card to a column that is off-screen on a phone is otherwise impossible, and that is the case this feature exists for. ## Estimate ~350–450 lines of TypeScript, no dependency beyond Datastar, which wires `pointerdown` and posts the result. Drop still commits through the same op the status select uses, so the two mechanisms cannot disagree about what a move means. ## Order unchanged Board first, read-only and grouped, with the select. Then the engine. The select stays visible afterwards — it is the mechanism, not a fallback. - mimetype: "text/x-markdown"
- icomment:
Ticket change [6f087a72ad] (rid 1058) by dmestas on 2026-08-19 11:04:25:
- priority changed to: "Low"
Ticket change [1c8a596844] (rid 1109) by dmestas on 2026-08-19 12:10:39:
- subsystem changed to: "tickets"
Ticket change [faa1b1979d] (rid 1698) by ai-local on 2026-08-22 01:09:06:
- icomment:
Shipped on trunk: ?view=board as a toggle (list stays default), case-folded grouping, boardLimit for large trackers, fold/unfold per column in the URL, fixed-width columns, full-bleed. Moving a card: drag (Datastar only, no new script) for pointers, and a native Move popover of plain forms for keyboard, touch and no-script — which is why the hand-rolled touch drag engine scoped in the last comment is not needed. Each move shows a banner with undo. d60c602c, 110001e1, 6ee9d1a5.
- mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [f8d4134b74] (rid 12463) by zeitgeist on 2026-09-24 00:52:55:
- Untracked field number: "28"