Skip to content

Router Refactor Part One - #722

Merged
saddlepaddle merged 11 commits into
mainfrom
router-refactor
Jan 13, 2026
Merged

saddlepaddle merged 11 commits into
mainfrom
router-refactor

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jan 12, 2026 •

Copy link
Copy Markdown
Collaborator

Switching the router to tanstack router. There was enough of a need for a router for us to dig into implementing this. Cleans up a lot of the custom router logic we had in zustand + a lot of the custom layout management we had in the main/index.tsx in the renderer.

The goal is for the router to feel as nextjs-y as possible, and for the structure of the renderer to match our repo guidelines.

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • Documentation

    • Added a detailed routing analysis and a comprehensive migration plan outlining benefits, trade‑offs, steps, testing, and risks.
  • New Features

    • File‑based routing with new pages: workspace, workspaces, tasks, settings (account, appearance, behavior, keyboard, presets, workspace), sign‑in, and 404.
    • Router boot via hash history and authenticated layout with route guards and default redirects.
  • Refactor

    • Routing migrated to support automatic code‑splitting, deeper linking and clearer route/component co‑location.
  • UX

    • Auth initialization tracking and full‑screen loading UI until auth is ready.

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

@coderabbitai

coderabbitai Bot commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Migrates the desktop renderer to TanStack Router with file-based routes, moves provider composition into route layouts, replaces the electron-router module with a window-loader, adds a Vite plugin for generated route tree, and introduces many file-based authenticated routes and settings pages.

Changes

Cohort / File(s) Summary
Docs: routing plan & analysis
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md, apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md
Add migration plan and analysis describing wins/losses, file-based routing conventions, phased steps, risks, and effort estimates.
Build / Vite / deps
apps/desktop/electron.vite.config.ts, apps/desktop/tsr.config.json, apps/desktop/package.json, apps/desktop/.gitignore
Add TanStack Router Vite plugin, tsr config, add/remove router deps, new npm scripts, and ignore generated routeTree.gen.ts.
Renderer entry & router wiring
apps/desktop/src/renderer/index.tsx, apps/desktop/src/renderer/routes.tsx (deleted), apps/desktop/src/renderer/routeTree.gen.ts (generated)
Replace previous AppProviders/AppRoutes render with TanStack RouterProvider wired to generated route tree; remove old routes and error UI.
Root layout & global providers
apps/desktop/src/renderer/routes/layout.tsx, apps/desktop/src/renderer/routes/__root.tsx, apps/desktop/src/renderer/routes/page.tsx, apps/desktop/src/renderer/routes/not-found.tsx
Add RootLayout composing global providers and ThemedToaster; add root route, root redirect to workspace, and NotFound page.
Authenticated group & file routes
apps/desktop/src/renderer/routes/_authenticated/layout.tsx, apps/desktop/src/renderer/routes/_authenticated/* (settings/*, tasks/page.tsx, workspace/page.tsx, workspaces/page.tsx, etc.)
Add authenticated layout that enforces sign-in and wraps DnD/Collections/Organizations providers; create many co-located file-based routes for settings, tasks, workspace, etc.
Providers: auth init & AppProviders removal
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx, apps/desktop/src/renderer/contexts/AppProviders/* (deleted), apps/desktop/src/renderer/contexts/AppProviders/index.ts
AuthProvider adds isInitialized and shows loading until auth resolves; legacy AppProviders module and its re-export removed in favor of route/layout-based providers.
Electron window loader & types
apps/desktop/src/lib/electron-router-dom.ts (deleted), apps/desktop/src/lib/window-loader.ts, apps/desktop/src/lib/electron-app/factories/windows/create.ts, apps/desktop/src/shared/types/electron.ts
Remove electron-router integration; add window-loader.registerRoute that loads dev server URL or packaged file with hash; update imports and types.
Import & hook relocations
various files under apps/desktop/src/renderer/screens/*, apps/desktop/src/renderer/routes/_authenticated/providers/*
Update many import paths to reflect co-location of providers/hooks with route folders (e.g., renderer/providers/*, renderer/routes/_authenticated/providers/*).
MainScreen / UI tweaks
apps/desktop/src/renderer/screens/main/index.tsx
Remove local DnDProvider wrappers and sign-in gating; always query active workspaces and simplify render branches.

Sequence Diagram(s)

sequenceDiagram
    participant Electron as Electron Main
    participant ViteGen as Vite Plugin (route tree)
    participant Renderer as Renderer App
    participant Router as TanStack Router
    participant Root as RootLayout (providers)
    participant Auth as AuthProvider
    participant AuthLayout as _authenticated/layout
    participant Page as Page Component

    Electron->>Renderer: registerRoute / load window URL
    ViteGen->>Renderer: generate routeTree.gen.ts (dev/build)
    Renderer->>Router: createRouter({ routeTree, history })
    Router->>Root: render root route
    Root->>Auth: initialize auth (isInitialized)
    Auth-->>Router: redirect to /sign-in if unauthenticated
    Router->>AuthLayout: render authenticated group when signed in
    AuthLayout->>Page: provide DnD/Collections/Organizations and render Outlet
    Page->>Renderer: display page UI
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰
I hopped through routes and moved the hay,
TanStack paths now clear the way.
Providers nested, cookies set,
Hashes hum — a tidy net.
A carrot-cheer for routing day! 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.76% 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 'Router Refactor Part One' is generic and doesn't clearly convey the specific change (migrating to TanStack Router). Consider a more descriptive title like 'Migrate to TanStack Router with file-based routing' to better communicate the primary change.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description provides clear context about switching to TanStack Router, mentions removal of custom router/layout logic, and describes the Next.js-inspired goals.

✏️ 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.

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

🤖 Fix all issues with AI agents
In @apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md:
- Around line 287-306: The effort estimate in the ROUTING_REFACTOR_ANALYSIS.md
(the "Estimated effort: 8-13 hours" line) is likely too optimistic; update this
line and associated text to either increase the estimate or state that the
migration will be performed in phased PRs, and add a concise justification
summarizing the larger scope/risk (e.g., testing, provider scoping fixes,
code-splitting validation). Specifically, edit the "Estimated effort: 8-13
hours" phrase and add a short note referencing ROUTING_REFACTOR_PLAN.md to
indicate phased migration or a revised higher-hours range, so reviewers know the
plan and risk mitigation (break into multiple PRs, incremental testing) without
changing any technical recommendations.

In @apps/desktop/docs/ROUTING_REFACTOR_PLAN.md:
- Around line 701-717: The TanStackRouterVite plugin configuration is missing
the required target option; update the TanStackRouterVite(...) call to include
target: "react" alongside the existing options (routesDirectory,
generatedRouteTree, indexToken, routeToken, autoCodeSplitting) so the plugin
knows the framework target.
🧹 Nitpick comments (2)
apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md (2)

13-19: CollectionsProvider blocking issue is clearly identified.

The problem is well-articulated with specific line references. However, documentation that references specific line numbers can become stale quickly. Consider referencing by file and symbol names instead.

📝 Suggested improvement
-**Current mess:** `CollectionsProvider.tsx:29-34` requires `token` and `activeOrgId` to render children, showing a loading spinner when missing. It's rendered in `MainScreen` (line 394-428) which wraps everything including sign-in.
+**Current mess:** `CollectionsProvider.tsx` requires `token` and `activeOrgId` to render children (see early return in component body), showing a loading spinner when missing. It's rendered in `MainScreen` which wraps everything including sign-in.

131-148: DndProvider scoping win could be stronger.

The document shows DndProvider wrapping sign-in unnecessarily, but the proposed solution still wraps all authenticated routes including settings and tasks. Consider whether DnD is truly needed outside of the workspace route.

If drag-and-drop is only used in workspace, consider moving DndProvider to routes/_authenticated/workspace/$id/page.tsx instead of the authenticated layout. This would further reduce provider overhead for settings and tasks routes.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb84ff8 and 4e2d06d.

📒 Files selected for processing (2)
  • apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
🧰 Additional context used
🪛 LanguageTool
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md

[style] ~203-~203: In American English, abbreviations like “etc.” require a period.
Context: ...ar, WorkspaceSidebar, WorkspaceContent, etc** → `routes/_authenticated/workspace/$i...

(ETC_PERIOD)

🪛 markdownlint-cli2 (0.18.1)
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md

34-34: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


238-238: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


462-462: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


762-762: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


830-830: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


838-838: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (12)
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md (6)

610-622: Important caveat about store lifecycle is well-documented.

Excellent clarification that moving stores to route folders is "purely for co-location" and doesn't change their global singleton behavior. This prevents confusion about store scoping vs. file location.


630-654: Critical migration items are well-identified.

The two critical items (agent hook listener navigation and workspace hotkeys) are clearly documented with concrete code examples. The migration path is clear and actionable.


828-833: Add routeTree.gen.ts to .gitignore before starting migration.

Good catch to include this in the plan. This should be done in Phase 0 before any code generation begins.


500-527: Workspace routing behavior is well-designed.

The two-route pattern (/workspace selector + /workspace/:id specific workspace) with auto-navigation is intuitive. Browser back/forward support is a significant UX improvement.


353-374: Authentication guard implementation looks correct.

The AuthenticatedLayout properly uses <Navigate> for unauthenticated users and <Outlet> for authenticated routes. Provider hierarchy is clear and well-organized.


297-299: Hash routing is compatible with Electron file:// protocol when properly initialized.

TanStack Router's createHashHistory() works correctly with Electron's file:// protocol. Ensure the app loads with a hash root in the initial URL (e.g., file:///.../index.html#/). If the app loads without the hash suffix, history.push() may inadvertently rewrite the file:// path. If initialization issues arise, createMemoryHistory() is a robust alternative for Electron environments.

apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md (6)

22-28: Strong win: Deleting custom routing state.

Eliminating 80 lines of reimplemented routing logic is a significant improvement. This aligns with the DRY principle and reduces maintenance burden.


49-62: Code splitting win is significant.

Automatic code splitting via the Vite plugin with zero manual React.lazy() calls is a major developer experience improvement. This should reduce initial bundle size and improve startup time.


206-226: Honest assessment of back-navigation behavior loss.

Excellent that the document acknowledges this as a "slight loss" and provides a concrete mitigation strategy. The proposed useNavigateToWorkspace() helper is a pragmatic solution.


255-265: Co-location trade-off is well-reasoned.

The document correctly identifies that flat folder structure aids discoverability, but co-location provides stronger benefits for maintainability, feature deletion, and tree-shaking. The justification aligns with repo conventions.


269-284: Verdict is balanced and well-supported.

The summary correctly identifies that most "losses" are pattern differences rather than functional limitations. The list of wins being cleaned up is compelling.


1-8: Documentation structure is clear and well-organized.

The document provides a focused analysis complementing the detailed plan. The status, date, and cross-reference to the related plan document are helpful.

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

🤖 Fix all issues with AI agents
In @apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md:
- Around line 54-59: Update the docs example to match the real plugin usage by
replacing the pseudo-call TanStackRouterVite({ autoCodeSplitting: true }) with
the actual tanstackRouter() invocation and include all required options: pass
target, routesDirectory, generatedRouteTree, indexToken, routeToken, and
autoCodeSplitting as shown in the real electron.vite.config.ts usage (use the
same option names and values as in the file’s tanstackRouter(...) call on lines
141-148).
- Around line 305-306: Update the ROUTING_REFACTOR_ANALYSIS.md to reflect the
revised effort and risk assessment: change the estimated effort from "8-13
hours" to "9-15 hours (per ROUTING_REFACTOR_PLAN.md)" and note the expanded
TasksView scope (40+ files) and ~121 navigation call sites; increase Phase 7
testing allocation from "1-2 hours" to a larger window (suggest 3-5 hours) to
cover auth/authorization flows, provider hierarchy, and dynamic routes; and
change the "Risk: Low" phrasing to indicate conditional low risk (e.g., "Risk:
Low if mitigations in ROUTING_REFACTOR_PLAN.md are followed") so the analysis
explicitly ties low risk to the documented mitigations.
- Around line 289-306: Consolidate the duplicated text blocks into a single,
non-redundant section: remove the repeated paragraph so the doc contains one
clear "Proceed with migration using TanStack Router" section that lists the
refactor benefits (deletion of app-state.ts, automatic code splitting, provider
scoping fixes, Next.js-style page.tsx/layout.tsx routing, type-safe navigation
with generated route tree, co-location per AGENTS.md, zero manual registration),
keep the "Why TanStack Router" bullets (mention indexToken and routeToken),
merge the React 19 note into one sentence recommending use of the latest
@tanstack/react-router packages and adding a short caveat about potential
metadata/hydration issues with SSR and to monitor the TanStack repo for updates,
and ensure the Estimated effort and Risk are shown once (reference
ROUTING_REFACTOR_PLAN.md for effort).

In @apps/desktop/docs/ROUTING_REFACTOR_PLAN.md:
- Around line 299-301: The doc currently contradicts itself about
electron-router-dom.ts (one section marks it deleted while another keeps it);
decide whether electron-router-dom.ts should be removed or retained, then update
the ROUTING_REFACTOR_PLAN.md to reflect that single choice: if deleting, remove
any mentions of electron-router-dom.ts from the "What Actually Stays Global" /
lib list and any references implying it remains; if keeping, remove the deletion
entry from the earlier list and add a brief note explaining why it stays. Ensure
the same filename electron-router-dom.ts appears only once with consistent
intent and a short justification.

In @apps/desktop/src/renderer/routes/page.tsx:
- Around line 7-9: The RootIndexPage component currently redirects to the wrong
path; update the Navigate target inside RootIndexPage to point to the
authenticated workspace route by replacing "/workspace" with
"/_authenticated/workspace" so the redirect matches the actual route defined in
your router.
🧹 Nitpick comments (9)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)

24-28: Potential flash of sign-in UI before redirect.

The auth check happens after the component mounts, which means if isInitialized is true but the user is authenticated, there could be a brief flash of the sign-in UI before the redirect occurs. Consider checking isInitialized from useAuth() and showing a loading state while auth is initializing.

♻️ Suggested improvement
 function SignInPage() {
-	const { session, token } = useAuth();
+	const { session, token, isInitialized } = useAuth();
 	const signInMutation = trpc.auth.signIn.useMutation();

 	useEffect(() => {
 		posthog.capture("desktop_opened");
 	}, []);

+	// Show nothing while auth is initializing to prevent flash
+	if (!isInitialized) {
+		return null;
+	}
+
 	// Redirect to workspace if already authenticated
 	const isSignedIn = !!token && !!session?.user;
 	if (isSignedIn) {
 		return <Navigate to="/workspace" replace />;
 	}
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)

17-24: Initialization tracking works correctly.

The logic properly gates children rendering until auth state is received. However, including isInitialized in the dependency array is unnecessary since we only ever set it to true once and the early !isInitialized check prevents re-execution anyway.

♻️ Minor simplification
 	// Mark as initialized once we receive the first auth state
 	useEffect(() => {
-		if (authState !== undefined && !isInitialized) {
+		if (authState !== undefined) {
 			setIsInitialized(true);
 		}
-	}, [authState, isInitialized]);
+	}, [authState]);

Since setIsInitialized(true) is idempotent (setting true when already true is a no-op in React), removing the isInitialized check and dependency simplifies the code without changing behavior.

apps/desktop/src/lib/window-loader.ts (2)

15-20: Unused query parameter.

The query parameter is defined in the function signature but never used in the function body. Either remove it if not needed, or implement query string handling if this is intended functionality.

♻️ Suggested fix if query support is not needed
 export function registerRoute(props: {
 	id: WindowId;
 	browserWindow: BrowserWindow;
 	htmlFile: string;
-	query?: Record<string, string>;
 }): void {

15-31: id parameter is defined but unused.

The id parameter of type WindowId is passed but never referenced within the function. If window-specific routing logic is planned (e.g., different routes for "main" vs "about"), implement it; otherwise, consider removing the unused parameter.

apps/desktop/src/renderer/index.tsx (1)

16-24: Router setup looks correct for Electron.

The hash history approach is appropriate for Electron's file:// protocol, and the module augmentation follows TanStack Router's recommended pattern.

However, the type cast on line 22 (hashHistory as RouterHistory) appears unnecessary since createHashHistory() already returns a RouterHistory compatible type.

♻️ Optional: Remove unnecessary type cast
 const router = createRouter({
 	routeTree,
-	history: hashHistory as RouterHistory,
+	history: hashHistory,
 	defaultPreload: "intent",
 });

And remove the unused RouterHistory type import if no longer needed.

apps/desktop/docs/ROUTING_REFACTOR_PLAN.md (2)

54-54: Consider adding language specifiers to code blocks.

Several code blocks are missing language identifiers which helps with syntax highlighting and linting:

  • Line 54: folder structure (use txt or plaintext)
  • Line 321: layout hierarchy (use txt or plaintext)
  • Line 545: file structure (use txt or plaintext)
  • Line 917: gitignore snippet (use gitignore or txt)

Also applies to: 321-321, 545-545, 917-917


137-140: Minor: Tree structure formatting issue.

The nested tree structure has a misaligned item at line 139:

 │       │       │   │   └── components/
 │       │       │   │       ├── Sidebar/
-│       │       │   │   │   └── ContentView/
+│       │       │   │       └── ContentView/
 │       │       │   └── ResizablePanel/
apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md (2)

116-129: Consider more router-integrated hotkey scoping.

While checking location.pathname.startsWith('/workspace') works, consider using TanStack Router's route matching utilities or registering hotkeys within route components themselves for better integration. This would make the route-scoping relationship more explicit and type-safe.

For example:

// In workspace route component
useAppHotkey("TOGGLE_SIDEBAR", toggleSidebar, undefined, [toggleSidebar]);

This automatically scopes hotkeys to the route lifecycle without manual path checks.


293-293: Clarify "exact Next.js conventions" claim.

While TanStack Router uses similar file-based routing conventions (page.tsx, layout.tsx), these are not exactly Next.js conventions—they're inspired by but distinct from Next.js patterns. Consider rephrasing to "Next.js-style conventions" or "similar to Next.js conventions" for accuracy.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e2d06d and 6c28ad7.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (55)
  • apps/desktop/.gitignore
  • apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/package.json
  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/lib/electron-router-dom.ts
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/contexts/AppProviders/AppProviders.tsx
  • apps/desktop/src/renderer/contexts/AppProviders/index.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/index.ts
  • apps/desktop/src/renderer/providers/MonacoProvider/MonacoProvider.tsx
  • apps/desktop/src/renderer/providers/MonacoProvider/index.ts
  • apps/desktop/src/renderer/providers/PostHogProvider/PostHogProvider.tsx
  • apps/desktop/src/renderer/providers/PostHogProvider/index.ts
  • apps/desktop/src/renderer/providers/TRPCProvider/TRPCProvider.tsx
  • apps/desktop/src/renderer/providers/TRPCProvider/index.ts
  • apps/desktop/src/renderer/routes.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/CollectionsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/components/SupersetLogo/SupersetLogo.tsx
  • apps/desktop/src/renderer/routes/sign-in/components/SupersetLogo/index.ts
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/shared/types/electron.ts
💤 Files with no reviewable changes (4)
  • apps/desktop/src/renderer/contexts/AppProviders/index.ts
  • apps/desktop/src/lib/electron-router-dom.ts
  • apps/desktop/src/renderer/routes.tsx
  • apps/desktop/src/renderer/contexts/AppProviders/AppProviders.tsx
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/CollectionsProvider.tsx
🧰 Additional context used
📓 Path-based instructions (7)
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc
Use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.
For tRPC subscriptions with trpc-electron, ALWAYS use the observable pattern from @trpc/server/observable instead of async generators, as the library explicitly checks isObservable(result) and throws an error otherwise

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use object parameters for functions with 2+ parameters instead of positional arguments
Functions with 2+ parameters should accept a single params object with named properties for self-documentation and extensibility
Use prefixed console logging with context pattern: [domain/operation] message
Extract magic numbers and hardcoded values to named constants at module top
Use lookup objects/maps instead of repeated if (type === ...) conditionals
Avoid using any type - maintain type safety in TypeScript code
Never swallow errors silently - at minimum log them with context
Import from concrete files directly when possible - avoid barrel file abuse that creates circular dependencies
Avoid deep nesting (4+ levels) - use early returns, extract functions, and invert conditions
Use named properties in options objects instead of boolean parameters to avoid boolean blindness

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Drizzle ORM for all database operations - never use raw SQL

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome for formatting and linting - run at root level with bun run lint:fix or biome check --write

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Files:

  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

One component per file - do not create multi-component files

Files:

  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
apps/desktop/src/lib/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules in shared code like electron-router-dom.ts - it runs in both main and renderer processes

Files:

  • apps/desktop/src/lib/window-loader.ts
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/electron-router-dom.ts : Do not import Node.js modules like node:path or dotenv in electron-router-dom.ts and similar shared files - they run in both main and renderer processes
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/electron-router-dom.ts : Do not import Node.js modules like node:path or dotenv in electron-router-dom.ts and similar shared files - they run in both main and renderer processes

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/package.json
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/.gitignore
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/*.ts : Never import Node.js modules in shared code like electron-router-dom.ts - it runs in both main and renderer processes

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/package.json
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
  • apps/desktop/src/shared/types/electron.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/shared/types/electron.ts
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : For Electron interprocess communication, ALWAYS use tRPC as defined in `src/lib/trpc`

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/main/index.ts : Load environment variables from monorepo root .env in desktop app with override: true before any imports in src/main/index.ts and electron.vite.config.ts

Applied to files:

  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/electron.vite.config.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/**/[A-Z]*.tsx : Create component folder structure with one folder per component: ComponentName/ComponentName.tsx with barrel export index.ts

