Skip to content

Fresh UI: add typed DataGrid multi-select, bulk actions, and per-row action menu #947

Description

@rickylabs

Problem

Applications using @netscript/fresh-ui need a reusable data-grid/list pattern for managing collections. eis-chat now has the same requirement on both Knowledge Base assets and channel sessions, but its local DataGrid only supports a single selected row plus onSelect/href.

Requested API / behavior

  • controlled multi-selection (selectedIds, select row, select all, indeterminate header)
  • accessible keyboard and screen-reader semantics for checkboxes and rows
  • bulk-action toolbar slot with selection count
  • per-row actions slot/menu (for example Rename, Archive, Delete, Reprocess)
  • destructive action styling and disabled/loading states
  • event isolation so checkbox/menu clicks do not trigger row navigation
  • responsive behavior for narrow layouts
  • typed generic row/column API compatible with Fresh/Preact

Concrete consumers

  1. KB documents: bulk Delete/Reprocess, rename, labels, OCR provenance.
  2. Channel sessions: bulk Archive/Delete and per-row Rename/Archive/Delete menu.

Acceptance criteria

A consumer should not need to hand-roll selection state, select-all logic, keyboard behavior, menu event propagation, and bulk-toolbar layout for every grid. Include a reference example and tests for selection + row actions.

Current workaround

eis-chat/apps/dashboard/components/blocks/data-grid.tsx is being extended locally to unblock product work; it should migrate to the shared Fresh UI primitive once available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions