You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lazy-loads SidePanel with React.lazy + Suspense and memoizes the selected task lookup so the panel's JS bundle is deferred until a card is actually clicked.
Why
On boards with 100+ cards, the side panel was mounting on every board load and running tasks.find() on every 2s poll tick, adding ~150-200ms to first paint. Fixes#30
Type
New connector
Bug fix
Feature / enhancement
Documentation
Refactor (no behavior change)
CI / tooling
Checklist
pnpm typecheck passes
pnpm lint passes
pnpm test passes
If this is a connector PR, the contract test harness passes
If this is a UI change, I tested in the live artifact (open-board → drag → AI action)
Defers SidePanel's JS bundle until first card click via React.lazy + Suspense, and moves the inline tasks.find() call into a useMemo so it no longer re-executes on every 2-second poll tick. The core implementation is clean and correct — the named-export lazy pattern is handled properly, the selectedTask memo falls back to selected as expected, and the Suspense fallback preserves the 440px layout width. Two unrelated CHANGELOG mutations (consistent with a dirty rebase) must be reverted before merge.
The mcp__<server>__<tool> pattern in the existing release notes has been changed to mcp**<server>**<tool> — the double-underscores were rendered as Markdown bold, garbling the text. This is unrelated to this PR. Please revert this line to its original state.
Missing blank line after import block [packages/artifact/src/App.tsx] — The blank line after the last import statement was removed when const SidePanel = lazy(...) was inserted. Re-adding it improves readability and avoids a potential import/newline-after-import lint warning.
Sparse Suspense fallback — The fallback <aside> is a blank pulsing shell. Since SidePanel has a visible header / body / footer structure, a minimal inner skeleton (title shimmer + a few body-line shimmers) would avoid what could look like a layout bug on a user's first card click. Low priority.
No test for the lazy-load path — There is no new test exercising the Suspense fallback or the selectedTask memo. Given the 2s poll frequency, a regression here would be silent. Worth a follow-up issue if not added now.
This review was generated automatically. A maintainer will follow up.
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
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.
Pull Request
What
Lazy-loads SidePanel with React.lazy + Suspense and memoizes the selected task lookup so the panel's JS bundle is deferred until a card is actually clicked.
Why
On boards with 100+ cards, the side panel was mounting on every board load and running tasks.find() on every 2s poll tick, adding ~150-200ms to first paint. Fixes #30
Type
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses[Unreleased]feat:,fix:,docs:,chore:,refactor:)Screenshots / demo (UI changes only)
Notes for the reviewer