Skip to content

[Request]: Richer data-bound CRUD screens: per-field labels, columns, filtering and sorting #330

Closed

Description

@jimhoyd

Follow-up to #262 (first slice shipped in #328).

crudScreen renders every declared field with a derived label. Add per-field labels and column selection in the ui config, then filtering and sorting once the store supports them (the store defers filtering and sorting, see docs/STORE.md). Keep output escaped and the page strict-CSP compatible.

Activity

  1. added
    enhancement
    ai-first
    extension
    in-progress
    on Sep 20, 2026
  2. jimhoyd commented on Sep 20, 2026

    @jimhoyd
    CollaboratorAuthor

    Progress: an agent has started on this; a PR will be linked here when it opens.

  3. jimhoyd commented on Sep 20, 2026

    @jimhoyd
    CollaboratorAuthor

    Recommendation for the next slice: keep labels, column choice, copy and layout in UI screen configuration, separate from the store field schema. The in-flight labels/columns work follows that boundary well.\n\nWhen filtering and sorting are added, make them declared and allowlisted per collection or screen: named equality filters and named sortable fields, not an arbitrary query expression. Define one deterministic sort with id as a tie-breaker and move from numeric offset cursors to an opaque cursor tied to that ordering. Otherwise inserts and concurrent writes will create duplicate or skipped rows. This preserves an easy AI authoring surface without silently turning the store into a query engine.

  4. removed
    in-progress
    on Sep 20, 2026
  5. jimhoyd commented on Sep 20, 2026

    @jimhoyd
    CollaboratorAuthor

    Shipped in #335: per-field labels and column selection/order for the CRUD screen (screens..columns or the crudScreen option), validated at activation, byte-identical output when unset. Filtering and sorting are not built: they need store support, and a bounded design (declared sortable/filterable fields, single-field sort, equality filters) is recorded in docs/OPEN-DECISIONS.md. Keeping this open for that. Note the ui package is now within about 2 KB of its unpacked-size budget.

  6. added
    important
    in-progress
    on Sep 20, 2026
  7. jimhoyd commented on Sep 20, 2026

    @jimhoyd
    CollaboratorAuthor

    Progress: an agent has started on this; a PR will be linked here when it opens.

  8. jimhoyd commented on Sep 21, 2026

    @jimhoyd
    CollaboratorAuthor

    Progress: PR #357 opened: collections declare sortable/filterable fields; single-field sort, up to three equality filters, stable id tie-break, sorted-page cursors that cannot repeat or skip records; undeclared names return 400. The screen half did not fit the ui size budget and is recorded on the decisions list.

  9. removed
    in-progress
    on Sep 21, 2026
  10. jimhoyd commented on Sep 21, 2026

    @jimhoyd
    CollaboratorAuthor

    Store half merged in #357: collections declare sortable and filterable fields (checked at activation); list requests take one sort= or sort=- and up to three equality filters with a stable id tie-break; sorted pages use an opaque cursor so inserts and deletes between pages cannot repeat or skip a record; undeclared, repeated or malformed names return 400 invalid_query naming only the key. Behavior change: unknown query parameters on a store list request now return 400 instead of being ignored. Sort and filter apply to the whole collection (no per-record ownership, #331). Keeping this open: the screen half would push the ui package about 2.2 KB over its unpacked-size budget, so it was reverted and recorded; it needs a decision (raise the budget, trim other ui bytes, or leave the screen unfiltered).

  11. added
    in-progress
    on Sep 21, 2026
  12. jimhoyd commented on Sep 21, 2026

    @jimhoyd
    CollaboratorAuthor

    Progress: an agent has started on this; a PR (or a recommendation comment) will be linked here.

  13. removed
    in-progress
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstenhancementextensionimportant

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions