Skip to content

Conversation

@craquet
Copy link
Member

@craquet craquet commented Jan 15, 2026

Summary by CodeRabbit

  • New Features

    • Added About modal with version and links
    • System theme option for theme preferences
    • Tooltip-enhanced navigation for better UX
  • Bug Fixes

    • Fixed theme resolution logic for consistent styling
  • Style

    • Redesigned landing page layout with unified crate listing
    • Added visual polish: borders, rounded corners, scrollbar styling
    • Updated navigation with improved tooltips and spacing
    • Enhanced responsive design for smaller screens
    • Refreshed visual assets and icons
  • Chores

    • Updated dependencies

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Walkthrough

This PR implements a comprehensive UI redesign and refactoring across the application, introducing new modals and visual styling improvements, restructuring the editor landing page with a simplified layout, refactoring navigation components, updating resizable handle styling, and removing deprecated component properties while maintaining functional stability.

Changes

Cohort / File(s) Summary
Editor page layout restructuring
app/editor/page.tsx
Replaces two-panel layout with card-like design; renames createEmptyCrate to createCrate, removes createCrateFromFolder; integrates file import flow; introduces localCrates memo combining recent and stored crates; adds loading indicators; replaces showDocumentationModal with showAboutModal.
Editor workspace pages styling
app/editor/full/entities/page.tsx, app/editor/full/file-explorer/page.tsx, app/editor/full/graph/page.tsx, app/editor/full/json-editor/page.tsx
Adds background, borders, rounded corners, and overflow handling to containers; updates ResizableHandle components with margin classes; adjusts header styling with bottom borders; replaces theme.theme with theme.resolvedTheme for dark mode detection.
Home/showcase page
app/page.tsx
Updates grid layout with minmax sizing; changes image assets from -2.png to -3.png; adjusts responsive behavior and height utilities.
Global styling
app/globals.css
Introduces webkit scrollbar styling with 10px size and rounded appearance across body and base layers.
Action components
components/actions/action-buttons.tsx, components/actions/default-actions.tsx
Removes conditional icon margins, standardizes icon sizing to size-4; adds new About action with Info icon; extends GlobalModalContext to include showAboutModal.
Editor panels & contexts
components/context/context.tsx, components/editor/entity-editor-header.tsx, components/editor/entity-editor-tabs.tsx, components/editor/property-overview.tsx, components/entity-browser/entity-browser.tsx
Adds container styling with backgrounds, borders, rounded corners; updates header bars with bottom borders; replaces LayoutGrid icon with TableOfContents; introduces Tooltip-wrapped UI controls for property overview toggle; adds onExpand/onCollapse handlers to ResizablePanels.
File explorer components
components/file-explorer/explorer.tsx, components/file-explorer/preview.tsx, components/file-explorer/viewers/iframe.tsx, components/file-explorer/viewers/text.tsx
Adds consistent container styling with backgrounds, borders, rounded corners; updates button variants from header to outline; adjusts spacing and layout; replaces theme.theme with theme.resolvedTheme.
Navigation components
components/nav/nav-drawer.tsx, components/nav/nav-header.tsx, components/nav/nav-sidebar.tsx
Introduces two-way sync for validation drawer visibility; adds NavSidebarButton wrapper component; replaces ResizablePanel layout with static grid; adds Tooltip-wrapped navigation items; adds System theme option; migrates controls into compact header.
Landing & crate components
components/landing/crate-entry.tsx, components/landing/create-crate-modal.tsx, components/info/showcase-block.tsx
Removes removeFromRecentCrates and isRecentCrate props from CrateEntry; removes fromFolder prop from CreateCrateModal and updates creation logic; changes grid from fixed two-column to responsive layout.
Modal & provider infrastructure
components/modals/about-modal.tsx, components/providers/global-modals-provider.tsx
Adds new AboutModal component displaying version, copyright, and links; extends GlobalModalContext with showAboutModal handler and state management.
Footer & legal constants
components/footer.tsx, lib/legals.ts
Replaces hardcoded URLs with imported constants (GITHUB_REPO, PRIVACY_POLICY, LEGALS); introduces new lib/legals.ts module with URL exports.
UI component variants
components/ui/button.tsx, components/ui/tabs.tsx, components/ui/menubar.tsx, components/ui/resizable.tsx, components/validation-drawer.tsx, components/pagination.tsx
Updates tab variant styling (active background, height, hover); removes dark mode background from TabsTrigger; adds gap spacing to MenubarItem and MenubarSubTrigger; adds grow spacing in pagination active state; adjusts validation drawer styling.
Theme & utilities
lib/monaco.ts
Changes theme resolution from theme.theme to theme.resolvedTheme for consistent dark mode detection.
Dependencies & tests
package.json, tests/common.ts, tests/create-crate.test.ts, tests/importing.test.ts, tests/landing-page.test.ts, tests/rename.test.ts
Bumps lucide-react, TypeScript types, and webpack; updates test selectors to reflect "Import RO-Crate" and "New RO-Crate" labels; adjusts test flows for new landing page layout.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • ThomasJejkal
🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Next Release' is vague and generic, providing no meaningful information about the specific changes or scope of this substantial pull request. Consider using a more descriptive title that summarizes the main changes, such as 'Redesign editor landing page and add about modal' or 'Major UI refactor: landing page and modal updates'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@craquet craquet marked this pull request as ready for review January 20, 2026 13:01
Copy link
Contributor