Applied to files:

  • apps/desktop/src/renderer/routes/page.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/{ui,ai-elements,react-flow}/*.tsx : Use kebab-case single files for shadcn/ui components (e.g., button.tsx, base-node.tsx) in src/components/ui/, src/components/ai-elements, and src/components/react-flow/

Applied to files:

  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/**/*.{ts,tsx} : Co-locate component dependencies: utils, hooks, constants, config, tests, stories in the same folder as the component using them

Applied to files:

  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use Biome for formatting and linting - run at root level with `bun run lint:fix` or `biome check --write`

Applied to files:

  • apps/desktop/.gitignore
🧬 Code graph analysis (14)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (8)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (6)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/lib/window-loader.ts (1)
apps/desktop/src/shared/constants.ts (1)
  • PORTS (11-16)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (4)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
  • useAuth (44-50)
apps/desktop/src/renderer/lib/dnd.ts (1)
  • dragDropManager (5-5)
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/CollectionsProvider.tsx (1)
  • CollectionsProvider (9-38)
apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx (1)
  • OrganizationsProvider (23-49)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (11)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/page.tsx (13)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (5)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/__root.tsx (2)
apps/desktop/src/renderer/routes/not-found.tsx (1)
  • NotFound (3-29)
apps/desktop/src/renderer/routes/layout.tsx (1)
  • RootLayout (9-23)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (2)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
