Skip to content

fix(fresh-ui): key ChartBlock lists + correct Toast setTimeout ref type (#206)#223

Merged
rickylabs merged 1 commit into
mainfrom
fix/fresh-ui-registry-lint-check
Jul 1, 2026
Merged

fix(fresh-ui): key ChartBlock lists + correct Toast setTimeout ref type (#206)#223
rickylabs merged 1 commit into
mainfrom
fix/fresh-ui-registry-lint-check

Conversation

@rickylabs

Copy link
Copy Markdown
Owner

Summary

Fixes two copied-source registry defects in @netscript/fresh-ui: ChartBlock column lists now have JSX keys, and Toast timeout refs use the actual setTimeout handle type under Deno/Node type scopes.

Scope

Slices

  • S1 Fix ChartBlock JSX keys and Toast timeout ref types — 6a0aa156

Validation

  • deno lint packages/fresh-ui/registry/components/ui/chart-block.tsx packages/fresh-ui/registry/islands/Toast.tsx — PASS, Checked 2 files
  • deno check packages/fresh-ui/registry/islands/Toast.tsx — PASS
  • deno fmt --check packages/fresh-ui/registry/components/ui/chart-block.tsx packages/fresh-ui/registry/islands/Toast.tsx — PASS, Checked 2 files

Harness

  • Run dir: .llm/tmp/run/fix-fresh-ui-registry-lint-check--206/
  • Phase: impl

Drift / Debt

  • No architecture debt created.
  • Minor path drift: Toast source is currently packages/fresh-ui/registry/islands/Toast.tsx.

Closes #206

@augmentcode

augmentcode Bot commented Jul 1, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Fixes two registry-source issues in @netscript/fresh-ui: missing JSX keys in ChartBlock list renders and incorrect Toast timeout ref typing under mixed Deno/Node type scopes.
Changes: Adds key props to tick/column/label maps and updates Toast timeout refs to use ReturnType<typeof setTimeout> for the actual handle type.

🤖 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. 1 suggestion posted.

Fix All in Augment

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

<div class='ns-colchart__yaxis'>
{ticks.map((tick) => <span class='ns-colchart__ytick'>{formatTick(tick)}</span>)}
{ticks.map((tick, i) => (
<span key={i} class='ns-colchart__ytick'>{formatTick(tick)}</span>

@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.

key={i} works for satisfying JSX key requirements, but if ticks/data can ever be inserted/reordered/filtered between renders, index keys can cause Preact to reconcile the wrong DOM nodes (e.g., bars/labels “swap” while keeping prior state). Consider using a stable value-based key (e.g., tick, or a stable datum identifier) when available.

Other locations where this applies: packages/fresh-ui/registry/components/ui/chart-block.tsx:76, packages/fresh-ui/registry/components/ui/chart-block.tsx:89

Severity: low

Other Locations
  • packages/fresh-ui/registry/components/ui/chart-block.tsx:76
  • packages/fresh-ui/registry/components/ui/chart-block.tsx:89

Fix This in Augment

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

@rickylabs
rickylabs merged commit 75d79a7 into main Jul 1, 2026
6 checks passed
@rickylabs
rickylabs deleted the fix/fresh-ui-registry-lint-check branch July 1, 2026 22:41
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.

fix(fresh-ui): registry ChartBlock + Toast fail deno lint/check when copied into a Deno app

1 participant