@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: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
components/landing/crate-entry.tsx (1)

49-49: Minor typo in console warning.

"Cloud" should be "Could" in the warning message.

Suggested fix
-                console.warn("Cloud not read crate details", crateId, e)
+                console.warn("Could not read crate details", crateId, e)
🤖 Fix all issues with AI agents
In `@app/editor/page.tsx`:
- Around line 312-316: Update the onClick handler that calls window.open in
page.tsx to guard against reverse tabnabbing: pass a third argument with
"noopener,noreferrer" to window.open (i.e., window.open(url, "_blank",
"noopener,noreferrer")) or capture the returned window and set its opener to
null (const w = window.open(...); if (w) w.opener = null); change the inline
onClick using window.open(...) accordingly in the component so external links
open safely.

In `@app/globals.css`:
- Around line 248-250: The ::-webkit-scrollbar-thumb rule in globals.css only
sets border-radius and needs an explicit background color to ensure the thumb is
visible and matches your design; update the ::-webkit-scrollbar-thumb selector
to include a background (and optionally a background-color for hover/active
states via ::-webkit-scrollbar-thumb:hover or ::-webkit-scrollbar-thumb:active)
using the project’s standard scrollbar color variables or a specific hex/RGB
value so webkit browsers render a visible, styled thumb.

