Skip to content

feat(web): list toolbar (search-left + filter + actions) + detail inlines rendering#189

Merged
MartinCastroAlvarez merged 1 commit into
mainfrom
feat/spa-list-toolbar-and-inlines
May 26, 2026
Merged

feat(web): list toolbar (search-left + filter + actions) + detail inlines rendering#189
MartinCastroAlvarez merged 1 commit into
mainfrom
feat/spa-list-toolbar-and-inlines

Conversation

@MartinCastroAlvarez
Copy link
Copy Markdown
Owner

Role: Author + Merger (Software Architect, repo-owner full-tier authorization). Two repo-owner UX directives from screenshots, both SPA.

List toolbar (#177 / #182)

  • Search + filter moved into a dedicated toolbar row below the N objects count.
  • Search left-aligned + debounced (~300ms → URL q). Always-open filter panel removed; Filter button (count badge) opens the modal.
  • Actions dropdown appears only on row selection → runs ModelAdmin.actions via new client.runAction() (contract §5.4) → refreshes; confirm prompt when requires_confirmation.
  • Row checkboxes + select-all via new generic @dar/ui Table props (selectable/selectedKeys/onToggleRow/onToggleAll). Shown only when the model has runnable actions.

Detail inlines (#54 SPA — "inlines seem to be missing")

Typecheck green (all packages); vite build succeeds; prettier clean. (apps/web eslint flat-config gap is pre-existing.)

Tier 4 frontend. Self-merging under explicit authorization.

…ines rendering

Two repo-owner UX directives from screenshots, both SPA-side, plus a
fix for a frontend-build regression already on main.

## List toolbar (#177 / #182)
- Search + filter moved OUT of the header into a dedicated toolbar row
  below the "N objects" count.
- Search is **left-aligned** + **debounced** (~300ms → URL `q`, replace
  history); the always-open filter panel is gone, replaced by a
  "Filter" button (lucide icon + active-count badge) that opens the
  existing modal.
- **Actions dropdown** appears only when ≥1 row is selected; lists
  `ModelAdmin.actions`, runs the chosen one via the new
  `client.runAction()` (POST …/actions/<name>/, contract §5.4), then
  refreshes. Confirmation prompt when `requires_confirmation`.
- **Row-selection checkboxes** + select-all on the generic `@dar/ui`
  Table via new props (`selectable`/`selectedKeys`/`onToggleRow`/
  `onToggleAll`) — props-driven, no business knowledge. Shown only when
  the model has runnable actions.

## Detail inlines (#54 SPA half — "inlines seem to be missing")
- The detail response carried `ModelAdmin.inlines` (read half #109) but
  the SPA dropped them. Added `InlineDescriptor`/`InlineRow`/
  `InlineFieldMeta` + `inlines` on `DetailResponse` (it was absent from
  the frontend contract), and render each inline below the fieldsets:
  tabular → table, stacked → card stack, empty → empty state. Gated on
  `can_view`.

## Drive-by fix: LoginResponse (un-breaks the frontend build on main)
`@dar/data`'s `index.ts` on main re-exports `LoginResponse` from
`@dar/api`, but that type was never defined — `pnpm -r typecheck` fails
on a clean main checkout. Added the missing `LoginResponse` type
(`{ user: RegistryUser }`, matching the #168 login endpoint) so the
frontend compiles. Flagged separately below.

## New api-client method
`ApiClient.runAction(app, model, action, pks, confirmed)` →
`ActionRunResponse` ({executed, action, pks?, redirect?}); re-exported
through `@dar/data`.

Typecheck green across all 7 packages; `vite build` succeeds; prettier
clean. (apps/web eslint flat-config gap is pre-existing, unrelated.)

Tier 4 frontend. Self-merging under the repo-owner's explicit full-tier
authorization for this session.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants