Skip to content

feat(fresh-ui): promote generic templated DataGrid (successor to DataTable) (#209)#225

Merged
rickylabs merged 1 commit into
mainfrom
feat/fresh-ui-datagrid
Jul 1, 2026
Merged

feat(fresh-ui): promote generic templated DataGrid (successor to DataTable) (#209)#225
rickylabs merged 1 commit into
mainfrom
feat/fresh-ui-datagrid

Conversation

@rickylabs

Copy link
Copy Markdown
Owner

Summary

Promotes a generic templated DataGrid<T> into @netscript/fresh-ui as the typed successor to the copy-source DataTable. It supports templated columns, built-in strong and num cell treatments, plain rows, button rows, Fresh client-nav link rows, selected state, and token-only semantic CSS.

The branch was rebased onto origin/main after the Icon primitive merged in #224/#211. The final fresh-ui barrel exports both the merged Icon surface and the new DataGrid surface; DataTable is untouched.

Scope

  • Archetype / area: packages/fresh-ui, frontend public component surface
  • Adds DataGrid<T> plus public column/row/renderable types
  • Adds token CSS under src/presentation/data-grid.css
  • Adds render tests and a consumer-shaped JSX fixture
  • Updates the README with the root-entrypoint DataGrid example

Slices

  • S1 DataGrid public component, docs, tests, and Icon barrel reconcile - cc7747d7

Validation

  • deno check --lock=deno.lock --unstable-kv mod.ts src/presentation/data-grid.tsx tests/data-grid.test.tsx tests/consumer-render.test.tsx - passed
  • deno lint mod.ts src/presentation/data-grid.tsx tests/data-grid.test.tsx tests/consumer-render.test.tsx - passed
  • deno test --lock=deno.lock --unstable-kv tests/data-grid.test.tsx tests/consumer-render.test.tsx tests/primitives.test.tsx - passed, 13 passed | 0 failed
  • deno doc --lint mod.ts - passed
  • deno publish --dry-run --allow-dirty - passed; unrelated deno.lock churn was reverted
  • rtk proxy deno task check - passed
  • rtk proxy deno task fmt:check - passed

Harness

  • Run dir: .llm/tmp/run/feat-fresh-ui-datagrid--209/
  • Phase: implementation slice complete; evidence recorded locally in worklog.md, drift.md, and commits.md

Drift / Debt

Closes #209

@augmentcode

augmentcode Bot commented Jul 1, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Promotes a generic, typed DataGrid<T> into @netscript/fresh-ui as the successor to the copy-source DataTable.

Changes:

  • Added DataGrid<T> with typed column/row contracts, built-in strong/num cell variants, and support for plain, button, and Fresh client-nav link rows.
  • Introduced token-only semantic CSS for ns-data-grid* classes.
  • Exported DataGrid and its public types from the root mod.ts barrel (alongside the merged Icon surface).
  • Added render-focused tests plus a consumer-shaped JSX fixture to validate roles, row variants, templated cells, and column width styling.
  • Updated the package README with a root-entrypoint usage example.

Notes: Keeps DataTable untouched while establishing DataGrid as the new typed component surface.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

{
...props,
role: 'grid',
'aria-label': label,

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...props is spread before 'aria-label': label, so a consumer-supplied aria-label in props will always be overwritten (and may be effectively dropped when label is omitted), which can leave the grid without an accessible name.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

}

const value = (row as Record<string, unknown>)[key];
if (value === null || value === undefined || typeof value === 'boolean') {

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallbackCellContent returns boolean values as-is; in Preact booleans don’t render, so true/false cells will appear empty. If boolean fields are expected, this can silently hide data.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@rickylabs
rickylabs merged commit 41ab053 into main Jul 1, 2026
6 checks passed
@rickylabs
rickylabs deleted the feat/fresh-ui-datagrid branch July 1, 2026 23:30
rickylabs added a commit that referenced this pull request Jul 2, 2026
…eature sweep (#233)

Storefront tutorial D-01…D-05 conformance to the shipped #206#231 surface,
plus accuracy reconciliation on the fresh-ui/web-layer pages the sweep touched.

D-01 (01-scaffold): Aspire dashboard URL is https; fileTree includes
  database/ and tests/.
D-02 (02-catalog-service): real #208 CRUD surface — createCrudContract +
  @database/zod + context.db; errors thrown via the contract's typed
  errors.NOT_FOUND (no hand-rolled notFound import); router nests health
  under products (no invented health-router import).
D-03 (03-cart-contracts): register in mod.ts, PascalCase CartContractV1,
  import from @my-shop/contracts and the ./versions/v1 subpath. Reconciled
  02's products.contract.ts exports to the same PascalCase convention
  (ProductsContract/ProductsContractV1) so ch2↔ch3 imports agree.
D-04 (04/05): public `netscript plugin install saga|trigger --name … --samples`.

Feature recon to the sweep: DataTable→DataGrid (#209/#225), Icon primitive
(#211/#224) and DataGrid in fresh-ui root exports, Dropzone/prompt-input
mentions (#214/#229, #212/#226), managed <Form> class + <form> attrs
(#213/#228), useIslandMutation onMutate/onSettled (#210/#227).

Docs-only. build + check:links + check:caveats green. Refs #153.


Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
rickylabs added a commit that referenced this pull request Jul 3, 2026
…aGrid

data-grid.tsx applies `ns-data-grid*` BEM classes (cn('ns-data-grid', ...))
that are styled exclusively in data-grid.css; the coupling is by class name,
not by import/<link>, so the earlier "zero @import references" check misjudged
it as dead. Deleting it would have silently stripped all styling from the
shipped, publicly-exported DataGrid component (#225). Net PR no longer touches
this file; the other 16 deletions + 4 dead-export removals stand (pure TS,
type-check-verified).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN
rickylabs added a commit that referenced this pull request Jul 3, 2026
…t removals) (#324)

* chore(stale): eliminate Wave-1 dead code (17 deletions + 4 dead-export removals)

Removes verified-dead CLI kernel adapters/ports/constants, queue internals,
sdk transport/metadata ports, the workers v1 contract shim, and an unused
fresh-ui css asset; severs the sdk re-export cascade and removes dead
form-page-props helpers. Zero live referencers; all six affected workspaces
type-check green. Evaluator-verified in a separate session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN

* fix(stale): restore data-grid.css — class-name-coupled to shipped DataGrid

data-grid.tsx applies `ns-data-grid*` BEM classes (cn('ns-data-grid', ...))
that are styled exclusively in data-grid.css; the coupling is by class name,
not by import/<link>, so the earlier "zero @import references" check misjudged
it as dead. Deleting it would have silently stripped all styling from the
shipped, publicly-exported DataGrid component (#225). Net PR no longer touches
this file; the other 16 deletions + 4 dead-export removals stand (pure TS,
type-check-verified).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wKHquACkXnWPDgJYhhFjN

---------

Co-authored-by: Claude Opus 4.8 <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.

fresh-ui: promote a generic templated DataGrid (successor to un-templated DataTable)

1 participant