Skip to content

fix: Kepler injector improvements - #349

Merged
ilyabo merged 6 commits into
mainfrom
fix--KeplerInjector-improvements
Feb 10, 2026
Merged

ilyabo merged 6 commits into
mainfrom
fix--KeplerInjector-improvements

Conversation

@ilyabo

@ilyabo ilyabo commented Feb 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Expanded public API: FileDropInput, KeplerAddTileSetDialog, KeplerS3Browser, KeplerProvider, KeplerPlotContainer, KeplerMapContainer, KeplerSidePanels and related props/types.
    • Added createDefaultKeplerConfig and new injectable factory exports (including CustomAddDataButtonFactory, CustomPanelTitleFactory) and injector controls (getKeplerInjector, resetKeplerInjectorRecipes).
  • Style

    • Refined spacing and hover styling across tree, menu, and table UI elements for improved visual consistency.

Signed-off-by: Ilya Boyandin <[email protected]>
@coderabbitai

coderabbitai Bot commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@ilyabo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Refactors Kepler injector initialization to a multi-step, type-checked provisioning flow; expands kepler package public exports with new factories and components; and applies small UI/styling and data-processing adjustments in schema-tree, duckdb, and ui tree components.

Changes

Cohort / File(s) Summary
Kepler injector implementation & factories
packages/kepler/src/components/KeplerInjector.tsx
Replaces old appInjector wiring with createBaseInjector + provideRecipesToInjectorSafely using typeCheckRecipe and computed customDependencies. Exports CustomAddDataButtonFactory and CustomPanelTitleFactory.
Kepler public API surface
packages/kepler/src/index.ts
Expands exports: adds createDefaultKeplerConfig, multiple UI components (FileDropInput, KeplerAddTileSetDialog, KeplerS3Browser, KeplerProvider, KeplerPlotContainer, KeplerMapContainer, KeplerSidePanels), hooks (useKeplerStateActions), injector controls (getKeplerInjector, resetKeplerInjectorRecipes, getKeplerFactory), and re-exports kepler-config types.
Schema-tree node styling
packages/schema-tree/src/nodes/TableTreeNode.tsx, packages/schema-tree/src/nodes/TreeNodeActionsMenu.tsx
TableTreeNode: conditional cn applied to name span when rowCount>0 and added mr-1 to row-count badge. TreeNodeActionsMenu: imported cn, added EllipsisVerticalIcon, and updated trigger classes (hover/bg/foreground adjustments).
DuckDB slice column handling
packages/duckdb/src/DuckDbSlice.ts
Adds isDuckDbPlaceholderViewColumn helper to skip placeholder columns; uses null-safe columnNames?.length ?? 0 and local columnName/columnType variables in loops to avoid placeholder and null issues.
UI tree rendering tweak
packages/ui/src/components/tree.tsx
Introduces explicit hasChildren boolean; leaf nodes now render wrapped in div.pl-4; branch rendering guards children with optional chaining. Minor import order change.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hop through code with careful paws,
New injectors stitched without a flaw.
Factories planted, exports in bloom,
Small style trims tidy the room.
A little rabbit cheers — hooray, zoom zoom! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: Kepler injector improvements' accurately reflects the main changes in the pull request, which center on refactoring the KeplerInjector with safer initialization and recipe provisioning logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix--KeplerInjector-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@packages/kepler/src/components/KeplerInjector.tsx`:
- Around line 108-110: The loop over provided is using the replacementFactory
value as the key when calling injectorWithRecipes.get(replacementFactory), which
is wrong because provided maps factoryToReplace → replacementFactory; change the
loop to iterate entries and call injectorWithRecipes.get(factoryToReplace) (or
remove the loop entirely if eager resolution is unnecessary). Update the code
that references provided, replacementFactory, factoryToReplace, and
injectorWithRecipes.get accordingly so the original factory key is resolved, not
the replacement implementation.

In `@packages/schema-tree/src/nodes/TreeNodeActionsMenu.tsx`:
- Line 39: In the TreeNodeActionsMenu component update the Tailwind text color
utilities: replace the non-standard classes "fg-muted-foreground" and
"hover:fg-foreground" in the div's className with the correct Tailwind classes
"text-muted-foreground" and "hover:text-foreground" so the element uses defined
color utilities; locate the div inside the TreeNodeActionsMenu component and
update its className string accordingly.
🧹 Nitpick comments (1)
packages/kepler/src/components/KeplerInjector.tsx (1)

51-60: Consider extracting a small cast helper to reduce repeated as unknown as Factory casts.

The as unknown as Factory cast appears 4+ times across this file. A tiny utility would reduce noise:

const asFactory = (f: KeplerFactory): Factory => f as unknown as Factory;

This is purely a readability nit.

Comment thread packages/kepler/src/components/KeplerInjector.tsx Outdated
Comment thread packages/schema-tree/src/nodes/TreeNodeActionsMenu.tsx Outdated
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
Signed-off-by: Ilya Boyandin <[email protected]>
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