apps/api/src/trpc/context.ts (1)
  • createContext (4-14)
apps/desktop/src/renderer/routes/layout.tsx (4)
apps/desktop/src/renderer/providers/PostHogProvider/PostHogProvider.tsx (1)
  • PostHogProvider (10-24)
apps/desktop/src/renderer/providers/TRPCProvider/TRPCProvider.tsx (1)
  • TRPCProvider (6-28)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
  • AuthProvider (15-42)
apps/desktop/src/renderer/providers/MonacoProvider/MonacoProvider.tsx (1)
  • MonacoProvider (73-105)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (5)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (7)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/sign-in/page.tsx (2)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
  • useAuth (44-50)
🪛 LanguageTool
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md

[style] ~286-~286: In American English, abbreviations like “etc.” require a period.
Context: ...ar, WorkspaceSidebar, WorkspaceContent, etc** → `routes/_authenticated/workspace/$i...

(ETC_PERIOD)

🪛 markdownlint-cli2 (0.18.1)
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md

54-54: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


321-321: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


545-545: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


917-917: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


925-925: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

@saddlepaddle saddlepaddle changed the title Router Refactor Router Refactor Part One Jan 13, 2026

@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 @apps/desktop/package.json:
- Line 53: The @tanstack/react-router and @tanstack/router-plugin versions must
match; update the @tanstack/react-router entry to the same major.minor range as
@tanstack/router-plugin (e.g., set @tanstack/react-router to ^1.149.0) so the
peerDependency ranges overlap, and also update any other @tanstack/react-router
occurrence noted (the second mention) to the same version to keep both packages
aligned.

In @apps/desktop/src/lib/window-loader.ts:
- Around line 1-3: Move the main-process-specific file window-loader.ts out of
apps/desktop/src/lib/ into apps/desktop/src/main/lib/ because it imports and
orchestrates BrowserWindow (BrowserWindow.loadURL/loadFile) and belongs with
other main utilities like sentry.ts and agent-setup.ts; after relocating, update
any imports of window-loader (e.g., in main process entry points) to the new
path, adjust any relative paths inside the moved file if necessary, and ensure
your tsconfig/exports (or barrel files) include the new location so the build
and linter no longer treat it as shared code.
🧹 Nitpick comments (7)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)

1-10: LGTM! Clean index route redirect.

The implementation correctly redirects the settings index to the account page using Navigate with replace. This follows the pattern established by other route files in the codebase.

Optional: TanStack Router supports route-level redirects via beforeLoad, which prevents the component from rendering entirely:

♻️ Alternative using beforeLoad redirect
-import { Navigate, createFileRoute } from "@tanstack/react-router";
+import { createFileRoute, redirect } from "@tanstack/react-router";

 export const Route = createFileRoute("/_authenticated/settings/")({
-	component: SettingsPage,
+	beforeLoad: () => {
+		throw redirect({ to: "/settings/account", replace: true });
+	},
 });
-
-function SettingsPage() {
-	// Redirect to account settings by default
-	return <Navigate to="/settings/account" replace />;
-}
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)

17-24: Initialization tracking logic is correct.

The pattern correctly gates children rendering until the first auth state arrives from the subscription.

Minor observation: isInitialized in the dependency array is technically unnecessary since the !isInitialized guard prevents re-triggering once set. This is harmless but could be simplified:

Optional: Simplify dependency array
 	useEffect(() => {
 		if (authState !== undefined && !isInitialized) {
 			setIsInitialized(true);
 		}
-	}, [authState, isInitialized]);
+	}, [authState]);

The isInitialized check inside the effect body already prevents redundant updates, so it doesn't need to be a dependency.

apps/desktop/src/lib/window-loader.ts (1)

15-31: Unused parameters: id and query are never used.

The id and query parameters are defined in the function signature but never utilized in the implementation. If these are intended for future use, consider documenting that intent. Otherwise, they should be removed to avoid confusion.

🔧 If these parameters are not needed, consider removing them
 export function registerRoute(props: {
-	id: WindowId;
 	browserWindow: BrowserWindow;
 	htmlFile: string;
-	query?: Record<string, string>;
 }): void {

Or if query should append query params to the URL:

 export function registerRoute(props: {
 	id: WindowId;
 	browserWindow: BrowserWindow;
 	htmlFile: string;
 	query?: Record<string, string>;
 }): void {
 	const isDev = env.NODE_ENV === "development";
+	const queryString = props.query
+		? `?${new URLSearchParams(props.query).toString()}`
+		: "";

 	if (isDev) {
-		const url = `http://localhost:${PORTS.VITE_DEV_SERVER}/#/`;
+		const url = `http://localhost:${PORTS.VITE_DEV_SERVER}/${queryString}#/`;
 		props.browserWindow.loadURL(url);
 	} else {
-		props.browserWindow.loadFile(props.htmlFile, { hash: "/" });
+		props.browserWindow.loadFile(props.htmlFile, { 
+			hash: "/",
+			query: props.query,
+		});
 	}
 }
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md (2)

54-54: Add language specifier to fenced code block.

Per static analysis, this code block should have a language specified for proper syntax highlighting.

🔧 Add language specifier

Change line 54 from:

```

to:

```text

or if it's a directory structure:

```

→

```plaintext

361-407: Note: Example differs from actual implementation.

