Skip to content

Fix/recent cloud objects#200

Merged
jasir99 merged 3 commits intodevfrom
fix/recent-cloud-objects
Feb 13, 2026
Merged

Fix/recent cloud objects#200
jasir99 merged 3 commits intodevfrom
fix/recent-cloud-objects

Conversation

@Nuri1977
Copy link
Contributor

@Nuri1977 Nuri1977 commented Feb 13, 2026

Summary by CodeRabbit

  • New Features

    • Track recently accessed cloud explorer directories and files; directory paths are normalized and file previews add entries.
    • Wizard now resets its form state when closed.
  • Bug Fixes

    • Recent items deduplicated, sorted by access time, and capped to 50.
    • Catalog connection errors include additional context in messages.
  • Style

    • Removed extra troubleshooting UI in data lake error display for a cleaner presentation.
  • Chores

    • Reduced debug/runtime logging noise across adapter services.

…s to the top, normalizing directory paths, and adding opened files to recent items.
…d reset logic, enhance catalog connection error messages, and simplify error display in DataLakeTablesView.
@Nuri1977 Nuri1977 requested review from jasir99 and nbesimi February 13, 2026 10:19
@Nuri1977 Nuri1977 self-assigned this Feb 13, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Sorts and de-duplicates recent items and caps them at 50; normalizes directory paths for cloud explorer recent entries; adds a form reset on wizard close; removes several console.log statements across DuckLake adapters and extension manager; and makes one DuckLake error message include the cause text when present.

Changes

Cohort / File(s) Summary
Recent Items Management
src/main/services/connectors.service.ts
Sorts recentItems by accessedAt desc, de-duplicates by id before reinserting, unshifts updated item to front with new accessedAt, and caps list at 50.
DuckLake Adapter & Extension Logging
src/main/services/duckLake/adapters/base.adapter.ts, src/main/services/duckLake/adapters/duckdb.adapter.ts, src/main/services/duckLake/adapters/postgresql.adapter.ts, src/main/services/duckLake/adapters/sqlite.adapter.ts, src/main/services/duckLake/extensionManager.service.ts
Removed multiple console.log statements from cleanup, testConnection, secret creation, and extension discovery paths — no control-flow or error-handling changes.
Cloud Explorer: Recent entries & path normalization
src/renderer/components/cloudExplorer/ExplorerBucketContent.tsx
Normalize directory paths to include trailing slash when creating recent-item id/path; add recent item for file previews; add error logging when connection/path missing.
Data Lake UI: Wizard state reset
src/renderer/components/dataLake/DataLakeTableImportWizard.tsx
Added resetForm() and trigger on dialog exit (TransitionProps.onExited) so wizard state resets when closed.
Data Lake UI: Error UI simplification
src/renderer/components/dataLake/DataLakeTablesView.tsx
Removed isConnectionError computation and the conditional troubleshooting UI block from the error rendering path.
DuckLake Error Message
src/types/duckLakeErrors.ts
catalogConnection now incorporates cause.message into the returned error message when a cause is provided; signature unchanged.

Sequence Diagram(s)

(omitted — changes are not a new multi-component control flow requiring visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Feat/s3 session token #199 — modifies createSecrets in src/main/services/duckLake/adapters/base.adapter.ts; related to secret handling/logging changes.

Suggested reviewers

  • nbesimi
  • jasir99

Poem

🐰 I hop through code with tiny paws,

I tidy logs and mend the flaws,
Recent things now front and bright,
Paths end neatly, errors speak right,
Wizards wake fresh after close — hooray! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix/recent cloud objects' is vague and generic, using unclear terminology that doesn't clearly convey what specific issue was fixed or what changes were made. Consider a more descriptive title that clarifies the specific fix, such as 'Normalize paths and update recent items tracking for cloud explorer' or 'Fix recent items deduplication and path normalization for cloud objects'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into dev

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/recent-cloud-objects

No actionable comments were generated in the recent review. 🎉


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/renderer/components/dataLake/DataLakeTableImportWizard.tsx`:
- Around line 146-160: The Dialog reset currently happens in a useEffect
watching open which runs after open flips to false and causes a mid-animation
render that snaps UI back; fix by deferring state resets until the Dialog fully
closes—either call the same reset sequence (setActiveStep, setSourceType,
setTableName, setSourceUrl, setFilePath, setPartitionColumnsText, setError)
inside handleClose before calling onClose (belt-and-suspenders), or remove that
useEffect and pass a TransitionProps.onExited callback to the Dialog to perform
the resets after the exit animation completes; look for handleClose,
useEffect([open]), and the set* state setters to implement the change.
🧹 Nitpick comments (1)
src/renderer/components/cloudExplorer/ExplorerBucketContent.tsx (1)

263-280: Good path normalization for directory recent items.

Ensuring a trailing slash on directory paths prevents duplicate recent-item entries caused by inconsistent path representations (e.g., foo/bar vs foo/bar/).

Minor note: the else branch (Lines 274-280) logs at console.error level, but path being empty is an expected case (e.g., navigating to the bucket root via the "Home" breadcrumb). Consider downgrading to console.warn or guarding the log to avoid noisy error output during normal navigation.

Suggested tweak
-    } else {
-      // eslint-disable-next-line no-console
-      console.error(
-        'Skipping recent item addition: connection or path missing',
-        { connection, path },
-      );
+    } else if (path) {
+      // Only warn when path is present but connection is missing (unexpected)
+      // eslint-disable-next-line no-console
+      console.warn(
+        'Skipping recent item addition: connection missing',
+        { connection, path },
+      );
     }

@jasir99 jasir99 merged commit a04b19e into dev Feb 13, 2026
3 checks passed
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.

2 participants