feat(web): list toolbar (search-left + filter + actions) + detail inlines rendering#189
Merged
Merged
Conversation
…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>
9667100 to
cc1ad0e
Compare
This was referenced May 26, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Role: Author + Merger (Software Architect, repo-owner full-tier authorization). Two repo-owner UX directives from screenshots, both SPA.
List toolbar (#177 / #182)
N objectscount.q). Always-open filter panel removed; Filter button (count badge) opens the modal.ModelAdmin.actionsvia newclient.runAction()(contract §5.4) → refreshes; confirm prompt whenrequires_confirmation.@dar/uiTable props (selectable/selectedKeys/onToggleRow/onToggleAll). Shown only when the model has runnable actions.Detail inlines (#54 SPA — "inlines seem to be missing")
ModelAdmin.inlines(read half feat(api): surface ModelAdmin.inlines in detail response — read half of #54 #109) but the SPA dropped them. AddedInlineDescriptor/InlineRow/InlineFieldMeta+inlinestoDetailResponse(was absent), and render below fieldsets: tabular → table, stacked → card stack, empty → empty state. Gated oncan_view.Typecheck green (all packages);
vite buildsucceeds; prettier clean. (apps/web eslint flat-config gap is pre-existing.)Tier 4 frontend. Self-merging under explicit authorization.