Repository navigation
Conversation
resource-kit renders list, detail and form screens for an app's own tables from a resource definition and a host-supplied source, with relation pickers, many-to-many links and delete. auth-pages are the account panels with injected handlers, and dashboard-tiles are count and recent-record tiles over resource-kit sources. All three are framework- and backend-agnostic: routing and data come in through adapters.
…from the registry alone
|
Review complete. 🟡 2 medium 💬 Inline comments (2)
🧹 Nitpicks (3) — 🟢 3 low
The PR introduces three new application blocks in
Reviewed commit: 734b33b |
There was a problem hiding this comment.
Adds three new @constructive registry application blocks — Resource Kit, Auth Pages, and Dashboard Tiles — plus docs-site pages, smoke-install consumers, and Storybook stories and tests.
Key findings
- 🟡
@tanstack/react-querymissing from runtime dependency declarations — package.json:852 - 🟡 Folded-column summary omits columns 4 and beyond — data-table.tsx:162
| "@storybook/addon-a11y": "^10.1.11", | ||
| "@storybook/react-vite": "^10.1.11", | ||
| "@tailwindcss/postcss": "^4.1.18", | ||
| "@tanstack/react-query": "^5.90.16", |
There was a problem hiding this comment.
🟡 bug · medium
@tanstack/react-query missing from runtime dependency declarations
@tanstack/react-query is declared only in devDependencies (packages/ui/package.json:852), yet the new Resource Kit and dashboard-tiles code imports it at runtime (e.g. packages/ui/src/components/resource-kit/queries.ts and context.tsx). Consumers installing @constructive-io/ui from npm get no dependency or peer declaration for it, so module resolution fails unless they happen to install it themselves. Sibling runtime libraries like lucide-react and react are declared as peerDependencies, so react-query is the odd one out.
📋 Prompt for AI Agents
In packages/ui/package.json, add "@tanstack/react-query": "^5.90.16" (or a suitable range) to the peerDependencies block (around line 811) alongside lucide-react and react, keeping the existing devDependencies entry at line 852 for the workspace build. The new resource-kit and dashboard-tiles components import @tanstack/react-query at runtime, so npm consumers currently receive no dependency declaration for it and module resolution fails unless they install it themselves.
| const folded = fields | ||
| .slice(2, 4) | ||
| .map((field) => summary(field, row)) | ||
| .filter((text): text is string => Boolean(text)); |
There was a problem hiding this comment.
🟡 bug · medium
Folded-column summary omits columns 4 and beyond
The summary line under the first cell is built only from fields.slice(2, 4) (packages/ui/src/components/resource-kit/data-table.tsx:163), but foldClass also hides columns 4-5 below @4xl/table and columns 6+ below @6xl/table — at the narrow widths where the summary renders, all columns from index 4 onward are hidden too. The doc comment says "Folded values are summarised under the first cell", yet those columns' values are completely unreachable on a narrow pane.
📋 Prompt for AI Agents
In packages/ui/src/components/resource-kit/data-table.tsx around lines 162-165, change fields.slice(2, 4) to fields.slice(2) so the folded summary under the first cell includes every column that foldClass (lines 46-49) hides at narrow container widths — columns 4-5 are hidden until @4xl/table and columns 6+ until @6xl/table, yet currently get no summary. Keep the existing .map(summary).filter(Boolean) chain.
The Pages artifact check rejects root-relative links outside /blocks. The auth and resource previews route by component state, so their links now render as #/<path> and the auth brand drops its href.
- resource-kit: useRecordDialogs owns the create, edit and delete dialogs that the list, related lists and record view each wired by hand; LoadFailure, queryFailure and NUMERIC_FORMATS replace repeated copies; MemoryRoute keeps id decoding next to useMemoryRouter's encoding; labels read related rows through one deduped detail cache. - auth-pages: AuthCard hands the link component down, useAuthForm owns the values, and passwordRule gives sign-up and reset one minimum-length rule. - Stories and the blocks previews route through useMemoryRouter and MemoryRoute instead of their own copies. Before/after screenshots of the three previews (light and dark, 1280 and 390 wide) match pixel for pixel.
ViewFrame's section had no min-h-0, so as a flex-1 child of a column (the wrapper resource-kit screens render) it grew to its content instead of letting its body scroll. Inside WorkspaceShell's overflow-hidden frame a long list or record view was cut off, with its pagination and lower related lists out of reach. Views that sit directly in the shell's row layout look the same, checked against the billing and data-rooms previews.
Three registry items for the apps Constructive Desktop generates, so a generated Next.js app installs its screens from
@constructiveinstead of carrying a copy of blocks.What's added
resource-kit: list, detail and form screens generated from resource definitions.createMemorySource,useMemoryRouter,MemoryRoute) for demos, stories and tests.auth-pages: sign-in, sign-up, check-email, verify and reset panels, with the submit handlers passed in.dashboard-tiles: count and recent-record tiles overresource-kitsources.next/*or a GraphQL client. They're built from blocks' existing parts (workspace-kitpanels and table surface,constructive-themetokens,form-kitcontrols), with no new look.docsfield says how to wire the item, so a coding agent can install and connect it without reading the source.apps/blocks/src/lib/app-kit/)packages/ui/test/resource-kit.test.tsx,auth-pages.test.tsx)smoke-installstep that installs the three items into a scratch app from the built registryToneBadgefix: the corners no longer show the tone's background past the border.ViewFramefix: a view inside a column layout, as the resource-kit screens are, now scrolls its body. Before, it grew past the window andWorkspaceShellcut off long lists and record views. Views placed directly in the shell look the same.After merge
Deploy Pages. The composed app template in constructive-io/sandbox-templates installs these items from
https://constructive-io.github.io/blocks/r/{name}.json, and its CI pins734b33bfrom this branch until the merged SHA replaces it.Screenshots
To add (
ghcan't upload images):resource-kitlist, sheet and record view in light and dark; the auth panels; the tiles; and theToneBadgecorners before and after.🤖 Generated with Claude Code
https://claude.ai/code/session_01TzSs1SgpRVHH81mRAK3ecK