The example index.tsx (lines 363-407) shows providers like PostHogProvider, TRPCProvider, MonacoProvider, and DndProvider wrapping RouterProvider. However, the actual index.tsx implementation only renders RouterProvider directly. This is fine if providers moved to route layouts, but consider updating the example to match the actual pattern for consistency.

apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md (1)

219-225: Good mitigation for the "back to workspace" behavior change.

The suggested useNavigateToWorkspace helper is a clean solution. Consider implementing this helper as part of this PR if the "always back to workspace" behavior is desired, rather than leaving it as a TODO.

Would you like me to generate a complete implementation of this helper hook that could be added to the codebase?

apps/desktop/src/renderer/index.tsx (1)

16-22: Remove unnecessary type cast – createHashHistory() already satisfies RouterHistory type.

The cast as RouterHistory is redundant. TanStack Router's type definitions confirm that createHashHistory() returns a type directly compatible with the router's history option. Removing the cast simplifies the code without sacrificing type safety.

🔧 Remove the cast
 const hashHistory = createHashHistory();

 const router = createRouter({
 	routeTree,
-	history: hashHistory as RouterHistory,
+	history: hashHistory,
 	defaultPreload: "intent",
 });
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c28ad7 and 4a34bc4.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (55)
  • apps/desktop/.gitignore
  • apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/package.json
  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/lib/electron-router-dom.ts
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/contexts/AppProviders/AppProviders.tsx
  • apps/desktop/src/renderer/contexts/AppProviders/index.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/index.ts
  • apps/desktop/src/renderer/providers/MonacoProvider/MonacoProvider.tsx
  • apps/desktop/src/renderer/providers/MonacoProvider/index.ts
  • apps/desktop/src/renderer/providers/PostHogProvider/PostHogProvider.tsx
  • apps/desktop/src/renderer/providers/PostHogProvider/index.ts
  • apps/desktop/src/renderer/providers/TRPCProvider/TRPCProvider.tsx
  • apps/desktop/src/renderer/providers/TRPCProvider/index.ts
  • apps/desktop/src/renderer/routes.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/CollectionsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/components/SupersetLogo/SupersetLogo.tsx
  • apps/desktop/src/renderer/routes/sign-in/components/SupersetLogo/index.ts
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/shared/types/electron.ts
💤 Files with no reviewable changes (4)
  • apps/desktop/src/renderer/contexts/AppProviders/index.ts
  • apps/desktop/src/renderer/contexts/AppProviders/AppProviders.tsx
  • apps/desktop/src/renderer/routes.tsx
  • apps/desktop/src/lib/electron-router-dom.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/src/renderer/routes/__root.tsx
🚧 Files skipped from review as they are similar to previous changes (20)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/CollectionsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/components/TasksTableView/components/TaskContextMenu/TaskContextMenu.tsx
  • apps/desktop/src/renderer/screens/main/components/SettingsView/TeamSettings/TeamSettings.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/StatusCell/StatusCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/PriorityCell/PriorityCell.tsx
  • apps/desktop/src/renderer/routes/not-found.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/components/AssigneeCell/AssigneeCell.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/ChangesContent/components/DiffViewer/DiffViewer.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/TabView/FileViewerPane/components/FileViewerContent/FileViewerContent.tsx
  • apps/desktop/.gitignore
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
🧰 Additional context used
📓 Path-based instructions (7)
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc
Use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.
For tRPC subscriptions with trpc-electron, ALWAYS use the observable pattern from @trpc/server/observable instead of async generators, as the library explicitly checks isObservable(result) and throws an error otherwise

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use object parameters for functions with 2+ parameters instead of positional arguments
Functions with 2+ parameters should accept a single params object with named properties for self-documentation and extensibility
Use prefixed console logging with context pattern: [domain/operation] message
Extract magic numbers and hardcoded values to named constants at module top
Use lookup objects/maps instead of repeated if (type === ...) conditionals
Avoid using any type - maintain type safety in TypeScript code
Never swallow errors silently - at minimum log them with context
Import from concrete files directly when possible - avoid barrel file abuse that creates circular dependencies
Avoid deep nesting (4+ levels) - use early returns, extract functions, and invert conditions
Use named properties in options objects instead of boolean parameters to avoid boolean blindness

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Drizzle ORM for all database operations - never use raw SQL

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome for formatting and linting - run at root level with bun run lint:fix or biome check --write

Files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Files:

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

One component per file - do not create multi-component files

Files:

  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx
  • apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx
  • apps/desktop/src/renderer/routes/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
apps/desktop/src/lib/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules in shared code like electron-router-dom.ts - it runs in both main and renderer processes

Files:

  • apps/desktop/src/lib/window-loader.ts
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/electron-router-dom.ts : Do not import Node.js modules like node:path or dotenv in electron-router-dom.ts and similar shared files - they run in both main and renderer processes
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/electron-router-dom.ts : Do not import Node.js modules like node:path or dotenv in electron-router-dom.ts and similar shared files - they run in both main and renderer processes

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/package.json
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
  • apps/desktop/src/renderer/routes/page.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/*.ts : Never import Node.js modules in shared code like electron-router-dom.ts - it runs in both main and renderer processes

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/package.json
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/lib/window-loader.ts
  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : For Electron interprocess communication, ALWAYS use tRPC as defined in `src/lib/trpc`

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/shared/types/electron.ts
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Applied to files:

  • apps/desktop/src/lib/electron-app/factories/windows/create.ts
  • apps/desktop/src/shared/types/electron.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.

Applied to files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/{ui,ai-elements,react-flow}/*.tsx : Use kebab-case single files for shadcn/ui components (e.g., button.tsx, base-node.tsx) in src/components/ui/, src/components/ai-elements, and src/components/react-flow/

Applied to files:

  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/screens/main/index.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/*/src/components/**/[A-Z]*.tsx : Create component folder structure with one folder per component: ComponentName/ComponentName.tsx with barrel export index.ts

Applied to files:

  • apps/desktop/src/renderer/index.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/main/index.ts : Load environment variables from monorepo root .env in desktop app with override: true before any imports in src/main/index.ts and electron.vite.config.ts

Applied to files:

  • apps/desktop/src/lib/window-loader.ts
📚 Learning: 2025-11-24T21:32:21.725Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/CLAUDE.md:0-0
Timestamp: 2025-11-24T21:32:21.725Z
Learning: Applies to apps/desktop/**/AGENTS.md : Document agent responsibilities, capabilities, and interaction patterns in AGENTS.md

Applied to files:

  • apps/desktop/docs/ROUTING_REFACTOR_PLAN.md
🧬 Code graph analysis (8)
apps/desktop/src/renderer/routes/layout.tsx (4)
apps/desktop/src/renderer/providers/PostHogProvider/PostHogProvider.tsx (1)
  • PostHogProvider (10-24)
apps/desktop/src/renderer/providers/TRPCProvider/TRPCProvider.tsx (1)
  • TRPCProvider (6-28)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
  • AuthProvider (15-42)
apps/desktop/src/renderer/providers/MonacoProvider/MonacoProvider.tsx (1)
  • MonacoProvider (73-105)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (11)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
apps/api/src/trpc/context.ts (1)
  • createContext (4-14)