In `@components/modals/about-modal.tsx`:
- Around line 38-56: The external Link elements (the Link wrapping "Christopher
Raquet" and the Links using GITHUB_REPO, PRIVACY_POLICY, and LEGALS) currently
use target="_blank" without a rel attribute; update each Link component to
include rel="noopener noreferrer" to prevent reverse-tabnabbing (i.e., add
rel="noopener noreferrer" to the Link for Christopher Raquet and the Link
components referencing GITHUB_REPO, PRIVACY_POLICY, and LEGALS).
🧹 Nitpick comments (9)
components/file-explorer/viewers/iframe.tsx (1)

6-9: Consider revoking the blob URL to prevent memory leaks.

URL.createObjectURL allocates memory that isn't automatically released. When props.data changes or the component unmounts, the previous blob URL should be revoked. Consider using useEffect for cleanup:

♻️ Suggested improvement
-    const url = useMemo(() => {
-        if (!props.data) return ""
-        return URL.createObjectURL(props.data)
-    }, [props.data])
+    const url = useMemo(() => {
+        if (!props.data) return ""
+        return URL.createObjectURL(props.data)
+    }, [props.data])
+
+    useEffect(() => {
+        return () => {
+            if (url) URL.revokeObjectURL(url)
+        }
+    }, [url])
components/actions/action-buttons.tsx (2)

76-80: Potential className override when props are spread.

The hardcoded className="gap-2" will be overwritten if a consumer passes their own className prop, since {...cleanProps(props)} is spread after. Consider merging classNames using a utility like cn().

♻️ Suggested fix
+import { cn } from "@/lib/utils"
+
 export const ActionDropdownMenuItem = memo(function ActionDropdownMenuItem(
     props: ComponentProps<typeof DropdownMenuItem> & GenericActionContentProps
 ) {
     const action = useAction(props.actionId)
 
     return (
-        <DropdownMenuItem className="gap-2" onClick={() => action.execute()} {...cleanProps(props)}>
+        <DropdownMenuItem className={cn("gap-2", props.className)} onClick={() => action.execute()} {...cleanProps(props)}>
             <GenericActionContent {...props} />
         </DropdownMenuItem>
     )
 })

88-92: Same className override issue applies here.

Same concern as ActionDropdownMenuItem above. Additionally, note that ActionCommandItem (line 101) doesn't have the gap-2 class added—verify if this inconsistency is intentional.

components/entity-browser/entity-browser.tsx (1)

35-37: Redundant state selector.

setShowPropertyOverview is retrieved separately here but is also accessible via the state object (line 32) that's already being used on line 101 as state.setShowPropertyOverview. Consider removing this redundant selector.

♻️ Suggested fix
-    const setShowPropertyOverview = useEntityBrowserSettings(
-        (store) => store.setShowPropertyOverview
-    )

Then update line 222 to use state.setShowPropertyOverview:

-                onExpand={() => setShowPropertyOverview(true)}
-                onCollapse={() => setShowPropertyOverview(false)}
+                onExpand={() => state.setShowPropertyOverview(true)}
+                onCollapse={() => state.setShowPropertyOverview(false)}
components/nav/nav-sidebar.tsx (2)

60-67: Remove redundant title attribute.

The title={name} attribute on the Link creates a native browser tooltip that may conflict with or duplicate the custom Tooltip component, causing a poor UX with two overlapping tooltips.

♻️ Suggested fix
-                <Link href={href} title={name}>
+                <Link href={href}>

114-123: External link should open in new tab.

The feedback link to GitHub issues is an external URL. Consider adding target="_blank" and rel="noopener noreferrer" for better UX (keeps the editor open) and security.

♻️ Suggested fix
-                            <Link href={"https://github.com/kit-data-manager/NovaCrate/issues"}>
+                            <Link
+                                href={"https://github.com/kit-data-manager/NovaCrate/issues"}
+                                target="_blank"
+                                rel="noopener noreferrer"
+                            >
components/modals/about-modal.tsx (2)

3-23: Avoid next/dist/... private API for basePath handling.

next/dist/client/add-base-path is an internal API and may break on upgrades. If basePath handling is needed, prefer a public approach (or rely on next/image basePath behavior) and keep it consistent across the app.

♻️ Possible simplification (verify basePath behavior first)
-import { addBasePath } from "next/dist/client/add-base-path"
@@
-                    src={addBasePath("/novacrate-nobg.svg")}
+                    src="/novacrate-nobg.svg"

5-31: Consider avoiding full package.json in the client bundle.

Importing package.json in a client component can pull the entire file into the JS payload. A small build-time constant (e.g., an env var or a dedicated version export) keeps the bundle lean.

app/editor/page.tsx (1)

230-235: Align logo asset path handling with the chosen basePath strategy.

This uses a raw /novacrate-nobg.svg path while the About modal prefixes basePath. If you deploy with basePath, pick a single, public approach and reuse it to avoid broken assets.

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