Skip to content

fix(devtools): stable PendingLane key + real TypeScript typecheck in CI - #21

Merged
monkeycode-global[bot] merged 1 commit into
mainfrom
fix/pending-lane-key-typecheck
Aug 8, 2026
Merged

monkeycode-global[bot] merged 1 commit into
mainfrom
fix/pending-lane-key-typecheck

Conversation

@monkeycode-global

Copy link
Copy Markdown
Contributor

Summary

Two focused fixes:

1. PendingLane renders with an undefined key

PendingLane in LoopDiagram.tsx used key={item.key}, but QueueItem only has { id, label } — there is no key field. Every item rendered with key={undefined}, breaking React reconciliation (and the enter/exit animation) for the Web APIs lane and triggering a React key warning.

Fixed by building a stable key p${item.id} locally in the render, the same pattern Workbench.tsx already uses for the identical data. No change to the QueueItem type.

2. Close the TypeScript CI gap

vite build only strips types, so real type errors could land on main undetected.

  • Added "typecheck": "tsc --noEmit" to package.json.
  • Added a Typecheck step to .github/workflows/ci.yml (between lint and build).
  • Fixed every error tsc --noEmit reports so the check passes cleanly:
    • Index-signature access via . for dataset.* and the search Record (noPropertyAccessFromIndexSignature) — AppShell.tsx, Timeline.tsx, routes/index.tsx.
    • Optional props that receive explicit undefined (exactOptionalPropertyTypes) — PatternLibrary.tsx, SourcesView.tsx, and the validateSearch return type.
    • 404 Link to / missing the now-required search={{ tab: "timeline" }} param.

Verification

  • bun run typecheck — passes
  • bun test — 31 pass, 0 fail
  • bun run lint — 0 errors (only pre-existing warnings)
  • bun run build — succeeds

PendingLane rendered every item with key={undefined} because QueueItem has
no key field, breaking React reconciliation for the Web APIs lane. Build a
stable key from the item id (p<id>) matching the pattern already used in
Workbench for the same data.

Also close the TypeScript CI gap:
- add "typecheck": "tsc --noEmit" to package.json
- run it in CI between lint and build
- fix all pre-existing tsc errors so the typecheck passes cleanly:
  - dataset/search index-signature access (noPropertyAccessFromIndexSignature)
  - optional props that receive explicit undefined (exactOptionalPropertyTypes)
  - 404 Link missing required search param
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
@monkeycode-global
monkeycode-global Bot merged commit 65cd994 into main Aug 8, 2026
1 check passed
@monkeycode-global
monkeycode-global Bot deleted the fix/pending-lane-key-typecheck branch August 8, 2026 14:57
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.

1 participant