apps/desktop/src/renderer/screens/main/index.tsx (3)
apps/desktop/src/renderer/lib/trpc.ts (1)
  • trpc (5-5)
apps/desktop/src/renderer/screens/main/components/Background.tsx (1)
  • Background (1-39)
apps/desktop/src/renderer/screens/main/components/AppFrame.tsx (1)
  • AppFrame (5-7)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (7)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/lib/window-loader.ts (1)
apps/desktop/src/shared/constants.ts (1)
  • PORTS (11-16)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
  • useAuth (44-50)
apps/desktop/src/renderer/routes/page.tsx (13)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)
  • Route (3-5)
🪛 LanguageTool
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md

[style] ~286-~286: In American English, abbreviations like “etc.” require a period.
Context: ...ar, WorkspaceSidebar, WorkspaceContent, etc** → `routes/_authenticated/workspace/$i...

(ETC_PERIOD)

🪛 markdownlint-cli2 (0.18.1)
apps/desktop/docs/ROUTING_REFACTOR_PLAN.md

54-54: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


321-321: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


545-545: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


917-917: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


925-925: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Web
  • GitHub Check: Build
🔇 Additional comments (17)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)

1-10: LGTM!

The route file follows TanStack Router conventions correctly, uses the proper alias import, and adheres to the one-component-per-file guideline.

Minor style note: Consider moving the WorkspacePage function definition above the Route export for top-down readability, though hoisting makes the current order functionally correct.

apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (1)

1-14: LGTM!

The route file correctly follows the TanStack Router file-based routing pattern with the createFileRoute API and exported Route constant. The component structure is clean and compliant with the one-component-per-file guideline.

apps/desktop/src/renderer/routes/_authenticated/providers/OrganizationsProvider/OrganizationsProvider.tsx (1)

34-42: Error handling aligns with router refactor.

The error logging correctly follows the [domain/operation] message pattern per coding guidelines. Since auth handling is now delegated to the _authenticated layout route guard, removing the SignInScreen redirect here is appropriate.

Consider whether a retry mechanism or more actionable error state would improve UX for non-auth errors (e.g., network failures).

apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)

1-14: LGTM - Route structure follows established pattern.

The file correctly implements TanStack Router's file-based routing pattern, matching other settings pages (account, keyboard, behavior, etc.). The component co-location with the route definition is the expected pattern for this router.

Note: This is currently a placeholder. Consider adding a TODO comment or tracking issue to implement the actual appearance settings functionality.

apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)

32-39: Loading state correctly blocks rendering until auth is ready.

The full-screen spinner appropriately prevents children from rendering before the auth state is available, which aligns with the new route-based authentication gating.

apps/desktop/src/renderer/screens/main/components/TasksView/hooks/useTasksTable/useTasksTable.tsx (1)

23-23: Import path correctly updated to align with route-based provider structure.

The import of useCollections from renderer/routes/_authenticated/providers/CollectionsProvider is correct. The CollectionsProvider module exists at the new location and properly exports useCollections through its index file. The change follows the project's aliasing guidelines and maintains proper encapsulation.

apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/components/EditorContextMenu/editor-actions.ts (1)

2-2: Approve import path change; fix function parameter pattern.

The import path correctly reflects the MonacoProvider relocation from contexts/ to providers/, and the renderer alias properly resolves via tsconfig.json.

However, registerCopyPathLineAction has 2+ parameters and should use an object parameter instead of positional arguments per coding guidelines:

export function registerCopyPathLineAction({
	editor,
	filePath,
}: {
	editor: Monaco.editor.IStandaloneCodeEditor;
	filePath: string;
}) {
	// ...
}
⛔ Skipped due to learnings
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.{ts,tsx} : Use object parameters for functions with 2+ parameters instead of positional arguments
apps/desktop/src/lib/electron-app/factories/windows/create.ts (1)

3-3: LGTM!

Import source correctly updated from the removed electron-router-dom to the new window-loader module. The registerRoute usage remains consistent.

apps/desktop/src/shared/types/electron.ts (1)

1-1: LGTM!

Type-only import correctly updated to reference the new window-loader module. Since this is a type import (import type), it doesn't introduce any runtime Node.js module dependencies in shared code.

apps/desktop/src/renderer/screens/main/index.tsx (2)

90-90: Auth-gated query behavior is correct. The trpc.workspaces.getActive.useQuery() call without an enabled option is appropriate because MainScreen is only rendered within the /_authenticated/workspace route, which enforces authentication at the layout level before the component is mounted. The DndProvider has been properly moved to the /_authenticated/layout.tsx and now wraps the <Outlet />.


288-295: DndProvider is correctly provided at a higher level and the removal from these branches is appropriate.

DndProvider is now properly scoped to the authenticated layout (apps/desktop/src/renderer/routes/_authenticated/layout.tsx), which wraps only the components that need drag-and-drop functionality (specifically WorkspaceListItem in the sidebar). Removing it from the loading, error, and main render branches eliminates unnecessary nesting without impacting functionality.

apps/desktop/src/renderer/routes/page.tsx (1)

7-9: The redirect to /workspace is correctly configured. In TanStack Router, the /_authenticated layout route is pathless (underscore prefix), so /_authenticated/workspace/ resolves to /workspace in the URL. The redirect properly navigates to the authenticated workspace page.

apps/desktop/src/renderer/routes/sign-in/page.tsx (2)

12-28: LGTM! Clean TanStack Router integration with proper auth gating.

The route setup correctly uses createFileRoute with the sign-in path, and the authentication redirect logic properly checks both token and session?.user before redirecting to /workspace. The Navigate component with replace is the idiomatic TanStack Router pattern for conditional redirects.


30-33: LGTM!

The sign-in handler properly captures analytics and triggers the mutation with the selected provider.

apps/desktop/docs/ROUTING_REFACTOR_PLAN.md (1)

1-6: Well-structured migration plan with clear acceptance criteria.

The document provides comprehensive guidance for the TanStack Router migration, including folder structure, co-location rules, example implementations, and a phased migration approach. The acceptance criteria and risk register are particularly helpful for tracking progress.

apps/desktop/docs/ROUTING_REFACTOR_ANALYSIS.md (1)

1-9: Excellent analysis document with balanced pros/cons evaluation.

The document provides concrete, code-referenced analysis of the migration benefits and tradeoffs. The acknowledgment of losses (like back navigation behavior changes) with proposed mitigations demonstrates thoughtful planning.

apps/desktop/src/renderer/index.tsx (1)

30-32: Provider composition is correctly placed in the route tree.

All global providers (TRPCProvider, PostHogProvider, AuthProvider, MonacoProvider) are initialized in RootLayout at apps/desktop/src/renderer/routes/layout.tsx, and route-specific providers (DndProvider, CollectionsProvider, OrganizationsProvider) are in the _authenticated layout. The entry point appropriately renders only RouterProvider, delegating provider composition to the route hierarchy.

Comment thread apps/desktop/package.json
"@tanstack/electric-db-collection": "^0.2.20",
"@tanstack/react-db": "^0.1.60",
"@tanstack/react-query": "^5.90.10",
"@tanstack/react-router": "^1.147.3",

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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

TanStack router-plugin @tanstack/react-router version compatibility requirements

💡 Result:

Short answer — router-plugin must match the same major/minor router release and your bundler versions:

  • @tanstack/router-plugin lists @tanstack/react-router as a peerDependency and expects the matching router version (e.g. package.json shows "@tanstack/react-router": "^1.132.47"). [1]
  • Other peer requirements: vite (>=5.0.0 || >=6.0.0 || >=7.0.0), webpack (>=5.92.0), and @rsbuild/core (>=1.0.2) are declared as peers (some optional). Node engine >=12. [1]
  • Official docs show the plugin is intended for file-based routing with Vite/webpack/rspack/rspack and instruct installing @tanstack/router-plugin alongside @tanstack/react-router. [2][3]

If you tell me the exact plugin version you plan to use I can show the exact peerDependency line from that release.

Sources: package.json for @tanstack/router-plugin (UNPKG). [1] TanStack Router docs (installation / Vite). [2][3]


Align @tanstack/react-router and @tanstack/router-plugin versions.

The @tanstack/react-router version ^1.147.3 and @tanstack/router-plugin version ^1.149.0 are incompatible. The router-plugin declares react-router as a peerDependency and expects matching major.minor versions. The caret ranges specified here do not overlap—react-router allows up to 1.147.x while router-plugin requires 1.149.0+. Both packages must use the same major.minor release (e.g., both ^1.149.x or both ^1.147.x).

Also applies to: 131-131

🤖 Prompt for AI Agents
In @apps/desktop/package.json at line 53, The @tanstack/react-router and
@tanstack/router-plugin versions must match; update the @tanstack/react-router
entry to the same major.minor range as @tanstack/router-plugin (e.g., set
@tanstack/react-router to ^1.149.0) so the peerDependency ranges overlap, and
also update any other @tanstack/react-router occurrence noted (the second
mention) to the same version to keep both packages aligned.

Comment on lines +1 to +3
import type { BrowserWindow } from "electron";
import { PORTS } from "shared/constants";
import { env } from "shared/env.shared";

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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read the full window-loader.ts file to understand what it does
echo "=== Content of window-loader.ts ==="
cat -n apps/desktop/src/lib/window-loader.ts

echo -e "\n=== Checking where window-loader.ts is imported ==="
rg -n "window-loader" apps/desktop --type ts --type tsx

echo -e "\n=== Checking the structure of src/lib ==="
ls -la apps/desktop/src/lib/

echo -e "\n=== Checking if similar files exist in src/main ==="
ls -la apps/desktop/src/main/ 2>/dev/null || echo "src/main directory not found or empty"

Repository: superset-sh/superset

Length of output: 2291


🏁 Script executed:

#!/bin/bash
# Try different search patterns for the registerRoute function
echo "=== Searching for registerRoute function calls ==="
rg -n "registerRoute" apps/desktop --type ts

echo -e "\n=== Searching for any imports from window-loader ==="
rg -rn "window-loader\|registerRoute" apps/desktop

echo -e "\n=== Check if this file is new in the current PR ==="
git -C apps/desktop log --oneline window-loader.ts 2>/dev/null | head -5 || echo "File may be new"

echo -e "\n=== Examine src/main/index.ts to see main process initialization ==="
head -50 apps/desktop/src/main/index.ts

Repository: superset-sh/superset

Length of output: 2520


Move this file to src/main/lib/ instead of src/lib/.

The window-loader.ts file is main-process-specific code (it orchestrates BrowserWindow.loadURL() and BrowserWindow.loadFile()), yet it's located in src/lib/ which should contain shared code. The codebase already has src/main/lib/ for main-process utilities (see sentry.ts, agent-setup.ts, etc.). Moving this file there aligns with the architectural separation and the coding guideline that files in src/lib/*.ts should not import main-process-specific Electron modules.

🤖 Prompt for AI Agents
In @apps/desktop/src/lib/window-loader.ts around lines 1 - 3, Move the
main-process-specific file window-loader.ts out of apps/desktop/src/lib/ into
apps/desktop/src/main/lib/ because it imports and orchestrates BrowserWindow
(BrowserWindow.loadURL/loadFile) and belongs with other main utilities like
sentry.ts and agent-setup.ts; after relocating, update any imports of
window-loader (e.g., in main process entry points) to the new path, adjust any
relative paths inside the moved file if necessary, and ensure your
tsconfig/exports (or barrel files) include the new location so the build and
linter no longer treat it as shared code.

@github-actions

github-actions Bot commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app

Thank you for your contribution! 🎉

- Install @tanstack/router-cli to generate routes in CI
- Add tsr.config.json matching Vite plugin settings
- Add pretypecheck script to generate routes before typecheck
- Fixes CI typecheck failing on missing routeTree.gen.ts

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

🧹 Nitpick comments (3)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)

3-14: Consider extracting BehaviorSettingsPage to a separate file.

Per the coding guidelines ("One component per file"), the BehaviorSettingsPage component should be in its own file (e.g., BehaviorSettingsPage.tsx) and imported here. This also aligns with the pattern suggested by the AI summary which expects a separate component file.

♻️ Suggested refactor

Create BehaviorSettingsPage.tsx:

export function BehaviorSettingsPage() {
	return (
		<div>
			<h2>Behavior Settings</h2>
			<p>Behavior settings placeholder</p>
		</div>
	);
}

Update page.tsx:

 import { createFileRoute } from "@tanstack/react-router";
+import { BehaviorSettingsPage } from "./BehaviorSettingsPage";

 export const Route = createFileRoute("/_authenticated/settings/behavior/")({
 	component: BehaviorSettingsPage,
 });
-
-function BehaviorSettingsPage() {
-	return (
-		<div>
-			<h2>Behavior Settings</h2>
-			<p>Behavior settings placeholder</p>
-		</div>
-	);
-}
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)

16-28: Consider gating the posthog event behind the auth check.

The useEffect capturing "desktop_opened" will fire even when the user is already authenticated and immediately redirected to /workspace. This may inflate the metric with unintended events when users re-visit the sign-in route while already signed in.

Suggested refactor
 function SignInPage() {
 	const { session, token } = useAuth();
 	const signInMutation = trpc.auth.signIn.useMutation();

-	useEffect(() => {
-		posthog.capture("desktop_opened");
-	}, []);
-
 	// Redirect to workspace if already authenticated
 	const isSignedIn = !!token && !!session?.user;
 	if (isSignedIn) {
 		return <Navigate to="/workspace" replace />;
 	}
+
+	useEffect(() => {
+		posthog.capture("desktop_opened");
+	}, []);

Alternatively, if the intent is to always capture this event on the sign-in page, you could wrap it in a condition:

useEffect(() => {
	if (!isSignedIn) {
		posthog.capture("desktop_opened");
	}
}, [isSignedIn]);
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)

26-30: Consider simplifying the effect dependencies.

The isInitialized dependency causes an extra effect execution after the state changes, though it's functionally harmless. You can simplify by removing it from the dependency array since setIsInitialized(true) is idempotent—React bails out when the new state equals the current state.

♻️ Suggested simplification
 	// Mark as initialized once we receive the first auth state
 	useEffect(() => {
-		if (authState !== undefined && !isInitialized) {
+		if (authState !== undefined) {
 			setIsInitialized(true);
 		}
-	}, [authState, isInitialized]);
+	}, [authState]);
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a34bc4 and e9b83c7.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/package.json
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/tsr.config.json
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/tsr.config.json
🚧 Files skipped from review as they are similar to previous changes (13)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceSidebarHeader/OrganizationDropdown.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx
  • apps/desktop/src/renderer/routes/layout.tsx
  • apps/desktop/src/renderer/routes/_authenticated/layout.tsx
  • apps/desktop/src/renderer/routes/__root.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts
  • apps/desktop/src/renderer/index.tsx
  • apps/desktop/electron.vite.config.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx
🧰 Additional context used
📓 Path-based instructions (6)
apps/desktop/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)

apps/desktop/**/*.{ts,tsx}: For Electron interprocess communication, ALWAYS use tRPC as defined in src/lib/trpc
Use alias as defined in tsconfig.json when possible
Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.
For tRPC subscriptions with trpc-electron, ALWAYS use the observable pattern from @trpc/server/observable instead of async generators, as the library explicitly checks isObservable(result) and throws an error otherwise

Files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use object parameters for functions with 2+ parameters instead of positional arguments
Functions with 2+ parameters should accept a single params object with named properties for self-documentation and extensibility
Use prefixed console logging with context pattern: [domain/operation] message
Extract magic numbers and hardcoded values to named constants at module top
Use lookup objects/maps instead of repeated if (type === ...) conditionals
Avoid using any type - maintain type safety in TypeScript code
Never swallow errors silently - at minimum log them with context
Import from concrete files directly when possible - avoid barrel file abuse that creates circular dependencies
Avoid deep nesting (4+ levels) - use early returns, extract functions, and invert conditions
Use named properties in options objects instead of boolean parameters to avoid boolean blindness

Files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
apps/desktop/src/renderer/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

One component per file - do not create multi-component files

Files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
apps/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Drizzle ORM for all database operations - never use raw SQL

Files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use Biome for formatting and linting - run at root level with bun run lint:fix or biome check --write

Files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx
  • apps/desktop/src/renderer/routes/sign-in/page.tsx
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/electron-router-dom.ts : Do not import Node.js modules like node:path or dotenv in electron-router-dom.ts and similar shared files - they run in both main and renderer processes
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : Prefer zustand for state management if it makes sense. Do not use effect unless absolutely necessary.

Applied to files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/electron-router-dom.ts : Do not import Node.js modules like node:path or dotenv in electron-router-dom.ts and similar shared files - they run in both main and renderer processes

Applied to files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
  • apps/desktop/package.json
📚 Learning: 2025-12-21T04:39:28.543Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/AGENTS.md:0-0
Timestamp: 2025-12-21T04:39:28.543Z
Learning: Applies to apps/desktop/**/*.{ts,tsx} : For Electron interprocess communication, ALWAYS use tRPC as defined in `src/lib/trpc`

Applied to files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/renderer/**/*.{ts,tsx} : Never import Node.js modules (fs, path, os, net) in renderer process or shared code - they are externalized for browser compatibility

Applied to files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to apps/desktop/src/lib/*.ts : Never import Node.js modules in shared code like electron-router-dom.ts - it runs in both main and renderer processes

Applied to files:

  • apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx
📚 Learning: 2026-01-02T06:50:28.671Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-02T06:50:28.671Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use Biome for formatting and linting - run at root level with `bun run lint:fix` or `biome check --write`

Applied to files:

  • apps/desktop/package.json
🧬 Code graph analysis (4)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
apps/api/src/trpc/context.ts (1)
  • createContext (4-14)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (13)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/behavior/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/keyboard/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/presets/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/workspace/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (7)
apps/desktop/src/renderer/routes/_authenticated/layout.tsx (1)
  • Route (8-10)
apps/desktop/src/renderer/routes/_authenticated/settings/account/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/settings/appearance/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/sign-in/page.tsx (1)
  • Route (12-14)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/routes/sign-in/page.tsx (4)
apps/desktop/src/renderer/routes/__root.tsx (1)
  • Route (5-8)
apps/desktop/src/renderer/routes/_authenticated/workspace/page.tsx (1)
  • Route (4-6)
apps/desktop/src/renderer/routes/page.tsx (1)
  • Route (3-5)
apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (1)
  • useAuth (50-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy Docs
  • GitHub Check: Build
🔇 Additional comments (9)
apps/desktop/src/renderer/routes/_authenticated/tasks/page.tsx (1)

1-14: LGTM!

The route definition follows the established TanStack Router file-based route pattern used consistently across the codebase (matching workspace/page.tsx, workspaces/page.tsx, settings/*/page.tsx, etc.). The single-component-per-file guideline is respected, and no Node.js modules are imported in this renderer code.

apps/desktop/src/renderer/routes/_authenticated/workspaces/page.tsx (1)

1-14: LGTM!

The route definition and component follow the established TanStack Router file-based routing pattern used consistently across other authenticated routes in the codebase. The structure correctly exports the Route constant and defines a co-located page component.

apps/desktop/src/renderer/routes/sign-in/page.tsx (2)

3-3: Route configuration follows the established pattern.

The imports and route definition align with other file-based routes in the codebase (e.g., page.tsx at root and _authenticated/workspace/page.tsx). The trailing slash in the route path is consistent with the project's convention.

Also applies to: 9-9, 12-14


30-99: Sign-in UI preserved correctly.

The existing sign-in mutation flow using tRPC (trpc.auth.signIn.useMutation) and the posthog event tracking in signIn handler are appropriately maintained. The UI structure and styling remain intact.

apps/desktop/src/renderer/providers/AuthProvider/AuthProvider.tsx (3)

1-9: LGTM!

Imports are clean with no Node.js modules (compliant with renderer process guidelines), and tRPC is correctly used for auth state subscription as per coding guidelines.


11-19: LGTM!

Type-safe derivation from tRPC outputs and the isInitialized flag appropriately supports the route gating requirements for the TanStack Router migration.


50-56: LGTM!

Proper error handling with a descriptive message when the hook is used outside the provider context.

apps/desktop/package.json (2)

30-31: LGTM on the new scripts.

The pretypecheck hook ensures the route tree is generated before type checking, which prevents CI failures when routeTree.gen.ts doesn't exist. This is a solid pattern for working with TanStack Router's code generation.


55-55: Align TanStack Router package versions to 1.147.3.

There's a version mismatch between the TanStack Router packages:

  • @tanstack/react-router: ^1.147.3
  • @tanstack/router-cli: ^1.149.0
  • @tanstack/router-plugin: ^1.149.0

TanStack publishes these packages together and recommends keeping them at the same version to avoid unmet peer dependencies and type/runtime issues. However, the latest available version of @tanstack/react-router is 1.147.3, so align @tanstack/router-cli and @tanstack/router-plugin down to ^1.147.3 instead.

Suggested fix
- "@tanstack/router-cli": "^1.149.0",
- "@tanstack/router-plugin": "^1.149.0",
+ "@tanstack/router-cli": "^1.147.3",
+ "@tanstack/router-plugin": "^1.147.3",

This branch was previously deployed

1 inactive deployment
preview — e9b83c7f Deployed Jan 13, 2026 by saddlepaddle via Deploy Web #837
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