Data UI Backlog

Reject :sortable t on :target fields

:sortable t on a :target (FK) field compiles today, then 500s at click time. compile-field-stage-2 rewrites the field's :source :column-name to the joined table's display column (e.g. users.user_name), but base Phase A SQL has no join, so Postgres raises 42P01 "missing FROM-clause entry". Observed live on Model Bank :models :user (Owner header). The existing guard passes it because compile-field force-sets :column t on any :target field.

Fix: compile-time reject, uniformly (base types and rollups — the memorable rule is ":target is never sortable"). compile-field already binds has-target beside the :searchable check that rejects FK fields; add the same shape inside the :sortable when, report-e matching its neighbors. Also drop :sortable t from :models :user in models/modelbank.lisp (the only current instance), update the :sortable row in docs/model-reference.md, and add a (signals error) compile test to tests/sortable-tests.lisp (test-suite edit permission granted <span class="timestamp-wrapper"><span class="timestamp">[2026-10-19 Mon]</span></span>; see the plan header).

Plan: target-non-sortable-plan.org. Superseded by "Sort by :target field display column" below when that lands.

Implemented per the plan:

Slot
2600
Status
60 Done
Tags
compiler, bug
Contributors
Donnie